ARM Technical Support Knowledge Articles

SIMULATING UNSUPPORTED INTERRUPTS

Applies to: uVision Debugger

Answer


Information in this article applies to:


QUESTION

I'm using a new device that is not completely supported by the uVision Debugger. Specifically, some interrupt vectors are not supported. Is there a way to generate an interrupt in the debugger?

ANSWER

Yes. You can create a script that generates an interrupt on demand. The following debugger function pushes the current program counter onto the stack and sets the program counter to the interrupt vector address you specify:

func void GenerateInterrupt (unsigned char vector) {
  SP++;
  _WBYTE (SP, PC & 0xFF);
  SP++;
  _WBYTE (SP, (PC & 0xFF00) >> 8);
  PC = 0x000000 + vector;
}

For example, to invoke the interrupt at vector address 0x1B, you would call this debugger function as follows:

GenerateInterrupt (0x1B)

Note that you may create a Button on the toolbox or you may attach this function to a breakpoint to automate the interrupt.

Article last edited on: 2004-06-28 19:15:06

Rate this article

[Bad]
|
|
[Good]
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