Skip to content

cpu/stm32l5: add initial support + add support for nucleo-l552ze-q board#15192

Merged
benpicco merged 12 commits intoRIOT-OS:masterfrom
aabadie:pr/cpu/stm32l5
Oct 23, 2020
Merged

cpu/stm32l5: add initial support + add support for nucleo-l552ze-q board#15192
benpicco merged 12 commits intoRIOT-OS:masterfrom
aabadie:pr/cpu/stm32l5

Conversation

@aabadie
Copy link
Contributor

@aabadie aabadie commented Oct 9, 2020

Contribution description

This PR adds support to the stm32l5 family and in the meantime to the nucleo-l552ze-q. It's very similar to L4 (regarding clock configuration) but not all bifield defines are available. That's why there's a specific stmclk_l5.c file but the board uses the common l4 clock configuration header.
Only the unsecure mode is available, adding support for TrustedZone and privileged peripheral access is more challenging but could be done in follow-up works.

I was not able to make it work very reliably unless idle thread support is added to the build. My intuition is that there's some sort of race condition at startup but I couldn't find the problem.

  • Features tested with success: I2C, UART, GPIO, GPIO irqs, Timer, flashpage, hwrng
  • Features missing: RTT, RTC

important: support in OpenOCD is not yet available upstream, you have to build OpenOCD with this patch to program the board.

Testing procedure

  • Green Murdock
  • Run the compile_and_test_for_board.py script and check the results:
$ BUILD_IN_DOCKER=1 ./dist/tools/compile_and_test_for_board/compile_and_test_for_board.py . nucleo-l552ze-q --jobs=8 --with-test-only
[...]
ERROR:nucleo-l552ze-q:Tests failed: 14
Failures during test:
- [examples/suit_update](examples/suit_update/test.failed)
- [tests/driver_at86rf2xx_aes](tests/driver_at86rf2xx_aes/test.failed)
- [tests/emcute](tests/emcute/test.failed)
- [tests/gnrc_dhcpv6_client](tests/gnrc_dhcpv6_client/test.failed)
- [tests/gnrc_dhcpv6_client_6lbr](tests/gnrc_dhcpv6_client_6lbr/test.failed)
- [tests/gnrc_ipv6_ext](tests/gnrc_ipv6_ext/test.failed)
- [tests/gnrc_ipv6_ext_frag](tests/gnrc_ipv6_ext_frag/test.failed)
- [tests/gnrc_ipv6_ext_opt](tests/gnrc_ipv6_ext_opt/test.failed)
- [tests/gnrc_ipv6_nib_dns](tests/gnrc_ipv6_nib_dns/test.failed)
- [tests/gnrc_rpl_srh](tests/gnrc_rpl_srh/test.failed)
- [tests/gnrc_sock_dns](tests/gnrc_sock_dns/test.failed)
- [tests/gnrc_tcp](tests/gnrc_tcp/test.failed)
- [tests/periph_timer_short_relative_set](tests/periph_timer_short_relative_set/test.failed)
- [tests/pkg_libfixmath_unittests](tests/pkg_libfixmath_unittests/test.failed)

=> No big surprise.

Issues/PRs references

@aabadie aabadie added Type: new feature The issue requests / The PR implemements a new feature for RIOT CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports labels Oct 9, 2020
@leandrolanzieri
Copy link
Contributor

compile/tests/ztimer_periodic/native:llvm seems to be failing sporadically, it also failed once in #15191.

@benpicco
Copy link
Contributor

Needs a rebase 😉

@aabadie
Copy link
Contributor Author

aabadie commented Oct 20, 2020

rebased

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

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

looks good, just some minor comments

Comment on lines +267 to +269
ifeq ($(STM32_MODEL2), 5)
RAM_LEN = 256K
else ifeq ($(STM32_MODEL2), 6)
RAM_LEN = 256K
endif
Copy link
Contributor

Choose a reason for hiding this comment

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

should those be the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not a copy paste issue but indeed both cases could be put in common.

@benpicco
Copy link
Contributor

Looks good. If that's not a copy & paste error in stm32_mem_lengths.mk this should be good to go.
Please squash.

@aabadie
Copy link
Contributor Author

aabadie commented Oct 23, 2020

Squashed and adapted the stm32_mem_lengths.mk.

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: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants