249
Chapter 5 Interrupt
FSET I
Time
5.2 Interrupt Control
The following explains how to enable/disable maskable interrupts and set acknowledge priority. The expla-
nation here does not apply to non-maskable interrupts.
Maskable interrupts are enabled and disabled by using the I flag, IPL, and ILVL2 bits to ILVL0 bits of each
interrupt control register. Whether there is any interrupt requested is indicated by the IR bit of each interrupt
control register.
For details about the memory allocation and the configuration of interrupt control registers, refer to the
R8C’s Hardware Manual.
5.2.1 I Flag
The I flag is used to disable/enable maskable interrupts. When the I flag is set to 1 (enabled), all
maskable interrupts are enabled; when the I flag is cleared to 0 (disabed), they are disabled.
When the I flag is changed, the altered flag status is reflected in determining whether or not to accept an
interrupt request at the following timing:
• If the flag is changed by an REIT instruction, the changed status takes effect beginning with that
REIT instruction.
• If the flag is changed by an FCLR, FSET, POPC, or LDC instruction, the changed status takes
effect beginning with the next instruction.
Previous
instruction
Interrupt sequence
REIT
Interrupt sequence
Next instruction
Previous
instruction
Time
Figure 5.2.1 Timing at which changes of I flag are reflected in interrupt handling
Interrupt request generated
Interrupt request generated
5.2 Interrupt Control
When changed by REIT instruction
Determination whether or not to
accept interrupt request
Determination whether or not to
accept interrupt request
When changed by FCLR, FSET, POPC, or LDC instruction
(If I flag is changed from 0 to 1 by REIT instruction)
(If I flag is changed from 0 to 1 by FSET instruction)
5.2.2 IR Bit
The IR bit is set to 1 (interrupt request issued) when an interrupt request is generated. The IR bit is
cleared to 0 (no interrupt request issued)after the interrupt request is acknowledged and the program
brances to corresponding interrupt vector table.
The IR bit can be cleared to 0 by program. Do not set to 1.
Содержание R8C/Tiny Series
Страница 50: ...Chapter 3 Functions 3 1 Guide to This Chapter 3 2 Functions...
Страница 151: ...134 Chapter 3 Functions 3 2 Functions Blank for page layout...
Страница 152: ...Chapter 4 Instruction Code Number of Cycles 4 1 Guide to This Chapter 4 2 Instruction Code Number of Cycles...
Страница 278: ...Chapter 6 Calculation Number of Cycles 6 1 Instruction queue buffer...
Страница 287: ...Glossary 1 Glossary Technical terms used in this software manual are explained below They are good in this manual only...
Страница 291: ...Symbol 1 Table of symbols Symbols used in this software manual are explained below They are good in this manual only...
Страница 295: ...REVISION HISTORY R8C Tiny Series SOFTWARE MANUAL Rev Date Description Page Summary B 1 1 00 Jun 19 03 First Edition...
Страница 297: ...R8C Tiny Series Software Manual 2 6 2 Ote machi Chiyoda ku Tokyo 100 0004 Japan...