2020-12-22 11:39 AM
Hi,
I am using stm32L431 and (32.768KHz ±20ppm 12.5pF 70kΩ) as LSE.
Every day the time is update by internet, but in some cases, the clock shifting about 5 minutes.
It occur aroung 2 times to week.
what is probably happening?
Binary data format and Alarm A is used.
Any help I would appreciate.
2020-12-22 12:36 PM
Isn't this still the infamous Cube RTC "initialization" which causes loss of subseconds?
https://community.st.com/s/question/0D50X00009XkgBWSAZ/stm32-rtc-loses-one-second-after-each-reset
https://github.com/STMicroelectronics/STM32CubeH7/issues/24
and many other places.
JW
2020-12-22 12:51 PM
Thank for you answer.
But my board sleep and wake up only once a day, after wake up by Alarm it update the time.
But it is wake up about 5 minutes later in some cases, in other cases is working fine.
2020-12-22 02:04 PM
OK, then I don't have an instant answer, just some random remarks:
> But it is wake up about 5 minutes later
How do you know?
Can you check, if the time is correct, just before going to sleep, e.g. outputting it to UART->PC or some other suitable way?
If the device does not go to sleep, is there any time shift?
Is there any power outage during sleep? Is there a battery on VBAT?
Can you try the code - or main parts of it - on a "known good" board such as Disco or Nucleo?
JW