cancel
Showing results for 
Search instead for 
Did you mean: 

What can cause an ADC calibration fails?

JLojo
Associate III

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

12 REPLIES 12
JLojo
Associate III

Code has been generated with the latest CubeIDE, that is V1.10.0 (12671_20220627_1643 ), featuring CubeMX V6.6.0-RC6 (202206222154).

And it works fine on 96% of the produced units...

That is part number, but not revision number. STM32H743xxx has two revisions (look at chip marking) called V and Y. Unfortunately they differ in many fundamental aspects (like max CPU clock or ADC clock and functions !) but share the same datasheet and reference manual (to confuse everybody). If you running code for V revision on Y revision chip, there can be lot of troubles.

My mistake sorry.

Marking shows a 'V' just under the part number.

And reading DBGMCU->IDCODE gives  0x20036450 corresponding to a rev V device according to reference manual.

I saw indeed this distinction between rev V and rev Y in the reference manual, but didn't pay much attention about that.

It seems however that rev V can do more than rev Y, so it should not be a problem...

Thanks