IMX8MP ECSPI max transmit size

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

IMX8MP ECSPI max transmit size

96 次查看
kartheek
Contributor III

 

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

 

0 项奖励
回复
1 回复

68 次查看
kef2
Senior Contributor V
  • It is mentioned 32-bit wide by 64-entry FIFO for both transmit and receive data.

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.

0 项奖励
回复