MOTOROLA
9-8
EXCEPTION PROCESSING
CPU16
REFERENCE MANUAL
Figure 9-2 (Sheet 5 of 5) Exception Processing Flow Diagram
9.6 Multiple Exceptions
Each exception has a priority based upon its relative importance to system operation.
Asynchronous exceptions have higher priorities than synchronous exceptions. Excep-
tion processing for multiple exceptions is done by priority, from highest to lowest. Pri-
ority governs the order in which exception processing occurs, not the order in which
exception handlers are executed.
When simultaneous exceptions occur, handler routines for lower priority exceptions
are generally executed before handler routines for higher priority exceptions.
Unless BERR, BKPT, or RESET occur during exception processing, the first instruc-
tion of all exception handler routines is guaranteed to execute before another excep-
tion is processed. Since interrupt exceptions have higher priority than synchronous
exceptions, this means that the first instruction in an interrupt handler will be executed
before other interrupts are sensed.
NO
RTI
INSTRUCTION
BGND
INSTRUCTION
NO
NO
4B
NO
NO
5A
1A
1A
1A
RESTORE
PROCESSOR
STATE
YES
BACKGROUND
MODE
ENABLED
YES
EXECUTE ILLEGAL
INSTRUCTION
ENTER
BACKGROUND
MODE
YES
STACK PROCESSOR
STATE
CLEAR PK
FETCH DIVIDE BY
ZERO VECTOR
DIVISOR
ZERO
YES
EXECUTE
INSTRUCTION
EDIV, EDIVS
INSTRUCTION
YES
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.