2025-07-30 6:41 AM - edited 2025-07-30 6:44 AM
I'm using the STM32H7B3.
ADC configuration:
Sample time : ~2us
LL_ADC_SAMPLINGTIME_64CYCLES_5
Calibrations:
HAL_ADCEx_LinearCalibration_FactorLoad(adc2)
HAL_ADCEx_Calibration_Start(adc2, ADC_CALIB_OFFSET, ADC_SINGLE_ENDED)
Observations:
The ADC counts seem to be stuck at values which are highlighted in the picture above at around 0.31 to 0.35 V and 0.62V to 0.66V
The ADC > DR also seems to be stuck and reads 255, 511 at the two voltage ranges mentioned above
Input signal source:
Analog Input voltage range is 0V - 5V in YELLOW converted to 3.3V scale which is also the Vref
Using only RED boxed channel that is connected to the ADC pin on the mcu
Things that I tried:
Nothing changes and it's repeatable
Any suggestions would be helpful
Thank you!
2025-07-30 6:57 AM
How is VREF+ connected? If you skip a cap here, or if it's unstable, you'll get readings like this.
2025-07-30 8:23 AM
The Vref+ has a 1nF cap and it seems to be stable
2025-07-30 9:35 AM
The recommendation is 1 uF + 100 nF. The 1 nF isn't doing much.
2025-07-30 10:57 AM - edited 2025-07-30 10:57 AM
I'm gonno try changing the caps and get back!
Thank you!
2025-07-30 4:08 PM
There is a thread
My testing with H753 shows, that ADC in the H7 families sensitive to sequence of calibration.
Read Call. Factors // Write // Calibrate can't be called "random", because some bits "latched" after action completed and uCPU has to be reset completely to re-initiate peripheral (ADC) status.
So, try Not to load Call. Factors before you start calibration. It doesn't make any sense since in normal circumstances calibration subroutine gonna to rewrite whatever pre-loaded.
Calibrations:
HAL_ADCEx_LinearCalibration_FactorLoad(adc2)
HAL_ADCEx_Calibration_Start(adc2, ADC_CALIB_OFFSET, ADC_SINGLE_ENDED)