Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

STM32F429 Why I can't read RTC?

I have a question about the RTC on STM43F429. I have a board that manages the RTC date and Time with a battery backup. After some test I have this problem: after a reset , when I try to read the RTC time for the first time, the RTC seems stopped (I see hh:mm:ss stipped) but if I look at the internal RTC register (with debugger) all is OK... so I cant read the current time. To solve this I have to read the date before and then I can read the time and the RTC is running correctly.. I don't understand why I have to read the date before to read the time. Can someone explay this? Thanks

like image 661
Lorenzo Avatar asked Dec 06 '25 12:12

Lorenzo


1 Answers

You need wait when data from RTC will be synchronised with their shadow registers, it is every two RTC clocks, and can be checked with RTC_ISR.RSF (Registers Synchronisation Flag).

More info is in Reference manual section 26.3.2 Real-time clock and calendar.

like image 136
vlk Avatar answered Dec 08 '25 06:12

vlk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!