then clears the NMI request, so if another interrupt is requested at the NMI pin during the NMI
exception-handling sequence, the NMI exception-handling sequence will be carried out again.
Coding Examples:
To select the rising edge of the NMI input:
To select the falling edge of the NMI input:
BSET.B #4, @H'FEFC
BCLR.B #4, @H'FEFC
IRQ0 (Interrupt Request 0):
An IRQ
0
interrupt can be requested by a Low input to the IRQ
0
pin. A Low IRQ
0
input requests an IRQ
0
interrupt if the interrupt request enable 0 bit (IRQ
0
E) in
SYSCR1 is set to 1. IRQ
0
must be held Low until the CPU accepts the interrupt. Otherwise the
request will be ignored.
The IRQ
0
interrupt can be assigned any priority level from 7 to 0 by setting the corresponding
value in the upper four bits of IPRA. If bit 4 of data transfer enable register A (DTEA) is set to 1,
an IRQ
0
interrupt starts the data transfer controller. Otherwise the interrupt is served by the CPU.
In the CPU interrupt-handling sequence for IRQ
0
, the T bit of the status register is cleared to 0,
and the interrupt mask level is set to the value in the upper four bits of IPRA.
Coding Examples:
To enable IRQ
0
to be requested by IRQ
0
input:
To assign priority level 7 to IRQ
0
:
To have IRQ
0
start the DTC:
BSET.B #5, @H'FEFC
OR.B #70, @H'FF00
BSET.B #4, @H'FF08
IRQ
1
to IRQ
5
(Interrupt Request 1 to 5):
An IRQ
1
to IRQ
5
interrupt is requested by a High-to-
Low transition at the IRQ
1
to IRQ
5
pin. The IRQ
1
interrupt is enabled only when the interrupt
request enable 1 bit (IRQ
1
E) in SYSCR1 is set to 1. IRQ
2
to IRQ
5
are controlled by bits IRQ
2
E to
IRQ
5
E in SYSCR2. (see section 9.7, “Port 6.”)
Interrupts IRQ
1
to IRQ
5
can be assigned any priority level from 7 (high) to 0 (low) by setting the
corresponding value in IPRA and IPRB. The lower four bits of IPRA determine the priority of
IRQ
1
. The upper four bits of IPRB determine the priority of IRQ
2
and IRQ
3
. The lower four bits
of IPRB determine the priority of IRQ
4
and IRQ
5
. Interrupt requests IRQ
1
to IRQ
5
are held in the
interrupt controller and cleared during the corresponding interrupt exception-handling sequence.
Contention among IRQ
1
to IRQ
5
is resolved when the CPU accepts the interrupt by taking the
interrupt with the highest priority first and holding lower-priority interrupts pending. (Contention
between IRQ
2
and IRQ
3
, or between IRQ
4
and IRQ
5
, is resolved by the priority order shown in
table 5-2.)
100