Inaccurate measurement of VREFINT
Hi everyone!
I see unexpected values when measuring VREFINT. The ADC measures around 1.18V, on some boards even 1.16V, which is outside the tolerance according to the datasheet:
Reading the calibration value VREFIN_CAL from OTP memory returns a value of 0x5E29 (1,214V).
Considering my ambient temperature of ~25°C, I would not expect the measured value to differ too much from VREFINT_CAL.
I then used VREFIN_CAL to calculate VREF+ according to section 29.4.35 in RM0436:
With the ADC-measurement of VINTREF, this calculates to VREF+= 2.57V. The actual voltage (measured with a multimeter) is 2.502V.
All the other ADC channels are pretty accurate.
My DeviceTree setup for ADC2:
adc2:adc@100{
st,adc-channels = <12 13 14>;
st,min-sample-time-nsecs = <50000>;
assigned-resolution-bits = <16>;
status = "okay";
channel@12 {
reg = <12>;
label = "vsense";
status = "okay";
};
channel@13 {
reg = <13>;
label = "vrefint";
status = "okay";
};
channel@14 {
reg = <14>;
label = "vddcore";
status = "okay";
};
};