2024-04-09 01:55 AM
The STM32G0 ADC calibration in Cube/HAL performs 8 iterations of the calibration process, each time reading out the calibration factor and accumulating it, then dividing by 8 (i.e. taking their average) and writing it back to the calibration factor holder register.
Nothing like this is present in HAL/Cube of other STM32 where ADC incorporates an explicit calibration, e.g. STM32F1 or STM32L4.
This of course raises questions.
Is this procedure necessary for achieving ADC parameters specified in the DS?
Or is it an optional method to achieve *better* parameters than those?
In any case, why is this not documented, neither in DS/RM, nor in any AN?
JW
Solved! Go to Solution.
2024-04-24 02:56 AM
Hi Jan,
Coming back after check internally. What I provided is not the explanation for the implementation of the calibration procedure in the HAL driver.
The correct explanation is what we provide as step 5 of the Software calibration procedure in STM32C0 reference manual RM0490:
The same should be done in the STM32G0 reference manuals. An internal request is tracked for this purpose.
Internal ticket number: 179856 (This is an internal tracking number and is not accessible or usable by customers).
-Amel
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.
2024-04-22 05:44 AM
Hi @waclawek.jan ,
Checking the ES (STM32G071x8/xB device errata), we have this note in the workaround suggested for the limitation "2.6.7 ADC offset may be out of specification":
I assume the implementation of the HAL driver is taking into consideration this note, but I need to double check.
-Amel
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.
2024-04-22 06:44 AM
That makes sense. Thanks, @Amel NASRI !
JW
2024-04-24 02:56 AM
Hi Jan,
Coming back after check internally. What I provided is not the explanation for the implementation of the calibration procedure in the HAL driver.
The correct explanation is what we provide as step 5 of the Software calibration procedure in STM32C0 reference manual RM0490:
The same should be done in the STM32G0 reference manuals. An internal request is tracked for this purpose.
Internal ticket number: 179856 (This is an internal tracking number and is not accessible or usable by customers).
-Amel
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.
2024-04-24 07:57 AM