English
Language : 

M16C30P_07 Datasheet, PDF (84/317 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/30 SERIES
M16C/30P Group
11. Interrupt
11.5.1 I Flag
The I flag enables or disables the maskable interrupt. Setting the I flag to “1” (= enabled) enables the maskable
interrupt. Setting the I flag to “0” (= disabled) disables all maskable interrupts.
11.5.2 IR Bit
The IR bit is set to “1” (= interrupt requested) when an interrupt request is generated. Then, when the interrupt
request is accepted and the CPU branches to the corresponding interrupt vector, the IR bit is cleared to “0” (=
interrupt not requested).
The IR bit can be cleared to “0” in a program. Note that do not write “1” to this bit.
11.5.3 ILVL2 to ILVL0 Bits and IPL
Interrupt priority levels can be set using the ILVL2 to ILVL0 bits.
Table 11.3 shows the Settings of Interrupt Priority Levels and Table 11.4 shows the Interrupt Priority Levels
Enabled by IPL.
The following are conditions under which an interrupt is accepted:
• I flag = 1
• IR bit = 1
• interrupt priority level > IPL
The I flag, IR bit, ILVL2 to ILVL0 bits and IPL are independent of each other. In no case do they affect one
another.
Table 11.3 Settings of Interrupt Priority Levels
ILVL2 to ILVL0 Bits
Interrupt Priority
Level
000b
Level 0 (interrupt disabled)
Priority
Order
−
001b
Level 1
Low
010b
Level 2
011b
Level 3
100b
Level 4
101b
Level 5
110b
Level 6
111b
Level 7
High
Table 11.4Interrupt Priority Levels Enabled by
IPL
IPL
000b
001b
010b
011b
100b
101b
110b
111b
Enabled Interrupt Priority Levels
Interrupt levels 1 and above are enabled
Interrupt levels 2 and above are enabled
Interrupt levels 3 and above are enabled
Interrupt levels 4 and above are enabled
Interrupt levels 5 and above are enabled
Interrupt levels 6 and above are enabled
Interrupt levels 7 and above are enabled
All maskable interrupts are disabled
Rev.1.22 Mar 29, 2007 Page 68 of 291
REJ09B0179-0122