2020-01-27 04:28 PM
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.
I also attach the circuit diagram that I used.
2020-01-28 05:29 AM
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
2020-01-28 06:01 AM
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.