102
N OTES ON USE
4. NOTES ON USE
4.1 Notes on interrupts
4.1.1 Setting for interrupt request bit and interrupt enable bit
To set an interrupt request bit and an interrupt enable bit for interrupts, execute as the
following sequence:
➀
Clear an interrupt request bit to “0” (no interrupt request issued).
➁
Set an interrupt enable bit to “1” (interrupts enabled).
●
Reason
If the above setting are performed simultaneously with one instruction, an unnecessary
interrupt processing routine is executed. Because an interrupt enable bit is set to “1”
(interrupts enabled) before an interrupt request bit is cleared to “0.”
4.1.2 Switching of detection edge
For the products able to switch the external interrupt detection edge, switch it as the
following sequence.
Fig. 4.1.1 Switching sequence of detection edge
●
Reason
The interrupt circuit recognizes the switching of the detection edge as the change of external
input signals. This may cause to execute an unnecessary interrupt processing routine.
Clear an interrupt enable bit to “0” (interrupt disabled)
Switch the detection edge
Clear an interrupt request bit to “0” (no interrupt request
issued)
Set the interrupt enable bit to “1” (interrupt enabled)