hideakitai / ESP32DMASPI

SPI library for ESP32 which use DMA buffer to send/receive transactions
MIT License
166 stars 36 forks source link

1ms minimum packet time. #53

Closed Artemkamax closed 3 months ago

Artemkamax commented 3 months ago

Hi! I trying to use example "transfer_big_data_in_the_background" sending 256bytes at 20Mhz speed from one esp32 to another as fast as i can, but as I see master send packet, and wait somesthing. now packet transfering time is 1ms. If I send 1200bytes, transfering time also 1ms. How I can change it? I can transfer 16000 bytes in one packet, but slave cant recieve this packet, some bytes are missed. I need to reach at least 2 160 000Bytes/s teoretical at 20Mhz I can 2.5Mbytes/s and 5Mbytes/s at 40Mhz, but have problems

Screenshot 2024-03-27 152942 Screenshot 2024-03-27 153054
hideakitai commented 3 months ago

It's probably FreeRTOS context switch. For more speed, we recommend writing your own code without this library.

Artemkamax commented 3 months ago

No, I cant. Your library is best solution! May be you know why I cant receive big data? 1200bytes in a packet at 20mhz is maximum?

hideakitai commented 3 months ago

1200bytes in a packet at 20mhz is maximum?

No. It may be a problem of hardware (noise, etc.)

hideakitai commented 3 months ago

If you still need help, please reopen this issue.