• 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) » C6000 Single Core DSP » C64x Single Core DSP Forum » [6416T] DMA controller does not interrupt DSP after transfer completes
Share
C6000 Single Core DSP
  • Forums
  • Announcements
Options
  • Subscribe via RSS

Forums

[6416T] DMA controller does not interrupt DSP after transfer completes

This question is not answered
JTM
Posted by JTM
on Oct 18 2010 15:35 PM
Prodigy20 points

Hello,

We are seeing a condition in which 2 QDMA transfers are submitted to the EDMA controller, they both transfer all of their data, but only one of them interrupts the DSP indicating it is finished. These transfers are submitted such that the second is submitted while the first transfer is still in process.  The first transfer to complete always interrupts the DSP to indicate it is finished, but the second transfer to complete never interrupts the DSP. When these two transfers happen independently (not overlapping in time), they both finish and interrupt the DSP as programmed, but we've found this race condition where if the two transfers line up over top of each other, the second one to finish does not interrupt the DSP.

Both transfers are to/from the EMIF bus.  We have verified that the transfers complete by looking at the EMIF signals on a logic analyzer.

To reproduce:

Case 1

Submit transfer 'A' to the EDMA controller.  While it is transferring data, submit transfer 'B' at a equal or lower priority.  Transfer A finishes and interrupts the DSP, then transfer B starts and finishes, but does not interrupt the DSP.

Case 2

Submit transfer 'B' to the EDMA controller.  While it is transferring data, submit transfer 'A' at a higher priority.  Transfer B starts, then transfer A takes over because it has higher priority.  Transfer A then finishes and interrupts the DSP.  Transfer B finishes, but never interrupts the DSP.

Any thoughts on what might cause this?

Thanks for your help!
Jeff

C64+ EDMA C6416T BIOS/DSP C64x C6416 BIOS C64x EDMA TMS320C64x C641x C64x Single Core DSP Forum
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Brad Griffis
    Posted by Brad Griffis
    on Oct 19 2010 21:54 PM
    Guru57425 points

    The first thing that comes to mind is whether you are using the same TCC for both transfers or a different TCC?  If you're using the same TCC and the transfers complete close together then your interrupt will not have time to clear the IPR bit prior to the next interrupt firing in which case you would effectively lose one.

    Can you try a 3rd case which is similar to case 1 except that transfer B is at a higher priority?  In this case we expect transfer B to complete first.  So the question is, does the first completed transfer always generate the interrupt or does 'A' always generate the interrupt (for some reason)?

     

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

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

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • JTM
    Posted by JTM
    on Oct 20 2010 08:27 AM
    Prodigy20 points

    Brad - thanks for your reply.

    We are using different TCC's for the two transfers.  One is 3 and the other is 4.

    As for your 3rd case - B finishes first and generates an interrupt.  A does not generate an interrupt.

    We were looking at our interrupt handling, and it appears that we may have found the problem.  We have the EDMAISR that gets called when the EDMA controller finishes a transfer.  This ISR calls EDMA_IntDispatcher (the CSL function) and then does an IRQ_clear on the EDMA interrupt flag.  We think that there could be a race condition where the first transfer completes and the ISR is called, and then the next transfer completes very quickly after it (it is a short transfer).  This second transfer may finish after the dispatcher is finished processing the first transfer, or it finishes prior to the dispatcher and the dispatcher generates another EDMA interrupt.  Then when we clear the EDMA interrupt flag, we lose the interrupt for the second transfer.  Does that make sense?  We moved the EDMA interrupt flag clearing to BEFORE the dispatcher call, and it appears to be working fine now.  We havent tested extensively, but the particular test case that caused a problem before is looking ok.  Does that sound like a valid fix?

    Thanks,
    Jeff

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Brad Griffis
    Posted by Brad Griffis
    on Oct 20 2010 19:01 PM
    Guru57425 points

    JTM
    This ISR calls EDMA_IntDispatcher (the CSL function) and then does an IRQ_clear on the EDMA interrupt flag.

    You should not be doing IRQ_clear at all.  This is handled automatically in hardware.  Upon acceptance of the interrupt the corresponding flag in the CPU's IFR register is automatically cleared.  Basically you are making yourself lose an interrupt.  The right answer is to get rid of that code altogether.  Moving the call to before EDMA_intDispatcher did the trick because it just so happens that upon clearing an EDMA CIPR bit that will cause the CPU IFR to be re-asserted so you get lucky.  Bottom line is that you don't need to do IRQ_clear at all in any ISR...

    If you haven't looked at this thread you might find this helpful too:

    Problem getting isr callback for tcc for QEDMA

    Best regards,
    Brad

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

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

    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