2025-12-11 1:06 AM - last edited on 2025-12-12 3:06 AM by Andrew Neil
Hi everyone,
I’m using the STM32F407VET6 VBAT pin to power the RTC, and I plan to use a CR2032 coin cell directly.
I noticed that many schematics add a diode between the CR2032 and the VBAT pin to prevent reverse charging, but after checking the datasheet I’m still not fully sure whether this is actually required.
I’d like to ask two questions:
When the main supply is present, can the F407’s VBAT pin back-charge the coin cell? Is a diode necessary?
Does ST provide an official reference design for powering VBAT with a CR2032? If so, where can I find it?
Thanks for your help!
Solved! Go to Solution.
2025-12-11 2:39 AM - edited 2025-12-11 2:43 AM
Boff!! I completely forget that there is an internal switch (the Power switch) that switches from VBAT to VDD when VDD is present.
From RM0090 figure 9:
So there is no need for these diodes! Need to connect the battery directly to VBAT pin.
Thank you @Peter BENSCH for the notification for that very basic information!
2025-12-11 1:17 AM - edited 2025-12-11 1:23 AM
Hello,
This is a schematic from the hardware getting started application note AN4488: either you select the battery or VDD. Generally, if the battery is used, it's connected directly to VBAT.
But that depends on the usage. Why are you connecting VBAT to both power supplies? do you need to save the power consumption from the VBAT while VDD is present?
I think it's doable but you need to select diodes with low voltage drop and ensure you have VDD > VBT1
2025-12-11 2:39 AM - edited 2025-12-11 2:43 AM
Boff!! I completely forget that there is an internal switch (the Power switch) that switches from VBAT to VDD when VDD is present.
From RM0090 figure 9:
So there is no need for these diodes! Need to connect the battery directly to VBAT pin.
Thank you @Peter BENSCH for the notification for that very basic information!
2025-12-11 3:03 AM
As I understand it, you can't really power the MCU from VBat.
The DS says :
> The VBAT pin allows to power the device VBAT domain from an external battery, an external supercapacitor, or from VDD when no external battery and an external supercapacitor are present.
> VBAT operation is activated when VDD is not present.
> The VBAT pin supplies the RTC, the backup registers and the backup SRAM.
Supplying the MCU or the VBat domain are different use cases.
Although I think powering a F407 from a CR3032 is not a a viable idea in the first place.
2025-12-11 3:40 AM - edited 2025-12-11 3:45 AM
@Ozone wrote:
As I understand it, you can't really power the MCU from VBat.
The DS says :
> The VBAT pin allows to power the device VBAT domain from an external battery, an external supercapacitor, or from VDD when no external battery and an external supercapacitor are present.
> VBAT operation is activated when VDD is not present.
> The VBAT pin supplies the RTC, the backup registers and the backup SRAM.
Supplying the MCU or the VBat domain are different use cases.
Sorry @Ozone I didn't catch your point. Do we contradict at some points?
The OP is using two power supplies VBAT and VDD to power supply the VBAT (the back up domain) over diodes:
That doesn't have no sense as the internal power switch is keeping the backup domain powered between VDD - VBAT depending on the VDD availability.
@Ozone wrote:
Although I think powering a F407 from a CR3032 is not a a viable idea in the first place.
He's not powering the MCU from the battery but the question is about VBAT not VDD ;)
2025-12-11 4:34 AM
> He's not powering the MCU from the battery but the question is about VBAT not VDD ;)
I'm not sure, the wording of his post is not very clear in this regard.
I just wanted to point out that this would not work.
But the datasheet has more to say about this topic :
When the internal reset is OFF, the following integrated features are no more supported:
...
- VBAT functionality is no more available and VBAT pin should be connected to VDD
Which, according to my interpretation, means that the VBat domain is without power in this case, and the diode network is required if one wants to keep the RTC and backup states.
I'm not a hardware guy, though.