ADC Measurements of VDD
Dear Community,
I started investigating issues on one old project that based on STML071xB and has been implemented by another engineer. I got confused with implementation of battery measurements. Here is the thing:
1. MCU is directly supplied by a battery (working voltage is expected to be in 2-3V range)
2. VREF+ is connected to a battery
3. ADC internal channel is used to measure VDD level
Datasheet says that VDD can be measured accurately using internal ADC channel when VREF+ is not connected. Meaning, an internal reference voltage which is 3.0V (bandgap) is used as a reference to measure VDD. But what if VREF+ is connected to a battery voltage, how VDD is supposed to be measured in this case?
From my understanding, VDD cannot be measured when VREF+ is used as a reference since it will be giving nearly maximal raw values on ADC output.
What is the most confusing part is when I use external supply to power the device and change output voltage I see accurate measurements of the batter. How is it possible? But on the field we have many devices that are showing suspicious battery readings.
Please advise what I'm wrong with.
Thank you!
