How RTC is powered in shutdown mode when VDD is removed
The RTC is connected by a switch to either VDD or VBAT.
Voltage monitoring controls this switch to ensure that the transition occurs before VDD drops below the minimum voltage that the RTC circuitry requires.
However, among several products such as STM32L4 and STM32G4, the reference manual states in the shutdown mode section:
“The brownout reset (BOR) is not available in shutdown mode. No power voltage monitoring is possible in this mode, therefore the switch to the backup domain is not supported."
It may appear that this voltage monitoring is disabled to reduce power consumption.
But, when using the real-time clock (RTC) in shutdown mode, users may observe that the RTC that is powered from VDD continues to operate correctly after VDD is removed and restored, regardless of whether the microcontroller was placed in shutdown mode.
This behavior can be reproduced by performing a test shared by our Super User
- Remove the 0R resistor R90 connecting VDD to VBAT.
- Add a parallel 100uF ceramic capacitor to the decoupling capacitor at VBAT.
- Flash a simple project that places the MCU into Shutdown then remove VDD shorted (3V-to-GND) to ensure that VBAT is powered.
- After several seconds, wake the MCU from shutdown mode and read RTC registers.
The question is how the RTC remains powered in shutdown mode.
The simple answer is that disabling the voltage monitoring system does not mean that the RTC will always stop operating. In practice, because the control switches themselves are supplied from VDD, when VDD collapses, their internal state may naturally force the RTC supply path to move to VBAT.
This can happen on some samples and in some test conditions. However, this transition may occur below the minimum voltage that the RTC supply circuitry requires.
In those conditions, internal registers may already be at risk of corruption during the switchover, so the reference manual states that the switch is unsupported because the behavior is not guaranteed.
Conclusion
Even though Shutdown mode disables voltage monitoring and the RTC backup switch is officially unsupported, the RTC may keep running thanks to a hardware fallback to VBAT when VDD disappears, but this behavior is not guaranteed by design.
Note: section 2.2.10 in the ES0587 mentions this topic.
Related links
- efton.sk STM32 gotchas 308
- ST Community product forums: In shutdown, how is RTC powered?
- Errata sheet ES0587: STM32U535xx and STM32U545xx device errata
