
R8C/38T-A Group
11. Interrupts
Under development Preliminary document
Specifications in this document are tentative and subject to change.
R01UH0241EJ0010 Rev.0.10
Page 157 of 730
Aug 05, 2011
11.9.4
Changing Interrupt Sources
The IR bit in the interrupt control register may be set to 1 (interrupt requested) when the interrupt source is
changed. To use an interrupt, set the IR bit to 0 (no interrupt requested) after changing interrupt sources.
Changing interrupt sources as referred to here includes all factors that change the source, polarity, or timing of
the interrupt assigned to a software interrupt number. Therefore, if a mode change of a peripheral function
involves the source, polarity, or timing of an interrupt, set the IR bit to 0 (no interrupt requested) after making
these changes. Refer to the descriptions of the individual peripheral functions for related interrupts.
Figure 11.12 shows a Procedure Example for Changing Interrupt Sources.
Figure 11.12
Procedure Example for Changing Interrupt Sources
Interrupt source change
Disable interrupts
(2)
Change interrupt sources
(including mode of peripheral function)
Set the IR bit to 0 (no interrupt request)
using the MOV instruction
Enable interrupts
(2)
Change completed
Notes:
1. The above settings must be executed individually. Do not execute two or more
settings simultaneously (using one instruction).
2. To prevent interrupt requests from being generated, disable the peripheral function
before changing the interrupt source. In this case, use the I flag if all maskable
interrupts can be disabled.
If all maskable interrupts cannot be disabled, use bits ILVL0 to ILVL2 for the interrupt
whose source is to be changed.
IR bit: Corresponding interrupt control register bit for the interrupt whose source is to be changed