1.. _efr32mg_sltb004a: 2 3EFR32MG-SLTB004A 4################ 5 6Overview 7******** 8 9The EFR32™ Mighty Gecko Starter Kit EFR32MG-SLTB004A (a.k.a Thunderboard 10Sense 2) contains a MCU from the EFR32MG family built on ARM® Cortex®-M4F 11processor with low power capabilities. 12 13.. image:: efr32mg_sltb004a.jpg 14 :align: center 15 :alt: EFR32MG-SLTB004A 16 17Hardware 18******** 19 20- EFR32MG12 Mighty Gecko Wireless SoC with 38.4 MHz operating frequency 21- ARM® Cortex® M4 core with 256 kB RAM and 1024 kB Flash 22- Macronix ultra low power 8-Mbit SPI flash (MX25R8035F) 23- 2.4 GHz ceramic antenna for wireless transmission 24- Silicon Labs Si7021 relative humidity and temperature sensor 25- Silicon Labs Si1133 UV index and ambient light sensor 26- Silicon Labs Si7210 hall effect sensor 27- Bosch Sensortec BMP280 barometric pressure sensor 28- ams CCS811 indoor air quality gas sensor 29- TDK InvenSense ICM-20648 6-axis inertial sensor 30- TDK InvenSense ICS-43434 MEMS microphone 31- Four high brightness RGB LEDs from Broadcom Limited (ASMT-YTB7-0AA02) 32- One bi-color LED and two push buttons 33- Power enable signals for fine grained power-control 34- On-board SEGGER J-Link debugger for easy programming and debugging, which 35 includes a USB virtual COM port 36- Mini Simplicity connector for access to energy profiling and advanced wireless 37 network debugging 38- Breakout pads for GPIO access and connection to external hardware 39- Reset button 40- Automatic switch-over between USB and battery power 41- CR2032 coin cell holder and external battery connector 42 43For more information about the EFR32MG SoC and Thunderboard Sense 2 44(EFR32MG-SLTB004A) board: 45 46- `EFR32MG Website`_ 47- `EFR32MG Datasheet`_ 48- `EFR32MG Reference Manual`_ 49- `EFR32MG-SLTB004A Website`_ 50- `EFR32MG-SLTB004A User Guide`_ 51- `EFR32MG-SLTB004A Schematics`_ 52 53Supported Features 54================== 55 56The efr32mg_sltb004a board configuration supports the following hardware features: 57 58+-----------+------------+-------------------------------------+ 59| Interface | Controller | Driver/Component | 60+===========+============+=====================================+ 61| MPU | on-chip | memory protection unit | 62+-----------+------------+-------------------------------------+ 63| NVIC | on-chip | nested vector interrupt controller | 64+-----------+------------+-------------------------------------+ 65| SYSTICK | on-chip | systick | 66+-----------+------------+-------------------------------------+ 67| COUNTER | on-chip | rtcc | 68+-----------+------------+-------------------------------------+ 69| FLASH | on-chip | flash memory | 70+-----------+------------+-------------------------------------+ 71| GPIO | on-chip | gpio | 72+-----------+------------+-------------------------------------+ 73| UART | on-chip | serial port-polling; | 74| | | serial port-interrupt | 75+-----------+------------+-------------------------------------+ 76| I2C | on-chip | i2c port-polling | 77+-----------+------------+-------------------------------------+ 78| SPI(M) | on-chip | spi port-polling | 79+-----------+------------+-------------------------------------+ 80| WATCHDOG | on-chip | watchdog | 81+-----------+------------+-------------------------------------+ 82| TRNG | on-chip | true random number generator | 83+-----------+------------+-------------------------------------+ 84 85The default configuration can be found in the defconfig file: 86``boards/arm/efr32mg_sltb004a/efr32mg_sltb004a_defconfig``. 87 88Other hardware features are currently not supported by the port. 89 90Connections and IOs 91=================== 92 93The EFR32MG SoC has eight gpio controllers (PORTA, PORTB, PORTC, PORTD, 94PORTF, PORTI, PORTJ and PORTK). 95 96In the following table, the column Name contains Pin names. For example, PE2 97means Pin number 2 on PORTE and #27 represents the location bitfield , as used 98in the board's and microcontroller's datasheets and manuals. 99 100+------+-------------+-----------------------------------+ 101| Name | Function | Usage | 102+======+=============+===================================+ 103| PD8 | GPIO | LED0 (RED) | 104+------+-------------+-----------------------------------+ 105| PD9 | GPIO | LED1 (GREEN) | 106+------+-------------+-----------------------------------+ 107| PD14 | GPIO | SW0 Push Button PB0 | 108+------+-------------+-----------------------------------+ 109| PD15 | GPIO | Push Button PB1 | 110+------+-------------+-----------------------------------+ 111| PA0 | UART_TX | UART TX Console VCOM_TX US0_TX #0 | 112+------+-------------+-----------------------------------+ 113| PA1 | UART_RX | UART RX Console VCOM_RX US0_RX #0 | 114+------+-------------+-----------------------------------+ 115| PF3 | UART_TX | EXP12_UART_TX LEU0_TX #27 | 116+------+-------------+-----------------------------------+ 117| PF4 | UART_RX | EXP14_UART_RX LEU0_RX #27 | 118+------+-------------+-----------------------------------+ 119| PC10 | I2C_SDA | EXP16_I2C_SDA I2C0_SDA #15 | 120+------+-------------+-----------------------------------+ 121| PC11 | I2C_SCL | EXP15_I2C_SCL I2C0_SCL #15 | 122+------+-------------+-----------------------------------+ 123| PB6 | I2C_SDA | CCS811_I2C_SDA I2C1_SDA #6 | 124+------+-------------+-----------------------------------+ 125| PB7 | I2C_SCL | CCS811_I2C_SCL I2C1_SCL #6 | 126+------+-------------+-----------------------------------+ 127| PK0 | SPI_MOSI | Flash MOSI US2_TX #29 | 128+------+-------------+-----------------------------------+ 129| PK2 | SPI_MISO | Flash MISO US2_RX #30 | 130+------+-------------+-----------------------------------+ 131| PF7 | SPI_SCLK | Flash SCLK US2_CLK #18 | 132+------+-------------+-----------------------------------+ 133| PK1 | SPI_CS | Flash Chip Select (GPIO) | 134+------+-------------+-----------------------------------+ 135 136System Clock 137============ 138 139The EFR32MG SoC is configured to use the 38.4 MHz external oscillator on the 140board. 141 142Serial Port 143=========== 144 145The EFR32MG SoC has four USARTs and one Low Energy UARTs (LEUART with 9600 146maximum baudrate). USART0 is configured as the Zephyr console and is connected 147to the On-Board J-Link Debugger that presents a virtual COM port for general 148purpose application serial data transfer with this interface. 149 150Programming and Debugging 151************************* 152 153.. note:: 154 Before using the kit the first time, you should update the J-Link firmware 155 from `J-Link-Downloads`_ 156 157Flashing 158======== 159 160The EFR32MG-SLTB004A includes an `J-Link`_ serial and debug adaptor built into the 161board. The adaptor provides: 162 163- A USB connection to the host computer, which exposes a Mass Storage and a 164 USB Serial Port. 165- A Serial Flash device, which implements the USB flash disk file storage. 166- A physical UART connection which is relayed over interface USB Serial port. 167 168Flashing an application to EFR32-SLTB004A 169----------------------------------------- 170 171The sample application :ref:`hello_world` is used for this example. 172Build the Zephyr kernel and application: 173 174.. zephyr-app-commands:: 175 :zephyr-app: samples/hello_world 176 :board: efr32mg_sltb004a 177 :goals: build 178 179Connect the EFR32MG-SLTB004A to your host computer using the USB port and you 180should see a USB connection which exposes a Mass Storage (TB004) and a 181USB Serial Port. Copy the generated zephyr.bin in the SLTB004A drive. 182 183Open a serial terminal (minicom, putty, etc.) with the following settings: 184 185- Speed: 115200 186- Data: 8 bits 187- Parity: None 188- Stop bits: 1 189 190Reset the board and you should be able to see on the corresponding Serial Port 191the following message: 192 193.. code-block:: console 194 195 Hello World! arm 196 197 198.. _EFR32MG-SLTB004A Website: 199 https://www.silabs.com/products/development-tools/thunderboard/thunderboard-sense-two-kit 200 201.. _EFR32MG-SLTB004A User Guide: 202 https://www.silabs.com/documents/public/user-guides/ug309-sltb004a-user-guide.pdf 203 204.. _EFR32MG-SLTB004A Schematics: 205 https://www.silabs.com/documents/public/schematic-files/BRD4166A-D00-schematic.pdf 206 207.. _EFR32MG Website: 208 https://www.silabs.com/products/wireless/mesh-networking/efr32mg-mighty-gecko-zigbee-thread-soc 209 210.. _EFR32MG Datasheet: 211 https://www.silabs.com/documents/public/data-sheets/efr32mg12-datasheet.pdf 212 213.. _EFR32MG Reference Manual: 214 https://www.silabs.com/documents/public/reference-manuals/efr32xg12-rm.pdf 215 216.. _J-Link: 217 https://www.segger.com/jlink-debug-probes.html 218 219.. _J-Link-Downloads: 220 https://www.segger.com/downloads/jlink 221