I am trying to enable using DMA with multi-buffer for SPI2 on the RM57.
I started by using "example_mibspiDMA.c" found in the HALCoGen examples at C:\ti\Hercules\HALCoGen\v04.05.01\examples\RM57Lx
I configured HALCoGen as directed in the example. I then verified that for MIBSPI1 the DMA transfer was working as expected (the RXDATA buffer contains the correct data at the end of the DMA transfer).
I then used HALCoGen to configure MIBSPI2 using the same steps that I used for MIBSPI1. I then search and replace all occurrences of "mibspiREG1" with "mibspiREG2" in the example source code. I also changed the occurrences of "mibspiRAM1" to "mibspiRAM2".
I tried tired to run my modified sample and it didn't work. Nothing was transferred to the RXDATA array.
I then found table 5-37 in the RM57 data sheet (this was not in the TRM). From the table it looks like I should be using DMA request 2 and 3 instead of 1 and 2.
I changed the line of code where I set up the MIBSPI DMA configuration:
mibspiDmaConfig(mibspiREG2,0,2,3);
I also tried changing the DMA control packets to use DMA_CH2 and 3:
/* - setting dma control packets */
dmaSetCtrlPacket(DMA_CH2,g_dmaCTRLPKT2);
dmaSetCtrlPacket(DMA_CH3,g_dmaCTRLPKT1);
/* - setting the dma channel to trigger on h/w request */
dmaSetChEnable(DMA_CH2, DMA_HW);
dmaSetChEnable(DMA_CH3, DMA_HW);
I tried several other permutations, but nothing is ever transferred to the RXDATA array. Is there something else I should be configuring?