2023-02-01 12:56 AM
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::
.
2023-02-09 01:46 PM
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.
2024-03-21 02:21 AM - edited 2024-03-21 02:21 AM
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.