cancel
Showing results for 
Search instead for 
Did you mean: 

RTC shifting in stm32L431

GFont.1
Associate III

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.

3 REPLIES 3

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

GFont.1
Associate III

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.

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