cancel
Showing results for 
Search instead for 
Did you mean: 

ADC Linear Calibration Address

NBrick67
Associate II

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?

 

1 ACCEPTED SOLUTION

Accepted Solutions
NBrick67
Associate II

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

View solution in original post

3 REPLIES 3
Douglas MILLER
ST Employee

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

AScha.3
Chief II

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 "Accept as Solution".
NBrick67
Associate II

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