This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

dummy isr for unused interrupts

Hello together,

I'm using the XC866-Board from Infineon.
As I don't use all the availible interrupts in my program I would like to simply overwrite the NOPs of the interrupt vectors with RETIs to make sure the program does not accidentaly run into my code when an unused interrupt should occure.
Is there a simpler alternative than writing a interrupt service routine for every unused interrupt like

void dummyISR() interrupt xy
{
}

Thanks in advance

Parents
  • The issue of unused interrupts should not be an issue for production ready project.
    However it can really kill your productivity during development.

    Thus I make all unused interrupts like this

    ////////////////////////////////////////////////////////////
    //
    //  ISR 2: void ISR_EI1 (void)
    //
    
    void ISR_EI1 (void) interrupt 2 using 0
    {
      Icrash(); // just kill stray interrupts
    }  // end ISR_EI1
    And Icrash look like this
    void Icrash(void)
    {
    for (;;)
    }

    This does not cure stray interrupts but, it does provide an easily detected means of catching your screwup. When I stop the program in the ICE it will sit RIGHT THERE when the bug was IE or start code related.

    Erik

Reply
  • The issue of unused interrupts should not be an issue for production ready project.
    However it can really kill your productivity during development.

    Thus I make all unused interrupts like this

    ////////////////////////////////////////////////////////////
    //
    //  ISR 2: void ISR_EI1 (void)
    //
    
    void ISR_EI1 (void) interrupt 2 using 0
    {
      Icrash(); // just kill stray interrupts
    }  // end ISR_EI1
    And Icrash look like this
    void Icrash(void)
    {
    for (;;)
    }

    This does not cure stray interrupts but, it does provide an easily detected means of catching your screwup. When I stop the program in the ICE it will sit RIGHT THERE when the bug was IE or start code related.

    Erik

Children