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
ESP SPI transfer Max Size
-
- Posts: 9761
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP SPI transfer Max Size
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?
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?
- ESP_krzychb
- Posts: 400
- Joined: Sat Oct 01, 2016 9:05 am
- Contact:
Re: ESP SPI transfer Max Size
Indeed, setting of the ".max_transfer_sz" let me transfer more than the default maximum of 4094 bytesESP_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?
Who is online
Users browsing this forum: ElectricThanhTung and 94 guests