Skip to main content
psain.1
Associate III
December 25, 2025
Solved

Strange behavior of STM32G070RBT6 ADC

  • December 25, 2025
  • 3 replies
  • 535 views

I am facing very weird issue in STM32 ADC.

1. I used single channel in polling mode and interrupt mode the value i got was 4095, even the pin voltage was 1.7V, i used DSO to look for any serious noise on the pin but it was clean.

Also if i gave 0V to this pin (pin 29 Ch10) it displayed adc value round 30.

2. Then i tried DMA for single channel CH0 it behaved same.

3. Then i tried DMA for 3 channel Ch9,Ch10,Ch11... behavior was same but this time if i touched any of the ADC Channel from ch9 & ch11 the value of Ch 10 became 2200, which was quite correct.

4. Then i tried DMA for only Ch10 then adc value became 4095 for 1.7V and touching any pin doesnt do anything.

Just if i give 0V instead of 1.7V adc value come near to 30-40.

5. Circuit checked multiple times its a custom PCB, connections are solid.. track distances are well above the standard.

6. I am using STM32CUBEIDE to generate the code.

 

Unable to figure out what wrong i am doing.

 

for information:- I have used ADC of STM32 multiple times before also even for the same controller, using that earlier code gives adc value 2600 aprox for 1.7V and touching any adc pin messes up with values.

 

Best answer by gbm

Check the connection of VDDA and VREF+ pins - they should both be at 3.3 V.

3 replies

gbm
gbmBest answer
Principal
December 25, 2025

Check the connection of VDDA and VREF+ pins - they should both be at 3.3 V.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
TDK
Super User
December 25, 2025

Definitely sounds like VREF+ is not connected properly. Is it floating? Consider showing the schematic. Ensure decoupling caps are present.

TDK_0-1766672034583.png

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
psain.1
psain.1Author
Associate III
December 25, 2025

YES!! ISSUE RESOLVED... VREF+ WAS NOT CONNECTED PROPERLY