cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Vbat pin drains battery quickly

mcgilvra2
Associate II
Posted on March 04, 2010 at 05:22

STM32 Vbat pin drains battery quickly

11 REPLIES 11
Posted on May 22, 2017 at 17:44

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.

Posted on May 24, 2017 at 07:51

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