I have a similar issue. In Standby Mode I measure 1uA which is quite possible with the run of the RTC. When I go back to Run Mode I measure 25uA which drains down the battery too fast.
Any ideas to test something?
Which chip? What battery-related functions do you use in your program?
It’s a ST32F429IIT6 with a CR2032 battery. I use only the RTC and it is all working perfect.
The only thing I’m worried about is the 25uA battery current to the chip in run operation, with standby it is 1uA which seem’s to be ok.
Gesendet: Mittwoch, 17. Mai 2017 14:54
An: metzger.marco <firstname.lastname@example.org>
Betreff: Re: - Re: STM32 Vbat pin drains battery quickly
<https://community.st.com/?et=watches.email.thread> STMicroelectronics Community
Re: STM32 Vbat pin drains battery quickly
reply from waclawek.jan <https://community.st.com/people/Waclawek.Jan?et=watches.email.thread> in STM32 MCUs Forum - View the full discussion <https://community.st.com/message/157312-re-stm32-vbat-pin-drains-battery-quickly?commentID=157312&et=watches.email.thread#comment-157312>
OK so write a minimal program which does basically nothing else only what you do with the RTC in the program in question, and does not go to sleep.
I tried with a simple program out of the cube and this works perfect. So is there anything configured wrong?
Gesendet: Mittwoch, 17. Mai 2017 15:12
reply from waclawek.jan <https://community.st.com/people/Waclawek.Jan?et=watches.email.thread> in STM32 MCUs Forum - View the full discussion <https://community.st.com/message/157315-re-stm32-vbat-pin-drains-battery-quickly?commentID=157315&et=watches.email.thread#comment-157315>
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.
[EDIT] Oh you've found out yourself... you have to measure it only very rarely.
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.
Retrieving data ...