Slow DMA compared to memcpy()

themindfactory
Posts: 79
Joined: Mon Mar 26, 2018 7:57 pm

Slow DMA compared to memcpy()

Postby themindfactory » Thu Apr 02, 2026 9:04 pm

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?

User avatar
ok-home
Posts: 156
Joined: Sun May 02, 2021 7:23 pm
Location: Russia Novosibirsk
Contact:

Re: Slow DMA compared to memcpy()

Postby ok-home » Fri Apr 03, 2026 2:46 am

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.)

themindfactory
Posts: 79
Joined: Mon Mar 26, 2018 7:57 pm

Re: Slow DMA compared to memcpy()

Postby themindfactory » Fri Apr 03, 2026 2:57 am

What would you expect ram to psram or psram to psram?

User avatar
ok-home
Posts: 156
Joined: Sun May 02, 2021 7:23 pm
Location: Russia Novosibirsk
Contact:

Re: Slow DMA compared to memcpy()

Postby ok-home » Fri Apr 03, 2026 3:21 am

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.

Who is online

Users browsing this forum: Baidu [Spider], Qwantbot and 7 guests