What can cause an ADC calibration fails?
We are starting (difficultly due to the lack of devices) the pre-production of our system built around an STM32 H743VIT, and, on already two systems (out of about 50), we have failures initializing ADC 2. For the first one, replacing the MCU was successful, but before replacing all (rare) MCUs, I'm wondering if there can not be any other possibility to fix it.
The code for ADC initialization is quite basic:
if (HAL_ADCEx_Calibration_Start(&hadc1,ADC_CALIB_OFFSET_LINEARITY,ADC_SINGLE_ENDED)!=HAL_OK) PRINT(console_ctx,"Error ADC1 Calibration\n");
if (HAL_ADCEx_Calibration_Start(&hadc2,ADC_CALIB_OFFSET_LINEARITY,ADC_SINGLE_ENDED)!=HAL_OK) PRINT(console_ctx,"Error ADC2 Calibration\n");
if (HAL_ADCEx_Calibration_Start(&hadc3,ADC_CALIB_OFFSET_LINEARITY,ADC_SINGLE_ENDED)!=HAL_OK) PRINT(console_ctx,"Error ADC3 Calibration\n");And each time the failure occurs on ADC2 (ADC1 and ADC3 works perfectly!)
Is it possible we got a bad batch of MCUs (there were so difficult to find!)?
I tried adding delays between calibration, but no changes.
Any idea/advice?
thanks
JYL