English
Language : 

M16C65 Datasheet, PDF (793/829 Pages) Renesas Technology Corp – RENESAS MCU M16C FAMILY / M16C/60
Under development
M16C/65 Group
Preliminary Specification
This is a preliminary specification and is subject to change.
31. Precautions
31.12.4 Changing an Interrupt Source
If the interrupt source is changed, the IR bit in the interrupt control register may inadvertently be set to 1
(interrupt requested). To use an interrupt, change the interrupt source, and then set the IR bit to 0
(interrupt not requested).
In this section, the changing of an interrupt source refers to all elements (e.g. changing the mode of a
peripheral function) used in changing the interrupt source, polarity, and timing assigned to each
software interrupt number. When using an element to change the interrupt source, polarity, or timing,
make the change before setting the IR bit to 0 (interrupt not requested). Refer to the descriptions of the
individual peripheral functions for details of the peripheral function interrupts.
Figure 31.8 shows the Procedure for Changing the Interrupt Generate Factor.
Change the interrupt source
Disable interrupts (2, 3)
Change the interrupt source
(including a mode change of peripheral function)
Use the MOV instruction to set the IR bit to 0 (interrupt not requested) (3)
Enable interrupts (2, 3)
Change completed
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 7).
For the interrupts from peripheral functions other than the INTi interrupt, turn off the
peripheral function that is the source of the interrupt 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,
use the corresponding bits ILVL2 to ILVL0 for the interrupt whose interrupt source is
to be changed.
3. Refer to the following “Rewriting the Interrupt Control Register” for details about the
instructions to use and the notes to be taken for instruction execution.
Figure 31.8 Procedure for Changing the Interrupt Generate Factor
REJ09B0484-0030 Rev.0.30 Sep 09, 2008
Page 758 of 791