Skip to main content
Zed
Associate III
June 10, 2026
Question

ADC Calibration in stm32g473

  • June 10, 2026
  • 2 replies
  • 16 views

Hi everyone!
I have a project where I start, with the help of the Timer 3, three ADCs(ADC1, ADC2 and ADC4). Each of them samples 256 samples and then stops. Then I disable them and start a calibration process on all three ADCs.This is repeated with a frequency of 4Hz approx. Interesting thing is that after calibration I get very often different calibration values for ADC1, not really often for ADC2 and rarely for ADC4. Like this:
60, 61, 62
60, 61, 62
61, 61, 62
60, 61, 62
60, 60, 62
61, 61, 62
61, 61, 62
60, 61, 62
60, 61, 62
...
Calibration is done with HAL function from ST. ADCs are turned of during calibration (ADEN = 0). Vref is external(3v) and it is stable, but I believe that offset calculation during calibration does not really use Vref voltage. Or it does?
So I’m a bit confused. Is here some ADC guru of Yoda level?
I appreciate any help.

2 replies

mƎALLEm
ST Technical Moderator
June 10, 2026

Hello, 

You need also to provide your code so others can help you on finding the issues.

Good luck.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
MasterT
Lead II
June 10, 2026

Read datasheet, there is a paragraph for adc accuracy. Basically, error ± 4 LSB is like default, so calibration constant may vary in the same range.

 Easy way to improve precision is to use oversampling, G4 supports it in hardware. Check out app. note AN5537