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 { }
This doesn't have to do with a dummy isr but here's a troubleshooting technique I find useful. I add a counter at the beginning of each isr (initialized to zero of course). uint isr_x_cntr=0; void isr_x(void) interrupt num_x { isr_x_cntr++; //rest of stuff goes here } If I'm working with a state machine whose transitions originate in different isrs examining the counts can tell me where things went wrong. Example, forgetting to clear the flag in a timer isr yields unbelievably high counts and you spot it right away in the watch window. Transmitting a SMBus packet may show one start count, one address/ACK count, 7 data byte/ACK counts and 1 data byte/NACK count. Showing those same counts everytime is a big clue about where to look in your code. Another example is where a vector has multiple sources, say the SPI overrun or write collision sources. It's nice to see not only what sources generated requests but how many were generated, sometimes you can correlate that number with some other activity in your system.