
Rev.2.10 Apr 14, 2006 page 347 of 378
REJ09B0124-0210
M16C/6N Group (M16C/6NK, M16C/6NM) 23. Usage Notes
23.8.4 Changing Interrupt Source
If the interrupt source is changed, the IR bit in the interrupt control register for the changed interrupt may
inadvertently be set to 1 (interrupt requested). If you changed the interrupt source for an interrupt that
needs to be used, be sure to set the IR bit for that interrupt to 0 (interrupt not requested).
Changing the interrupt source referred to here means any act of changing the source, polarity or timing of
the interrupt assigned to each software interrupt number. Therefore, if a mode change of any peripheral
function involves changing the source, polarity or timing of an interrupt, be sure to set the IR bit for that
interrupt to 0 (interrupt not requested) after making such changes. Refer to the description of each peripheral
function for details about the interrupts from peripheral functions.
Figure 23.3 shows the Procedure for Changing Interrupt Source.
Figure 23.3 Procedure for Changing Interrupt Generate Factor
_____
23.8.5 INT Interrupt
• Either an “L” level of at least tW(INH) or an “H” level of at least tW(INL) width is necessary for the signal
________ ________
input to pins INT0 to INT8
(1)
regardless of the CPU operation clock.
• If the POL bit in registers INT0IC to INT8IC
(2)
, bits IFSR10 to IFSR15 in the IFSR1 register or bits
IFSR23 to IFSR25
(3)
in the IFSR2 register are changed, the IR bit may inadvertently set to 1 (interrupt
requested). Be sure to set the IR bit to 0 (interrupt not requested) after changing any of those register bits.
NOTES:
1.
________ ________
The pins INT6 to INT8 are only in the 128-pin version.
2. Registers INT6IC to INT8IC are only in the 128-pin version.
3. Bits IFSR23 to IFSR25 are effective only in the 128-pin version. In the 100-pin version, these bits
are set to 0 (one edge).
Changing the interrupt source
Disable interrupt
(2) (3)
Use the MOV instruction to set the IR bit to 0
(interrupt not requested)
(3)
Change the interrupt source
(including a mode change of peripheral function)
Enable interrupt
(2) (3)
End of change
IR bit: A bit in the interrupt control register for the interrupt whose interrupt source is to be
changed
NOTES:
1.The above settings must be executed individually. Do not execute two or more settings
simultaneously (using one instruction).
2.Use the I flag for the INTi interrupt (i = 0 to 8; 6 to 8 are only in the 128-pin version).
For the interrupts from peripheral functions other than the INTi interrupt, turn off the
peripheral function that is the interrupt source in order not to generate an interrupt request
before changing the interrupt source. In this case, if the maskable interrupts can all be
disabled without causing a problem, use the I flag. Otherwise, if it is not possible to disable
all maskable interrupts, use bits ILVL2 to ILVL0 of the interrupt whose source is changed.
3.Refer to 23.8.6 Rewrite Interrupt Control Register for details about the instructions to
use and the notes to be taken for instruction execution.
Comentários a estes Manuais