2025-12-24 9:34 PM
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.
2025-12-25 12:05 AM - edited 2025-12-25 12:05 AM
Check the connection of VDDA and VREF+ pins - they should both be at 3.3 V.