My vdd readout is high. Using Vrefint ADC channel.
Hi,
My vdd calculates to 3.49V but I measure it to 3.30V with a voltmeter.
The Vrefint calibration value at 0x1FFFF7BA is 1550.
The ADC value I read is 1465, fluctuating +/- 1.
Calculation is 3.3V * VrefintCalValue / AdcValue = 3.49V
I'm guessing it's my adc read value that is off, not the factory calibration value?
MCU is STM32F042G6Ux. ADC code is done in CubeMX.
ADC is clocked with a prescaler of /4 and sampletime is 239.5 cycles. So all signals should have plenty of time to settle between samples.
Code is inside this link ->
