This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RM57L843: Configuring MIBSPI4 to use DMA on the RM57

Part Number: RM57L843

Dear All

I am trying to use MIBSPI4 to use as DMA on 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 this example and verified that MIBSPI1  is working as expected (the RXDATA buffer contains the correct data at the end of the DMA transfer).  And as well as it is working on MIBSPI2 after i have gone through this thread. .

I then used HALCoGen to configure MIBSPI4 using the same steps that I used for MIBSPI1  and MIBSPI2.  Then i  replace all occurrences of "mibspiREG1"  with "mibspiREG4" in the example source code. I also changed the occurrences of "mibspiRAM1" to "mibspiRAM4".

I tried but Nothing was transferred to the RXDATA array and it gets struck on dmaGetInterruptStatus.

I remained unchanged DMA_CH2 and DMA_CH3 as per the thread because i want to use channel 2 and channel 3, what other things i need to change to configure DMA on MIBSPI4?

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);

/* - configuring the mibspi dma , channel 0 , tx line -0 , rxline -1 */
/* - refer to the device data sheet dma request source for mibspi tx/rx */


mibspiDmaConfig(mibspiREG4,0,0,1);

dmaEnable();

/* - start the mibspi transfer tg 0 */
mibspiTransfer(mibspiREG4,0 );


while(!(mibspiIsTransferComplete(mibspiREG4,0)))
{
};

mibspiGetData(mibspiREG4,0,RXDATA);

while(dmaGetInterruptStatus(DMA_CH2, FTC) != TRUE);
while(dmaGetInterruptStatus(DMA_CH3, FTC) != TRUE);

Thanks in advance

Waiting for your early response,

regards,

Irfan

  • Hello,

    You need to change the DMA request line for MibSPI4. Please refer to Table 6-41: DMA Request Line Connection, and MibSPI TX Line, MibSPI RX Line.

    mibspiDmaConfig(mibspiREG4,0,0,1);
  • Hello,

    Well i have gone through it and following changes i did.

    dmaReqAssign(DMA_CH2,DMA_REQ37 );
    dmaReqAssign(DMA_CH3,DMA_REQ36);

    /* - refer to the device data sheet dma request source for mibspi tx/rx */
    mibspiDmaConfig(mibspiREG4,0,6,7);

    now it is working and the RXDATA buffer contains the correct data at the end of the DMA transfer.

    Thanks 

    Regars,

    Irfan