cancel
Showing results for 
Search instead for 
Did you mean: 

ADC Calibration doesn't complete on STM32G0C1RE.

BrianB
Associate II

Using HAL_ADCEx_Calibration_Start() to calibrate the ADC. This function always returns HAL_ERROR.

Debugging shows its failing after it collects the 8 samples and attempting to disable the ADC is timing out.  (ie.  if ((HAL_GetTick() - tickstart) > ADC_DISABLE_TIMEOUT) is TRUE.)

Using CubeMX to generate drivers. CubeMX version 6.8.1

Note: ADC conversion are working IF I don't calibrate.

 

Thanks for your help.

 

11 REPLIES 11

Why it is not correct in the HAL library ?

Hi @DAlbe.3 ,

I was trying to reproduce the problem using your code on a STM32G0B1 Nucleo, but for me, it worked without the delay.

Can you please post the code with context, i.e. what exactly are clock settings, and what is before this piece of code, so that the problem can be reproduced?

Thanks,

JW