Pierre Theron

DSPI Slave Mode with DMA in S32DS with NXP5744P

Discussion created by Pierre Theron on May 20, 2020
Latest reply on May 20, 2020 by Lukas Zadrapa

Hi

I am using DSPI slave mode with the drivers supplied with S32DS. The problem I have is that it takes quite long to set up the Slave transfer when DMA is used. I optimized the driver for my use as I am only using receive and not transmit, and disabled setting up of the DMA transmit channel using the EDMA_DRV_ConfigMultiBlockTransfer() and EDMA_DRV_StartChannel() . I also install the receive callback function during initialization as this is always the same function. This is all working. I tried to optimize the driver further by configuring the source and destination addresses for the DMA channels during initialization, but the SPI stops working after if I don't initialize the source and destination addresses in the EDMA_DRV_ConfigSingleBlockTransfer() function. The micro gets an Assert if I do this. The source and destination buffers never change, to me it does not make sense to have to set up the DMA for every SPI transfer. The driver clears all the DMA register for the channel and set it up again for every SPI transfer. Is there a way where I can set up the DMA channel only once and initiate an SPI transfer by just starting the DMA channel and the starting the SPI transfer? All the examples I looked at set up the DMA and then does only 1 transfer. I need to do periodic transfers with minimal setup when initiating the transfer.

 

Regards,

Pierre

Outcomes