Lpspi_Ip_AsyncTransmit() call gets executed once with expected SPI waveforms.
Other calls are rejected because drives stays in LPSPI_IP_BUSY state.
I have a workaround to call Lpspi_Ip_Cancel() when BUSY state is reported:
if (Lpspi_Ip_GetStatus() == LPSPI_IP_BUSY) Lpspi_Ip_Cancel();
Lpspi_Ip_AsyncTransmit();
This works but I won't want to keep using that cancel call.
What can keep driver in BUSY state even after all needed data are properly Tx/Rx by SPI?
I use RTD 4.0.0, SPI with Tx/Rx DMA channels. DMA does not have global/transfer/scatter configs, also no interrupt callback.
Hi @sstelmak,
I understand the driver never becomes IDLE after the transfer.
It would help if you could share the project so that I can test it.
Did you enable DMA interrups in the IntCtrl_Ip driver?
Regards,
Daniel
Hello,
I can't post entire project per company policies, it would be ok to email it directly.
Attached is the mex and few relevant c files.
DMA or SPI interrupts are not configured. This is because I have restriction for micro throughput and looking for possibility to skip unnecessary calls.
Hi @sstelmak,
The driver requires the DMA interrupts.
Have a look at the Lpspi_Flexio_Ip_Transfer_S32K344 example, where the FlexIO_SPI driver uses DMA.
BR, Daniel
Hello,
I added DMA ISRs (I use same DMA channels as the example) to IntCtrl_Ip
Nothing changed after that, and I didn't see that any of those interrupts were called.
Try enabling Global config in the in the DMA driver.
Please share the whole project (or a test project that can demonstrate the issue,) so that I can test it.
Thank you,
BR, Daniel