Skip to main content
Associate II
Jun 27, 2024 8:21 AM UTC
Solved

ADC Linear Calibration Address

I understand that ADC Linear Calibration is performed during device production and the values stored in the System Memory.

However, I have been unable to find any documentation on where the 6 values are stored.

Also, are their 6 values per ADC device (ADC1, ADC2, ADC3) or do one set of values apply to all 3 ADCs?

 

This topic has been closed for replies.
NBrick67Best answer
Associate II
Jul 5, 2024 6:52 AM UTC

In case anyone else is looking for this information (STM32H745), which apparently is not documented, this is the reply from ST Customer Support:

Subject: ADC Linear Calibration Address
Description:
Hello,
indeed, it's not documented.
ADC1:0x1FF1 EC00 - 0x1FF1 EC14
ADC2:0x1FF1 EC20 - 0x1FF1 EC34
ADC3:0x1FF1 EC40 - 0x1FF1 EC54

However, even linear calibration is technology depended we highly recommend to perform user calibration instead of use factory data to reach better adc performance.

BR, Jan

3 replies

Douglas MILLER
ST Employee
Jun 28, 2024 1:43 PM UTC

This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.

AScha.3
Super User
Jun 28, 2024 2:30 PM UTC

Hi,

its more : you have to call calibration... ->

HAL_ADCEx_Calibration_Start (..)

see text there )in xxx_hal_adc_ex.c :

 

**

* @brief Perform an ADC automatic self-calibration

* Calibration prerequisite: ADC must be disabled (execute this

* function before HAL_ADC_Start() or after HAL_ADC_Stop() ).

* @PAram hadc ADC handle

* @PAram CalibrationMode Selection of calibration offset or

* linear calibration offset.

* @arg ADC_CALIB_OFFSET Channel in mode calibration offset

* @arg ADC_CALIB_OFFSET_LINEARITY Channel in mode linear calibration offset

* @PAram SingleDiff Selection of single-ended or differential input

* This parameter can be one of the following values:

* @arg @ref ADC_SINGLE_ENDED Channel in mode input single ended

* @arg @ref ADC_DIFFERENTIAL_ENDED Channel in mode input differential ended

* @retval HAL status

 

or/and load factory calib:

 

 

/**
 * @brief Load the calibration factor from engi bytes
 * @PAram hadc ADC handle
 * @retval HAL state
 */
HAL_StatusTypeDef HAL_ADCEx_LinearCalibration_FactorLoad(ADC_HandleTypeDef *hadc)
{
 HAL_StatusTypeDef tmp_hal_status = HAL_OK;
 uint32_t cnt, FactorOffset;
 uint32_t LinearCalib_Buffer[ADC_LINEAR_CALIB_REG_COUNT];

 /* Linearity calibration is retrieved from engi bytes
 read values from registers and put them to the CALFACT2 register */
 /* If needed linearity calibration can be done in runtime using
 LL_ADC_GetCalibrationLinearFactor() */

 

 

...Just : I always use ..calibration_start , doing calibration now. This some ms i can spend at program start...

see ds (note):

AScha3_0-1719586412856.png

 

I never tried just loading calibration factors...but you can try and compare, whats better.

I bet, doing actual calibration (lin and diff) is better, because at actual temp and age of chip.

 

If you feel a post has answered your question, please click on " Best Answer ".
NBrick67AuthorBest answer
Associate II
Jul 5, 2024 6:52 AM UTC

In case anyone else is looking for this information (STM32H745), which apparently is not documented, this is the reply from ST Customer Support:

Subject: ADC Linear Calibration Address
Description:
Hello,
indeed, it's not documented.
ADC1:0x1FF1 EC00 - 0x1FF1 EC14
ADC2:0x1FF1 EC20 - 0x1FF1 EC34
ADC3:0x1FF1 EC40 - 0x1FF1 EC54

However, even linear calibration is technology depended we highly recommend to perform user calibration instead of use factory data to reach better adc performance.

BR, Jan