
μ
PD17016, 17017
75
10.2.2 Configuration and function of interrupt permission flag (IP
×××
)
Each interrupt permission flag enables the interrupt of the corresponding peripheral hardware unit.
So that an interrupt is acknowledged, all the following three conditions must be satisfied.
The interrupt must be enabled by the corresponding interrupt permission flag.
An interrupt request must be issued by the corresponding interrupt request flag.
The “EI” instruction (that enables all the interrupts) must be executed.
Enabling or disabling an interrupt is controlled by a software macro.
Table 10-2 lists the available software macros.
These macros are defined in the device file and can be used by INCLUDEing the files supplied with the device
file (D17016.INC for the
μ
PD17016 and D17017.INC for the
μ
PD17017) on the source program.
Table 10-2. Software Macros Enabling/Disabling Interrupts
Function
Macro Format
Enables timer interrupt
SET1_IPTM
Enables INT
0
pin interrupt
SET1_IP0
Enables timer interrupt and INT
0
pin interrupt
SET2_IPTM_IP0
Disables timer interrupt
CLR1_IPTM
Disables INT
0
pin interrupt
CLR1_IP0
Disables timer interrupt and INTP
0
pin interrupt
CLR2_IPTM_IP0
Disables timer interrupt and enables INT
0
pin interrupt
INIT_NOT_IPTM_IP0
Enables timer interrupt and disables INT
0
pin interrupt
INIT_IPTM_NOT_IP0
Caution
If the above macros are used, the contents of the window register are destroyed.
If an embedded macro instruction is used immediately before the above macro instructions, an
“object error” occurs when the source file is assembled and then loaded to the in-circuit
emulator. To use an embedded macro instruction immediately before the above macro
instructions, insert a comment statement between them.
The status of the interrupt at reset is as follows:
On power-ON reset
The interrupt is disabled.
On execution of clock stop instruction
The interrupt is disabled.
On CE reset
The interrupt is disabled.
In halt status
The interrupt permission flag holds the previous status.