Keil Logo

µVISION DEBUGGER: SIMULATING UNSUPPORTED INTERRUPTS


Information in this article applies to:

  • C51 Version 6.12
  • µVision Version 2.12

QUESTION

I'm using a new device that is not completely supported by the µVision 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.

Last Reviewed: Monday, June 28, 2004


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.