If execution of interrupt-handling routines under these conditions is not desired, it can be
avoided by using the following procedure to disable and clear interrupt requests.
1.
Set the I bit to “1” in the CCR, masking interrupts. Note that the I bit is set to 1 automatically
when execution jumps to an interrupt vector.
2.
Clear the desired bits from IRQ
0
E to IRQ
7
E to “0” to disable new interrupt requests.
3.
Clear the corresponding IRQ
0
SC to IRQ
7
SC bits to “0,” then set them to “1” again. Pending
IRQ
n
interrupt requests are cleared when I = “1” in the CCR, IRQ
n
SC = “0,” and IRQ
n
E = “0.”
4.3.3 External Interrupts
The external interrupts are NMI and IRQ
0
to IRQ
2
. These four interrupts can be used to recover
from software standby mode.
(1) NMI: A nonmaskable interrupt is generated on the rising or falling edge of the NMI input
signal regardless of whether the I (interrupt mask) bit is set in the CCR. The valid edge is selected
by the NMIEG bit in the system control register. The NMI vector number is 3. In the NMI
hardware exception-handling sequence the I bit in the CCR is set to “1.”
(2) IRQ
0
to IRQ
2
: These interrupt signals are level-sensed or sensed on the falling edge of the
input, as selected by ISCR bits IRQ
0
SC to IRQ
2
SC. These interrupts can be masked collectively by
the I bit in the CCR, and can be enabled and disabled individually by setting and clearing bits
IRQ
0
E to IRQ
2
E in the IRQ enable register.
When one of these interrupts is accepted, the I bit is set to “1.” IRQ
0
to IRQ
2
have interrupt vector
numbers 4 to 6. They are prioritized in order from IRQ
2
(Low) to IRQ
0
(High). For details, see
table 4-2.
Interrupts IRQ
0
to IRQ
2
do not depend on whether pins IRQ
0
to IRQ
2
are input or output pins.
When using external interrupts IRQ
0
to IRQ
2
, clear the corresponding DDR bits to “0” to set these
pins to the input state, and do not use these pins for input to the A/D converter.
66
Содержание H8/326 Series
Страница 67: ...58 ...
Страница 121: ...112 ...
Страница 274: ... 3 Clock Settling Timing Ø VCC RES STBY tOSC1 tOSC1 Figure 14 8 Clock Setting Timing 265 ...
Страница 279: ...270 ...