cancel
Showing results for 
Search instead for 
Did you mean: 

Could you help me about ADC error?

Jpark.22
Associate

Thanks for coming into to this post

I want to use ADC which is embedded in STM32G030J6M6.

I had a experiment with a STM32F030F4 which showed me a very clear ADC.

So I used a exactly same source code except ADC and GPIO settings.

But I got a unstable ADC results, but I don't which part I misused or misunderstood.

So could you help me to find out Why the ADC error had been occurred?

I attached the source code and experiment results.

Reference voltage is actual voltage from source power that I want to measure by ADC.

and Experience Voltage is the voltage I got from the MCU ADC.

0690X00000BwdwJQAR.png

I also attach the circuit diagram that I used.

0690X00000BwdwxQAB.png

2 REPLIES 2
Mike_ST
ST Employee

As Ozone suggested in the post below maybe you should try with longer sampling time:

https://community.st.com/s/question/0D50X0000Bzvt5nSQA/why-adc-isnt-correct

Ozone
Lead II

Looking at the source code, I tend to agree.

Zipping whole projects is not the best way to present a problem, though.

Posting relevant code sections, and information about the hardware (including schematics at the analog pin(s) and involved impedances) would have procured a quicker response.