hi all
1:I use S32K146 ' LPSPI interrupt mode to communicate FS4503,I found 2 words send in one CS period sometimes,
2:I checked S32K1 SDK3.0 source code,I found the LPSPI use 2 times LPSPI_SetFlushFifoCmd (),the code comments is that " The second flush command is used to avoid the case when one word is still in shifter"
3:I want to be sure whether the second flush command will push no use data in fifo to spi bus,then bus will appear twice data
4:If yes,how to work around,thanks
/* Clean RX and TX buffers */
LPSPI_SetFlushFifoCmd(base, true, true);
/* The second flush command is used to avoid the case when one word is still in shifter. */
LPSPI_SetFlushFifoCmd(base, true, true);
Hi Wang,
After test, the operations of RRF and RTF will not push unused data to SPI bus.
These are internal hardware IP operations that will not affect the SPI bus.
BR
Frank
Hi zhijian,
How about the latest status based on given advice? In myside, I could not re-produce this issue until now.
A little advice, we suggest that setting GPIO PCS line in SPI ISR with you using SPI under interrupt mode.
BR
Frank