I see that you also have the ENABLE_IRQ() code in your irq handler. is it possible to put this code into the global irq_handler?? so I don't have to put it into every irq handler. Thanks.
Yes, it can be done. You have to do it in the right order: read EIC_IVR first, then enable interrupts and call ISR. EIC initialization code would have to be modified too in order to accommodate a new way of calling ISRs via EIC_IVR.
The reason why I didn't do it is that interrupt handling code would inevitably become slower because of the manipulations with EIC_IVR. It kind of defeats the purpose of EIC_IVR, which is there to speed up interrupt handling. But if an extra microsecond or so in interrupt response time is not a problem, then what you are suggesting makes a lot of sense. I'll look into it when I have time. Regards, - mike