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.

EDMA link the paRAM to itself?

Other Parts Discussed in Thread: OMAPL138

hi,

Why does EDMA link the paRAM to itself? 

Have what effect?

/*
** This function will be called once transmit DMA is completed
*/
static void McASPTxDMAComplHandler(void)
{
    ParamTxLoopJobSet((unsigned short)(PAR_TX_START + parOffSent));

    parOffSent = (parOffSent + 1) % NUM_PAR;
}

/*
** Assigns loop job for a parameter set
*/
static void ParamTxLoopJobSet(unsigned short parId)
{
    EDMA3CCPaRAMEntry paramSet;

    memcpy(&paramSet, &txDefaultPar, SIZE_PARAMSET - 2);

    /* link the paRAM to itself */
    paramSet.linkAddr = parId * SIZE_PARAMSET;

    EDMA3SetPaRAM(SOC_EDMA30CC_0_REGS, parId, &paramSet);
}

  • Which device are you using?

    Which software package and source file does this code snippet come from?

    Most likely, the param set is not an active set but is a link set. In this case any time the copy of this link set is exhausted it will be copied again.

    Regards,
    RandyP
  • I'm not good at EDMA, but here is some idea to findout the reason why we need to do loop job.

    Your code seems to be from OMAPL138/C6748 starterware package and its from McASP example.

    It seems, in RX, enable the loop job for all the paramset except paRAM set1.

    C:\ti\OMAPL138_StarterWare_1_10_04_01\examples\lcdkOMAPL138\mcasp\mcaspPlayBk.c

    /*

    ** Initializes the DMA parameters.

    ** The RX basic paRAM set(channel) is 0 and TX basic paRAM set (channel) is 1.

    **

    ** The RX paRAM set 0 will be initialized to receive data in the rx buffer 0.

    ** The transfer completion interrupt will not be enabled for paRAM set 0;

    ** paRAM set 0 will be linked to linked paRAM set starting (PAR_RX_START) of RX.

    ** and further reception only happens via linked paRAM set.

    ** For example, if the PAR_RX_START value is 40, and the number of paRAMS is 2,

    ** reception paRAM set linking will be initialized as 0-->40-->41-->40

    **

    ** The TX paRAM sets will be initialized to transmit from the loop buffer.

    ** The size of the loop buffer can be configured.  

    ** The transfer completion interrupt will not be enabled for paRAM set 1;

    ** paRAM set 1 will be linked to linked paRAM set starting (PAR_TX_START) of TX.

    ** All other paRAM sets will be linked to itself.

    ** and further transmission only happens via linked paRAM set.

    ** For example, if the PAR_RX_START value is 42, and the number of paRAMS is 2,

    ** So transmission paRAM set linking will be initialized as 1-->42-->42, 43->43.

    */

       /* Initialize the 1st paRAM set for transmit */

       memcpy(&paramSet, &txDefaultPar, SIZE_PARAMSET);

       EDMA3SetPaRAM(SOC_EDMA30CC_0_REGS, EDMA3_CHA_MCASP0_TX, &paramSet);

       /* rest of the params, enable loop job */

       for(idx = 0 ; idx < NUM_PAR; idx++)

       {

           ParamTxLoopJobSet(PAR_TX_START + idx);

       }

  • Hi,

    For more details on EDMA PaRAM set linking, kindly refer below the starterware audio application wiki

    The McASP starterware audio loopback example demonstrates audio input and output in I2S mode using DMA. The audio input on the LINE IN is looped back to the audio ouput on LINE OUT of the EVM. Before running the application, connect an audio source to the LINE IN connector and speakers or headphones to the LINE OUT connector. While the application runs, audio is piped from LINE IN to LINE OUT

    http://processors.wiki.ti.com/index.php/StarterWare_Audio_Application

    For Starterware McASP configuration programming, you could refer the below wiki:

    http://processors.wiki.ti.com/index.php/StarterWare_McASP

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question

    -------------------------------------------------------------------------------------------------------