cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 ADC calibration, I don't understand

linuxfan
Associate II

Hi all,

I am experimenting with H7 ADC (after having tried the G4 ADC).

I see in the HAL that the calibration, HAL_ADCEx_Calibration_Start(), for H7 MCU wants a parameter more than G4. One should specify ADC_CALIB_OFFSET or ADC_CALIB_OFFSET_LINEARITY.

I am confused, and reading the datasheet does not help me. Can't understand the difference between the two methods.

Should I use ADC_CALIB_OFFSET  or  ADC_CALIB_OFFSET_LINEARITY, when calling the calibration_start()?

Or should I call the calibration *twice*, one for each option?

TY,
linuxfan

1 ACCEPTED SOLUTION

Accepted Solutions
linuxfan
Associate II

Don't mind. After reading AN5354 "getting-started-with-the-stm32h7-series-mcu-16bit-adc" things are a little clearer.

"Linearity" has to be called once (after a reset), and ADC_CALIB_OFFSET must be performed once and eventually more times later, when conditions change.

 

View solution in original post

1 REPLY 1
linuxfan
Associate II

Don't mind. After reading AN5354 "getting-started-with-the-stm32h7-series-mcu-16bit-adc" things are a little clearer.

"Linearity" has to be called once (after a reset), and ADC_CALIB_OFFSET must be performed once and eventually more times later, when conditions change.