LPSPI - end of frame detection in slave mode

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

LPSPI - end of frame detection in slave mode

1,182 Views
mictec
Contributor II

Hello All,

currently I'm developing generic SPI driver for S32K devices for use in slave mode. My intention is to perform the whole handling without usage of DMA and interrupts. The issue I'm facing now is end of frame detection. In order to read Receive FIFO I need to know if it contains data of the whole frame. I tried to use SR[FCF] bit, which according to Reference Manual should indicate the end of frame, when PCS negates. Unfortunately it doesn't seem to work this way. It is not set, though PCS is negative. How does this bit really work? 

Best regards,

Mic

3 Replies

931 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Mic,

I highly recommend you to use our drivers that we delivered within the SDK instead of developing your own. Within the SDK, along with the drivers, you will find example projects that demonstrate how to implement them.

Best regards,

Victor.

0 Kudos

931 Views
razva_tilimpea
NXP Employee
NXP Employee

Hi,

What is the frame size configured for your SPI slave? It is the same as the size of the received messages?

Best regards,

Razvan

0 Kudos

931 Views
mictec
Contributor II

Hi,

the frame size is configured to be 64 bits. It is the same as the size of received frame (two words = 2 x 32 bits). The data are received correctly, CS is negated, SPI is idle, but SR[FCF] is not set.

Best regards,

Mic