• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » DaVinci™ Video Processors » DM816x, C6A816x and AM389x Processors Forum » EDMA problem
Share
DaVinci™ Video Processors
  • Forums
  • Announcements
Options
  • Subscribe via RSS

Forums

EDMA problem

This question is not answered
powersoft powersoft
Posted by powersoft powersoft
on May 04 2012 02:29 AM
Prodigy110 points

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.

edma McASP
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • RandyP
    Posted by RandyP
    on May 04 2012 23:03 PM
    Guru60070 points

    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

    Search for answers, Ask a question, click  Verify  when complete, Help others, Learn more.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • RandyP
    Posted by RandyP
    on May 08 2012 16:23 PM
    Guru60070 points

    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

    Search for answers, Ask a question, click  Verify  when complete, Help others, Learn more.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • RandyP
    Posted by RandyP
    on May 08 2012 16:31 PM
    Guru60070 points

    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

    Search for answers, Ask a question, click  Verify  when complete, Help others, Learn more.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • RandyP
    Posted by RandyP
    on May 09 2012 07:27 AM
    Guru60070 points

    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

    Search for answers, Ask a question, click  Verify  when complete, Help others, Learn more.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • RV
    Posted by RV
    on May 09 2012 08:14 AM
    Expert1980 points

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Colombo Carlo
    Posted by Colombo Carlo
    on May 09 2012 09:56 AM
    Expert4915 points

    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  

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • powersoft powersoft
    Posted by powersoft powersoft
    on May 09 2012 14:59 PM
    Prodigy110 points

    test test

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • RandyP
    Posted by RandyP
    on May 10 2012 07:27 AM
    Guru60070 points

    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

    Search for answers, Ask a question, click  Verify  when complete, Help others, Learn more.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use