2026-05-05 2:38 PM - edited 2026-05-05 2:38 PM
Hi,
I need to measure a 4.2V battery while my MCU's supply varies between 2.0V and 3.3V. Since VDDA is the ADC reference, raw ADC counts will drift as the supply changes.
And I don't want to use any external references.
My plan:
The formula being:
V_battery = 3.0 V × (VREFINT_CAL / VREFINT_DATA) × (ADC_battery / 4095) × ((R1 + R2) / R2)
Is this the correct approach for getting a supply-independent battery reading on this part?
Anything I'm missing... sampling time for VREFINT, divider impedance vs. ADC sample-and-hold, or calibration register quirks specific to the C0 series?
Thank you