Hi All, I am using the STR710 microcontroller. Does someone know if it is possible to catch all unused interrupts sources by putting an one single interrupt routine adress in all the different vectors? If an unused interrupt is triggert(whatever the source) than this will always execute the pre-defind service routine. In this case a system reset. This way I can manage all the unused interrupt sources preventing unexpected behaviour due to for example EMC problems. I tried to point a few different interrupt vertors to the same interrupt service routine but failt to do that. Does someone have idea's?? Regards, Erik
Wouldn't it actually be better to have separate handlers, so that you can tell which interrupts are triggering spuriously...?
all my unused interrupts call Icrash();
void Icrash(void) { U1 ICbit; #ifdef DEBUG ICbit = 1; #else ICbit = 0; #endif while ICbit; }
Hi and thanks for the anwers, Why don't you perform a MCU-reset in your IRS? This way all resisters are reset and restored and the bit that is the source of the interrupt is cleared. If I may ask, how does your code look that catches all unused interrupts? And how does it point to a single interrupt service routine? Regards, Erik
The STR71x has a vectored interrupt controller and it is up to the user to set the interrupt vectors of unused interrupts to some dummy routines. I do not see that this is something the tool vendor needs to take care of. Reinhard
View all questions in Keil forum