EFM32 Pearl Gecko Starter Kit¶
The EFM32 Pearl Gecko Starter Kit EFM32PG-STK3402A contains an MCU from the EFM32PG family built on an ARM® Cortex®-M4F processor with excellent low power capabilities.
- 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, 2 LEDs and a touch slider
- Humidity, temperature, and inductive-capacitive metal sensor
- On-board Segger J-Link USB debugger
For more information about the EFM32PG SoC and EFM32PG-STK3402A board:
- EFM32PG Website
- EFM32PG12 Datasheet
- EFM32PG12 Reference Manual
- EFM32PG-STK3402A Website
- EFM32PG-STK3402A User Guide
- EFM32PG-STK3402A Schematics
The efm32pg_stk3402a board configuration supports the following hardware features:
|NVIC||on-chip||nested vector interrupt controller|
|UART||on-chip||serial port-polling; serial port-interrupt|
The default configuration can be found in the defconfig file:
Other hardware features are currently not supported by the port.
Connections and IOs¶
The EFM32PG12 SoC has twelve GPIO controllers (PORTA to PORTL), but only four are currently enabled (PORTA, PORTB, PORTD and PORTF) for the EFM32PG-STK3402A board.
In the following table, the column Name contains pin names. For example, PE2 means pin number 2 on PORTE, as used in the board’s datasheets and manuals.
|PF6||GPIO||Push Button PB0|
|PF7||GPIO||Push Button PB1|
|PA5||GPIO||Board Controller Enable EFM_BC_EN|
|PA0||UART_TX||UART TX Console VCOM_TX US0_TX #0|
|PA1||UART_RX||UART RX Console VCOM_RX US0_RX #0|
|PD10||UART_TX||EXP12_UART_TX LEU0_TX #18|
|PD11||UART_RX||EXP14_UART_RX LEU0_RX #18|
|PC10||I2C_SDA||ENV_I2C_SDA I2C0_SDA #15|
|PC11||I2C_SCL||ENV_I2C_SCL I2C0_SCL #15|
The EFM32PG SoC is configured to use the 40 MHz external oscillator on the board.
The EFM32PG SoC has four USARTs and one Low Energy UART (LEUART).
Programming and Debugging¶
Before using the kit the first time, you should update the J-Link firmware from J-Link-Downloads
The EFM32PG-STK3402A 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 mass storage device and a USB serial port.
- A serial flash device, which implements the USB flash disk file storage.
- A physical UART connection which is relayed over interface USB serial port.
Flashing an application to EFM32PG-STK3402A¶
The sample application Hello World is used for this example. Build the Zephyr kernel and application:
# On Linux/macOS cd $ZEPHYR_BASE/samples/hello_world mkdir build && cd build # On Windows cd %ZEPHYR_BASE%\samples\hello_world mkdir build & cd build # Use cmake to configure a Ninja-based build system: cmake -GNinja -DBOARD=efm32pg_stk3402a .. # Now run ninja on the generated build system: ninja
Connect the EFM32PG-STK3402A to your host computer using the USB port and you should see a USB connection which exposes a mass storage device(STK3402A). Copy the generated zephyr.bin to the STK3402A drive.
Use a USB-to-UART converter such as an FT232/CP2102 to connect to the UART on the expansion header.
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’ll see the following message on the corresponding serial port terminal session:
Hello World! arm