Page 1 of 1

Slow DMA compared to memcpy()

Posted: Thu Apr 02, 2026 9:04 pm
by themindfactory
I can not get DMA on the ESP32P4 to go above about 5MB/s while I can in some cases get 1000+ with a memcpy()

This is being done while no other tasks running.

Missing anything?

Re: Slow DMA compared to memcpy()

Posted: Fri Apr 03, 2026 2:46 am
by ok-home
Hi
GDMA is obviously slower than memcpy.
1. The data transfer goes through the APB bus, which is slower than direct RAM transfer.
2. High overhead when transferring GDMA m2m (descriptor allocation with alignment, cache synchronization).
However, up to 40 MB/sec on Spiram (RAM) M2M should work. (At least Parlio -> Spiram works up to 80 MB/sec.)

Re: Slow DMA compared to memcpy()

Posted: Fri Apr 03, 2026 2:57 am
by themindfactory
What would you expect ram to psram or psram to psram?

Re: Slow DMA compared to memcpy()

Posted: Fri Apr 03, 2026 3:21 am
by ok-home
I haven't measured the M2M speeds for the ESP32P4.
For the ESP32S3, you can see speed comparisons here.

viewtopic.php?t=36808

esp_async_memcpy - as far as I remember, it's GDMA.