cancel
Showing results for 
Search instead for 
Did you mean: 

RTC crash on STM32F103

abrous3d
Associate II
Posted on January 05, 2012 at 21:45

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,

Angelo
2 REPLIES 2
John F.
Senior
Posted on January 06, 2012 at 09:38

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?

abrous3d
Associate II
Posted on January 06, 2012 at 16:56

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