AnsweredAssumed Answered

RTC, big TimeGap between setting new Time and Availability

Question asked by Nor Sch on Feb 13, 2017
Latest reply on Feb 13, 2017 by Nor Sch

I simply use the normal Functions given by RTC-Lib from Cube, means I use these Calls:

 

uint32_t tFormat = RTC_FORMAT_BIN;
...
HAL_RTC_SetDate(&hrtc, &myDate, tFormat);
HAL_RTC_SetTime(&hrtc, &myTime, tFormat);
...
HAL_RTC_GetDate(&hrtc, &myDate, tFormat);
HAL_RTC_GetTime(&hrtc, &myTime, tFormat);

 

In a Thread I check every Second if the Hour + Minute is changed to show this in the Gui-Thread. But I have a strange Problem with this. After Setting the Time it needs sometimes only 2-3 Seconds, often 6-8 Seconds and sometimes even 30 Seconds until the GetTime delivers the new Value (seen with Traces in the relevant Functions). I could fasten up the Update with some (senseless) GetDate() + GetTime() directly after the SetDate() + SetTime(). But anyway the new Time is not immediately there. That's really ugly ...

 

Has anyone some suggestions?

Outcomes