• 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) » C5000 Ultra Low Power DSP » C5000 Ultra Low Power DSP Forum » ISR bug?
Share
C5000 Ultra Low Power DSP
  • Forum
  • Announcements
Options
  • Subscribe via RSS
Top 6 Wiki Links
  • C5000 Main Wiki
  • C5000 Software
  • C5515 Boot-Image Programmer
  • CSL (including CSL 3.00)
  • C5000 Connected Audio Framework
  • Porting C5000 Teaching ROM to C5535 eZdsp
  • ISR bug?

    ISR bug?

    This question is not answered
    Timothy Sapio
    Posted by Timothy Sapio
    on Jul 30 2011 17:10 PM
    Intellectual310 points

    I have a simple program which turns the LED on and off when the RTC expires. Here is the ISR code.

    interrupt void RTC_Isr(void)
    {
       
        Uint16 temp;

        // clear RTC int flag
        IFR1 = 0x0004;
       
        temp =RTC_STAT;
        RTC_STAT = temp;
        if((ST1_55&0x2000) != 0)
        {
            // turn off LED
            ST1_55 &=0xDFFF;
        }
        else
        {
            //turn on LED
            ST1_55 |=0x2000;
        }

    }

    The code executes correctly, and the led turns on and off at the correct times, however when the ISR exits, if the LED was turned on, it immediately turns off. Why??

    C5505 C5505 eZdsp Interrupt TIMER TMS320VC5505 Emulation usbstk5505 GPT ezdsp5505 TMS320VC5505 ezDSP USB Stick TMS320VC5505 ezDSP USB ezDSP c5505
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Nelson Vazquez
      Posted by Nelson Vazquez
      on Jul 31 2011 22:30 PM
      Prodigy310 points

      I am assuming you are using a TMS320C5515/14/05/04 device. Correct me if I am wrong. 

      Try clearing the RTCINTFL (ioport register 1920h) by writing 1 to the corresponding bit field instead of clearing the IFR1. The CPU should clear the IFR1 register automatically. 

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

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

      Check out our C5000 Wiki page!

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

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Timothy Sapio
      Posted by Timothy Sapio
      on Aug 01 2011 09:05 AM
      Intellectual310 points

      I think I found the problem...as it turns out, this particular LED is controlled by setting a bit in the ST1_55 CPU status register. If I'm not mistaken, CPU status registers are backed up pre-interrupt, then restored post interrupt. Because of this, the LED state cannot be changed from within an interrupt.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Cong Van Nguyen
      Posted by Cong Van Nguyen
      on Aug 28 2011 06:53 AM
      Intellectual940 points

      Thanks, Timothy. I am having this problem as well. Not sure why they connect a LED to that pin!

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • ted chen81331
      Posted by ted chen81331
      on Jun 25 2012 03:02 AM
      Prodigy140 points

      Can anyone briefly explain to me how ST1_55 works? Or point me to any relevant document. I only found that it is a CPU register.

      I try to monitor it by setting breakpoints but it appears that the ST1_55 is always 0 under the register watch.

       

      Im using the USB_Stick_AudioFilter code, which is very similar to the code posted above.

      What confuses me the most is when i monitor the temp value read from ST1_55, it appears to be always the same (0x6100 for LED on OR 0x4100 for LED off). Therefore I don't know why sometimes it step into IF((ST1_55&0x2000)!=0) and sometimes it doesn't.

      regards,

      Chen Chiu-Hao (Ted)

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • ted chen81331
      Posted by ted chen81331
      on Jun 25 2012 03:15 AM
      Prodigy140 points

      Nevermind, I got it. Such a simple question. Sorry for trouble caused!

      regards,

      ted. 

      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