AnsweredAssumed Answered

RTC SubSeconds gets in count down mode

Question asked by Sachin Gole on Apr 10, 2018
Latest reply on Apr 10, 2018 by waclawek.jan

Following is GetTime function, It always give SubSeconds from 255 to 0 in count down mode. Values read in few ms interval. 

static void RTC_GetTime(void)

{
RTC_DateTypeDef sdatestructureget;
RTC_TimeTypeDef stimestructureget;
HAL_RTC_GetTime(&hrtc, &stimestructureget, RTC_FORMAT_BIN);
HAL_RTC_GetDate(&hrtc, &sdatestructureget, RTC_FORMAT_BIN);
printf("\r\n%0.2d:%0.2d:%0.2d:%0.2d", stimestructureget.Hours, stimestructureget.Minutes, stimestructureget.Seconds, stimestructureget.SubSeconds);
}

 

logs are :-

05:34:35:149
05:34:35:99
05:34:35:48
05:34:36:254
05:34:36:203
05:34:36:153
05:34:36:103
05:34:36:52
05:34:36:02
05:34:37:208
05:34:37:157
05:34:37:107
05:34:37:57
05:34:37:06
05:34:38:212
05:34:38:161
05:34:38:111
05:34:38:61
05:34:38:10
05:34:39:216
05:34:39:166
05:34:39:115
05:34:39:65
05:34:39:15
05:34:40:220
05:34:40:170
05:34:40:120
05:34:40:69
05:34:40:19
05:34:41:225

 

Any suggestion ?

Outcomes