SPI Slave - DMA 2M max read length limit

KWolfe81
Posts: 14
Joined: Mon Dec 13, 2021 7:00 pm

SPI Slave - DMA 2M max read length limit

Postby KWolfe81 » Wed Mar 02, 2022 11:42 pm

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.

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

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

Postby ESP_Sprite » Mon Mar 07, 2022 3:20 am

Good question, I'll see if I can poke around internally for this info.

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

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

Postby ESP_Sprite » 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?

KWolfe81
Posts: 14
Joined: Mon Dec 13, 2021 7:00 pm

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

Postby KWolfe81 » Tue Mar 08, 2022 8:38 pm

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.

Who is online

Users browsing this forum: No registered users and 361 guests