2010-03-03 08:22 PM
STM32 Vbat pin drains battery quickly
2017-05-22 10:44 AM
So is there anything configured wrong?
In your program? How could I know?
One potential issue is the measurement of battery voltage using ADC, it connects a resistor divider to VBAT which has a quite significant power consumption, one is not supposed to leave it connected.
JW
[EDIT] Oh you've found out yourself... you have to measure it only very rarely.
2017-05-24 12:51 AM
Issue solved.
If VBat is measured by the ADC it switches on a VBATE bit in the CCR register of the ADC. If the VBat voltage only wants to be measured several times and not constantly it is important to switch off the VBATE bit in the ADC_CCR register.
Best regards
Marco