Page 1 of 1

SPI Slave - DMA 2M max read length limit

Posted: Wed Mar 02, 2022 11:42 pm
by KWolfe81
I'm using the ESP32S2 and would like to write a continuous stream of data out of the SPI peripheral. I'm using DMA mode with some circular linked lists to achieve high data volumes. However, after 2MB, the ESP32S2 only shifts out 0xFF values despite the hardware appearing to work as expected. I note that this does match the datasheet indicating that GP-SPI2 as a slave in DMA mode can only output up to 2M-bytes (Section 24.5.1).

My question is where is that 2MB limit coming from? Is there a way in software for me to reset a counter to achieve higher than 2MB data outputs in a single transaction? Thanks in advance.

Re: SPI Slave - DMA 2M max read length limit

Posted: Mon Mar 07, 2022 3:20 am
by ESP_Sprite
Good question, I'll see if I can poke around internally for this info.

Re: SPI Slave - DMA 2M max read length limit

Posted: Mon Mar 07, 2022 8:03 am
by ESP_Sprite
Digital team says you can get around the limit by setting up segmented transfers, and having the segments to be <2MiB (ref trm section 24.5.4. Perhaps that's a feasible workaround?

Re: SPI Slave - DMA 2M max read length limit

Posted: Tue Mar 08, 2022 8:38 pm
by KWolfe81
ESP_Sprite wrote:
Mon Mar 07, 2022 8:03 am
Digital team says you can get around the limit by setting up segmented transfers, and having the segments to be >2MiB (ref trm section 24.5.4. Perhaps that's a feasible workaround?
Great, thanks! I'll give it a try.