Procedure For Using A Hardware Interrupt - Fujitsu MB90335 Series Hardware Manual

16-bit microcontroller
Table of Contents

Advertisement

MB90335 Series
3.4.3

Procedure for Using a Hardware Interrupt

Use of hardware interrupt requires the system stack area, peripheral functions, and
interrupt control registers (ICR) to be set up.
■ Procedure for Using a Hardware Interrupt
Figure 3.4-4 shows an example of the procedure for using a hardware interrupt.
Figure 3.4-4 Example of Procedure for Using a Hardware Interrupt
(1)
(2)
(3)
(4)
(5)
(6)
(1) The system stack area is set.
(2) Initialize the setting of a peripheral function which can generate an interrupt request.
(3) Set the interrupt control register (ICR) in the interrupt controller.
(4) Make the peripheral function ready to start, and set the interrupt enable bit to "enable".
(5) Sets the interrupt level mask register (ILM) and interrupt enable flag (I) to accept interrupts.
(6) Generation of an interrupt in the peripheral function generates a hardware interrupt request.
(7) The contents of the registers are saved by the interrupt handling hardware, and control branches to the
interrupt handling program.
(8) The interrupt handling program handles to the peripheral function in response to generation of the
interrupt.
(9) Clear the interrupt request from the peripheral function.
(10)Execute the interrupt return instruction to return control to the program before branching.
CM44-10137-6E
START
Setting System stack area
Initialize
peripheral function
Setting ICR
in interrupt controller
Set the interrupt
enable bit of operation
starting setting for
peripheral function = enable.
Setting ILM, I in PS
Main program
Interrupt request generation
Main program
FUJITSU MICROELECTRONICS LIMITED
Interrupt processing program
Branch to
Stack processing
(8)
interrupt vector
(7)
Processing
by Hardware
(9)
(10)
CHAPTER 3 INTERRUPT
3.4 Hardware Interrupt
Execution for
peripheral interrupt
(execute interrupt routine)
Clearing interrupt factor
Interrupt return
instruction (RET1)
65

Advertisement

Table of Contents
loading

This manual is also suitable for:

F2mc-16lxMb90v330aMb90f337Mb90337

Table of Contents