AnsweredAssumed Answered

S32K144:SPI Transfer

Question asked by BJ RAJENDRANATH on Jun 8, 2020
Latest reply on Jul 31, 2020 by wjandsq wjandsq

Hello all,

 

I tried to use SPI transfer with CS as GPIO. I'm performing following steps.

 

1. Making the CS LOW

2. Pushing to data in the FIFO

3. Making the CS HIGH

 

I'm able to transfer the data but my CS goit HIGH (Step 3) Far ahead of the transfer.

 

CS_LOW;

LPSPI0->TDR = LPSPI_TDR_DATA(n) ; 
while((LPSPI0->SR & LPSPI_SR_TDF_MASK)>>LPSPI_SR_TDF_SHIFT==0) {} 

CS_HIGH;

 

 

Kindly help in this regard,

Raju

Outcomes