Hi Team,
I am using ECSPI for user space application. While transmitting data using
struct spi_ioc_transfer, mentioned .len as 4096 and its giving error like message to long, bad address. For small .len like 255, it is working fine.
I have checked the reference manual ECSPI features (attached below). It is mentioned 32-bit wide by 64-entry FIFO for both transmit and receive data.
Is the max len supported by ECSPI is 256 bytes while transmitting? Does this length can be increased to 65535?
Thanks & Regards,
Kartheek
Yes, FIFO is 32*64/8 = 256 bytes long.
Max "burst length" (see CONNREG register) is 4096 bits (512 bytes). That's the max transfer size, eCSPI may toggle CS pin for you automatically on start and end of transfer.
256 bytes limit you hit perhaps is caused by SW implementation. It must be easier to just fill FIFO and send. 512 bytes would need to use interrupts / flags polling loop / DMA to fill FIFO with what doesn't fit FIFO.