• 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 » TMS570 VIM Parity Error Handling
Share
Hercules™ Safety Microcontrollers
  • Forum
  • E2E Wiki
Options
  • Subscribe via RSS

TMS570 VIM Parity Error Handling

TMS570 VIM Parity Error Handling

This question is answered
Nathan Flinn
Posted by Nathan Flinn
on Apr 01 2012 20:28 PM
Prodigy30 points

HI there,

 

I am having a frustrating issue.  I have initliatezed the VIM and have entered code to test the VIM Parity Correction routine that I created.  I generate a parity error, which both the VIM and the ESM see.  I have loaded the FBPARERR register with the location of the subroutine to recover from this.  I see that the FIQVECREG properly displays this address to the CPU.

 

The problem is that the CPU never begins executing this code.  It simply ignores the FIQ interrupt.

 

I have triple checked that the FIQ is being enabled in the CPSR.  I have also double and triple checked all of the ESM and VIM registers that enable, map, etc.  Is there something I'm missing?

 

Thanks for all you do!

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Jean-Marc Mifsud
    Posted by Jean-Marc Mifsud
    on Apr 02 2012 09:39 AM
    Expert8985 points

    Nathan,

    I need additional information to answer your question.

    What device are you using, and which board?

    How do you check that the CPU does not enters FIQ?

    In which mode are you using the VIM?
    1) The TMS470R1x legacy
    2) Vectored interrupts
    3) Hardware vectored interrupts (IRQ only)

    Thanks,

    Jean-Marc

    Best regards,

    Jean-Marc

    Application Engineer


    If my reply answers your question please click on the green button "Verify Answer".

    VIM NMI interrupt
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Nathan Flinn
    Posted by Nathan Flinn
    on Apr 02 2012 10:46 AM
    Prodigy30 points

    Hi Jean-Marc,

     

    I am using the TMS570LS20216 board with a TMS570 chip.

     I am using register vectored interrupts.  By the way, I never saw a place to explicitly select 1,2, or 3 from your list above.  I instead simply enabled the VIMs registers and initalized the VIM RAM.  So far this seems to work because the FIQVECREG receives the correct ISR addresses.

    I check the CPU to see it does not enter FIQ for the VIM Parity error by verifying that the VIM FIQVECREG is set to the FBPARERR address and the PARFLG is set to 1.  I placed code in the ISR pointed to by FBPARERR that writes a RAM address with a known value that is different than its startup value (the startup value of this RAM address is set during startup).  I also put an infinite loop into the service routine which is contained in the FBPARERR.  Neither of these have anything to do with the actual ISR.  I only added them to try and see if they were ever hit.  The infinite loop is never reached, and the RAM is not written.  I have done this while the debugger is attached and while it is not.

     

    FYI, I have also turned off all of interrupt disables in the debug build options.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jean-Marc Mifsud
    Posted by Jean-Marc Mifsud
    on Apr 02 2012 13:01 PM
    Verified Answer
    Verified by Nathan Flinn
    Expert8985 points

    Nathan,

    1) Legacy mode:

    The CPU branches to 0x18 (IRQ) or 0x1C (FIQ) to execute the main ISR.
    The main ISR routine reads the offset register (IRQIVEC, FIQIVEC) to
    determine the source of the interrupt.
    In this mode, it is easy to check if the CPU gets the IRQ or FIQ/NMI signal by setting a break point in 0x18 (IRQ) or 0x1C (FIQ/NMI)

    2) Vectored interrupts:

    The CPU executes the instruction placed at 0x18 or 0x1C (IRQ or FIQ/NMI vector).
    The instruction should be a LDR PC, [PC,#-0x1B0], the offset indicates the relative address of the interrupt vector register (IRQVECREG for IRQ interrupt, FIQVECREG for FIQ/NMI interrupt) within the vectored interrupt manager (VIM). This register will give the CPU the address of the Interrupt Service Routine (ISR) corresponding to the highest active interrupt request.
    In this mode, it is easy to check if the CPU gets the IRQ or FIQ/NMI signal by setting a break point in 0x18 (IRQ) or 0x1C (FIQ/NMI)

    3)  Hardware vectored interrupts (IRQ only)

    If the vectored interrupt interface is enabled within the CPU CP15 R1register, the CPU reads the vector address as part of the IRQ interrupt entry, i.e. the CPU will read a vector address from interrupt vector interface instead of branching to 0x18. The VIM will provide directly to the vector interface of the CPU the address of the highest pending request.
    The CPU will branch directly to the ISR.
    In this mode, the processor state after an IRQ interrupt entry is determined by bit 0 of the interrupt vector (T flag = VECTOR[0]), i.e. the
    LSB of the vector address will determine if the first instruction of the interrupt handler is an ARM or Thumb state instruction.
    In this mode, a break point at 0x18 cannot be used. The CPU will jump directly in your handler and will not stop on 0x18.

    Will it be possible to receive your project so I can try to see what is going on.
    You can send your code directly to my email address if you don't want to post it on the forum.

    Regards,

    Jean-Marc

    Best regards,

    Jean-Marc

    Application Engineer


    If my reply answers your question please click on the green button "Verify Answer".

    VIM NMI interrupt
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jean-Marc Mifsud
    Posted by Jean-Marc Mifsud
    on Apr 27 2012 10:07 AM
    Expert8985 points

    Nathan,

    What is the status on this question?

    If it is answered, can you mark it as verified?

    Thanks and Regards,

    Jean-Marc

    Best regards,

    Jean-Marc

    Application Engineer


    If my reply answers your question please click on the green button "Verify Answer".

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Nathan Flinn
    Posted by Nathan Flinn
    on Apr 27 2012 11:45 AM
    Prodigy30 points

    It was my mistake.  I verified my code to turn on the FIQ interrupts in the CPSR, but another programmer's code was turning off the FIQ interrupts in the CPSR a moment before I triggered the interrupt.  After discovering the "Registers" view, I was able to detect this and remedy it.  Everything else I was doing was correct and lined up with what you said two posts above.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jean-Marc Mifsud
    Posted by Jean-Marc Mifsud
    on Apr 27 2012 12:23 PM
    Expert8985 points

    Nathan,

    Thanks for your update.

    Anyway, I have a concern about your problem description.

    On this device family, FIQ interrupt are treated as NMI. That means, once FIQ are enable at the CPU level (via the CPSR) there is no way to disable FIQ anymore.
    Only a reset or entering FIQ/NMI mode will disable FIQ (set the FIQ disable bit in CPSR)

    Can you check this point?

    Regards,

    Jean-Marc

    Best regards,

    Jean-Marc

    Application Engineer


    If my reply answers your question please click on the green button "Verify Answer".

    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