cancel
Showing results for 
Search instead for 
Did you mean: 

What is the difference between ADC_CALIB_OFFSET and ADC_CALIB_OFFSET_LINEARITY (STM32H7 HAL ADC) ?

GVG
Associate II

In the STM32 H7 HAL driver (UM2217) there is the following function:

0693W00000aHYEtQAO.jpgIt is absolutely not clear for me that what is the difference between ADC_CALIB_OFFSET and ADC_CALIB_OFFSET_LINEARITY?

Thank you in advance

2 REPLIES 2
raptorhal2
Lead

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

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.