Skip to main content
seyedamirhossein moshtaghioun
Associate II
June 3, 2018
Solved

STM32F0 Reading multiple adc channels using DMA issue

  • June 3, 2018
  • 6 replies
  • 1818 views
Posted on June 03, 2018 at 09:31

Hi everyone and thanks for the  help in advance

I'm trying to read 4 channels of ADC using stm32f043 MCU and get the results on DMA interrupt, the problem I'm having is that I can only get accurate and fix results from one channel and although the signal is steady, the reading on all other channels are bouncing and changing constantly , I have tried to decouple the line using different capacitors and also I have taken the VSSA and VDDA from the hardware design file from ST.

how can I get steady readings from all my ADC channels?

again thanks in advanced 

#stm32f0 #hal-adc #dma-adc
This topic has been closed for replies.
Best answer by T J
Posted on June 04, 2018 at 06:58

do you have any pins on 5V level ?like TTL-RS232 bouncing around...

any level above VDD will affect some channels

Try the slowest rate of conversion, is there a hurry ? 

I found the first and second fastest were less stable, then everything else seemed to work.

drop the clocking rate too.. it all helps

did you add the a small capacitance to the pin ? maybe 0.1uF

6 replies

Tesla DeLorean
Guru
June 3, 2018
Posted on June 03, 2018 at 13:25

Make sure the sources you are measuring can charge/discharge the sampling capacitor within the sample-time window you have selected.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
seyedamirhossein moshtaghioun
Associate II
June 3, 2018
Posted on June 03, 2018 at 20:34

Thanks for the heads up

so far I have tried 1.5 cycles and 7.5 cycles and 71.5 cycles.

the problem is that in the first two sampling times I can read one channel accurately no matter what kind of sensor I'm connecting to it but for the second channel it stays the same bouncing up and down no matter what I attach to the analog input, even if I connect it to the ground it still does not stay on 0.

what am I missing here?

thanks again.

T J
T JBest answer
Senior III
June 4, 2018
Posted on June 04, 2018 at 06:58

do you have any pins on 5V level ?like TTL-RS232 bouncing around...

any level above VDD will affect some channels

Try the slowest rate of conversion, is there a hurry ? 

I found the first and second fastest were less stable, then everything else seemed to work.

drop the clocking rate too.. it all helps

did you add the a small capacitance to the pin ? maybe 0.1uF