Tool/software:
Hello,
I am trying to use DMA for the received data on the SPI peripheral (standard SPI, not the MibSPI). It seems to mostly work fine, but when having multiple successive transfers I noted that the last frame of the block is instead transferred to the next destination. I've set up a small example project and you can see in the screenshot below that the 4th element of the src array was sent to dest2 array instead of dest array.
I assume it is because I start the next transfer before the previous one fully completed (if I add some delay in between it works fine, see the dest3). I tried reading different bits of the DMA status registers (GCTRL, DMASTAT, PEND, PTCRL) to get confirmation that the DMA transfer completed, but none of them work. Is there a more reliable way to achieve this?
For reference, my example code is available here:
Thank you and best regards,
Aaron