cancel
Showing results for 
Search instead for 
Did you mean: 

Automated ADC calibration on STM32F4 ?

pr
Associate III

AN2834 Rev 4, point 4.2.9 Temperature-effect compensation says:

One method is be to fully characterize the offset and gain drift and provide a lookup table in memory to correct measurement according to temperature change. This calibration involves additional cost and takes time.

The second method consists in recalibrating the ADC when the temperature change reaches given values, by using the internal temperature sensor and the ADC watchdog.

A quick web search turns up the following API:

HAL_ADCEx_Calibration_Start (ADC_HandleTypeDef *hadc, uint32_t SingleDiff)

Perform an ADC automatic self-calibration Calibration

However I can't find this API in the HAL-LL drivers that came with STM32CubeF4 Firmware Package V1.25.0. Is this API available on F4 machines? If not, is there a similarly straight-forward API or method to perform automated calibration of the internal ADCs on F4 machines?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

> Is this API available on F4 machines? If not, is there a similarly straight-forward API or method to perform automated calibration of the internal ADCs on F4 machines?

No and No. You need to implement your calibration manually. Note that the ADC is relatively accurate off the bat, see datasheet for details.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Guru

> Is this API available on F4 machines? If not, is there a similarly straight-forward API or method to perform automated calibration of the internal ADCs on F4 machines?

No and No. You need to implement your calibration manually. Note that the ADC is relatively accurate off the bat, see datasheet for details.

If you feel a post has answered your question, please click "Accept as Solution".

There are at least two distinct ADC designs in the various STM32 families - the design in 'F4 does not have any inherent calibration mechanism, the other design e.g. in 'L4 has.

Look at the ADC chapter in your STM32's family RM, if there's an ADC_CALFACT register, you have to perform calibration (there's a related ADCAL bit in ADC_CR), otherwise you don't.

JW