IMX8MP ECSPI max transmit size

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

IMX8MP ECSPI max transmit size

1,648件の閲覧回数
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 返信

1,620件の閲覧回数
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 件の賞賛
返信