cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4R5: RTC slow when using SHUTDOWN or STANDBY mode with periodic wakeup

js23
Associate III

Hello,

while testing our new PCB we discovered, that the RTC does not keep time correctly. I therefore measured the 32kHz clock driven by an external crystal, therefore I enabled PA2 for LSCO output: Interestingly, the signal was fine - stable and no missing pulses, approx. 10 PPM to fast. But when the time of the RTC was absovered, it was much slower then expacted. Within 20 minutes, more than a second got lost.

I then switched to the STM32L4R5ZI Nucleo board, same result there. After some time I could track it down to the use of the SHUTDOWN mode. When it is not used, the time is correct. Obviously, with every wakeup from SHUTDOWN, the RTC looses some ms.

I added the code that I used for the Nucleo board, it is the modified RTC_Alarm example (only the main.c is modified, I attached it).

With every wakeup, a LED flashes on the board, the other LED every minute. When running it for more than 10 minutes, one can see that the minute flash comes late.

Maybe anything I forgot to init after wakeup?

Regards,

Johannes

0 REPLIES 0