37
CHAPTER 3 CPU
3.4.2
Steps in the Interrupt Operation
When an interrupt request is generated in a peripheral function, the interrupt controller
notifies the CPU of its interrupt level. If the CPU can accept an interrupt, the CPU
temporarily stops the program that is handling and starts the interrupt processing
routine.
■
Steps in the Interrupt Operation
The steps for processing an interrupt are: occurrence of a source of an interrupt in a peripheral function,
designation of the interrupt request flag bit (request F/F), check on the interrupt request enable bit (enable
F/F), check on the interrupt level (ILR1, 2, 3, or 4, and CCR: IL1 and IL0), check on another request with
the same level, and check on the interrupt enable flag (CCR: I).
Figure 3.4-2 shows the steps in the interrupt operation.
Figure 3.4-2 Steps in the Interrupt Operation
➀
After a reset, all interrupt requests are prohibited.
Initialize the peripheral functions that generate interrupts using a initialization program for peripheral
functions, specify interrupt levels in the interrupt level setting registers (ILR1 to ILR4) concerned, then
start up the peripheral functions.
Interrupt levels 1, 2, and 3 can be specified. Level 1 is the highest level, and level 2 is the second
highest level. Level 3 prohibits interrupts from the peripheral functions to which it is assigned.
➁
Run the main program. (For a multiple-interrupt, run the interrupt processing routine.)
➂
When a peripheral function generates a source of an interrupt, the interrupt request flag bit for
peripheral function (request F/F) is set to "1". If the interrupt request enable bit for a peripheral function
is turned on (enable F/F = 1) at that time, an interrupt request is output to the interrupt controller.
IL
I
PS
MB89202 CPU
AND
RAM
Inter
nal b
u
s
Operation
Unit
Check
Com-
parator
Enable
F/F
Source
F/F
Peripheral
Le
v
el compar
ator
Interrupt
controller
Main
program
Cancellation
of a reset
Initial setting
for interrupt
Execution
of main
program
Interrupt
processing
routine
Update of IL
PC and
PS saved
Request
cleared
Level
check
Interrupt
processing
PC and PS
restored
Occur-
rence of
interrupt
RETI
PC and PS
restored
..
.
Содержание F2MC-8L F202RA
Страница 2: ......
Страница 4: ......
Страница 32: ...16 CHAPTER 1 OVERVIEW ...
Страница 90: ...74 CHAPTER 3 CPU ...
Страница 142: ...126 CHAPTER 5 TIME BASE TIMER POPW A RETI ENDS END ...
Страница 150: ...134 CHAPTER 6 WATCHDOG TIMER ...
Страница 174: ...158 CHAPTER 7 8 BIT PWM TIMER User processing POPW A XCHW A T Restoring A and T POPW A RETI ENDS ...
Страница 176: ...160 CHAPTER 7 8 BIT PWM TIMER ...
Страница 220: ...204 CHAPTER 8 8 16 BIT CAPTURE TIMER COUNTER ...
Страница 240: ...224 CHAPTER 9 12 BIT PPG TIMER ...
Страница 258: ...242 CHAPTER 10 EXTERNAL INTERRUPT CIRCUIT 1 EDGE PUSHW A User processing POPW A XCHW A T POPW A RETI ENDS END ...
Страница 274: ...258 CHAPTER 11 EXTERNAL INTERRUPT CIRCUIT 2 LEVEL ...
Страница 362: ...346 CHAPTER 15 BUZZER OUTPUT ...
Страница 371: ...355 CHAPTER 16 WILD REGISTER FUNCTION 16 3 5 Data Test Set Register WROR A test register Do not access this register ...
Страница 390: ...374 CHAPTER 17 FLASH MEMORY ...
Страница 419: ...403 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...
Страница 434: ...418 INDEX ...
Страница 436: ......