Skip to content

Commit a24e5c4

Browse files
committed
boards: silabs: Add support for efm32tg_stk3300
Support for the Silabs EFM32TG-STK3300 Starter Kit. Board features: * EFM32TG840F32 MCU with 32 kB flash and 4 kB RAM * Advanced Energy Monitoring * Real-time, accurate energy and power profiling * Light, LC and touch sensors * 8 x 20 LCD * SEGGER J-Link debugger Signed-off-by: Lukas Woodtli <woodtli.lukas@gmail.com>
1 parent eacfe95 commit a24e5c4

File tree

10 files changed

+299
-0
lines changed

10 files changed

+299
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright (c) 2025, Lukas Woodtli
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if BOARD_EFM32TG_STK3300
5+
6+
config CMU_HFXO_FREQ
7+
default 32000000
8+
9+
config CMU_LFXO_FREQ
10+
default 32768
11+
12+
endif # BOARD_EFM32TG_STK3300
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025, Lukas Woodtli
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_EFM32TG_STK3300
5+
select SOC_PART_NUMBER_EFM32TG840F32
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025, Lukas Woodtli
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
board_runner_args(jlink "--device=EFM32TG840F32")
5+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
board:
2+
name: efm32tg_stk3300
3+
full_name: EFM32 Tiny Gecko (EFM32TG-STK3300)
4+
vendor: silabs
5+
socs:
6+
- name: efm32tg840f32
Binary file not shown.
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
.. zephyr:board:: efm32tg_stk3300
2+
3+
Overview
4+
********
5+
6+
The EFM32 Tiny Gecko Starter Kit EFM32TG-STK3300 contains a MCU from the
7+
EFM32TG family built on ARM® Cortex®-M3 processor with excellent low
8+
power capabilities.
9+
10+
Hardware
11+
********
12+
13+
- EFM32TG840F32 MCU with 32 kB flash and 4 kB RAM
14+
- Advanced Energy Monitoring provides real-time information about the energy
15+
consumption of an application or prototype design.
16+
- 160 segment Energy Micro LCD
17+
- 2 user buttons, 1 LED and a touch slider
18+
- Ambient Light Sensor, Inductive-capacitive metal sensor and touch sensor
19+
- On-board Segger J-Link USB debugger
20+
21+
For more information about the EFM32TG SoC and EFM32TG-STK3300 board:
22+
23+
- `EFM32TG Website`_
24+
- `EFM32TG Datasheet`_
25+
- `EFM32TG Reference Manual`_
26+
- `EFM32TG-STK3300 Website`_
27+
- `EFM32TG-STK3300 User Guide`_
28+
- `EFM32TG-STK3300 Schematics`_
29+
30+
Supported Features
31+
==================
32+
33+
.. zephyr:board-supported-hw::
34+
35+
Connections and IOs
36+
===================
37+
38+
The EFM32TG SoC has six gpio controllers (PORTA to PORTF), but only three are
39+
currently enabled (PORTB, PORTC and PORTD) for the EFM32TG-STK3300 board.
40+
41+
In the following table, the column Name contains Pin names. For example, PE2
42+
means Pin number 2 on PORTE, as used in the board's datasheets and manuals.
43+
44+
+------+-----------+---------------------------------------+
45+
| Name | Function | Usage |
46+
+======+===========+=======================================+
47+
| PD7 | GPIO | LED0 |
48+
+------+-----------+---------------------------------------+
49+
| PD8 | GPIO | Push Button PB0 |
50+
+------+-----------+---------------------------------------+
51+
| PB11 | GPIO | Push Button PB1 |
52+
+------+-----------+---------------------------------------+
53+
| PD0 | USART1_TX | UART Console USART1_TX #1 (EXP Pin 4) |
54+
+------+-----------+---------------------------------------+
55+
| PD1 | USART1_RX | UART Console USART1_RX #1 (EXP Pin 6) |
56+
+------+-----------+---------------------------------------+
57+
58+
System Clock
59+
============
60+
61+
The EFM32TG SoC is configured to use the 32 MHz external oscillator on the
62+
board.
63+
64+
Serial Port
65+
===========
66+
67+
The EFM32TG SoC has two USARTs and two Low Energy UARTs (LEUART).
68+
USART1 is used for the console. It is exposed to the EXP Header on the
69+
board (TX: Pin 4, RX: Pin 6).
70+
71+
Programming and Debugging
72+
*************************
73+
74+
.. zephyr:board-supported-runners::
75+
76+
.. note::
77+
Before using the kit the first time, you should update the J-Link firmware
78+
in Simplicity Studio or with *JLinkConfig*.
79+
80+
Flashing
81+
========
82+
83+
The EFM32TG-STK3300 includes an `J-Link`_ debug adaptor built into the
84+
board. It is used to flash and debug the EFM32TG on the board.
85+
86+
Flashing an application to EFM32-STK3300
87+
----------------------------------------
88+
89+
The sample application :zephyr:code-sample:`hello_world` is used for this example.
90+
Build the Zephyr kernel and application:
91+
92+
.. zephyr-app-commands::
93+
:zephyr-app: samples/hello_world
94+
:board: efm32tg_stk3300
95+
:goals: build
96+
97+
Connect the EFM32TG-STK3300 to your host computer using the USB port.
98+
Flash the device:
99+
100+
.. code-block:: console
101+
102+
west flash
103+
104+
Connect the board with
105+
Use a Serial-to-USB cable to connect the host computer with the board.
106+
The serial port is exposed on the EXP Header (TX: Pin 4, RX: Pin 6).
107+
108+
Open a serial terminal (minicom, putty, etc.) with the following settings:
109+
110+
- Speed: 115200
111+
- Data: 8 bits
112+
- Parity: None
113+
- Stop bits: 1
114+
115+
Reset the board and you should be able to see on the corresponding Serial Port
116+
the following message:
117+
118+
.. code-block:: console
119+
120+
Hello World! efm32tg_stk3300/efm32tg840f32
121+
122+
123+
.. _EFM32TG-STK3300 Website:
124+
https://www.silabs.com/products/development-tools/mcu/32-bit/efm32-tiny-gecko-starter-kit
125+
126+
.. _EFM32TG-STK3300 User Guide:
127+
https://www.silabs.com/documents/public/user-guides/ug420-efm32tg-stk3300.pdf
128+
129+
.. _EFM32TG-STK3300 Schematics:
130+
https://www.silabs.com/documents/public/schematic-files/BRD2100A-A04-schematic.pdf
131+
132+
.. _EFM32TG Website:
133+
https://www.silabs.com/products/mcu/32-bit/efm32-tiny-gecko
134+
135+
.. _EFM32TG Datasheet:
136+
https://www.silabs.com/documents/public/data-sheets/EFM32TG840.pdf
137+
138+
.. _EFM32TG Reference Manual:
139+
https://www.silabs.com/documents/public/reference-manuals/EFM32TG-RM.pdf
140+
141+
.. _J-Link:
142+
https://www.segger.com/jlink-debug-probes.html
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/*
2+
* Copyright (c) 2025 Lukas Woodtli
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
#include <silabs/efm32tg840f32.dtsi>
9+
#include <zephyr/dt-bindings/input/input-event-codes.h>
10+
11+
/ {
12+
model = "Silicon Labs EFM32TG STK3300 board";
13+
compatible = "silabs,efm32tg_stk3300", "silabs,efm32tg";
14+
15+
chosen {
16+
zephyr,console = &usart1;
17+
zephyr,shell-uart = &usart1;
18+
zephyr,sram = &sram0;
19+
zephyr,flash = &flash0;
20+
};
21+
22+
/* These aliases are provided for compatibility with samples */
23+
aliases {
24+
led0 = &led0;
25+
sw0 = &button0;
26+
sw1 = &button1;
27+
};
28+
29+
leds {
30+
compatible = "gpio-leds";
31+
32+
led0: led_0 {
33+
gpios = <&gpiod 7 0>;
34+
label = "LED 0";
35+
};
36+
};
37+
38+
buttons {
39+
compatible = "gpio-keys";
40+
41+
button0: button_0 {
42+
/* gpio flags need validation */
43+
gpios = <&gpiod 8 GPIO_ACTIVE_LOW>;
44+
label = "User Push Button 0";
45+
zephyr,code = <INPUT_KEY_0>;
46+
};
47+
48+
button1: button_1 {
49+
/* gpio flags need validation */
50+
gpios = <&gpiob 11 GPIO_ACTIVE_LOW>;
51+
label = "User Push Button 1";
52+
zephyr,code = <INPUT_KEY_1>;
53+
};
54+
};
55+
};
56+
57+
&cpu0 {
58+
clock-frequency = <32000000>;
59+
};
60+
61+
&gpiob {
62+
status = "okay";
63+
};
64+
65+
&gpioc {
66+
status = "okay";
67+
};
68+
69+
&gpiod {
70+
status = "okay";
71+
};
72+
73+
&usart1 {
74+
current-speed = <115200>;
75+
location-tx = <GECKO_LOCATION(1) GECKO_PORT_D GECKO_PIN(0)>;
76+
location-rx = <GECKO_LOCATION(1) GECKO_PORT_D GECKO_PIN(1)>;
77+
status = "okay";
78+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
identifier: efm32tg_stk3300
2+
name: EFM32 Wonder Gecko Starter Kit (EFM32TG-STK3300, BRD2100)
3+
type: mcu
4+
arch: arm
5+
ram: 4
6+
flash: 32
7+
toolchain:
8+
- zephyr
9+
- gnuarmemb
10+
supported:
11+
- gpio
12+
- nvs
13+
testing:
14+
ignore_tags:
15+
- net
16+
- bluetooth
17+
vendor: silabs
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) 2025, Lukas Woodtli
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_ARM_MPU=n
5+
CONFIG_CONSOLE=y
6+
CONFIG_UART_CONSOLE=y
7+
CONFIG_SERIAL=y
8+
CONFIG_GPIO=y
9+
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32000000
10+
CONFIG_CMU_HFCLK_HFXO=y

dts/arm/silabs/efm32tg840f32.dtsi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright (c) 2025 Lukas Woodtli
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <mem.h>
8+
#include <silabs/efm32tg.dtsi>
9+
10+
/ {
11+
sram0: memory@20000000 {
12+
reg = <0x20000000 DT_SIZE_K(32)>;
13+
};
14+
15+
soc {
16+
compatible = "silabs,efm32tg840f32", "silabs,efm32tg", "silabs,efm32", "simple-bus";
17+
18+
flash-controller@400c0000 {
19+
flash0: flash@0 {
20+
reg = <0 DT_SIZE_K(256)>;
21+
};
22+
};
23+
};
24+
};

0 commit comments

Comments
 (0)