Question
HAL RTC BUG
Posted on September 02, 2014 at 10:40
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.