2017-12-10 07:56 AM
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 #rtcSolved! Go to Solution.
2017-12-10 08:42 AM
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:
2017-12-10 08:42 AM
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:
2017-12-10 07:54 PM
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.
2017-12-11 06:15 AM
Thank you both, your answers really helped . I got it working now.