cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F446RE - RTC time drift under ''heavy'' load of wake up's and standby mode

David Lichterov
Associate II
Posted on December 10, 2017 at 16:56

Hey,

I am trying to test my MCU with the sequence bellow in order to check if i get time drift on the RTC clock.

loop on :

1. print RTC time + date

2.  enter stand by mode

I tested the wake up from stand by mode with :

1. ALARM every 5 seconds

2. rising edge on the WKUP pin

This sequence make's the RTC clock drift almost immediately and the drift is getting larger and larger as the time passes ( I print the RTC clock and compare it to a stop watch).

Am i doing some thing wrong that causes this issue ? I would be happy to supply any parts of the code if needed.

Thanks !

#stm32-f4 #stm32f4-rtc #rtc
1 ACCEPTED SOLUTION

Accepted Solutions
john doe
Lead
Posted on December 10, 2017 at 17:42

try RTC->CR->BYPSHAD = 1 and read the registers again because the shadow registers are not updated during stop or standby. otherwise, wait for RTC->ISR->RSF to set.

Checking out the F446 errata RTC section might help too:

0690X00000609AAQAY.png

View solution in original post

3 REPLIES 3
john doe
Lead
Posted on December 10, 2017 at 17:42

try RTC->CR->BYPSHAD = 1 and read the registers again because the shadow registers are not updated during stop or standby. otherwise, wait for RTC->ISR->RSF to set.

Checking out the F446 errata RTC section might help too:

0690X00000609AAQAY.png
Zt Liu
Senior III
Posted on December 11, 2017 at 04:54

You may also check that you don't call something like HAL_RTC_Init() every time you wake up.

Also make sure that your LSE XTAL is loaded with proper capacitors to get the nominated 32.768kHz.

David Lichterov
Associate II
Posted on December 11, 2017 at 15:15

Thank you both, your answers really helped . I got it working now.