
Section 4 Exception Handling
Rev. 3.00 Mar. 14, 2006 Page 73 of 804
REJ09B0104-0300
Section 4 Exception Handling
4.1
Exception Handling Types and Priority
As table 4.1 indicates, exception handling is caused by a reset, a trace, an address error, an
interrupt, a trap instruction, and illegal instructions (general illegal instruction and slot illegal
instruction). Exception handling is prioritized as shown in table 4.1. If two or more exceptions
occur simultaneously, they are accepted and processed in order of priority. Exception sources, the
stack structure, and operation of the CPU vary depending on the interrupt control mode. For
details on the interrupt control mode, see section 5, Interrupt Controller.
Table 4.1
Exception Types and Priority
Priority Exception
Type
Exception Handling Start Timing
High
Reset
Exception handling starts at the timing of level change from
low to high on the
RES
pin, or when the watchdog timer
overflows. The CPU enters the reset state when the
RES
pin is low.
Illegal instruction
Exception handling starts when an undefined code is
executed.
Trace
*
1
Exception handling starts after execution of the current
instruction or exception handling, if the trace (T) bit in EXR
is set to 1.
Address error
After an address error occurs, the exception handling starts
on completion of the current instruction execution.
Interrupt
Exception handling starts after execution of the current
instruction or exception handling, if an interrupt request has
occurred.
*
2
Low
Trap instruction
*
3
Exception handling starts by execution of a trap instruction
(TRAPA).
Notes: 1. Traces are enabled only in interrupt control mode 2. Trace exception handling is not
executed after execution of an RTE instruction.
2. Interrupt detection is not performed on completion of ANDC, ORC, XORC, or LDC
instruction execution, or on completion of reset exception handling.
3. Trap instruction exception handling requests are accepted at all times in the program
execution state.
electronic components distributor