2024-03-31 02:40 AM
Hi,
I use a STM32G030.
The application works fine when we compile it with option -O0 (no optimize).
It fails when we using the function HAL_ADCEx_Calibration_Start() for the calibration of the ADC.
This function returns the fail at the follow location:
The calibration is started as follow:
HAL_ADC_Stop(hdlr->pHadc);
HAL_ADCEx_Calibration_Start(hdlr->pHadc);
Why returns this function an error only when the compiler option is greater than -O0?
Now when the functions returns an error the function/ADC is locked.
Is this normal or should be not there for the return __HAL_UNLOCK(hadc)?
Solved! Go to Solution.
2024-03-31 02:48 AM
2024-03-31 02:48 AM
2024-03-31 03:02 AM
Thanks, the workaround works.
Why it not updated in the HAL library yet?