2019-05-17 03:37 AM
The CPU is powered using 1.8V both on VDD as well as VDDA (4.7uH coil as well as 1n/100n/1u capacitors in power path).
When I measure the Vbat pin (100n cap supporting) in the range 2V-3.6V using the ADC I always measure about 0.1V less than the voltage as measured by my lab equipment.
Where does this offset originate from? I find nothing in AN2834 that would correspond to such a high error (it is like 228 LSB)
2019-05-17 03:38 AM
sorry, due to the 1/3 scaling the error is only 76 LSB at the input level
2019-05-17 03:40 AM
With VDDA 1.8 Volt you can not measure 2 to 3.6 Volt. So probably you have a resistive divider that you don't tell to us. Maybe RIN of the ADC and the divider interact noticably?
2019-05-17 03:55 AM
Did you perform calibration?
Note, that depending on the battery's capacity and internal resistance, the VBAT measurement divider can be a significant load.
JW