LPSPI - end of frame detection in slave mode

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

LPSPI - end of frame detection in slave mode

1,396 次查看
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 回复数

1,145 次查看
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 项奖励
回复

1,145 次查看
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 项奖励
回复

1,145 次查看
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