s32k mcal Spi

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

s32k mcal Spi

220 Views
Higgs_Boson
Contributor I

Hi,

The autosar api Spi_SetupEB() in s32k mcal we have use in project, we wonder the passing parameter  'Length' Meaning. In Autosar Description, it means 'data of element'. it means u8 or u16 or u32? How is it define in nxp s32k mcal?

IMG_0148.jpeg

0 Kudos
1 Reply

200 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Higgs_Boson,

SrcDataBufferPtr and DesDataBufferPtr: Pointer to source/destination data buffer. These parameters have defined as Spi_DataBufferType, which is uint8 for each element in it buffer.

Length: Number of data elements in above Src/Des data buffer.

The setting of SpiDataWidth is the width of each transmitted data unit. For example, 16 bits mean that each time transmit, the SPI driver will transmit 16bits at a time. So, you still need to setup Length in SetupEB as 2 for 16bits Framesize.

Best regards,
Julián

0 Kudos