This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Transfer more than 1024 values using DMA

Hi, I would like to know if it is possible to transfer more than 1024 values using DMA, if I configure the destiny buffers with a size of 2048 or more, the first 1024 values stays in 0 and the other 1024 values are modified by DMA.

  • Hello Sergio

    Yes. You can use Ping Pong mechanism where there are 2 1025 element buffers. When Ping buffer are being updated by the DMA, the Pong buffer can be processed by the CPU and vice-versa.

    A similar software example exists (though not of 1024 elements but 960 elements) in the Software package that comes along with the following reference design,

    www.ti.com/.../TIDM-TM4C129POEAUDIO
  • Amit thaks for your answer, I have a ping pong DMA code working, both buffers have a size of 1024, what i would like to know is How I can make them (the buffers) bigger?, for example I want to have two buffers of 2048 samples each, and I want the DMA to copy the data from the ADC FIFO to them, earlier I explain the problem that I was having, When the buffers have a size of 1024, everything works well, but, when they have a size of 2048 the first 1024 values remain in 0 and in the other 1024 (the second half) de ADC FIFO data gets stored, when they have a size of (1024 x 3 = 3072 ) the first 2048 values remain in 0 and the rest (1024) store the ADCFIFO data.
  • Hello Sergio

    The 1024 element limit is the maximum. So it is not possible to have a larger buffer. The other way of doing it may be is to use the Peripheral Scatter Gather, where a chain of control structures can be created (think of it is as longer ping-pang-pung-pong mechanism).