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
  • hi,

    Is there a simpler alternative than writing a interrupt service routine for every unused interrupt

    Indeed, just disable them with IE register(s). When they are individualy disabled then no ISR is called.
    As about dummy ISR then there is not easy way to do it because some interrupts require for their pending flag must be cleared by software. In such case, the simple RETI is not enough.

    Regards,
    Oleg

Reply
  • hi,

    Is there a simpler alternative than writing a interrupt service routine for every unused interrupt

    Indeed, just disable them with IE register(s). When they are individualy disabled then no ISR is called.
    As about dummy ISR then there is not easy way to do it because some interrupts require for their pending flag must be cleared by software. In such case, the simple RETI is not enough.

    Regards,
    Oleg

Children
More questions in this forum