AnsweredAssumed Answered

HAL RTC BUG

Question asked by rook.malcolm on Sep 2, 2014
Latest reply on Nov 30, 2017 by buga.d_niel
There appears to be a bug in the HAL drivers for the RTC.

I have only recently migrated to STM micros and am in the process of rewriting a number of projects to use them.  I have a project running on a STM32F405RG with 16MHz external crystal used as source for both main 160MHz system clock and RTC.
If the RTC is read using HAL_RTC_GetTime it will read a valid, and correct, time but subsequent reads only return the same time as the first read.
After many hours of head banging I have found a work around which is to read the date as well with HAL_RTC_GetDate even though the date is not wanted.  The RTC reads are then correct.

Outcomes