User`s guide
Pragmas for the DSP56800 and DSP56800E
Pragma Reference
391Targeting MC56F83xx/DSP5685x Controllers
Prototype
#pragma interrupt [called|warn|saveall[warn]]
Remarks
The compiler generates a special prologue and epilogue for functions so that they may
be used to handle interrupts. The contents of the epilogue and prologue vary
depending on the mode selected.
The compiler also emits an RTI or RTS for the return statement depending upon the
mode selected. The SA, R, and CC bits of the OMR register are set to system default.
There are several ways to use this pragma as described below:
• pragma interrupt [warn]
The compiler performs the following using the pragma interrupt [warn]
argument:
– Sets M01 to –1 if M01 is used by ISR
– Sets OMR to system default (see OMR settings)
– Saves/restores only registers used by ISR
– Generates an RTI to return from interrupt.
–If [warn] is present, then emits warnings if this ISR makes a function call
that is not defined with # pragma interrupt called
Important considerations of usage:
– This type of usage is required within the ISR function body as follows:
void ISR(void)
{
#pragma interrupt
... code here
• pragma interrupt [called]
The compiler performs the following using the pragma interrupt
[called] argument:
– Saves/restores only registers used by routine
– Generates an RTS to return from function
Important considerations of usage:
– You must use this argument before the interrupt body is compiled