cancel
Showing results for 
Search instead for 
Did you mean: 

ADC multiple channel with DMA gives 0 on the output of STM32-NUCLEO-H7A3ZI-Q

Adeni
Associate

Hi there;

I have been trying to get analog signal from three channels on my STM32 for 2 days. I could get the signal from each potentiometer using polling with single channel conversion, but when I try to use multiple channels with DMA, all I get is zeros.

NOTE1: I debugged the program to check for any deadlocks but the code was working perfectly with no deadlocks

NOTE2: I have checked the order of MX_DMA_Init() and MX_ADC1_Init(), the DMA comes before the ADC as you can see in my code below

NOTE3: the clock speed of CPU is 280MHz Max, and the clock speed of ADC is 32MHz

Any suggestion is very much appreciated ......

The whole code is attached in the main.c file :backhand_index_pointing_down::

.

2 REPLIES 2
FBL
ST Employee

Hello @Adeni​ 

I suggest to check the memory addressed by the data buffers if placed in DTCM (0x2000 0000) then change it for example to AXI SRAM (mapped at 0x2400 0000)

Also, you may need also to disable compiler optimizations for debug purposes.

Hope this helps!

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Miha
Associate II

Sorry but my programing capabilities are limited. I am not very good programer, first i will follow few videos on YT, how to get adc running and then maybe i will change board, as this one can be demaged.... Thank for fast replay tho.