Rev.6.00 Oct.28.2004 page 49
of 1016
REJ09B0138-0600H
Table 2-7
Exception Handling Types and Priority
Priority
Type of Exception
Detection Timing
Start of Exception Handling
High
Reset
Synchronized with clock
Exception handling starts
immediately after a low-to-high
transition at the
RES
pin, or
when the watchdog timer
overflows.
Trace
End of instruction
execution or end of
exception-handling
sequence
*
1
When the trace (T) bit is set to
1, the trace starts at the end of
the current instruction or current
exception-handling sequence
Interrupt
End of instruction
execution or end of
exception-handling
sequence
*
2
When an interrupt is requested,
exception handling starts at the
end of the current instruction or
current exception-handling
sequence
Low
Trap instruction
When TRAPA instruction
is executed
Exception handling starts when
a trap (TRAPA) instruction is
executed
*
3
Notes: 1. Traces are enabled only in interrupt control mode 2. Trace exception-handling is not executed at the end of the
RTE instruction.
2. Interrupts are not detected at the end of the ANDC, ORC, XORC, and LDC instructions, or immediately after
reset exception handling.
3. Trap instruction exception handling is always accepted, in the program execution state.
(2) Reset Exception Handling
After the
RES
pin has gone low and the reset state has been entered, when
RES
goes high again, reset exception handling
starts. The CPU enters the power-on reset state when the NMI pin is high, or the manual reset* state when the NMI pin is
low. When reset exception handling starts the CPU fetches a start address (vector) from the exception vector table and
starts program execution from that address. All interrupts, including NMI, are disabled during reset exception handling
and after it ends.
Note : * Manual reset is only supported in the H8S/2357 ZTAT.
(3) Traces
Traces are enabled only in interrupt control mode 2. Trace mode is entered when the T bit of EXR is set to 1. When trace
mode is established, trace exception handling starts at the end of each instruction.
At the end of a trace exception-handling sequence, the T bit of EXR is cleared to 0 and trace mode is cleared. Interrupt
masks are not affected.
The T bit saved on the stack retains its value of 1, and when the RTE instruction is executed to return from the trace
exception-handling routine, trace mode is entered again. Trace exception-handling is not executed at the end of the RTE
instruction.
Trace mode is not entered in interrupt control mode 0, regardless of the state of the T bit.
(4) Interrupt Exception Handling and Trap Instruction Exception Handling
When interrupt or trap-instruction exception handling begins, the CPU references the stack pointer (ER7) and pushes the
program counter and other control registers onto the stack. Next, the CPU alters the settings of the interrupt mask bits in
the control registers. Then the CPU fetches a start address (vector) from the exception vector table and program execution
starts from that start address.
Содержание ZTAT H8S/2357F
Страница 4: ......
Страница 28: ...Rev 6 00 Oct 28 2004 page xxiv of xxiv REJ09B0138 0600H...
Страница 82: ...Rev 6 00 Oct 28 2004 page 54 of 1016 REJ09B0138 0600H...
Страница 108: ...Rev 6 00 Oct 28 2004 page 80 of 1016 REJ09B0138 0600H...
Страница 364: ...Rev 6 00 Oct 28 2004 page 336 of 1016 REJ09B0138 0600H...
Страница 438: ...Rev 6 00 Oct 28 2004 page 410 of 1016 REJ09B0138 0600H...
Страница 566: ...Rev 6 00 Oct 28 2004 page 538 of 1016 REJ09B0138 0600H...
Страница 588: ...Rev 6 00 Oct 28 2004 page 560 of 1016 REJ09B0138 0600H...
Страница 688: ...Rev 6 00 Oct 28 2004 page 660 of 1016 REJ09B0138 0600H...
Страница 694: ...Rev 6 00 Oct 28 2004 page 666 of 1016 REJ09B0138 0600H...
Страница 708: ...Rev 6 00 Oct 28 2004 page 680 of 1016 REJ09B0138 0600H...
Страница 1044: ...Rev 6 00 Oct 28 2004 page 1016 of 1016 REJ09B0138 0600H...
Страница 1047: ...H8S 2357 Group H8S 2357F ZTATTM H8S 2398F ZTATTM Hardware Manual 2 6 2 Ote machi Chiyoda ku Tokyo 100 0004 Japan...