Stm32L452 RTC Clock Drift with use---related to entering/exiting shutdown mode?
Hi. I'm operating an stm32l452 MCU which enters and exits shutdown mode frequently, and am using the internal RTC of the chip to keep track of time as the days progress. I have noticed that over continued use (with frequent exits/entrances to shutdown mode), the RTC is losing time. Depending on the frequency of shutdowns, the time loss is greater or smaller. The system can exit shutdown mode using either predefined wakeup pins or an alarm (ignoring watchdog and normal power related events).
For example, some data I have collected through use...All of these tests are over 10 minutes. In these tests to speed up automated testing, I forced a watchdog reset at the following intervals.
- 1 second reset interval: ~22s lost
- 5 second reset interval: ~12s lost
- 10 second reset interval: ~9s lost
- 30 second reset interval: ~6s lost
- 60 second reset interval: ~3s lost
What I am curious about is that is this expected? Is the entrance/exit to shutdown mode possibly freezing the clock for a split second, and over time this accumulates? Or is this something else entirely and I am looking at a non-factor?
Thank you!