2012-01-05 12:45 PM
Hello to all,
Recently I noticed a strange behavior on STM32F series RTC, I'd like to draw your attention upon. After a hardware failure (it happened to me many times after an accidental VCC-GND short during board debugging and some times during EMC testing) the RTC crashes irrecoverably and cannot initialized again even after power cycling. The symptom is that RTC library function RTC_WaitForLastTask() or RTC_WaitForSynchro() does not return and loop forever. The only cure I have found so far is VBAT cycling during power off. Is there any other way to restart RTC through software without cycling VBAT ? Thanks in advance, Angelo2012-01-06 12:38 AM
Assume you have a backup battery powering the RTC.
According to RM008 Rev 11, 6.1.3 Backup domain reset The backup domain has two specific resets that affect only the backup domain (see Figure 4). A backup domain reset is generated when one of the following events occurs: 1. Software reset, triggered by setting the BDRST bit in the Backup domain control register (RCC_BDCR). 2. VDD or VBAT power on, if both supplies have previously been powered off. Have you tried the BDRST bit?2012-01-06 07:56 AM
No I didn't. I am just using the standard initialization library functions. Are you sure that library functions doesn't do this by default ? In any case I'll give it a try. The bad thing is that I cannot create this failure on demand.
Thank you very much