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 problem

Hi all
I am working with the C6A8168 EVB, and I am investigating about the EDMA usage.
So I have written a DSP demo application which generate a 1Kz signal using buffers transfered by edma to MCASP2 wired to a aic306 codec.
This application work fine if loaded in to the dsp by CCS5-XDS100V2, but it doesn't work if loaded in the DSP by a SYSLINK-LINUX implementation, using the slave_loader application found in SYSLINK.
I suspect the problem is something rearding the memory protecion. So some question: when slave_loader load a fw in to the DSP, then DSP will work in USER MODE or SUPERVISOR MODE?
Could this be the problem?
Note that:
    -    the EDMA ISR is normally called (because in the isr I move an external pin and I see move it by oscilloscope)
    -    I have compiled the kernel linux deisabling the sound card support, i2c support, and reserving the right dma channel and parameters for DSP (see http://processors.wiki.ti.com/index.php/TI81XX_EDMA_Driver_User_Guide)
    -    If I modify the application writing in 'polling mode' in the tx register of the MCASP2 instead of use the DMA, everithing work well.
   
Thanks.

Bye, Paolo.

  • Paolo,

    I do not know the answer to the USER or SUPERVISOR mode question, but I doubt it is the problem.

    You have not explained what is different between the working case and the failing case, so it is not possible to predict a cause.

    My suggestions:

    1. After loading from SYSLINK, dump the contents of the DSP's memory to see if it is identical to what it is when loaded from JTAG. I would expect it to be the same.

    2. Before you load using JTAG, remove the GEL file that is associated with your DSP, if any. Quite often, the initializations done in the GEL file are not done in the DSP code when loaded from other methods. You may need to copy some of that initialization code into your DSP application to make it ready, or copy it into some A8-based code to make it ready. That may be a feature of SYSLINK that needs to be configured correctly, but I do not know that, either.

    Regards,
    RandyP

  • It was reported that you are having trouble posting a reply. This is my test to see if I can reply. If it goes through, please try again. I will report a problem for you in either case.

    RandyP

  • There have been some updates to the forum in the past 7-10 days. You may need to clear your cache and then restart your browser.

    Instructions on how to clear your cache are here:

      IE: http://kb.iu.edu/data/ahic.html

      Firefox: http://support.mozilla.org/en-US/kb/How%20to%20clear%20the%20cache

      Chrome: http://support.google.com/chrome/bin/answer.py?hl=en&answer=95582

    We apologize for any inconvenience this may have caused.

    In my case, I use IE8 and I did not remove the cookies, but did follow the rest of the instructions. Please try the instructions above and try to reply to the post again.

    Regards,
    RandyP

  • I understand that you have issues with replying on this thread. Hopefully that will be fixed soon.

    Have you tried the things I suggested in my first post, above?

    The code that was sent to me externally is not really a part of this issue other than being some of the program code that is not executing correctly. Since you have one or more methods to load the program and it will work correctly, that means the basic code is functional. The problem would seem to be in the loading, so that is what must be debugged.

    Regards,
    RandyP

  • Hi all

    I am working with the C6A8168 EVB, and I am investigating about the EDMA usage.

    So I have written a DSP demo application which move a block memory from one buffer to another one.

    The function I have written is the follow:

     

    void dma_int_copy(int *source, int *destination, int size, int dma_ch, int tcc_code)

    {

        edma3Regs = (CSL_Edma3ccRegs *) REGS_BASE;

        // Set channel to Region 1 DSP.

        edma3Regs->DRA[1].DRAE = 1 << dma_ch;

        edma3Regs->DCHMAP[dma_ch] = (PARAM_BASE + (dma_ch * 0x20));

        myParamSetup_base = (CSL_Edma3ParamSetup *) (PARAM_BASE + (dma_ch * 0x20)) ;

        myParamSetup_base->option = CSL_EDMA3_OPT_MAKE(CSL_EDMA3_ITCCH_DIS, \

                                                  CSL_EDMA3_TCCH_DIS, \

                                                  CSL_EDMA3_ITCINT_DIS, \

                                                  CSL_EDMA3_TCINT_EN,\

                                                  tcc_code,                        // TCC_CODE

                                                  CSL_EDMA3_TCC_NORMAL,\

                                                  CSL_EDMA3_FIFOWIDTH_NONE, \

                                                  CSL_EDMA3_STATIC_DIS, \

                                                  CSL_EDMA3_SYNC_AB, \

                                                  CSL_EDMA3_ADDRMODE_INCR, \

                                                  CSL_EDMA3_ADDRMODE_INCR);

        myParamSetup_base->srcAddr         = (Uint32) source;

        myParamSetup_base->dstAddr         = (Uint32) destination;

        myParamSetup_base->aCntbCnt     = CSL_EDMA3_CNT_MAKE(4, size);

        myParamSetup_base->srcDstBidx     = CSL_EDMA3_BIDX_MAKE(4,4);

        myParamSetup_base->linkBcntrld     = 0;

        myParamSetup_base->srcDstCidx = CSL_EDMA3_CIDX_MAKE(0,0);

        myParamSetup_base->cCnt = 1;

        edma3Regs->SHADOW[1].ICR |= (1 << tcc_code);    // clear the interrupt

        edma3Regs->SHADOW[1].ESR |= (1 << dma_ch);        // trigger the dma channel

     

        while( (edma3Regs->SHADOW[1].IPR & (1 << tcc_code) ) == 0);    // poll for xfer completion

    }

     

    called by the follow:

     

                    int source[SIZE], destination[SIZE],i;

        for(i=0;i<SIZE;i++)

        {

            source[i] = i;

            destination[i] = 0;

        }

        dma_int_copy(source, destination, SIZE, 21, 21);

     

    So I have created a 'typical' SYS/BIOS example project, and I have added the dma_int_copy() function and it works fine.

     

    At this point, I have created a new SYSLINK project, following the steps found in:

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

     

    This sample, loaded with 'slaveloader_debug' work well.

    Now I have added the dma_int_copy() to the sample, but the memory block has not been copied.

     

    Someone could image the problem?

     

    Bye.

    Carlo

    PS  I am using OPERA browser now  

  • From my understanding, the most likely problem is interaction with resources used by Linux. That seems to be the difference between the working case and the failing case.

    After loading the modified sample (with dma_int_copy) using SysLink, take over control with JTAG and halt the A8. Try the DSP app and see if it will work in this case.

    If it does not work with the A8 halted, then you will have to debug by looking at the EDMA3 registers to find out what is not running correctly.

    Regards,
    RandyP