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.

DMA_configMode () not working

Why the function  DMA_configMode ()  for the c28379D is not working ?

the example below shows 2 deferent configurations but the PERINTSEL not set properly or even changing !!

Thanks

  • Naim,

    Those are legacy bits that are no longer used on the F2837x device.  They have been replaced with the DMACHSRCSELn registers.  Please see below from page 673 of the TRM

    You will need to open a watch window to the SysCtrl Register space, base address shown here.

    Best,

    Matthew

  • Thank you  Matthew for your swift response,

    Yes, I discovered that but now I am having problem to "RE trigger" the DMA.  it seems to trigger only once. 

    I tried to restart as shown below but no luck:

    __interrupt void dmaCh1ISR(void)
    {
    static int PingPong =0;
    static int test =0;


    PingPong ^=1;
    test= test +1;

    DMA_startChannel(DMA_CH1_BASE);


    return;
    }

    void initDMA()
    {
    //
    // Refer to dma.c for the descriptions of the following functions.
    //

    //
    //Initialize DMA
    //
    DMA_initController();

    const void *destAddr;
    const void *srcAddr;


    srcAddr = (const void *)sData;
    destAddr = (const void *)rData;

    //
    // configure DMA CH1
    //
    DMA_configAddresses(DMA_CH1_BASE, destAddr, srcAddr);
    DMA_configBurst(DMA_CH1_BASE,BURST,1,1); // DMA_configBurst(DMA_CH1_BASE,BURST,1,1);
    DMA_configTransfer(DMA_CH1_BASE,TRANSFER,0,1); //
    DMA_configMode(DMA_CH1_BASE,DMA_TRIGGER_EPWM1SOCA, DMA_CFG_ONESHOT_DISABLE);
    DMA_setInterruptMode(DMA_CH1_BASE,DMA_INT_AT_END);
    DMA_enableTrigger(DMA_CH1_BASE);
    DMA_enableInterrupt(DMA_CH1_BASE);
    }

    Cheers

    Naim

  • Naim,

    Can you enable continuous mode in your _configMode funcition call and see if this works.  Your ISR looks correct, the _startChannel should reactivate the DMA, but setting continous mode would show if this is the issue or not.  If this doesn't work, then there is some other setting effecting things.

    Best,

    Matthew

  • Many thanks Matthew,

    The problem was that once in the interrupt I wasn't clearing it with:

     Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP7);

    Again many thanks Slight smile

    Naim.