
MC68HC05X16
10-9
RESETS AND INTERRUPTS
10
10.2.1
Interrupt priorities
Each potential interrupt source is assigned a priority level, which means that if more than one
interrupt is pending at the same time, the processor will service the one with the highest priority
rst. For example, if both an external interrupt and a timer interrupt are pending after an instruction
execution, the external interrupt is serviced rst.
interrupt processing ow.
10.2.2
Nonmaskable software interrupt (SWI)
The software interrupt (SWI) is an executable instruction and a nonmaskable interrupt: it is
executed regardless of the state of the I-bit in the CCR. If the I-bit is zero (interrupts enabled), SWI
is executed after interrupts that were pending when the SWI was fetched, but before interrupts
generated after the SWI was fetched. The SWI interrupt service routine address is specied by the
contents of memory locations $3FFC and $3FFD.
10.2.3
Maskable hardware interrupts
If the interrupt mask bit in the CCR is set, all maskable interrupts (internal and external) are
masked. Clearing the I-bit allows interrupt processing to occur.
Note:
The internal interrupt latch is cleared in the rst part of the interrupt service routine;
therefore, one external interrupt pulse could be latched and serviced as soon as the I-bit
is cleared.
Table 10-2 Interrupt priorities
Source
Register
Flags
Vector address Priority
Reset
—
$3FFE, $3FFF
highest
Software interrupt (SWI)
—
$3FFC, $3FFD
External interrupt (IRQ) or WOI
—
$3FFA, $3FFB
Timer input captures
TSR
ICF1, ICF2
$3FF8, $3FF9
Timer output compares
TSR
OCF1, OCF2
$3FF6, $3FF7
Timer overow
TSR
TOF
$3FF4, $3FF5
Serial communications
interface (SCI)
SCSR
TDRE, TC,
OR, RDRF,
IDLE
$3FF2, $3FF3
MCAN
CINT
WIF,OIF,EIF,
TIF, RIF
$3FF0, $3FF1
lowest
141
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
In
c
..
.
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com