Skip to content

boards/slstk3301a: add support#22069

Open
basilfx wants to merge 7 commits intoRIOT-OS:masterfrom
basilfx:feature/add_slstk3301a
Open

boards/slstk3301a: add support#22069
basilfx wants to merge 7 commits intoRIOT-OS:masterfrom
basilfx:feature/add_slstk3301a

Conversation

@basilfx
Copy link
Member

@basilfx basilfx commented Feb 10, 2026

Contribution description

This PR adds support for the SLSTK3301A starter kit. It is based on the EFM32TG11 Series 1 microcontroller, which is a Cortex M0+. It has about 128 KiB of flash and 32 KiB of memory, rich amount of peripheral and quite some more advanced features such as HWRNG and CAN.

In terms of capabilities I would put it between the SLSTK3400A and the SLSTK3401A. And for the line-up I think it is a relevant board. The STK3200 and and SLSTK3400A have a Cortex M0+ too, but for Series 0. They often lack flash and/or memory to run more-advanced applications. This board is more capable.

I have this board for quite some time, but never bothered to add it before. I am considering this family of microcontrollers for a next project, and with #22040, adding support was easier. Although the kit is a bit older, you can still buy this starter kit (it is not not-recommended for new designs).

Testing procedure

This board makes use of the drivers already working for other EFM32-based boards, so it should be straight forward to run some applications and see how they work.

I tested a few of the peripheral tests, and some basic interaction with examples/default/basic.

Screenshots of test applications

Just a few screenshots of the test I ran (not all of them).

examples/default/basic

IMG_6316

tests/periph/uart

tests/periph/uart_mode

tests/periph/hwrng

tests/periph/wdt

Scherm­afbeelding 2026-02-10 om 07 52 56

Issues/PRs references

Depends on #22040.

@github-actions github-actions bot added Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: doc Area: Documentation Area: build system Area: Build system Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports Area: Kconfig Area: Kconfig integration labels Feb 10, 2026
@basilfx basilfx force-pushed the feature/add_slstk3301a branch 2 times, most recently from f6f58d5 to b8d422c Compare February 10, 2026 10:04
@crasbe crasbe added the State: waiting for other PR State: The PR requires another PR to be merged first label Feb 10, 2026
Copy link
Contributor

@crasbe crasbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a static error and some copyright headers might have to be adjusted.

#endif

/**
* @name Xtimer configuration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that still relevant? xtimer is deprecated and the compat layer uses ztimer in the backend 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the other EFM32-based boards still have the same defines, so I would presume it is still relevant.

For example: https://github.com/RIOT-OS/RIOT/blob/master/boards/slstk3401a/include/board.h#L36

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The xtimer defines are used as fallback for ztimer apparently:

/* for ZTIMER_USEC, use xtimer configuration if available and no ztimer
* specific configuration is set. */
#if CONFIG_ZTIMER_USEC_TYPE_PERIPH_TIMER
# ifndef CONFIG_ZTIMER_USEC_DEV
# ifdef XTIMER_DEV
# define CONFIG_ZTIMER_USEC_DEV XTIMER_DEV
# endif
# endif
# ifndef CONFIG_ZTIMER_USEC_BASE_FREQ
# ifdef XTIMER_HZ
# define CONFIG_ZTIMER_USEC_BASE_FREQ XTIMER_HZ
# endif
# endif
# ifndef CONFIG_ZTIMER_USEC_WIDTH
# ifdef XTIMER_WIDTH
# define CONFIG_ZTIMER_USEC_WIDTH XTIMER_WIDTH
# endif
# endif
#endif

Although with #21960 on the horizon, it might be better to just use the respective ztimer defines. One thing less to (eventually) migrate.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I will adapt and provide a PR for the other boards later.

* @{
*/
#ifndef CLOCK_HF
#define CLOCK_HF cmuSelect_HFXO
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define CLOCK_HF cmuSelect_HFXO
# define CLOCK_HF cmuSelect_HFXO

Same for many other locations, this is just an example.


### Pinout
This is the pinout of the expansion header on the right side of the board.
PIN 1 is the bottom-left contact when the header faces you horizontally.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit confusing IMO, especially since the table has pin 1 in the bottom right position 🤔

Copy link
Member Author

@basilfx basilfx Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was an auto-generated document, and it turns out that this is not the case for this board (it is actually top-left).

This will probably be the case for other EFM32-boards (starting with SLSTK*).

On second thought: it is correct. The table reflects the documentation and the silk screen.

image

Comment on lines 146 to 147
the speeds above, ensure to pass `EFM32_HFXO_FREQ=freq_in_hz` and
`EFM32_LFXO_FREQ=freq_in_hz` to your compiler.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a CFLAG or an environment variable?

Copy link
Member Author

@basilfx basilfx Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes this into 'compiler defines'.

Comment on lines 235 to 236
## License information
Silicon Labs' EMLIB: zlib-style license (permits distribution of source).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that for this README or for the Toolchain?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is to mention that emlib (used by this board and CPU) permits distribution of source.

This is also added to the other EFM32 boards.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but the headline is at the same level as the other headlines, it's not on a sub-level for emlib.

Suggested change
## License information
Silicon Labs' EMLIB: zlib-style license (permits distribution of source).
### License information
Silicon Labs' EMLIB: zlib-style license (permits distribution of source).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah now I understand. I'll address this and provide a PR for the other board (with probably the same mistake) too (will also check for other inconsistencies).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved this below the emlib section as an additional sentence to that section.

@@ -0,0 +1,9 @@
MODULE = cpu_efm32tg11b

# (file triggers compiler bug. see #5775)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that still the case? #5775 got fixed with #14422 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still in-place for many more CPUs (als non-EFM32), so the honest answer is: I don't know.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still in-place for many more CPUs (als non-EFM32)

That doesn't have to mean much, it is not unlikely that these remarks were not removed when the bug was fixed.

Ping @maribu 👀

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, let's drop and check if something breaks when compiling with LTO=1

Copy link
Member Author

@basilfx basilfx Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unable to build with LTO=1, even without dropping this line.

There are many errors, but most are related to undefined reference to '__wrap_puts' and undefined reference to '__wrap_printf'.

@basilfx
Copy link
Member Author

basilfx commented Feb 10, 2026

I did not alter the copyright headers, because they have been copy-pasted from the original board back in the days. This board was already generated a long time ago ;-)

@basilfx basilfx force-pushed the feature/add_slstk3301a branch from 6f936f3 to 5545621 Compare February 11, 2026 22:37
@github-actions github-actions bot added the Area: tools Area: Supplementary tools label Feb 11, 2026
@basilfx basilfx removed the State: waiting for other PR State: The PR requires another PR to be merged first label Feb 11, 2026
@basilfx
Copy link
Member Author

basilfx commented Feb 11, 2026

#22040 is now merged, so no more dependencies.

@basilfx basilfx added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Feb 11, 2026
@riot-ci
Copy link

riot-ci commented Feb 12, 2026

Murdock results

✔️ PASSED

1a8067c fixup! boards/slstk3301a: add support

Success Failures Total Runtime
11004 0 11005 08m:52s

Artifacts

@basilfx basilfx force-pushed the feature/add_slstk3301a branch from 5545621 to 1a8067c Compare February 15, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: boards Area: Board ports Area: build system Area: Build system Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: Kconfig Area: Kconfig integration Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants