boards: arm: Add support for SiLabs EFR32BG13 BRD4104A board
This commit adds support for Silicon Labs BRD4104A (a.k.a. SLWRB4104A) Blue Gecko and BRD4250B (a.k.a. SLWRB4250B) Flex Gecko Radio Boards. Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
This commit is contained in:
parent
bdcfa4f375
commit
6dc7b40da9
7
boards/arm/efr32_radio/CMakeLists.txt
Normal file
7
boards/arm/efr32_radio/CMakeLists.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if(CONFIG_UART_GECKO)
|
||||
zephyr_library()
|
||||
zephyr_library_sources(board.c)
|
||||
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
|
||||
endif()
|
18
boards/arm/efr32_radio/Kconfig
Normal file
18
boards/arm/efr32_radio/Kconfig
Normal file
|
@ -0,0 +1,18 @@
|
|||
# EFR32 radio board configuration
|
||||
|
||||
# Copyright (c) 2020 Piotr Mienkowski
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_EFR32_RADIO
|
||||
bool
|
||||
|
||||
if BOARD_EFR32_RADIO
|
||||
|
||||
config BOARD_INIT_PRIORITY
|
||||
int
|
||||
default KERNEL_INIT_PRIORITY_DEFAULT
|
||||
help
|
||||
Board initialization priority. This must be bigger than
|
||||
GPIO_GECKO_COMMON_INIT_PRIORITY.
|
||||
|
||||
endif # BOARD_EFR32_RADIO
|
16
boards/arm/efr32_radio/Kconfig.board
Normal file
16
boards/arm/efr32_radio/Kconfig.board
Normal file
|
@ -0,0 +1,16 @@
|
|||
# EFR32BG13 BRD4104A board
|
||||
|
||||
# Copyright (c) 2020 Piotr Mienkowski
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_EFR32_RADIO_BRD4104A
|
||||
bool "Silicon Labs BRD4104A (Blue Gecko Radio Board)"
|
||||
depends on SOC_SERIES_EFR32BG13P
|
||||
select BOARD_EFR32_RADIO
|
||||
select SOC_PART_NUMBER_EFR32BG13P632F512GM48
|
||||
|
||||
config BOARD_EFR32_RADIO_BRD4250B
|
||||
bool "Silicon Labs BRD4250B (Flex Gecko Radio Board)"
|
||||
depends on SOC_SERIES_EFR32FG1P
|
||||
select BOARD_EFR32_RADIO
|
||||
select SOC_PART_NUMBER_EFR32FG1P133F256GM48
|
61
boards/arm/efr32_radio/Kconfig.defconfig
Normal file
61
boards/arm/efr32_radio/Kconfig.defconfig
Normal file
|
@ -0,0 +1,61 @@
|
|||
# EFR32 radio board
|
||||
|
||||
# Copyright (c) 2020 Piotr Mienkowski
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if BOARD_EFR32_RADIO
|
||||
|
||||
config BOARD
|
||||
default "efr32_radio_brd4104a" if BOARD_EFR32_RADIO_BRD4104A
|
||||
default "efr32_radio_brd4250b" if BOARD_EFR32_RADIO_BRD4250B
|
||||
|
||||
config CMU_HFXO_FREQ
|
||||
default 38400000
|
||||
|
||||
config CMU_LFXO_FREQ
|
||||
default 32768
|
||||
|
||||
if LOG_BACKEND_SWO
|
||||
|
||||
config LOG_BACKEND_SWO_FREQ_HZ
|
||||
default 875000
|
||||
|
||||
endif # LOG_BACKEND_SWO
|
||||
|
||||
if GPIO_GECKO
|
||||
|
||||
config GPIO_GECKO_PORTA
|
||||
default y
|
||||
|
||||
config GPIO_GECKO_PORTB
|
||||
default y
|
||||
|
||||
config GPIO_GECKO_PORTC
|
||||
default y
|
||||
|
||||
config GPIO_GECKO_PORTD
|
||||
default y
|
||||
|
||||
config GPIO_GECKO_PORTE
|
||||
default n
|
||||
|
||||
config GPIO_GECKO_PORTF
|
||||
default y
|
||||
|
||||
endif # GPIO_GECKO
|
||||
|
||||
if SERIAL
|
||||
|
||||
config UART_GECKO
|
||||
default y
|
||||
|
||||
endif # SERIAL
|
||||
|
||||
if COUNTER
|
||||
|
||||
config COUNTER_GECKO_RTCC
|
||||
default y
|
||||
|
||||
endif # COUNTER
|
||||
|
||||
endif # BOARD_EFR32_RADIO
|
34
boards/arm/efr32_radio/board.c
Normal file
34
boards/arm/efr32_radio/board.c
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (c) 2018 Christian Taedcke
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <init.h>
|
||||
#include <drivers/gpio.h>
|
||||
#include <sys/printk.h>
|
||||
|
||||
/* This pin is used to enable the serial port using the board controller */
|
||||
#define VCOM_ENABLE_GPIO_NAME DT_GPIO_GECKO_PORTA_NAME
|
||||
#define VCOM_ENABLE_GPIO_PIN 5
|
||||
|
||||
static int efr32_radio_init(struct device *dev)
|
||||
{
|
||||
struct device *vce_dev; /* Virtual COM Port Enable GPIO Device */
|
||||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
/* Enable the board controller to be able to use the serial port */
|
||||
vce_dev = device_get_binding(VCOM_ENABLE_GPIO_NAME);
|
||||
if (!vce_dev) {
|
||||
printk("Virtual COM Port Enable device was not found!\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
gpio_pin_configure(vce_dev, VCOM_ENABLE_GPIO_PIN, GPIO_OUTPUT_HIGH);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* needs to be done after GPIO driver init */
|
||||
SYS_INIT(efr32_radio_init, PRE_KERNEL_1, CONFIG_BOARD_INIT_PRIORITY);
|
12
boards/arm/efr32_radio/board.cmake
Normal file
12
boards/arm/efr32_radio/board.cmake
Normal file
|
@ -0,0 +1,12 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
board_runner_args(openocd)
|
||||
|
||||
if(CONFIG_BOARD_EFR32_RADIO_BRD4104A)
|
||||
board_runner_args(jlink "--device=EFR32BG13PxxxF512")
|
||||
elseif(CONFIG_BOARD_EFR32_RADIO_BRD4250B)
|
||||
board_runner_args(jlink "--device=EFR32FG1PxxxF256")
|
||||
endif()
|
||||
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
124
boards/arm/efr32_radio/doc/brd4104a.rst
Normal file
124
boards/arm/efr32_radio/doc/brd4104a.rst
Normal file
|
@ -0,0 +1,124 @@
|
|||
.. _efr32_radio_brd4104a:
|
||||
|
||||
EFR32 BRD4104A (SLWRB4104A)
|
||||
###########################
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
The EFR32BG13 Blue Gecko Bluetooth® Low Energy Radio Board is one of the two
|
||||
radio boards delivered with `SLWSTK6020B Bluetooth SoC Starter Kit`_. It
|
||||
contains a Wireless System-On-Chip from the EFR32BG13 family built on an
|
||||
ARM Cortex®-M4F processor with excellent low power capabilities.
|
||||
|
||||
.. figure:: ./efr32bg13-slwrb4104a.jpg
|
||||
:height: 260px
|
||||
:align: center
|
||||
:alt: SLWRB4104A Blue Gecko Bluetooth® Low Energy Radio Board
|
||||
|
||||
SLWRB4104A (image courtesy of Silicon Labs)
|
||||
|
||||
The BRD4104A a.k.a. SLWRB4104A radio board plugs into the Wireless Starter Kit
|
||||
Mainboard BRD4001A and is supported as one of :ref:`efr32_radio`.
|
||||
|
||||
Hardware
|
||||
********
|
||||
|
||||
- EFR32BG13P632F512GM48 Blue Gecko SoC
|
||||
- CPU core: ARM Cortex®-M4 with FPU
|
||||
- Flash memory: 512 kB
|
||||
- RAM: 64 kB
|
||||
- Transmit power: up to +10 dBm
|
||||
- Operation frequency: 2.4 GHz
|
||||
- 8Mbit SPI NOR Flash
|
||||
- Crystals for LFXO (32.768 kHz) and HFXO (38.4 MHz).
|
||||
|
||||
For more information about the EFR32BG13 SoC and BRD4104A board, refer to these
|
||||
documents:
|
||||
|
||||
- `EFR32BG13 Website`_
|
||||
- `EFR32BG13 Datasheet`_
|
||||
- `EFR32xG13 Reference Manual`_
|
||||
- `SLWSTK6020B Bluetooth SoC Starter Kit`_
|
||||
- `BRD4104A User Guide`_
|
||||
- `BRD4104A Reference Manual`_
|
||||
- `EFR32BG13-BRD4104A Schematics`_
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
Please refer to
|
||||
:ref:`EFR32 Radio Board Supported Features <efr32_radio_supported_features>`
|
||||
for details of the configuration and common features supported by the
|
||||
efr32_radio_brd4104a board.
|
||||
|
||||
The default configuration can be found in the defconfig file:
|
||||
|
||||
``boards/arm/efr32_radio/efr32_radio_brd4104a_defconfig``
|
||||
|
||||
System Clock
|
||||
============
|
||||
|
||||
The EFR32BG13P SoC is configured to use the 38.4 MHz external oscillator on the
|
||||
board.
|
||||
|
||||
Serial Port
|
||||
===========
|
||||
|
||||
The EFR32BG13P SoC has three USARTs and one Low Energy UARTs (LEUART).
|
||||
USART0 is connected to the board controller and is used for the console.
|
||||
|
||||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
Please refer to
|
||||
:ref:`Programming and Debugging EFR32 Radio Board <efr32_radio_programming>`
|
||||
for details on the supported debug interfaces.
|
||||
|
||||
Flashing
|
||||
========
|
||||
|
||||
Connect the BRD4001A board with a mounted BRD4104A radio module to your host
|
||||
computer using the USB port.
|
||||
|
||||
Here is an example for the :ref:`hello_world` application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: efr32_radio_brd4104a
|
||||
:goals: flash
|
||||
|
||||
Open a serial terminal (minicom, putty, etc.) with the following settings:
|
||||
|
||||
- Speed: 115200
|
||||
- Data: 8 bits
|
||||
- Parity: None
|
||||
- Stop bits: 1
|
||||
|
||||
Reset the board and you should see the following message in the terminal:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
Hello World! efr32_radio_brd4104a
|
||||
|
||||
|
||||
.. _EFR32BG13 Website:
|
||||
https://www.silabs.com/wireless/bluetooth/efr32bg13-series-1-socs
|
||||
|
||||
.. _EFR32BG13 Datasheet:
|
||||
https://www.silabs.com/documents/public/data-sheets/efr32bg13-datasheet.pdf
|
||||
|
||||
.. _EFR32xG13 Reference Manual:
|
||||
https://www.silabs.com/documents/public/reference-manuals/efr32xg13-rm.pdf
|
||||
|
||||
.. _SLWSTK6020B Bluetooth SoC Starter Kit:
|
||||
https://www.silabs.com/products/development-tools/wireless/bluetooth/blue-gecko-bluetooth-low-energy-soc-starter-kit
|
||||
|
||||
.. _BRD4104A User Guide:
|
||||
https://www.silabs.com/documents/public/user-guides/ug279-brd4104a-user-guide.pdf
|
||||
|
||||
.. _BRD4104A Reference Manual:
|
||||
https://www.silabs.com/documents/public/reference-manuals/brd4104a-rm.pdf
|
||||
|
||||
.. _EFR32BG13-BRD4104A Schematics:
|
||||
https://www.silabs.com/documents/public/schematic-files/EFR32BG13-BRD4104A-A00-schematic.pdf
|
123
boards/arm/efr32_radio/doc/brd4250b.rst
Normal file
123
boards/arm/efr32_radio/doc/brd4250b.rst
Normal file
|
@ -0,0 +1,123 @@
|
|||
.. _efr32_radio_brd4250b:
|
||||
|
||||
EFR32 BRD4250B (SLWRB4250B)
|
||||
###########################
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
The EFR32FG1 Flex Gecko 2.4 GHz and 868 MHz Radio Board is delivered as part of
|
||||
`SLWSTK6061B Proprietary Wireless Starter Kit`_. It contains a EFR32FG1 Wireless
|
||||
SoC built on an ARM Cortex®-M4F processor with excellent low power capabilities.
|
||||
|
||||
.. figure:: ./efr32fg1-slwrb4250b.jpg
|
||||
:height: 262px
|
||||
:align: center
|
||||
:alt: SLWRB4250B Flex Gecko 2.4 GHz and 868 MHz Radio Board
|
||||
|
||||
SLWRB4250B (image courtesy of Silicon Labs)
|
||||
|
||||
The BRD4250B a.k.a. SLWRB4250B radio board plugs into the Wireless Starter Kit
|
||||
Mainboard BRD4001A and is supported as one of :ref:`efr32_radio`.
|
||||
|
||||
Hardware
|
||||
********
|
||||
|
||||
- EFR32FG1P133F256GM48 Flex Gecko SoC
|
||||
- CPU core: ARM Cortex®-M4 with FPU
|
||||
- Flash memory: 256 kB
|
||||
- RAM: 32 kB
|
||||
- Transmit power: up to +13 dBm
|
||||
- Operation frequency: 2.4 GHz, 868 MHz
|
||||
- 8Mbit SPI NOR Flash
|
||||
- Crystals for LFXO (32.768 kHz) and HFXO (38.4 MHz).
|
||||
|
||||
For more information about the EFR32FG1 SoC and BRD4250B board, refer to these
|
||||
documents:
|
||||
|
||||
- `EFR32FG1 Website`_
|
||||
- `EFR32FG1 Datasheet`_
|
||||
- `EFR32xG1 Reference Manual`_
|
||||
- `SLWSTK6061B Proprietary Wireless Starter Kit`_
|
||||
- `BRD4250B User Guide`_
|
||||
- `BRD4250B Reference Manual`_
|
||||
- `EFR32FG1-BRD4250B Schematics`_
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
Please refer to
|
||||
:ref:`EFR32 Radio Board Supported Features <efr32_radio_supported_features>`
|
||||
for details of the configuration and common features supported by the
|
||||
efr32_radio_brd4250b board.
|
||||
|
||||
The default configuration can be found in the defconfig file:
|
||||
|
||||
``boards/arm/efr32_radio/efr32_radio_brd4250b_defconfig``
|
||||
|
||||
System Clock
|
||||
============
|
||||
|
||||
The EFR32FG1P SoC is configured to use the 38.4 MHz external oscillator on the
|
||||
board.
|
||||
|
||||
Serial Port
|
||||
===========
|
||||
|
||||
The EFR32FG1P SoC has two USARTs and one Low Energy UARTs (LEUART).
|
||||
USART0 is connected to the board controller and is used for the console.
|
||||
|
||||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
Please refer to
|
||||
:ref:`Programming and Debugging EFR32 Radio Board <efr32_radio_programming>`
|
||||
for details on the supported debug interfaces.
|
||||
|
||||
Flashing
|
||||
========
|
||||
|
||||
Connect the BRD4001A board with a mounted BRD4250B radio module to your host
|
||||
computer using the USB port.
|
||||
|
||||
Here is an example for the :ref:`hello_world` application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: efr32_radio_brd4250b
|
||||
:goals: flash
|
||||
|
||||
Open a serial terminal (minicom, putty, etc.) with the following settings:
|
||||
|
||||
- Speed: 115200
|
||||
- Data: 8 bits
|
||||
- Parity: None
|
||||
- Stop bits: 1
|
||||
|
||||
Reset the board and you should see the following message in the terminal:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
Hello World! efr32_radio_brd4250b
|
||||
|
||||
|
||||
.. _EFR32FG1 Website:
|
||||
https://www.silabs.com/products/wireless/proprietary/efr32-flex-gecko-2-4-ghz-sub-ghz
|
||||
|
||||
.. _EFR32FG1 Datasheet:
|
||||
https://www.silabs.com/documents/public/data-sheets/efr32fg1-datasheet.pdf
|
||||
|
||||
.. _EFR32xG1 Reference Manual:
|
||||
https://www.silabs.com/documents/public/reference-manuals/efr32xg1-rm.pdf
|
||||
|
||||
.. _SLWSTK6061B Proprietary Wireless Starter Kit:
|
||||
https://www.silabs.com/products/development-tools/wireless/proprietary/slwstk6061b-efr32-flex-gecko-868-mhz-2-4-ghz-and-sub-ghz-starter-kit
|
||||
|
||||
.. _BRD4250B User Guide:
|
||||
https://www.silabs.com/documents/public/user-guides/ug182-brd4250b-user-guide.pdf
|
||||
|
||||
.. _BRD4250B Reference Manual:
|
||||
https://www.silabs.com/documents/public/reference-manuals/brd4250b-rm.pdf
|
||||
|
||||
.. _EFR32FG1-BRD4250B Schematics:
|
||||
https://www.silabs.com/documents/public/schematic-files/efr32fg1-brd4250b-b02-schematic.pdf
|
BIN
boards/arm/efr32_radio/doc/efr32_slwstk6020b.jpg
Normal file
BIN
boards/arm/efr32_radio/doc/efr32_slwstk6020b.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
BIN
boards/arm/efr32_radio/doc/efr32bg13-slwrb4104a.jpg
Normal file
BIN
boards/arm/efr32_radio/doc/efr32bg13-slwrb4104a.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
BIN
boards/arm/efr32_radio/doc/efr32fg1-slwrb4250b.jpg
Normal file
BIN
boards/arm/efr32_radio/doc/efr32fg1-slwrb4250b.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
173
boards/arm/efr32_radio/doc/index.rst
Normal file
173
boards/arm/efr32_radio/doc/index.rst
Normal file
|
@ -0,0 +1,173 @@
|
|||
.. _efr32_radio:
|
||||
|
||||
EFR32 Radio Boards
|
||||
##################
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
brd4104a.rst
|
||||
brd4250b.rst
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
Support for EFR32 Radio boards is provided by one of the starter kits
|
||||
|
||||
- `SLWSTK6020B Bluetooth SoC Starter Kit`_
|
||||
- `SLWSTK6000B Mighty Gecko Wireless Starter Kit`_
|
||||
- `SLWSTK6061B Proprietary Wireless Starter Kit`_
|
||||
|
||||
.. figure:: ./efr32_slwstk6020b.jpg
|
||||
:width: 490px
|
||||
:align: center
|
||||
:alt: SLWSTK6020B Bluetooth SoC Starter Kit
|
||||
|
||||
SLWSTK6020B (image courtesy of Silicon Labs)
|
||||
|
||||
Hardware
|
||||
********
|
||||
|
||||
Wireless Starter Kit Mainboard:
|
||||
|
||||
- Advanced Energy Monitoring provides real-time information about the energy
|
||||
consumption of an application or prototype design.
|
||||
- Ultra-low power 128x128 pixel memory LCD
|
||||
- 2 user buttons and 2 LEDs
|
||||
- Si7021 Humidity and Temperature Sensor
|
||||
- On-board Segger J-Link USB and Ethernet debugger
|
||||
|
||||
For more information about the BRD4001A board, refer to these documents:
|
||||
|
||||
- `EFR32BG13 Blue Gecko Bluetooth Starter Kit User's Guide`_
|
||||
- `WSTK Main Board BRD4001A Schematics`_
|
||||
|
||||
.. _efr32_radio_supported_features:
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
The board configuration supports the following hardware features:
|
||||
|
||||
+-----------+------------+-------------------------------------+
|
||||
| Interface | Controller | Driver/Component |
|
||||
+===========+============+=====================================+
|
||||
| NVIC | on-chip | nested vector interrupt controller |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| SYSTICK | on-chip | systick |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| COUNTER | on-chip | rtcc |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| FLASH | on-chip | flash memory |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| GPIO | on-chip | gpio |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| UART | on-chip | serial port-polling; |
|
||||
| | | serial port-interrupt |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| SPI(M) | on-chip | spi port-polling |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| WATCHDOG | on-chip | watchdog |
|
||||
+-----------+------------+-------------------------------------+
|
||||
|
||||
Other hardware features are currently not supported by the port.
|
||||
|
||||
Connections and IOs
|
||||
===================
|
||||
|
||||
In the following table, the column **Name** contains Pin names. For example, PA2
|
||||
means Pin number 2 on PORTA, as used in the board's datasheets and manuals.
|
||||
|
||||
+-------+-------------+-------------------------------------+
|
||||
| Name | Function | Usage |
|
||||
+=======+=============+=====================================+
|
||||
| PF4 | GPIO | LED0 |
|
||||
+-------+-------------+-------------------------------------+
|
||||
| PF5 | GPIO | LED1 |
|
||||
+-------+-------------+-------------------------------------+
|
||||
| PF6 | GPIO | Push Button PB0 |
|
||||
+-------+-------------+-------------------------------------+
|
||||
| PF7 | GPIO | Push Button PB1 |
|
||||
+-------+-------------+-------------------------------------+
|
||||
| PA5 | GPIO | Board Controller Enable |
|
||||
| | | EFM_BC_EN |
|
||||
+-------+-------------+-------------------------------------+
|
||||
| PA0 | USART0_TX | UART Console EFM_BC_TX US0_TX #0 |
|
||||
+-------+-------------+-------------------------------------+
|
||||
| PA1 | USART0_RX | UART Console EFM_BC_RX US0_RX #0 |
|
||||
+-------+-------------+-------------------------------------+
|
||||
| PC6 | SPI_MOSI | Flash MOSI US1_TX #11 |
|
||||
+-------+-------------+-------------------------------------+
|
||||
| PC7 | SPI_MISO | Flash MISO US1_RX #11 |
|
||||
+-------+-------------+-------------------------------------+
|
||||
| PC8 | SPI_SCLK | Flash SCLK US1_CLK #11 |
|
||||
+-------+-------------+-------------------------------------+
|
||||
| PA4 | SPI_CS | Flash Chip Select (GPIO) |
|
||||
+-------+-------------+-------------------------------------+
|
||||
|
||||
.. _efr32_radio_programming:
|
||||
|
||||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
The BRD4001A includes an `J-Link`_ serial and debug adaptor built into the
|
||||
board. The adaptor provides:
|
||||
|
||||
- A USB connection to the host computer, which exposes a debug interface and a
|
||||
USB Serial Port.
|
||||
- A physical UART connection which is relayed over interface USB Serial port.
|
||||
- An Ethernet connection to support remote debugging.
|
||||
|
||||
It is compatible with the following host debug tools:
|
||||
|
||||
- :ref:`openocd-debug-host-tools`
|
||||
- :ref:`jlink-debug-host-tools`
|
||||
|
||||
OpenOCD is included in the Zephyr SDK. Refer to the links above for information
|
||||
on how to install required host debug tools if you are not using the Zephyr SDK.
|
||||
|
||||
Flashing
|
||||
========
|
||||
|
||||
Connect the BRD4001A main board with the mounted radio module to your host
|
||||
computer using the USB port.
|
||||
|
||||
Following example shows how to build the :ref:`hello_world` application for
|
||||
BRD4104A radio module.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: efr32_radio_brd4104a
|
||||
:goals: flash
|
||||
|
||||
Open a serial terminal (minicom, putty, etc.) with the following settings:
|
||||
|
||||
- Speed: 115200
|
||||
- Data: 8 bits
|
||||
- Parity: None
|
||||
- Stop bits: 1
|
||||
|
||||
Reset the board and you should see the following message in the terminal:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
Hello World! efr32_radio_brd4104a
|
||||
|
||||
|
||||
.. _SLWSTK6020B Bluetooth SoC Starter Kit:
|
||||
https://www.silabs.com/products/development-tools/wireless/bluetooth/blue-gecko-bluetooth-low-energy-soc-starter-kit
|
||||
|
||||
.. _SLWSTK6000B Mighty Gecko Wireless Starter Kit:
|
||||
https://www.silabs.com/products/development-tools/wireless/mesh-networking/mighty-gecko-starter-kit
|
||||
|
||||
.. _SLWSTK6061B Proprietary Wireless Starter Kit:
|
||||
https://www.silabs.com/products/development-tools/wireless/proprietary/slwstk6061b-efr32-flex-gecko-868-mhz-2-4-ghz-and-sub-ghz-starter-kit
|
||||
|
||||
.. _EFR32BG13 Blue Gecko Bluetooth Starter Kit User's Guide:
|
||||
https://www.silabs.com/documents/public/user-guides/ug279-brd4104a-user-guide.pdf
|
||||
|
||||
.. _WSTK Main Board BRD4001A Schematics:
|
||||
https://www.silabs.com/documents/public/schematic-files/WSTK-Main-BRD4001A-A01-schematic.pdf
|
||||
|
||||
.. _J-Link:
|
||||
https://www.segger.com/jlink-debug-probes.html
|
97
boards/arm/efr32_radio/efr32_radio.dtsi
Normal file
97
boards/arm/efr32_radio/efr32_radio.dtsi
Normal file
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Piotr Mienkowski
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zephyr,console = &usart0;
|
||||
zephyr,shell-uart = &usart0;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,code-partition = &slot0_partition;
|
||||
};
|
||||
|
||||
/* These aliases are provided for compatibility with samples */
|
||||
aliases {
|
||||
led0 = &led0;
|
||||
led1 = &led1;
|
||||
sw0 = &button0;
|
||||
sw1 = &button1;
|
||||
watchdog0 = &wdog0;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
led0: led_0 {
|
||||
gpios = <&gpiof 4 0>;
|
||||
label = "LED 0";
|
||||
};
|
||||
led1: led_1 {
|
||||
gpios = <&gpiof 5 0>;
|
||||
label = "LED 1";
|
||||
};
|
||||
};
|
||||
|
||||
buttons {
|
||||
compatible = "gpio-keys";
|
||||
button0: button_0 {
|
||||
/* gpio flags need validation */
|
||||
gpios = <&gpiof 6 GPIO_ACTIVE_LOW>;
|
||||
label = "User Push Button 0";
|
||||
};
|
||||
button1: button_1 {
|
||||
/* gpio flags need validation */
|
||||
gpios = <&gpiof 7 GPIO_ACTIVE_LOW>;
|
||||
label = "User Push Button 1";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&usart0 {
|
||||
current-speed = <115200>;
|
||||
location-rx = <GECKO_LOCATION(0) GECKO_PORT_A GECKO_PIN(1)>;
|
||||
location-tx = <GECKO_LOCATION(0) GECKO_PORT_A GECKO_PIN(0)>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usart1 {
|
||||
compatible = "silabs,gecko-spi-usart";
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
location-rx = <GECKO_LOCATION(11) GECKO_PORT_C GECKO_PIN(7)>;
|
||||
location-tx = <GECKO_LOCATION(11) GECKO_PORT_C GECKO_PIN(6)>;
|
||||
location-clk = <GECKO_LOCATION(11) GECKO_PORT_C GECKO_PIN(8)>;
|
||||
|
||||
cs-gpios = <&gpioa 4 0>;
|
||||
|
||||
status = "okay";
|
||||
|
||||
mx25r80: mx25r8035f@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
label = "MX25R8035F";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <33000000>;
|
||||
size = <0x800000>;
|
||||
has-be32k;
|
||||
jedec-id = [c2 28 14];
|
||||
};
|
||||
};
|
||||
|
||||
&rtcc0 {
|
||||
prescaler = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio {
|
||||
location-swo = <0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wdog0 {
|
||||
status = "okay";
|
||||
};
|
59
boards/arm/efr32_radio/efr32_radio_brd4104a.dts
Normal file
59
boards/arm/efr32_radio/efr32_radio_brd4104a.dts
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Piotr Mienkowski
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <silabs/efr32bg13p632f512gm48.dtsi>
|
||||
#include "efr32_radio.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Silicon Labs BRD4104A (Blue Gecko Radio Board)";
|
||||
compatible = "silabs,efr32_radio_brd4104a", "silabs,efr32bg13p";
|
||||
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
clock-frequency = <38400000>;
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
/* Reserve 32 kB for the bootloader */
|
||||
boot_partition: partition@0 {
|
||||
label = "mcuboot";
|
||||
reg = <0x0 0x00008000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
/* Reserve 220 kB for the application in slot 0 */
|
||||
slot0_partition: partition@8000 {
|
||||
label = "image-0";
|
||||
reg = <0x0008000 0x00037000>;
|
||||
};
|
||||
|
||||
/* Reserve 220 kB for the application in slot 1 */
|
||||
slot1_partition: partition@3f000 {
|
||||
label = "image-1";
|
||||
reg = <0x0003f000 0x00037000>;
|
||||
};
|
||||
|
||||
/* Reserve 32 kB for the scratch partition */
|
||||
scratch_partition: partition@76000 {
|
||||
label = "image-scratch";
|
||||
reg = <0x00076000 0x00008000>;
|
||||
};
|
||||
|
||||
/* Set 8Kb of storage at the end of the 512KB of flash */
|
||||
storage_partition: partition@7e000 {
|
||||
label = "storage";
|
||||
reg = <0x0007e000 0x00002000>;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
21
boards/arm/efr32_radio/efr32_radio_brd4104a.yaml
Normal file
21
boards/arm/efr32_radio/efr32_radio_brd4104a.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
identifier: efr32_radio_brd4104a
|
||||
name: BRD4104A
|
||||
type: mcu
|
||||
arch: arm
|
||||
ram: 64
|
||||
flash: 512
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
- xtools
|
||||
supported:
|
||||
- counter
|
||||
- gpio
|
||||
- nvs
|
||||
- spi
|
||||
- uart
|
||||
- watchdog
|
||||
testing:
|
||||
ignore_tags:
|
||||
- net
|
||||
- bluetooth
|
14
boards/arm/efr32_radio/efr32_radio_brd4104a_defconfig
Normal file
14
boards/arm/efr32_radio/efr32_radio_brd4104a_defconfig
Normal file
|
@ -0,0 +1,14 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_ARM_MPU=y
|
||||
CONFIG_SOC_SERIES_EFR32BG13P=y
|
||||
CONFIG_BOARD_EFR32_RADIO_BRD4104A=y
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_CORTEX_M_SYSTICK=y
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=38400000
|
||||
CONFIG_CMU_HFCLK_HFXO=y
|
||||
CONFIG_SOC_GECKO_EMU_DCDC=y
|
||||
CONFIG_SOC_GECKO_EMU_DCDC_MODE_ON=y
|
59
boards/arm/efr32_radio/efr32_radio_brd4250b.dts
Normal file
59
boards/arm/efr32_radio/efr32_radio_brd4250b.dts
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Piotr Mienkowski
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <silabs/efr32fg1p133f256gm48.dtsi>
|
||||
#include "efr32_radio.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Silicon Labs BRD4250B (Flex Gecko Radio Board)";
|
||||
compatible = "silabs,efr32_radio_brd4250b", "silabs,efr32fg1p";
|
||||
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
clock-frequency = <38400000>;
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
/* Reserve 32 kB for the bootloader */
|
||||
boot_partition: partition@0 {
|
||||
label = "mcuboot";
|
||||
reg = <0x0 0x00008000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
/* Reserve 94 kB for the application in slot 0 */
|
||||
slot0_partition: partition@8000 {
|
||||
label = "image-0";
|
||||
reg = <0x0008000 0x00017800>;
|
||||
};
|
||||
|
||||
/* Reserve 94 kB for the application in slot 1 */
|
||||
slot1_partition: partition@1f800 {
|
||||
label = "image-1";
|
||||
reg = <0x0001f800 0x00017800>;
|
||||
};
|
||||
|
||||
/* Reserve 32 kB for the scratch partition */
|
||||
scratch_partition: partition@37000 {
|
||||
label = "image-scratch";
|
||||
reg = <0x00037000 0x00008000>;
|
||||
};
|
||||
|
||||
/* Set 4Kb of storage at the end of the 256Kb of flash */
|
||||
storage_partition: partition@3f000 {
|
||||
label = "storage";
|
||||
reg = <0x0003f000 0x00001000>;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
21
boards/arm/efr32_radio/efr32_radio_brd4250b.yaml
Normal file
21
boards/arm/efr32_radio/efr32_radio_brd4250b.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
identifier: efr32_radio_brd4250b
|
||||
name: BRD4250B
|
||||
type: mcu
|
||||
arch: arm
|
||||
ram: 32
|
||||
flash: 256
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
- xtools
|
||||
supported:
|
||||
- counter
|
||||
- gpio
|
||||
- nvs
|
||||
- spi
|
||||
- uart
|
||||
- watchdog
|
||||
testing:
|
||||
ignore_tags:
|
||||
- net
|
||||
- bluetooth
|
13
boards/arm/efr32_radio/efr32_radio_brd4250b_defconfig
Normal file
13
boards/arm/efr32_radio/efr32_radio_brd4250b_defconfig
Normal file
|
@ -0,0 +1,13 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_SOC_SERIES_EFR32FG1P=y
|
||||
CONFIG_BOARD_EFR32_RADIO_BRD4250B=y
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_CORTEX_M_SYSTICK=y
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=38400000
|
||||
CONFIG_CMU_HFCLK_HFXO=y
|
||||
CONFIG_SOC_GECKO_EMU_DCDC=y
|
||||
CONFIG_SOC_GECKO_EMU_DCDC_MODE_ON=y
|
25
boards/arm/efr32_radio/support/openocd.cfg
Normal file
25
boards/arm/efr32_radio/support/openocd.cfg
Normal file
|
@ -0,0 +1,25 @@
|
|||
if {[info exists env(OPENOCD_INTERFACE)]} {
|
||||
set INTERFACE $env(OPENOCD_INTERFACE)
|
||||
} else {
|
||||
# By default connect over Debug USB port using the J-Link interface
|
||||
set INTERFACE "jlink"
|
||||
}
|
||||
|
||||
source [find interface/$INTERFACE.cfg]
|
||||
|
||||
transport select swd
|
||||
|
||||
set CHIPNAME efr32
|
||||
|
||||
source [find target/efm32.cfg]
|
||||
|
||||
$_TARGETNAME configure -event gdb-attach {
|
||||
echo "Debugger attaching: halting execution"
|
||||
reset halt
|
||||
gdb_breakpoint_override hard
|
||||
}
|
||||
|
||||
$_TARGETNAME configure -event gdb-detach {
|
||||
echo "Debugger detaching: resuming execution"
|
||||
resume
|
||||
}
|
Loading…
Reference in a new issue