
MOTOROLA
8-4
MC68HC05F4
RESETS AND INTERRUPTS
8
8.2.1
Interrupt priorities
Each potential interrupt source is assigned a priority 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.
8.2.2
Non-maskable 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.
8.2.3
Maskable hardware interrupts
If the interrupt mask bit (I-bit) of the CCR is set, all maskable interrupts (internal and external) are
masked. Clearing the I-bit allows interrupt processing to occur. IRQ is software selectable as
either edge or edge-and-level sensitive (bit 3 of the system option register).
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.
8.2.3.1
Real time and core timer (CTIMER) interrupts
There are two different core timer interrupt ags that cause a CTIMER interrupt whenever an
interrupt is enabled and its ag becomes set, namely RTIF and CTOF. The interrupt ags and
enable bits are located in the CTIMER control and status register (CTCSR). These interrupts will
vector to the same interrupt service routine, whose start address is contained in memory locations
To make use of the real time interrupt the RTIE bit must rst be set. The RTIF bit will then be set
after the specied number of counts.
To make use of the core timer overow interrupt, the CTOFE bit must rst be set. The CTOF bit
will then be set when the core timer counter register overows from $FF to $00.
TPG
74
05F4Book Page 4 Tuesday, August 5, 1997 1:10 pm