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?
Solved! Go to Solution.
Changing SpiCsContinuous to FALSE fixed the problem