Keil™, An ARM® Company

Technical Support

C251: CONFIGURING FOR 2-BYTE INTERRUPTS


Information in this article applies to:

  • C251 Version 2.14

QUESTION

How can I configure my C251 application to use 2-byte interrupt stack frames instead of 4-byte ones?

ANSWER

There are three things you must do to configure the 251 chip and tools to use 2-byte interrupt stack frames.

  1. Add the switch I2 to the compiler command line. In µVision, go to Options | C251 Compiler | Object and check the switch that says Save PSW1 in C251 int code.
  2. Add the switch I2 to the assembler command line. In µVision, go to Options | A251 assembler | Misc and add I2 under "Additional Options."
  3. Copy the startup file (C251\LIB\START251.A51) to your project directory and add it to your project. Around line 57 there is a line that reads INTR EQU 1. Change this to read INTR EQU 0.

That's all there is to it!

Last Reviewed: Saturday, July 09, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure