cancel
Showing results for 
Search instead for 
Did you mean: 

ADC encounters issues with continuous conversion using GPDMA

MECHO
Associate III

The board I am using is NUCLEO-H7S3 and I have encountered the following issues
I want to perform continuous and large data sampling using ADC+DMA, but when the collected value reaches 10000, the subsequent values become 0. When I modify the number of collected values to 50000, it stops at 17231 and the subsequent values remain 0. At this point, I am connecting the ADC pin to the 3.3V on the board. I'm not sure where the settings went wrong, please help me.
Thank you.

MECHO_0-1777792518463.pngMECHO_1-1777792548684.png

MECHO_5-1777792897527.png

 

MECHO_3-1777792847325.png

MECHO_2-1777792733760.png

MECHO_4-1777792869805.png

 

 

 

13 REPLIES 13

Super and for real use continuos big buffer your idea with starting new DMA is bad. HAL is slow for this and samples is lost. Normal way is leave circular DMA in store little buff and on half and full complete calbacks run mem2mem DMA to target buffer... Here you can address incerement and no lost sample ....

WhatsPlus
Associate

I havent understood

Simply: you should use cicular mode . All these problems solved then.

As i said in my first post...

If you feel a post has answered your question, please click "Accept as Solution".

Your plan was 200000 samples store. 

1. Start 1000 samples circular DMA (enable half and full complete callbacks)

2. On Half complete start normal DMA 500 samples form buff1 to buff2 M2M.

3. On M2M complete full increment buff2 index for next 

4. On Full complete start normal DMA 501-999 sample from buff1 to buff2 M2M.

5. DMA repeat it self neverending.

Ofcourse on 200000 you start back from 0

Ofcourse M2M must be configured to lower priority and higher speed as circular DMA.