Maximum SPI buffer size

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Maximum SPI buffer size

919 Views
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 Kudos
Reply
1 Reply

885 Views
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 Kudos
Reply