Changing The Interrupt Generate Factor - Renesas M16C/26 Series Reference Book

16-bit single-chip microcomputer
Table of Contents

Advertisement

Under development
Preliminary specification
Specifications in this manual are tentative and subject to change.
M16C/26 Group

1.3.4 Changing the Interrupt Generate Factor

If the interrupt generate factor 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 generate factor
for an interrupt that needs to be used, be sure to clear the IR bit for that interrupt to "0" (interrupt not
requested).
"Changing the interrupt generate factor" 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 generate factor, polarity or timing of an interrupt, be sure to
clear 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 1.3.1 shows the procedure for changing the interrupt generate factor.
Change the interrupt generate factor (including a mode change of peripheral function)
Use the MOV instruction to clear the IR bit to "0" (interrupt not requested) (Note 3)
IR bit: A bit in the interrupt control register for the interrupt whose interrupt generate factor is to
be changed
Note 1: The above settings must be executed individually. Do not execute two or more settings
simultaneously (using one instruction).
Note 2: Use the I flag for the INTi interrupt (i = 0 to 1, 3 to 5).
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 generate factor. In this case, if the maskable interrupts
can all be disabled without causing a problem, use the I flag. Otherwise, use the corresponding
ILVL2 to ILVL0 bit for the interrupt whose interrupt generate factor is to be changed.
Note 3: Refer to Section 1.1.6, "Rewrite the Interrupt Control Register" for details about the
instructions to use and the notes to be taken for instruction execution.
Figure 1.3.1. Procedure for Changing the Interrupt Generate Factor
______
1.3.5 INT Interrupt
1. Either an "L" level of at least t
_______
input to pins INT
2. If the POL bit in the INT0IC to INT1IC and INT3IC to INT5IC registers or the IFSR7 to IFSR0 bits in the
IFSR register are changed, the IR bit may inadvertently set to 1 (interrupt requested). Be sure to clear
the IR bit to 0 (interrupt not requested) after changing any of those register bits.
Rev.0.90
2003.12.28
page 4 of 28
Changing the interrupt source
Disable interrupts (Note 2, Note 3)
Enable interrupts (Note 2, Note 3)
End of change
(
) or an "H" level of at least t
W
INH
_______
_______
through INT
, and INT
0
1
3
(
W
INL
_______
through INT
regardless of the CPU operation clock.
5
1.3 Precautions for Interrupts
) width is necessary for the signal

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c seriesM16c/20 series

Table of Contents