Skip to main content
Heidi Holmes
Visitor II
January 12, 2017
Question

STM32F303 Vbat battery voltage monitoring

  • January 12, 2017
  • 1 reply
  • 1995 views
Posted on January 12, 2017 at 06:57

I saw the below statement in the

http://www.st.com/content/ccc/resource/technical/document/datasheet/f2/1f/e1/41/ef/59/4d/50/DM00058181.pdf/files/DM00058181.pdf/jcr:content/translations/en.DM00058181.pdf

and if it means what it says, that I can measure battery voltage, then how do I get this MCU to read my battery voltage? Are there extra components I need to get this to work, how would I hook this up, if no extra components requires, is this all through software, where are the codes, is there an example of schematic and/or code somewhere? I have yet to come across details of how to actually measure battery voltage using this embedded feature so if there is documentation somewhere that I missed, please let me know. Thanks.

3.13.3 VBAT battery voltage monitoring

This embedded hardware feature allows the application to measure the VBAT battery voltage using the internal ADC channel ADC1_IN17. As the VBAT voltage may be higher than VDDA, and thus outside the ADC input range, the VBAT pin is internally connected to a bridge divider by 2. As a consequence, the converted digital value is half the VBAT voltage.

#vbat-monitoring #stm32f3
This topic has been closed for replies.

1 reply

ST Technical Moderator
January 12, 2017
Posted on January 12, 2017 at 08:53

Hello

Holmes.Heidi

‌,

Usingthe VBATEN bit in the ADC12_CCR register to switch to the battery voltage. You can reviewthe reference manual

http://www.st.com/content/ccc/resource/technical/document/reference_manual/4a/19/6e/18/9d/92/43/32/DM000435pdf/files/DM000435pdf/jcr:content/translations/en.DM000435pdf

for more details about Vbat monitoring.

Regards

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks