Skip to main content
Visitor II
July 7, 2020
Question

HAL_RTC_GetTime - Problem for increment the count according to seconds

  • July 7, 2020
  • 3 replies
  • 1182 views

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.

    This topic has been closed for replies.

    3 replies

    Graduate II
    July 7, 2020
    Super User
    July 8, 2020

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

    JW

    Visitor II
    July 28, 2020

    Thank you. It solved my issue.