2023-02-23 01:16 PM
In the STM32 H7 HAL driver (UM2217) there is the following function:
It is absolutely not clear for me that what is the difference between ADC_CALIB_OFFSET and ADC_CALIB_OFFSET_LINEARITY?
Thank you in advance
2023-02-23 05:50 PM
ADC_CALIB_OFFSET corrects the ADC for bias at zero volts input.
ADC_CALIB_OFFSET_LINEARITY corrects the ADC gain over the input voltage range.
From what I can gather from the H750 reference manual, your choices are offset only or offset plus linearity calibration.
Cheers, Hal
2023-02-24 02:53 PM
However, if ADC_CALIB_OFFSET only corrects your offset error but ADC_CALIB_OFFSET_LINEARITY corrects both your offset + gain error, then why do you have these two choices? I mean, you could simply just use ADC_CALIB_OFFSET_LINEARITY option all the time and it corrects everything.