Skip to main content
Scott Dev
Senior
December 21, 2018
Question

Invalid RTC readings after initialisation.

  • December 21, 2018
  • 0 replies
  • 3815 views

Hi

I am using the RTC on the STM32L433 processor , and works well in periodic and Alarm. I can read in the date and time without any issues within these interupts. But after the RTC is initialised for the first time, reading the date and time register gives the default values. After I setup the RTC I keep checking the RSF flag until its set, then read in the registers.

while((RTC->ISR & RTC_ISR_RSF)==0); //wait until RTC initialised

read in date & time here from RTC->TR and RTC->DR

Anyone tell me when why I cant read the date and time right after initialisation, and only in interupts?

Many Thanks

Scott

This topic has been closed for replies.