Procedure For Using A Hardware Interrupt - Fujitsu F2MC-16LX Hardware Manual

16-bit microcontroller mb90330 series
Hide thumbs Also See for F2MC-16LX:
Table of Contents

Advertisement

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.
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
Interrupt processing program
Branch to
Stack processing
(8)
interrupt vector
(7)
Processing
by Hardware
(9)
(10)
CHAPTER 3 INTERRUPT
Execution for
peripheral interrupt
(execute interrupt routine)
Clearing interrupt factor
Interrupt return
instruction (RET1)
67

Advertisement

Table of Contents
loading

Table of Contents