AnsweredAssumed Answered

S32k144 transfer array to S32k142,but when set point to debug I found the sequence of data in array sometimes was wrong

Question asked by shen jun on Aug 21, 2019
Latest reply on Aug 23, 2019 by shen jun

I used master S32k144 sent uint8_t TXBuffer[8] = {0,1,2,3,4,5,6,7}; 

if(STATUS_SUCCESS == LPSPI_DRV_MasterTransfer(0, TXBuffer, RXBuffer, 8))
{


}

to slave S32k142: uint8_t RXBuffer[8] = {0};

if(STATUS_SUCCESS == LPSPI_DRV_SlaveTransfer(0, TXBuffer, RXBuffer, 8))
{

 

 

}

but the sequence of data in RXBuffer[8] is wrong,as follow, the sequence also changed not surely,sometimes it's {1,2,3,4,5,6,7,0},or {4,5,6,7,0,1,2,3},or {6,7,0,1,2,3,4,5} and so on.

 I check the clock polarity, direction of the 144 and 142 both are clock active high and lsb first. So how can I get the correct sequence of data in RXBuffer[8] as the sequence of data in TXBuffer[8] of master S32K144 sent. Is there some SDK API need to be called.Thank you very much.

Outcomes