cancel
Showing results for 
Search instead for 
Did you mean: 

ADC2 calibration

LKoe
Associate

Hi,

I have a problem with the ADC2 calibration on STM32H743VIT6(V). I use ADC1 and ADC2 in dual mode(Regular simultaneous mode). On some boards the ADC2 calibartion doesn't work. (The ADCAL-Bit in ADC_CR is not cleard after start).

On the boards where I have the problem with the ADC2 calibration, when I change the dual mode to simultaneous mode + Regular simultaneous mode the calibration of ADC2 works.

I don't unstertand this bevaior. 

What is the problem of ADC2 calibration on some controllers in Regular simultaneous mode.

 

1 REPLY 1
Pierre_Paris
ST Employee

Hello @LKoe ,

Thank you for your question.

Q: "What is the problem of ADC2 calibration on some controllers in Regular simultaneous mode."

A: ADC1 (master) and ADC2 (slave) must not be used by the application and must wait calibration is complete. You must try first with HAL API.

 /* Run the ADC calibration in single-ended mode */
  if (HAL_ADCEx_Calibration_Start(&AdcHandle_master, ADC_CALIB_OFFSET_LINEARITY, ADC_SINGLE_ENDED) != HAL_OK)
  {
    /* Calibration Error */
    Error_Handler();
  }

  if (HAL_ADCEx_Calibration_Start(&AdcHandle_slave, ADC_CALIB_OFFSET_LINEARITY, ADC_SINGLE_ENDED) != HAL_OK)
  {
    /* Calibration Error */
    Error_Handler();
  }

 Then you can follow the Software procedure to calibrate the ADC at the page 925 of the Reference manual.

Best Regards,

Pierre

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.