AnsweredAssumed Answered

S32K148 SPI issue with the DMA

Question asked by Ahmed Elamir on Sep 22, 2019
Latest reply on Oct 17, 2019 by Razvan-nicolae Tilimpea



We are using S32k148 Dev board, We configure SPI0 as Slave using the DMA.


When the slave wants to send data to Master, It Trigers the master by GPIO pin, and when it finish it return this pin to high.


As the slave doesn't know in advance the length of the frame from the master, after the CS pin is switched off, the slave terminate the communication using the function LPSPI_DRV_SlaveAbortTransfer then copy the received data to local buffer.


Also at the start, the slave sends some data to the master (it is received by the master successfully).


We have an issue while send or receive, many frames are dropped and not captured by the slave. It shall be sent multiple times from the Master so that the slave capture it, however the Master send it correct.


SPI slave configuration

DMA controller configuration


We use master SPI clock of 6.25MHz. Is there any further configuration shall be done if we use the SPI with DMA ? 



Thanks for the help.