49
Section 3 Exception Handling
3.1
Overview
3.1.1
Exception Handling Types
Exception handling is performed in the H8/3664 Series when a reset, interrupt, or trap instruction
occurs. Table 3.1 shows these three types of exception handling. A trap instruction can always be
accepted when the program is being executed.
Table 3.1
Exception Handling Types
Exception Source
Time of Start of Exception Handling
Reset
Exception handling starts as soon as the reset state is cleared
Interrupt
When an interrupt is requested, exception handling starts after the present
instruction or the exception handling in progress is completed
Trap instruction
Execution handling starts up when a TRAP instruction is executed
3.2
Reset
As soon as the
RES
pin is set to low, all processing is stopped and the chip enters the reset state.
The internal state of the CPU and the registers of the on-chip peripheral modules are initialized by
the reset. To make sure the chip is reset properly, when turning the power on, the
RES
pin should
be held at low until the clock pulse generator output stabilizes. When resetting during operation,
the
RES
pin should be held at low for at least 10 system clock cycles. Reset exception handling
begins when the
RES
pin is held at low for a given period, then returned to the high level.
3.2.1
Reset Sequence
A reset is the highest-priority exception handling. The sequence of the reset exception handling
takes place as follows.
1. Set the I bit of the condition code register (CCR).
2. The CPU generates the reset exception handling vector address (H'0000 to H'0001), and
transfers the address to PC as a start address. Then a program starts executing from the
address indicated in PC. Figure 3.1 shows the reset sequence.
Summary of Contents for H8/3660
Page 4: ......
Page 26: ...10 ...
Page 82: ...66 ...
Page 152: ...136 ...
Page 154: ...138 ...
Page 260: ...244 ...