ARM Technical Support Knowledge Articles


Applies to: General Topics



How do I insert dummy interrupt vectors in my code for debug purposes?


Create an interrupt service routine using the interrupt keyword for each unused interrupt. In these routines, use a while (1) {} statement to create a tight loop jumping to itself. The following is a typical example:

void empty_isr (void) interrupt 0
        while (1) {};

Copy it for each interrupt and remember to change the interrupt number. If you forget, the linker posts an error message about code space overlap.

If a spurious interrupt is received, your interrupt handler halts your program in this tight loop. This may give you an idea where the problem may lie.

Article last edited on: 2004-05-08 15:21:28

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential