whether S32K1 SDK3.0 LPSPI_SetFlushFifoCmd function will push LPSPI fifo data to spi bus

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

whether S32K1 SDK3.0 LPSPI_SetFlushFifoCmd function will push LPSPI fifo data to spi bus

560件の閲覧回数
teddywang
Contributor I

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);

0 件の賞賛
返信
3 返答(返信)

491件の閲覧回数
frank_yang_1
NXP Employee
NXP Employee

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

0 件の賞賛
返信

468件の閲覧回数
zhijian
Contributor I

hi,Frank

       Plase reference attachment,Thanks!

タグ(1)
0 件の賞賛
返信

446件の閲覧回数
frank_yang_1
NXP Employee
NXP Employee

Hi zhijian,

How about the latest status based on given advice? In myside, I could not re-produce this issue until now. 

frank_yang_1_3-1717660905807.png

A little advice, we suggest that setting GPIO PCS line in SPI ISR with you using SPI under interrupt mode. 

frank_yang_1_2-1717660775421.png

 

BR

Frank

0 件の賞賛
返信