1.. zephyr:board:: slstk3402a 2 3Overview 4******** 5 6The EFM32 Pearl Gecko 12 Starter Kit SLSTK3402A contains an MCU from the 7EFM32PG family built on an ARM® Cortex®-M4F processor with excellent low 8power capabilities. 9 10Hardware 11******** 12 13- Advanced Energy Monitoring provides real-time information about the energy 14 consumption of an application or prototype design. 15- Ultra low power 128x128 pixel Memory-LCD 16- 2 user buttons, 2 LEDs and a touch slider 17- Humidity, temperature, and inductive-capacitive metal sensor 18- On-board Segger J-Link USB debugger 19 20For more information about the EFM32PG SoC and SLSTK3402A board: 21 22- `EFM32PG Website`_ 23- `EFM32PG12 Datasheet`_ 24- `EFM32PG12 Reference Manual`_ 25- `SLSTK3402A Website`_ 26- `SLSTK3402A User Guide`_ 27- `SLSTK3402A Schematics`_ 28 29Supported Features 30================== 31 32The slstk3402a board configuration supports the following hardware features: 33 34+-----------+------------+-------------------------------------+ 35| Interface | Controller | Driver/Component | 36+===========+============+=====================================+ 37| MPU | on-chip | memory protection unit | 38+-----------+------------+-------------------------------------+ 39| NVIC | on-chip | nested vector interrupt controller | 40+-----------+------------+-------------------------------------+ 41| SYSTICK | on-chip | systick | 42+-----------+------------+-------------------------------------+ 43| COUNTER | on-chip | rtcc | 44+-----------+------------+-------------------------------------+ 45| FLASH | on-chip | flash memory | 46+-----------+------------+-------------------------------------+ 47| GPIO | on-chip | gpio | 48+-----------+------------+-------------------------------------+ 49| UART | on-chip | serial port-polling; | 50| | | serial port-interrupt | 51+-----------+------------+-------------------------------------+ 52| I2C | on-chip | i2c port-polling | 53+-----------+------------+-------------------------------------+ 54| WATCHDOG | on-chip | watchdog | 55+-----------+------------+-------------------------------------+ 56| TRNG | on-chip | true random number generator | 57+-----------+------------+-------------------------------------+ 58 59The default configuration can be found in 60:zephyr_file:`boards/silabs/starter_kits/slstk3402a/slstk3402a_efm32pg12b500f1024gl125_defconfig` 61 62The default configuration when building using this board to develop for the 63EFM32JG12 SoC can be found in 64:zephyr_file:`boards/silabs/starter_kits/slstk3402a/slstk3402a_efm32jg12b500f1024gl125_defconfig` 65 66Other hardware features are currently not supported by the port. 67 68EFM32 Jade Gecko SoC 69-------------------- 70 71The EFM32 Pearl Gecko Starter Kit SLSTK3402A can also be used to evaluate 72the EFM32 Jade Gecko SoC (EFM32JG12). The only difference between the Pearl 73Gecko and the Jade Gecko is their core. The Pearl Gecko contains an ARM® 74Cortex®-M4F core, and the Jade Gecko an ARM® Cortex®-M3 core. Other features 75such as memory and peripherals are the same. 76 77Code that is built for the Jade Gecko also runs on an equivalent Pearl Gecko. 78 79To build firmware for the Jade Gecko and run it on the EFM32 Pearl Gecko Starter 80Kit, use the board ``slstk3402a/efm32jg12b500f1024gl125`` instead of 81``slstk3402a/efm32pg12b500f1024gl125``. 82 83Connections and IOs 84=================== 85 86The EFM32PG12 SoC has twelve GPIO controllers (PORTA to PORTL), but only four 87are currently enabled (PORTA, PORTB, PORTD and PORTF) for the SLSTK3402A 88board. 89 90In the following table, the column **Name** contains pin names. For example, PE2 91means pin number 2 on PORTE, as used in the board's datasheets and manuals. 92 93+-------+-------------+-------------------------------------+ 94| Name | Function | Usage | 95+=======+=============+=====================================+ 96| PF4 | GPIO | LED0 | 97+-------+-------------+-------------------------------------+ 98| PF5 | GPIO | LED1 | 99+-------+-------------+-------------------------------------+ 100| PF6 | GPIO | Push Button PB0 | 101+-------+-------------+-------------------------------------+ 102| PF7 | GPIO | Push Button PB1 | 103+-------+-------------+-------------------------------------+ 104| PA5 | GPIO | Board Controller Enable | 105| | | EFM_BC_EN | 106+-------+-------------+-------------------------------------+ 107| PA0 | UART_TX | UART TX Console VCOM_TX US0_TX #0 | 108+-------+-------------+-------------------------------------+ 109| PA1 | UART_RX | UART RX Console VCOM_RX US0_RX #0 | 110+-------+-------------+-------------------------------------+ 111| PD10 | UART_TX | EXP12_UART_TX LEU0_TX #18 | 112+-------+-------------+-------------------------------------+ 113| PD11 | UART_RX | EXP14_UART_RX LEU0_RX #18 | 114+-------+-------------+-------------------------------------+ 115| PC10 | I2C_SDA | ENV_I2C_SDA I2C0_SDA #15 | 116+-------+-------------+-------------------------------------+ 117| PC11 | I2C_SCL | ENV_I2C_SCL I2C0_SCL #15 | 118+-------+-------------+-------------------------------------+ 119 120 121System Clock 122============ 123 124The EFM32PG12 SoC is configured to use the 40 MHz external oscillator on the 125board. 126 127Serial Port 128=========== 129 130The EFM32PG12 SoC has four USARTs and one Low Energy UART (LEUART). 131 132Programming and Debugging 133************************* 134 135.. note:: 136 Before using the kit the first time, you should update the J-Link firmware 137 in Simplicity Studio. 138 139Flashing 140======== 141 142The SLSTK3402A includes an `J-Link`_ serial and debug adaptor built into the 143board. The adaptor provides: 144 145- A USB connection to the host computer, which exposes a mass storage device and a 146 USB serial port. 147- A serial flash device, which implements the USB flash disk file storage. 148- A physical UART connection which is relayed over interface USB serial port. 149 150Flashing an application to SLSTK3402A 151------------------------------------- 152 153The sample application :zephyr:code-sample:`hello_world` is used for this example. 154Build the Zephyr kernel and application: 155 156.. zephyr-app-commands:: 157 :zephyr-app: samples/hello_world 158 :board: slstk3402a/efm32pg12b500f1024gl125 159 :goals: build 160 161Connect the SLSTK3402A to your host computer using the USB port and you 162should see a USB connection which exposes a mass storage device(STK3402A). 163Copy the generated zephyr.bin to the STK3402A drive. 164 165Use a USB-to-UART converter such as an FT232/CP2102 to connect to the UART on the 166expansion header. 167 168Open a serial terminal (minicom, putty, etc.) with the following settings: 169 170- Speed: 115200 171- Data: 8 bits 172- Parity: None 173- Stop bits: 1 174 175Reset the board and you'll see the following message on the corresponding serial port 176terminal session: 177 178.. code-block:: console 179 180 Hello World! slstk3402a 181 182 183.. _SLSTK3402A Website: 184 https://www.silabs.com/products/development-tools/mcu/32-bit/efm32-pearl-gecko-pg12-starter-kit 185 186.. _SLSTK3402A User Guide: 187 https://www.silabs.com/documents/public/user-guides/ug257-stk3402-usersguide.pdf 188 189.. _SLSTK3402A Schematics: 190 https://www.silabs.com/documents/public/schematic-files/BRD2501A-A01-schematic.pdf 191 192.. _EFM32PG Website: 193 https://www.silabs.com/products/mcu/32-bit/efm32-pearl-gecko 194 195.. _EFM32PG12 Datasheet: 196 https://www.silabs.com/documents/public/data-sheets/efm32pg12-datasheet.pdf 197 198.. _EFM32PG12 Reference Manual: 199 https://www.silabs.com/documents/public/reference-manuals/efm32pg12-rm.pdf 200 201.. _J-Link: 202 https://www.segger.com/jlink-debug-probes.html 203