I am trying to setup MibSPI with the DMA and for some reason the DMA is not activated when I set the TXDMAENA bit in DMAxCTRL.
At first I setup a DMA channel 13 to work with MibSPI, but I was using the DMA just to copy the data from RAM into the SPI RAM. That worked fine as soon as I set the software trigger for channel 13.
At this point I set the DMA trigger for channel 13 to hardware, initialized the DMACTRL[0] to 0x8B0d2000 (buffer 11, DMA req 13). The DMA requests are mapped at default (req 0 -> chan 0). The PCP is set the same way as it worked with the software trigger. I used the DMACNTLEN = 1 and DMACOUNT[0].ICOUNT = 64 (as I’m transferring 64 elements). As soon as I set TXDMAENA the DMACOUNT[0].COUNT becomes 65, but nothing happens on the DMA registers. I expect the PBACSA, PBACDA and PBACTC to be updated with the information from the PCP of DMA Ch 13, but it doesn’t. The control fields in the TX RAM buffer is set to 0xB80D (the DMA suppose to copy only the data part).
1. Why the MibSPI is not triggering the DMA channel?
2. The BUFIDx is set to the beginning of the RAM for the TG which I want to transfer to with the DMA. Is that the intention on the BUFIdx?
3. I don’t exactly understand the difference between Buffer Mode 1 and 5 (skip, or suspend), which one should I use?
4. If I want to transfer large amount of data without processor intervention, how the MibSPI handshakes with the DMA?
5. Do I need to define DMA frames the size of the SPI buffer of the TG I am using?