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