M16C/62P Group (M16C/62P, M16C/62PT)
12. Interrupt
Rev.2.41
Jan 10, 2006
Page 111 of 390
REJ09B0185-0241
12.5
Interrupt Control
The following describes how to enable/disable the maskable interrupts, and how to set the priority in which order
they are accepted. What is explained here does not apply to nonmaskable interrupts.
Use the I flag in the FLG register, IPL, and ILVL2 to ILVL0 bits in the each interrupt control register to enable/
disable the maskable interrupts. Whether an interrupt is requested is indicated by the IR bit in the each interrupt
control register.
Figure 12.3 and Figure 12.4 show the Interrupt Control Registers.
Figure 12.3
Interrupt Control Registers (1)
Interrupt Control Register
(2)
Symbol
Address
After Reset
TB5IC
0045h
XXXXX000b
TB4IC/U1BCNIC
(3)
0046h
XXXXX000b
TB3IC/U0BCNIC
(3)
0047h
XXXXX000b
BCNIC
004Ah
XXXXX000b
DM0IC, DM1IC
004Bh, 004Ch
XXXXX000b
KUPIC
004Dh
XXXXX000b
ADIC
004Eh
XXXXX000b
S0TIC to S2TIC
0051h, 0053h, 004Fh
XXXXX000b
S0RIC to S2RIC
0052h, 0054h, 0050h
XXXXX000b
TA0IC to TA4IC
0055h to 0059h
XXXXX000b
TB0IC to TB2IC
005Ah to 005Ch
XXXXX000b
Bit Symbol
Function
RW
NOTES :
1.
2.
3. Use the IFSR2A register to select.
Bit Name
Interrupt Priority Level Select Bit
Interrupt Request Bit
Nothing is assigned. When w rite, set to “0”.
When read, their contents are indeterminate.
—
(b7-b4)
—
This bit can only be reset by w riting “0” (Do not w rite “1”).
IR
0 : Interrupt not requested
1 : Interrupt requested
RW
(1)
RW
b2 b1 b0
0 0 0 : Level 0 (interrupt disabled)
0 0 1 : Level 1
0 1 0 : Level 2
0 1 1 : Level 3
1 0 0 : Level 4
1 0 1 : Level 5
1 1 0 : Level 6
1 1 1 : Level 7
ILVL1
RW
ILVL2
RW
ILVL0
To rew rite the interrupt control registers, do so at a point that does not generate the interrupt request for that register.
For details, refer to
24.6 Interrupt
.
b7 b6 b5 b4 b3 b2 b1 b0
http://www.xinpian.net
提供单片机解密、IC解密、芯片解密业务
010-62245566 13810019655