cancel
Showing results for 
Search instead for 
Did you mean: 

ADC readings 'sticking' anomaly

Sahiel
Associate II

I'm using the STM32H7B3.

ADC configuration:

 

Sahiel_1-1753879721438.png

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:

Sahiel_2-1753881148542.png

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:

Sahiel_4-1753882434410.png

 

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:

  • Increasing the sample time to ~11us
  • Tried different calibration combinations HAL_ADCEx_Calibration_Start(adc2, ADC_CALIB_OFFSET_LINEARITY, ADC_SINGLE_ENDED)
  • Ignored the DMA buffer values and only observed the ADC > DR which also seems to directly jump from 255 to 288 and 511 to 544 

Nothing changes and it's repeatable 

Any suggestions would be helpful

Thank you!

 

 

12 REPLIES 12
Sahiel
Associate II

This issue was resolved when the F_adc which was 35Mhz was reduced to 6.25Mhz

@Sahiel please pick a solution and mark it as solved.

If you feel a post has answered your question, please click "Accept as Solution".
waclawek.jan
Super User

> This issue was resolved when the F_adc which was 35Mhz was reduced to 10Mhz

According to STM32H7B3 datasheet, the maximum ADC clock frequency is 50MHz, but ADC_CR.BOOST has to be set accordingly.

@Sahiel , how was BOOST set with Fadc=35MHz, when the problem was observed - was it 0b11?

JW