Page 1 of 1

ESP SPI transfer Max Size

Posted: Sat Jun 24, 2017 7:57 am
by jaybnair
Hi,

I have a need to transfer 4096 bytes over SPI in one transfer.
However, I see that ESP32 SPI transfer accepts only a max of 2048 bytes. Anything more than that is discarded.
Any idea where this limitation comes from or any input on how to increase the limit atleast to 4096 bytes?

Thanks
Jay

Re: ESP SPI transfer Max Size

Posted: Sat Jun 24, 2017 12:35 pm
by ESP_Sprite
Erm, it shouldn't discard the excess, the queue/transfer function should return with an error (ESP_ERR_INVALID_ARG if memory serves.) Also, the default maximum transfer size should be 4094, not 2048; are you sure you see a limit there and not at 4094?

The maximum size of the transfers is settable using the spi_bus_config_t.max_transfer_sz variable that you feed into spicommon_bus_initialize_io. Can you see if setting that higher changes anything?

Re: ESP SPI transfer Max Size

Posted: Fri Dec 22, 2017 7:39 pm
by ESP_krzychb
ESP_Sprite wrote:The maximum size of the transfers is settable using the spi_bus_config_t.max_transfer_sz variable that you feed into spicommon_bus_initialize_io. Can you see if setting that higher changes anything?
Indeed, setting of the ".max_transfer_sz" let me transfer more than the default maximum of 4094 bytes :idea: