Maximum SPI buffer size

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

Maximum SPI buffer size

784 次查看
AnhNguyenDuc
NXP Employee
NXP Employee

Hi,

I have some definitions of the maximum size of the buffer data when communicating via SPI (256 bytes, 1024 bytes,...).

In SPI S32K drivers (on S32DS), Do we have a limitation for the SPI buffer size? Or Can we configure it?

I'm using S32K1xx, S32K312 with both autosar and non-autosar versions.

Thanks.

0 项奖励
回复
1 回复

750 次查看
cuongnguyenphu
NXP Employee
NXP Employee

Hi,
As far as I know, Autosar define 2 types of buffer: Internal and external buffer.
With Internal buffer, RTD limits Tx and Rx buffer to SpiIbNBuffer (max 65535) bytes. Please check define IB in file Spi_<>_PBcfg.c as below:

cuongnguyenphu_0-1697512943264.png

cuongnguyenphu_1-1697513629716.png

For external buffer, you can define your own Tx/Rx buffer and call Spi_SetupEB() to set buffer for your SPI channel. This function limits the size of your buffer as SpiEbMaxLength (max 65535 bytes)

cuongnguyenphu_2-1697513681692.png

 

 

0 项奖励
回复