Skip to main content
Visitor II
February 1, 2023
Question

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

  • February 1, 2023
  • 1 reply
  • 1103 views

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::

.

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    February 9, 2023

    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!

    Explorer
    March 21, 2024

    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.