Operation Of Hardware Interrupt - Fujitsu MB90335 Series Hardware Manual

16-bit microcontroller
Table of Contents

Advertisement

CHAPTER 3 INTERRUPT
3.4 Hardware Interrupt
3.4.1

Operation of Hardware Interrupt

The following describes the operation sequence from generation of a hardware interrupt
request to completion of interrupt handling.
■ Start of Hardware Interrupt
Operation of peripheral function (generation of interrupt request)
Any peripheral function provided with the hardware interrupt request function has "interrupt request flag"
and "interrupt enable flag". The interrupt request flag indicates whether an interrupt request has been
generated or not. The interrupt enable flag indicates whether an interrupt request is enabled or disabled.
The interrupt request flag is set by occurrence of an specific event to the peripheral function. It causes an
interrupt request to the interrupt controller when the interrupt enable flag indicates "enable".
Operation of Interrupt controller (Control of interrupt request)
The interrupt controller makes a comparison between interrupt levels (ILs) of the simultaneously received
interrupt requests. It adopts the highest-level request, (the request with the smallest IL value), and notifies it
to the CPU. If two or more requests at the same level are found, the highest priority is given to the request
with the smallest interrupt number.
CPU operation (Interrupt request acceptance and interrupt processing)
The CPU compares the received interrupt level (IL2 to IL0 of ICR) with the contents of the interrupt level
mask (ILM) register. If IL < ILM and the interrupt has been enabled (PS CCR:I = 1), the currently active
instruction terminates, the interrupt handling microcode is then activated to execute the interrupt handling.
First, the interrupt handling saves the contents of the dedicated registers (12 bytes of A, DPR, ADB, DTB,
PCB, PC, and PS) in the system stack (system stack space indicated by SSB and SSP). Next, the interrupt
handling loads to the program counters (PCB and PC) of the interrupt vector, and updates the ILM. It also
sets the stack flag (S) (setting CCR:S=1 to enable the system stack).
■ Return from Hardware Interrupt
When the interrupt request flag of the peripheral function causing the interrupt is cleared, and the RETI
instruction is executed in the interrupt handling program, the 12-byte data saved in the system stack returns
to the dedicated registers. Control then returns to the process which was being executed before the interrupt
branch. By clearing the interrupt request flag, the interrupt request which the peripheral function has output
to the interrupt controller is canceled automatically.
62
FUJITSU MICROELECTRONICS LIMITED
MB90335 Series
CM44-10137-6E

Advertisement

Table of Contents
loading

This manual is also suitable for:

F2mc-16lxMb90v330aMb90f337Mb90337

Table of Contents