Skip to main content
AZube.2
Associate III
May 3, 2022
Solved

VBAT/3 ADC internal input measurement

  • May 3, 2022
  • 1 reply
  • 1257 views

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.
Best answer by waclawek.jan

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

1 reply

waclawek.jan
waclawek.janBest answer
Super User
May 3, 2022

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

Got it, thanks!