S32K1 RTD function Lpspi_Ip_SyncTransmitHalfDuplex() clocks too many bytes

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K1 RTD function Lpspi_Ip_SyncTransmitHalfDuplex() clocks too many bytes

Jump to solution
1,747 Views
hns80
Contributor V

When using the SPI in half duplex mode, the following call sends two bytes, which is expected:

Lpspi_Ip_SyncTransmitHalfDuplex(&Lpspi_Ip_DeviceAttributes_SpiExternalDevice_0_BOARD_InitPeripherals, txBuffer, 2, LPSPI_IP_HALF_DUPLEX_TRANSMIT, timeOut);

When receiving, though, the function clocks multiple bytes. I tried specifying from 1 to 4 bytes and see the peripheral send enough clocks for 6 or 7 bytes:

Lpspi_Ip_SyncTransmitHalfDuplex(&Lpspi_Ip_DeviceAttributes_SpiExternalDevice_0_BOARD_InitPeripherals, rxBuffer, 1, LPSPI_IP_HALF_DUPLEX_RECEIVE, timeOut);

I see the same behavior whether I use interrupt driven SPI or polling.

How can I use the RTD calls to get the peripheral to receive a single byte with no extra clock pulses?

 

Labels (1)
Tags (3)
0 Kudos
Reply
1 Solution
1,739 Views
hns80
Contributor V

Changing SpiCsContinuous to FALSE fixed the problem

 

 

View solution in original post

0 Kudos
Reply
1 Reply
1,740 Views
hns80
Contributor V

Changing SpiCsContinuous to FALSE fixed the problem

 

 

0 Kudos
Reply