MB95630H Series
MN702-00009-1v0-E
FUJITSU SEMICONDUCTOR LIMITED
75
CHAPTER 5 INTERRUPTS
5.1 Interrupts
5.1.2
Interrupt Processing
When an interrupt request is made by a peripheral resource, the interrupt
controller notifies the CPU of the interrupt level of that interrupt request. When
the CPU is ready to accept interrupts, it halts the program it is executing and
executes an interrupt service routine.
■
Interrupt Processing
The procedure for processing an interrupt is as follows: the generation of an interrupt source in a
peripheral resource, the execution of the main program, the setting of the interrupt request flag bit,
the evaluation of the interrupt request enable bit, the evaluation of the interrupt level (ILR0 to
ILR5 and CCR:IL[1:0]), the checking for interrupt requests of the same interrupt level made
simultaneously, and the evaluation of the interrupt enable flag (CCR:I).
Figure 5.1-1 shows the interrupt processing.
Figure 5.1-1 Interrupt Processing
Interr
u
pt
from peripher
a
l
re
s
o
u
rce?
Peripher
a
l
re
s
o
u
rce interr
u
pt re
qu
e
s
t
o
u
tp
u
t en
ab
led?
Determine interr
u
pt priority
a
nd
tr
a
n
s
fer interr
u
pt level to CPU
Comp
a
re interr
u
pt level
with IL
b
it in P
S
S
TART
R
u
n m
a
in progr
a
m
Re
s
tore PC
a
nd P
S
Initi
a
lize peripher
a
l re
s
o
u
rce
s
Interr
u
pt level higher
th
a
n IL v
a
l
u
e?
I fl
a
g = 1?
Cle
a
r interr
u
pt re
qu
e
s
t
Exec
u
te interr
u
pt proce
ss
ing
RETI
Upd
a
te IL in P
S
PC
←
interr
u
pt vector
Sa
ve PC
a
nd P
S
to
s
t
a
ck
Level comp
a
r
a
tor
Interr
u
pt
controller
AND
Interr
u
pt re
qu
e
s
t
fl
a
g
Interr
u
pt re
qu
e
s
t
en
ab
led
Condition code regi
s
ter (CCR)
Comp
a
r
a
tor
Check
CPU
RAM
Intern
a
l d
a
t
a
bus
I
IL
Rele
as
e from
s
top mode
Rele
as
e from
s
leep mode
Rele
as
e from time-
bas
e
timer mode or w
a
tch mode
(1)
(2)
(
3
)
(4)
(5)
(6)
(7)
(
3
)
(4)
(5)
(6)
(7)
NO
NO
NO
NO
YE
S
YE
S
YE
S
YE
S
Interr
u
pt
s
ervice ro
u
tine
E
a
ch peripher
a
l re
s
o
u
rce