Hardware Errors and Exception Handling
Deferring Exception Processing
Exception handlers are usually long routines, because they must discrimi-
nate among several exception causes and take corrective action
accordingly. The length of the routines may result in long periods during
which the interrupt system is, in effect, suspended.
To avoid lengthy suspension of interrupts, write the exception handler to
identify the exception cause, but defer the processing to a low priority
interrupt. To set up the low priority interrupt handler, use the Force
Interrupt / Reset instruction (
When deferring the processing of an exception to lower priority
interrupt
before returning to the application-level code that issued the excep-
tion. If a pending interrupt of higher priority than
acceptable to enter the high priority interrupt before
Example Code for an Exception Handler
The following code is for an exception routine handler with deferred
processing.
Listing 4-5. Exception Routine Handler With Deferred Processing
/* Determine exception cause by examining EXCAUSE field in
SEQSTAT (first save contents of R0, P0, P1 and ASTAT in Supervi-
sor SP) */
[--SP] = R0 ;
[--SP] = P0 ;
[--SP] = P1 ;
[--SP] = ASTAT ;
R0 = SEQSTAT ;
/* Mask the contents of SEQSTAT, and leave only EXCAUSE in R0 */
R0 <<= 26 ;
R0 >>= 26 ;
4-68
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
RAISE
, the system must guarantee that
IVGx
).
is entered
IVGx
occurs, it is
IVGx
.
IVGx
Need help?
Do you have a question about the ADSP-BF53x Blackfin and is the answer not in the manual?
Questions and answers