cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7B0 has incorrect ADC scale

OGhis
Senior

Dear,

We are using the ADC2 in 16-bit resolution at 100 kHz, operating in differential mode.
The internal voltage reference (Vref) is set to 2.5 V.

A 1 kHz sine wave with a peak-to-peak voltage of 2.5 V (ranging from 0 V to 2.5 V) is applied to the ADC inputs.
Based on this setup, we expect the ADC output to vary between 0 and 65,535 after conversion.

However, our actual measurements show values ranging approximately from 16,787 to 50,000.
This suggests we are missing about 16384 counts on the lower and upper end.
When we rescale the measured values to the full 0–65,535 range, it appears as though the ADC is working with a 3.3 V range instead of 2.5 V.

Is this expected behaviour, or is there something we might be doing wrong?

See attached files for the configuration.

OGhis_1-1746199734945.png

 

OGhis_0-1746199662145.png

Our VREF of 1.25 (2.5V / 2) is connected to PC2

OGhis_2-1746199793804.png

 

 






12 REPLIES 12

I feel like the goalposts are moving here. You were doing differential calibration above, and your IOC file has the channel in differential mode. You're also reporting different results in your last post vs the original post.

TDK_0-1746220678670.png

 

Is this a new question? Has the original question been resolved?

 

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

Dear,

This is not a new question.
We have tested both single-ended and differential modes, but the results are the same.
The VREFOUT/VREF+ (2.5 V) is not connected to the ADC input. Instead, the ADC appears to use VDDA (3.3 V) as the reference voltage.

Our question is:
why is the ADC using a 3.3 V reference instead of 2.5 V, and how can we configure it so that the ADC uses the 2.5 V VREFOUT as its reference voltage?



Hi,

so we have : 2v5 at vref+ pin , but conversion looks like 3v3 as vref+ .

What i would try: set program to use standard vref pin input as vref+ , check vref pin voltage (should be ~ 0v now),

 then apply at vref some external voltage,  2v5 , then make singe ended calibration,

and check: what ADC converts (in single end input mode), with 1v at its input.

Should clearly show: is vref pin voltage used for conversion - or what else...

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