2015-03-31 08:08 AM
Hello,
I am trying to read the RTC time after setting it up. I am experiencing weird behavior.I am using the STM32L0 discovery board.I am using the new HAL libraries and the RTC alarm example.I am using internal LSI and set the prescaler accordingly, per an app note.I am using IARThe alarm is working all the time, I can see the interrupt fire at the end of a minute delay, so I know the clock is actually workingHowever, I am trying to periodically read the current time using the following code://get time if(HAL_RTC_GetTime(&RtcHandle,¤ttimestructure,FORMAT_BIN)==HAL_OK) { sprintf((char *) statusline,''%2d:%2d:%2d'',currenttimestructure.Hours,currenttimestructure.Minutes,currenttimestructure.Seconds); } else { sprintf((char *) statusline,''error''); } HAL_Delay(5000);The problem: if I set a breakpoint in the code, I see the RTC_TR update and the time is updated on the epd displayIf I remove the breakpoint, the currenttime structure is never updated.Thanks,Ashraf #stm32-rtc2015-03-31 02:10 PM