Hello, I'm using an S32K144 and transmitting data via LPSPI using interrupts. When the slave device is not operational, the S32K144 keeps entering the SPI interrupt and calling LPSPI_DRV_FillupTxBuffer(instance) to send data. This results in the main function of the program not running as expected, even though I'm calling LPSPI_DRV_MasterTransfer to send data periodically at 1ms intervals. Can you help analyze what might be causing this issue?
Hi @fengba_360,
What do you mean by "the slave device is not operational"?
Do you monitor the bus with an oscilloscope?
What SDK version is it?
Can you share the project either here or privately via a support ticket?
Thank you,
Daniel
I'm not using an oscilloscope to monitor the bus temporarily. I used Freemaster to monitor variables. The slave is a chip that supports SPI communication.
sdk verision:3.0.0
I apologize that I cannot share the project due to company policies. The situation I'm monitoring is that the master is not sending data all the time, but the SPI keeps entering the data transmission interrupt, as shown in the image above.
How many frames do you send in one transfer call?
You should see how the internal structure of the driver changes each call within the LPSPI_DRV_FillupTxBuffer() function.
Or, can you call LPSPI_DRV_MasterGetTransferStatus() to get the status and remaining bytes?
Does it work with the LPSPI_DRV_MasterTransferBlocking() function?
Thanks,
Daniel