-
Notifications
You must be signed in to change notification settings - Fork 2.1k
boards/nucleo-wl55jc, cpu/stm32: enable RTC support, increase RTC accuracy #21837
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
base: master
Are you sure you want to change the base?
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, |
7a3c6a9 to
85af6be
Compare
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 🥳 |
07b30af to
d0a2783
Compare
d0a2783 to
8996fef
Compare
…TC for every lock
|
@crasbe thanks for picking this up and getting the alarms to work! That's amazing |
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