-
Notifications
You must be signed in to change notification settings - Fork 8.2k
boards: silabs: Support for efm32tg_stk3300 #91191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
LukasWoodtli
wants to merge
2
commits into
zephyrproject-rtos:main
Choose a base branch
from
LukasWoodtli:efm32tg_stk3300
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+552
−0
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
boards/silabs/starter_kits/efm32tg_stk3300/Kconfig.defconfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Copyright (c) 2025, Lukas Woodtli | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| if BOARD_EFM32TG_STK3300 | ||
|
|
||
| config CMU_HFXO_FREQ | ||
| default 32000000 | ||
|
|
||
| config CMU_LFXO_FREQ | ||
| default 32768 | ||
|
|
||
| endif # BOARD_EFM32TG_STK3300 | ||
5 changes: 5 additions & 0 deletions
5
boards/silabs/starter_kits/efm32tg_stk3300/Kconfig.efm32tg_stk3300
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Copyright (c) 2025, Lukas Woodtli | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| config BOARD_EFM32TG_STK3300 | ||
| select SOC_EFM32TG840F32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Copyright (c) 2025, Lukas Woodtli | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| board_runner_args(jlink "--device=EFM32TG840F32") | ||
| include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| board: | ||
| name: efm32tg_stk3300 | ||
| full_name: EFM32 Tiny Gecko (EFM32TG-STK3300) | ||
| vendor: silabs | ||
| socs: | ||
| - name: efm32tg840f32 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
142 changes: 142 additions & 0 deletions
142
boards/silabs/starter_kits/efm32tg_stk3300/doc/index.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,142 @@ | ||
| .. zephyr:board:: efm32tg_stk3300 | ||
|
|
||
| Overview | ||
| ******** | ||
|
|
||
| The EFM32 Tiny Gecko Starter Kit EFM32TG-STK3300 contains a MCU from the | ||
| EFM32TG family built on ARM® Cortex®-M3 processor with excellent low | ||
| power capabilities. | ||
|
|
||
| Hardware | ||
| ******** | ||
|
|
||
| - EFM32TG840F32 MCU with 32 kB flash and 4 kB RAM | ||
| - Advanced Energy Monitoring provides real-time information about the energy | ||
| consumption of an application or prototype design. | ||
| - 160 segment Energy Micro LCD | ||
| - 2 user buttons, 1 LED and a touch slider | ||
| - Ambient Light Sensor, Inductive-capacitive metal sensor and touch sensor | ||
| - On-board Segger J-Link USB debugger | ||
|
|
||
| For more information about the EFM32TG SoC and EFM32TG-STK3300 board: | ||
|
|
||
| - `EFM32TG Website`_ | ||
| - `EFM32TG Datasheet`_ | ||
| - `EFM32TG Reference Manual`_ | ||
| - `EFM32TG-STK3300 Website`_ | ||
| - `EFM32TG-STK3300 User Guide`_ | ||
| - `EFM32TG-STK3300 Schematics`_ | ||
|
|
||
| Supported Features | ||
| ================== | ||
|
|
||
| .. zephyr:board-supported-hw:: | ||
|
|
||
| Connections and IOs | ||
| =================== | ||
|
|
||
| The EFM32TG SoC has six gpio controllers (PORTA to PORTF), but only three are | ||
| currently enabled (PORTB, PORTC and PORTD) for the EFM32TG-STK3300 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. | ||
|
|
||
| +------+-----------+---------------------------------------+ | ||
| | Name | Function | Usage | | ||
| +======+===========+=======================================+ | ||
| | PD7 | GPIO | LED0 | | ||
| +------+-----------+---------------------------------------+ | ||
| | PD8 | GPIO | Push Button PB0 | | ||
| +------+-----------+---------------------------------------+ | ||
| | PB11 | GPIO | Push Button PB1 | | ||
| +------+-----------+---------------------------------------+ | ||
| | PD0 | USART1_TX | UART Console USART1_TX #1 (EXP Pin 4) | | ||
| +------+-----------+---------------------------------------+ | ||
| | PD1 | USART1_RX | UART Console USART1_RX #1 (EXP Pin 6) | | ||
| +------+-----------+---------------------------------------+ | ||
|
|
||
| System Clock | ||
| ============ | ||
|
|
||
| The EFM32TG SoC is configured to use the 32 MHz external oscillator on the | ||
| board. | ||
|
|
||
| Serial Port | ||
| =========== | ||
|
|
||
| The EFM32TG SoC has two USARTs and one Low Energy UART (LEUART). | ||
| USART1 is used for the console. It is exposed to the EXP Header on the | ||
| board (TX: Pin 4, RX: Pin 6). | ||
|
|
||
| Programming and Debugging | ||
| ************************* | ||
|
|
||
| .. zephyr:board-supported-runners:: | ||
|
|
||
| .. note:: | ||
| Before using the kit the first time, you should update the J-Link firmware | ||
| in Simplicity Studio or with *JLinkConfig*. | ||
|
|
||
| Flashing | ||
| ======== | ||
|
|
||
| The EFM32TG-STK3300 includes an `J-Link`_ debug adaptor built into the | ||
| board. It is used to flash and debug the EFM32TG on the board. | ||
|
|
||
| Flashing an application to EFM32-STK3300 | ||
| ---------------------------------------- | ||
|
|
||
| The sample application :zephyr:code-sample:`hello_world` is used for this example. | ||
| Build the Zephyr kernel and application: | ||
|
|
||
| .. zephyr-app-commands:: | ||
| :zephyr-app: samples/hello_world | ||
| :board: efm32tg_stk3300 | ||
| :goals: build | ||
|
|
||
| Connect the EFM32TG-STK3300 to your host computer using the USB port. | ||
| Flash the device: | ||
|
|
||
| .. code-block:: console | ||
|
|
||
| west flash | ||
|
|
||
| Connect the board with | ||
| Use a Serial-to-USB cable to connect the host computer with the board. | ||
| The serial port is exposed on the EXP Header (TX: Pin 4, RX: Pin 6). | ||
|
|
||
| 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 should be able to see on the corresponding Serial Port | ||
| the following message: | ||
|
|
||
| .. code-block:: console | ||
|
|
||
| Hello World! efm32tg_stk3300/efm32tg840f32 | ||
|
|
||
|
|
||
| .. _EFM32TG-STK3300 Website: | ||
| https://www.silabs.com/products/development-tools/mcu/32-bit/efm32-tiny-gecko-starter-kit | ||
|
|
||
| .. _EFM32TG-STK3300 User Guide: | ||
| https://www.silabs.com/documents/public/user-guides/ug420-efm32tg-stk3300.pdf | ||
|
|
||
| .. _EFM32TG-STK3300 Schematics: | ||
| https://www.silabs.com/documents/public/schematic-files/BRD2100A-A04-schematic.pdf | ||
|
|
||
| .. _EFM32TG Website: | ||
| https://www.silabs.com/products/mcu/32-bit/efm32-tiny-gecko | ||
|
|
||
| .. _EFM32TG Datasheet: | ||
| https://www.silabs.com/documents/public/data-sheets/EFM32TG840.pdf | ||
|
|
||
| .. _EFM32TG Reference Manual: | ||
| https://www.silabs.com/documents/public/reference-manuals/EFM32TG-RM.pdf | ||
|
|
||
| .. _J-Link: | ||
| https://www.segger.com/jlink-debug-probes.html |
79 changes: 79 additions & 0 deletions
79
boards/silabs/starter_kits/efm32tg_stk3300/efm32tg_stk3300.dts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| /* | ||
| * Copyright (c) 2025 Lukas Woodtli | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| /dts-v1/; | ||
| #include <silabs/efm32tg840f32.dtsi> | ||
| #include <zephyr/dt-bindings/input/input-event-codes.h> | ||
| #include <zephyr/dt-bindings/pinctrl/gecko-pinctrl-s1.h> | ||
|
|
||
| / { | ||
| model = "Silicon Labs EFM32TG STK3300 board"; | ||
| compatible = "silabs,efm32tg_stk3300", "silabs,efm32tg"; | ||
|
|
||
| chosen { | ||
| zephyr,console = &usart1; | ||
LukasWoodtli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| zephyr,flash = &flash0; | ||
| zephyr,shell-uart = &usart1; | ||
| zephyr,sram = &sram0; | ||
| }; | ||
|
|
||
| /* These aliases are provided for compatibility with samples */ | ||
| aliases { | ||
| led0 = &led0; | ||
| sw0 = &button0; | ||
| sw1 = &button1; | ||
| }; | ||
|
|
||
| leds { | ||
| compatible = "gpio-leds"; | ||
|
|
||
| led0: led_0 { | ||
LukasWoodtli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| gpios = <&gpiod 7 0>; | ||
| label = "LED 0"; | ||
| }; | ||
| }; | ||
|
|
||
| buttons { | ||
| compatible = "gpio-keys"; | ||
|
|
||
| button0: button_0 { | ||
| /* gpio flags need validation */ | ||
| gpios = <&gpiod 8 GPIO_ACTIVE_LOW>; | ||
| label = "User Push Button 0"; | ||
| zephyr,code = <INPUT_KEY_0>; | ||
| }; | ||
|
|
||
| button1: button_1 { | ||
| /* gpio flags need validation */ | ||
| gpios = <&gpiob 11 GPIO_ACTIVE_LOW>; | ||
| label = "User Push Button 1"; | ||
| zephyr,code = <INPUT_KEY_1>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| &cpu0 { | ||
| clock-frequency = <32000000>; | ||
| }; | ||
|
|
||
| &gpiob { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &gpioc { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &gpiod { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &usart1 { | ||
| current-speed = <115200>; | ||
| location-tx = <GECKO_LOCATION(1) GECKO_PORT_D GECKO_PIN(0)>; | ||
| location-rx = <GECKO_LOCATION(1) GECKO_PORT_D GECKO_PIN(1)>; | ||
| status = "okay"; | ||
| }; | ||
17 changes: 17 additions & 0 deletions
17
boards/silabs/starter_kits/efm32tg_stk3300/efm32tg_stk3300.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| identifier: efm32tg_stk3300 | ||
| name: EFM32 Tiny Gecko Starter Kit (EFM32TG-STK3300, BRD2100) | ||
| type: mcu | ||
| arch: arm | ||
| ram: 4 | ||
| flash: 32 | ||
| toolchain: | ||
| - zephyr | ||
| - gnuarmemb | ||
| supported: | ||
| - gpio | ||
| - nvs | ||
| testing: | ||
| ignore_tags: | ||
| - net | ||
| - bluetooth | ||
| vendor: silabs |
9 changes: 9 additions & 0 deletions
9
boards/silabs/starter_kits/efm32tg_stk3300/efm32tg_stk3300_defconfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Copyright (c) 2025, Lukas Woodtli | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| CONFIG_ARM_MPU=n | ||
| CONFIG_CONSOLE=y | ||
| CONFIG_UART_CONSOLE=y | ||
| CONFIG_SERIAL=y | ||
| CONFIG_GPIO=y | ||
| CONFIG_CMU_HFCLK_HFXO=y |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.