2016-12-11 04:34 AM
Hi!
Immediately after reading the time from the RTC using HAL_RTC_GET_TIME RTC clock stops. Changes only position Subsecounds. The second problem is that when you first start debugging is successful but the stay and want to restart it stops at Reset_Handler:
ldr sp = _estack / * set stack pointer * /only helps clear the memory of the processor with ST-LINK utility.My workbench :Eclipse Mars 2AC6SW4STM32ORGINAL STLINK2016-12-11 03:05 PM
I fixed debugging brazing the resistor between VCC and boot0. However, the problem with the real-time clock remained.
2016-12-13 05:07 AM
Reading the RTC is more complicated than you might think. In order to get a consistent snapshot of time/date, there are shadow registers used to capture the current time. Here's a comment from the Cube F3 Hal
Call HAL_RTC_GetDate() after HAL_RTC_
GetTime
() to unlock the values
*
in the higher-order calendar shadow registers.
The bottom line is that you need to read both time and data, and in that order.
In my experience it's a good idea to read the hal code for anything you are considering using. There are frequently buried assumptions and even more frequently, the hal code is unnecessarily complex in order to cover all possible scenarios.
2016-12-14 03:22 AM
Thanks is great working !