boards/nucleo-wl55jc, cpu/stm32: enable RTC support, increase RTC accuracy#21837
Conversation
|
I created a new PR because the commit message of the original PR had to be changed and I didn't want to modify the original PR. The actual content is unchanged. |
Okay, that wasn't it. Also the band-aid fix was rather a coincidence to work apparently since the clock didn't actually run. The reason for that is the use of [1] page 989 I added this without using the Furthermore, |
85af6be to
e3946b7
Compare
|
So I took the code from @Meumeu that was visible in the issue #8746 and adapted it to the latest code. The idea was originally from @MichelRottleuthner. The original pros and cons remain:
|
|
Okay the original solution from @Meumeu did not quite work because the RTC registers have to be enabled first, otherwise the Edit: I also added a check for the Now it is very stable though. The only thing I still have to check is if the RSF-flag thing is also required for the other STM32 families (and therefore if the RTC actually works on other STM32 families or if the test just coincidentally worked). |
|
A test trace is in #8746 (comment), I did not want to post the full sources and logs here. |
|
Nucleo-WB55 works with The last two both hang at the "waiting for RSF flag to be set by hardware". The reason for that is that the This is now fixed with the latest fixup. This is now officially done and ready for review 🥳 |
d0a2783 to
8996fef
Compare
|
@crasbe thanks for picking this up and getting the alarms to work! That's amazing |
Awesome to hear back from you :) |
I would love to, but unfortunately I had to hand all the hardware back when I finished my phd project so i don't have access to it anymore |
benpicco
left a comment
There was a problem hiding this comment.
The changes look good and I trust your testing.
|
Thanks for the review :) |
6dd5619 to
76d8fec
Compare
76d8fec to
5c12ed9
Compare
Contribution description
This PR takes over #20536 and enables the RTC peripheral for the Nucleo-WL55JC (and WL55 processor in general).
The original author @FlapKap said that he didn't get the alarms to work. The reason for that is a combination of #8746 and the note from the reference manual [1]
Essentially we have a race condition in
tests/periph/rtcwhere the sleep period of 2 just causes this issue. Changing that period fixes the issue:Of course this is just a band-aid fix and the real fix has to be done for #8746, but this is out of scope for this PR.
Testing procedure
Run the
tests/periph/rtctest on a Nucleo-WL55JC board.Behavior with this PR and the aforementioned change:
Issues/PRs references
Taken over from #20536.
Fixes #18789.
Fixes #8746 thanks to @Meumeu.
Links
[1] https://www.st.com/resource/en/reference_manual/dm00451556-stm32wl5x-advanced-armbased-32bit-mcus-with-subghz-radio-solution-stmicroelectronics.pdf