Hi all!
I want to set one DMA channel to send data from 4 SPI modules and receive data from 4 SPI modules with another DMA channel.
To send, I set burst size 4, burst destination step size as (SPIB_BASE-SPIA_BASE), transfer size 1 and transfer destination step size -(3*(SPIB_BASE-SPIA_BASE)).
destination address is (uint16_t *)(SPIA_BASE + SPI_O_TXBUF)
And the similar settings for receiving with same logic.
Then I trigger TX DMA with DMA_TRIGGER_SPIATX event and DMA_TRIGGER_SPIDRX for RX_DMA. And all SPI fifo levels are set to 1.
When I run my code, it works but RX_DMA reads old data from some SPI's and it doesnt work properly.
Can I use 1 DMA to send data from all 4 SPI's and another DMA to receive?
If yes. How should I set the DMA's and SPI's.
Many thanks in advance.