‘HAL_RTC_GetTime’ was not updating the time.
Hi Master:
Platform: STM32H743
HAL library firmware: STM32Cube FW_H7 V1.12.1
Question:
As shown in the following code, it takes a long time to update 'sTime', perhaps a few minutes.
RTC_TimeTypeDef sTime = { 0 };
RTC_DateTypeDef sDate = { 0 };
ASSERT(HAL_RTC_GetDate(&hrtc, &sDate, RTC_FORMAT_BIN) == HAL_OK);
ASSERT(HAL_RTC_GetTime(&hrtc, &sTime, RTC_FORMAT_BIN) == HAL_OK);
But when I switch the order of execution, it is updated every second
RTC_TimeTypeDef sTime = { 0 };
RTC_DateTypeDef sDate = { 0 };
ASSERT2(HAL_RTC_GetTime(&hrtc, &sTime, RTC_FORMAT_BIN) == HAL_OK);
ASSERT2(HAL_RTC_GetDate(&hrtc, &sDate, RTC_FORMAT_BIN) == HAL_OK);What is the reason for this? Thank you so much
