Skip to main content
AZube.2
Associate III
May 3, 2022 8:06 AM UTC
Solved

VBAT/3 ADC internal input measurement

Is there any code example on how to perform the VBAT/3 measurement. I need to measure my battery level (1.8V-2.7V) which I connect to VBAT pin. VDD and the rest of the micro supply pins are coneccted to a DCDC output which gives 3.3V.

This topic has been closed for replies.
waclawek.jan
waclawek.janBest answer
Super User
May 3, 2022 2:13 PM UTC

It's identical to taking measurement on any other ADC channel, except you have to set ADC_CCR.VBATEN before starting the measurement. Read Battery voltage monitoring subchapter in RM, and VBAT monitoring characteristics in the Datasheet.

JW

2 replies

waclawek.jan
waclawek.janBest answer
Super User
May 3, 2022 2:13 PM UTC

It's identical to taking measurement on any other ADC channel, except you have to set ADC_CCR.VBATEN before starting the measurement. Read Battery voltage monitoring subchapter in RM, and VBAT monitoring characteristics in the Datasheet.

JW

AZube.2
AZube.2Author
Associate III
May 3, 2022 2:17 PM UTC

Got it, thanks!