cancel
Showing results for 
Search instead for 
Did you mean: 

Resetting RTC domain (workaround for an issue in device errata) would clear time/date data.

wesleywong
Associate

MCU: STM32G070CBT6

According to ES0468 - Rev 5 (STM32G070CB/KB/RB device errata), for issue 2.2.10, the only workaround can be applied is erasing the RTC domain by software during power up.

 

But this workaround would clear RTC time/date data. Normally, the RTC would keep running as long as VBAT is powered. When VDD is powered, I can keep the RTC time/date data if backup register has specific data. But after appling above workaround, the RTC time/date data and backup register would be erased.

 

Is there any way to keep the RTC time/date while appling the workaround?

3 REPLIES 3

That erratum describes incomplete backup-domain (i.e. VBAT-powered circuitry) *reset*, i.e. a situation, where VBAT is not powered actively from a battery, and drops below 700mV.

If your RTC is running, you have a battery on VBAT which certainly hasn't dropped that low, so the problem can't occur.

JW

The issue is that the software cannot distinguish whether VBAT and VDD are both dropped below 700mV. 

During power up, RCC_FLAG_PWRRST (BOR or POR/PDR reset flag) would be set even VBAT is powered all the time.

The software needs to know if VBAT and VDD are both dropped below 700mV and then decides to erase RTC domain or not.

Are you trying to use a capacitor/supercap as VBAT source?

Unfortunately, there's not much that can be done in that case.

One option may be to characterize how long it the clock able to run in VBAT mode, then in runtime regularly store current time into a backup register; and upon reset check, if the time in RTC is within the expected run time - if it is not, VBAT has been discharged too far, so then perform the backup-domain reset.

JW