RTC shadow register incosistent readings #14241
Unanswered
jotamudo
asked this question in
STM32 / Pyboard
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Greetings!
So I've been playing a little with a pyboard-sf2 and eventually noticed some weird "skips" on a seconds counter before the subsseconds had finished counting a roll-over, as an example (I hadn't synchronized the RTC to the pc's clock):
I had the suspicion that something was weird with these "jumps" and found them by leaving a board thorough a whole night running a continuous comparison between the rtc time-delta and the ticks_us time-delta, and apparently it's the case for every stm32 RTC series launched before 2016: http://www.efton.sk/STM32/gotcha/g82.html
Now I don't know if it's plausible (or desireable) to include a fix-up, but I've succesfully fixed the error locally by modifying a little the code provided here, more specifically by starting the readings by the subsecond counter instead of the date/time register with the shadow register lock mechanism disabled:
I've searched a bit and didn't find any issue mentioning this RTC detail ( #12957 may be related?) but found that it'd be nice to have a discussion to whether it's best to include it directly into the c module, do you guys have any position over it?
Beta Was this translation helpful? Give feedback.
All reactions