Page 1 of 1

Memory to Memory transfer via DMA

Posted: Tue Dec 04, 2018 8:55 pm
by safiuddinkhan
The ESP32 technical reference manual mentions that we can do memory to memory data transfer via DMA.

"Direct Memory Access (DMA) is used for high-speed data transfer between peripherals and memory, as well as
from memory to memory. Data can be quickly moved with DMA without any CPU intervention, thus allowing for
more efficient use of the cores when processing data."

I wanna know that it can be done with some type of example. What I wanna do is to make a fast memcpy like function which transfers a block of memory b/w two places of RAM via DMA.

Re: Memory to Memory transfer via DMA

Posted: Wed Dec 05, 2018 6:28 am
by ESP_Sprite
I think the intention was that you can use an I2S peripheral for this, possibly using the I2S_OUT_LOOP_TEST/I2S_IN_LOOP_TEST. However, we never actually used it or wrote an API for it as doing it using the CPU is faster in almost all circumstances, as the CPU can access the memory at full 240MHz speeds while DMA is restricted to the 80MHz APB bus. DMA also is restricted to internal memory only, and usually takes some time to set up as well.

Re: Memory to Memory transfer via DMA

Posted: Wed Dec 05, 2018 7:47 am
by safiuddinkhan
Oh! Ok Thanks