User`s guide

Pragmas for the DSP56800 and DSP56800E
Pragma Reference
394
Targeting MC56F83xx/DSP5685x Controllers
Emit an RTI for the return statement depending upon the mode selected. If the
interrupt routine has a return value, the return register is not saved.
There are several ways to use this pragma, with an on|off|reset arguments, or with no
arguments.
Arguments
NOTE
Use on or off to change the pragma setting, and then use reset to
restore the previous pragma setting.
To disable the pragma, use #pragma interrupt off after #pragma
interrupt (Listing C.13
)
<options> alignsp Aligns the stack pointer register correctly to allow long values to be
pushed on to the stack. Use this option when your project mixes C code
and assembly code. Use this option specifically on ISRs which may
interrupt assembly routines that do not maintain the long stack alignment
requirements at all times. Restores the stack pointer to its original value
before returning from the subroutine.
comr The Operating Mode Register (OMR) is set for the following to ensure
correct execution of C code in the ISR:
36-bit values used for condition codes. (CM bit cleared)
Convergent Rounding. (R bit cleared)
No Saturation mode. (SA bit cleared)
Instructions fetched from P memory. (XP bit cleared)
<mode> saveall Preserves register values by saving and restoring all registers by calling
the INTERRUPT_SAVEALL and INTERRUPT _ RESTOREALL routines
in the Runtime Library.
called Preserves register values by saving and restoring registers used by the
routine. The routine returns with an RTS. Routines with pragma interrupt
enabled in this mode are safe to be called by ISRs.
default This is the mode when no mode is specified. In this mode, the routine
preserves register values by saving and restoring the registers that are
used by the routine. The routine returns with an RTI.
on|off|reset on Enables the option to compile all C routines as interrupt routines.
off Disables the option to compile all C routines as interrupt routines.
reset Restores the option to its previous setting.