Chapter 4. Notes On Use; Notes On Interrupts; Setting For Interrupt Request Bit And Interrupt Enable Bit; Switching Of Detection Edge - Mitsubishi M16C/60 Series Software Manual

16-bit single-chip microcomputer
Hide thumbs Also See for M16C/60 Series:
Table of Contents

Advertisement

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.
102
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)

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/20 series

Table of Contents