cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_RTC_GetTime - Problem for increment the count according to seconds

Param sivan
Associate II

Hi,

In one of my task, i just increment a one seconds counter variable after read HAL_RTC_GetTime  and compare the read seconds value is change or not. It doesn't work until I comment the following line in the HAL_RTC_GetTime  function as described in one thread in the forum. What is the cause? How do I resolve this issue ? Thanks in advance.

sTime->SubSeconds = (uint32_t)(hrtc->Instance->SSR);

Thanks,

Param.

3 REPLIES 3
Piranha
Chief II

As Piranha said above: read date after reading time, or set RTC->CR.BYPSHAD.

JW

Param sivan
Associate II

Thank you. It solved my issue.