2.1 CPU
35
2.1.4 Interrupts, Extended Intelligent I/O Services, and Exceptions
The F2MC-16L CPU has four types of functions capable of reacting to the occurrence of a particular event,
interrupting the execution of the instruction that is currently being processed, and transferring control to a
separately defined program.
Hardware interrupts: ......................................... Interrupt processing triggered by events occurring
in internal resources.
Software interrupts: ........................................... Interrupt processing triggered by software
instructions that generate specific events.
Extended intelligent I/O services (EI2OS): ....... Transfer processing triggered by events occurring
in internal resources.
Exceptions: ........................................................ Processing interruptions triggered by the
occurrence of abnormal circumstances.
s Hardware Interrupts
(1) Overview
In a hardware interrupt, the CPU reacts to an interrupt request signal from one of its internal resource
circuits, temporarily suspends the execution of the program that it has been executing, and transfers
control to an interrupt processing program defined by the user.
Hardware interrupts are initiated when the level of the interrupt request is compared with the interrupt
level mask (ILM) register in the CPU processor status (PS) register, and the contents of the I flag in the
PS register are referenced by hardware to determine that interrupt conditions exist. When a hardware
interrupt is generated, the CPU performs interrupt processing as follows.
The contents of the A, DPR, ADB, DTB, PCB, PC and PS registers in the CPU are saved to the
system stack.
The level of the current interrupt request is stored in the ILM register field in the PS register.
The CPU branches to the corresponding interrupt vector.
(2) Configuration
Three areas of the MB90660A chip are involved in hardware interrupt processing.
Internal resources: ......... Interrupt enable bit and interrupt request bit (control of interrupt
requests from internal resources.)
Interrupt controller: ....... ICR register (assignment of interrupt levels and determination of
priority of interrupts occurring at the same time.)
CPU: .............................. I and ILM registers (comparison of the interrupt request level with the
current level and assignment of interrupt enable status.)
Microcode (execution of the necessary steps in interrupt processing.)
Each of these functions is realized through register settings -- the internal resource control registers for
the internal resources, the ICR register for the interrupt controller, and the CCR register for the CPU.
Before a hardware interrupt can be used, therefore, settings must be made to three locations. For
information about the ICR register, see ‘Interrupt Control Register (ICR)’ in the section “Extended
Intelligent I/O Services.”
The interrupt vector tables referred to during interrupt processing are located in memory area FFFC00H
to FFFFFFH, and the same tables are used for software interrupts. Table 2.1.12 lists interrupt numbers
and interrupt vectors.