• 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 » Microcontrollers » Hercules™ Safety Microcontrollers » Hercules™ Safety Microcontrollers Forum » sys_core.asm file in spna106a.zip archive contains WRITE to Readonly INTREQ Register of VIM
Share
Hercules™ Safety Microcontrollers
  • Forum
  • E2E Wiki
Options
  • Subscribe via RSS

sys_core.asm file in spna106a.zip archive contains WRITE to Readonly INTREQ Register of VIM

sys_core.asm file in spna106a.zip archive contains WRITE to Readonly INTREQ Register of VIM

This question is answered
Pashan None
Posted by Pashan None
on Jul 30 2012 14:50 PM
Genius3290 points

Hello Support,

There is a file called sys_core.asm within spna106a.zip archive. [spna106a.pdf]

There is a function called _esmCcmErrorsClear_ within sys_core.asm file.

In that function, there is a WRITE to VIM INTREQ Register.

But according to the TRM, VIM INTREQ is a READONLY Register.

So, is the code wrong or TRM wrong?

Please help.

Thank you.

Regards

Pashan

 

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Sunil Oak
    Posted by Sunil Oak
    on Jul 30 2012 14:57 PM
    Expert8535 points

    Pashan,

    The TRM needs to be updated to include the write-clear functionality added to the pending interrupt status register in the VIM. Thanks for identifying this issue with our documentation.

    Regards, Sunil

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Pashan None
    Posted by Pashan None
    on Jul 30 2012 16:00 PM
    Genius3290 points

    Hello Sunil,

    Do I have to clear INTREQ Register within the Interrupt Routine before returning in order to clear the Pending Interrupt Flag?

    Please elaborate more on the INTREQ Register usage from end-user perspective because you mentioned that it is WRITE_CLEAR Register.

    Under what conditions, end-user must perform WRITE_CLEAR to INTREQ Register?

    Any more information will be helpful for debugging my code.

    Thank you.

    Regards

    Pashan

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Sunil Oak
    Posted by Sunil Oak
    on Jul 31 2012 13:21 PM
    Suggested Answer
    Expert8535 points

    Hello Pashan,

    The INTREQ flag gets cleared under either of the following conditions:

    1. In hardware vectored mode of operation, when the CPU fetches the ISR using the address provided by the VIM
    2. Reading the IRQVECREG or FIQVECREG register using the "ldr pc, [pc, #-0x1b0]" instruction at addresses 0x18 and 0x1C
    3. Reading the IRQIVEC or FIQIVEC register to determine the highest priority pending interrupt
    4. Writing a '1' to the INTREQ(i) flag. This write-clear functionality is basically provided to clear the history of "pulse interrupts" that are not required to be serviced.
    It is generally recommended to write-clear the INTREQ flags for interrupt conditions that have happened prior to enabling or unmasking these interrupts.
    Regards,
    Sunil
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Pashan None
    Posted by Pashan None
    on Jul 31 2012 14:13 PM
    Genius3290 points

    Hello Sunil,

    INTREQ bit is edge-triggered or Level-Triggered w.r.t. ESM Error Sources [Like Group 2 Bit 2 -- CCM-R4 Compare Error]?

    I am assuming Level-Triggered.

    If it is Level-Triggered, then once I clear the ESM Group 2 Status Register, then will INTREQ Bit revert back to ZERO state and hence no subsequent FIQ Interrupt?

    I am just trying to understand the behaviour.

    Thank you.

    Regards

    Pashan

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Sunil Oak
    Posted by Sunil Oak
    on Aug 02 2012 07:41 AM
    Verified Answer
    Verified by Pashan None
    Expert8535 points

    Pashan,

    If the application follows either of the first three methods of servicing the interrupts, the INTREQ flag is automatically cleared and the application does not have to do anything else after that. The INTREQ flag needs to be explicitly cleared only for the case where the application chooses to not use the vectored mode for servicing the interrupt and does the interrupt prioritization completely in software. In this case, it is better for the application to not assume (or care) about whether a particular interrupt is indicated as a pulse or a level to the VIM. It needs to explicitly write-clear the INTREQ just to account for the possibility of a pulse interrupt.

    Regards, Sunil

    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