Hello,
I want to communication with a sensor using the NXP S32K344 board as the master using LPSPI1. The clock for the spi communication should be 1MHz according to the sensor's datasheet. I need to send an 8bit command and should receive a 32bit response.
I configured the clock for 10MHz and sent the command once and in the oscilloscope everything is fine despite not having answers from the sensor. Although when I put the clock at 1MHz the master sends 2 times the command.
Clock at 10MHz:

Clock at 1MHz:

This is the first problem. The baudrate used for both cases is 100000.
I've also defined the SpiDataWidth for 32bits. But I'm not sure how to receive the 32 bits response since the RTD function used "Lpspi_Ip_SyncTransmit" has 8bits array as inputs.
My code:
Lpspi_Ip_SyncTransmit(&SPI_EXTERNAL_DEVICE, Tx_Buffer, Rx_Buffer, NUMBER_OF_BYTES, TIMEOUT);
Tx_Buffer is an uint8 and Rx_Buffer is an uint32.
Function Declaration:
Lpspi_Ip_StatusType Lpspi_Ip_SyncTransmit(
const Lpspi_Ip_ExternalDeviceType *ExternalDevice,
uint8 *TxBuffer,
uint8 *RxBuffer,
uint16 Length,
uint32 TimeOut
)
Also, if I update "Lpspi_Ip_UpdateFrameSize" for 32 bits the programm crashes.
Lpspi_Ip_UpdateFrameSize(&SPI_EXTERNAL_DEVICE, 32U);
Thank you.