Memory to Memory transfer via DMA

safiuddinkhan
Posts: 2
Joined: Tue Dec 04, 2018 8:39 pm

Memory to Memory transfer via DMA

Postby safiuddinkhan » Tue Dec 04, 2018 8:55 pm

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.

ESP_Sprite
Posts: 2072
Joined: Thu Nov 26, 2015 4:08 am

Re: Memory to Memory transfer via DMA

Postby ESP_Sprite » Wed Dec 05, 2018 6:28 am

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.

safiuddinkhan
Posts: 2
Joined: Tue Dec 04, 2018 8:39 pm

Re: Memory to Memory transfer via DMA

Postby safiuddinkhan » Wed Dec 05, 2018 7:47 am

Oh! Ok Thanks

Who is online

Users browsing this forum: Bing [Bot] and 18 guests