Hi,
The example lpspi_transfer_s32k142 works properly on the eval-board, where the slave transfers date to master by LPSPI_DRV_SlaveTransfer() and LPSPI_DRV_MasterTransferBlocking().
However, I exchanged the direction of data transfering and the master shall send the data to slave with the following lines:
masterDataSend = (uint8_t)adcRead;
LPSPI_DRV_MasterTransfer(SEND,&masterDataSend, &masterDataReceive, BUFFER_SIZE);
LPSPI_DRV_SlaveTransferBlocking(RECEIVE, &slaveDataSend, &slaveDataReceive, BUFFER_SIZE, TIMEOUT);
FTM_DRV_UpdatePwmChannel(INST_FLEXTIMER_PWM1, 0U, FTM_PWM_UPDATE_IN_DUTY_CYCLE, slaveDataReceive<<8, 0U, true);
where slaveDataReceive is always 0.
Is there anything shall be reconfigured as well to make it operate properly?
Attached is the entire project. Thank you!
Kind regards,
Nanjun