187
CHAPTER 6 INTERRUPT AND TEST FUNCTIONS
6.3 VARIOUS DEVICES TO CONTROL INTERRUPT FUNCTIONS
(1) Interrupt request flags and interrupt enable flags
The following seven interrupt request flags (IRQxxx) corresponding to the interrupt sources are
provided.
INT0 interrupt request flag (IRQ0) Serial interface interrupt request flag (IRQCSI)
INT1 interrupt request flag (IRQ1) Timer/event counter interrupt request flag (IRQT0)
INT4 interrupt request flag (IRQ4) Timer counter interrupt request flag (IRQT1)
BT interrupt request flag (IRQBT)
An interrupt request flag is set to 1 by an interrupt request, and is automatically cleared to 0 when interrupt
processing is performed. However, IRQBT and IRQ4 are cleared in a different way because these flags
share a vector address. (See Section 6.6.)
The following seven interrupt enable flags (IExxx) corresponding to the interrupt request flags are
provided.
INT0 interrupt enable flag (IE0) Serial interface interrupt enable flag (IECSI)
INT1 interrupt enable flag (IE1) Timer/event counter interrupt enable flag (IET0)
INT4 interrupt enable flag (IE4) Timer counter interrupt enable flag (IET1)
BT interrupt enable flag (IEBT)
An interrupt enable flag set to 1 enables the corresponding interrupt, and an interrupt enable flag set to
0 disables the corresponding interrupt.
When an interrupt request flag and the interrupt enable flag are set to 1, a vectored interrupt request (VRQn)
occurs. This condition is also used to release a standby mode.
A bit manipulation instruction or 4-bit memory manipulation instruction is used to manipulate an interrupt
request flag and interrupt enable flag. A bit manipulation instruction allows direct manipulation regardless
of MBE setting. An interrupt enable flag can be manipulated using an EI IExxx instruction or DI IE instruction.
The SKTCLR instruction is usually used to test an interrupt request flag.
Example EI IE0 ; Enable INT0
DI IE1 ; Disable INT1
SKTCLR IRQCSI ; Skip and clear IRQCSI when it is set to 1.
When an interrupt request flag is set using an instruction, even if there is no interrupt request, a vectored
interrupt is executed in the same way as when an interrupt is requested.
Inputting a RESET signal clears the interrupt request and interrupt enable flags to 0, disabling all interrupts.