Procedure For Using Hardware Interrupt - Fujitsu MB90460 Series Hardware Manual

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

CHAPTER 7 INTERRUPT
7.4.3

Procedure for using Hardware Interrupt

Before hardware interrupt can be used, the system stack area, peripheral function, and
interrupt control register (ICR) must be set.
■ Procedure for using Hardware Interrupt
Figure 7.4-4 shows an example of the procedure for using hardware interrupt.
(1)
Set the system stack area
Initialize the peripheral function
(2)
Set the ICR in the interrupt
(3)
controller
Set operation start for the
(4)
peripheral function. Set the
interrupt enable bit to enable
(5)
Set the ILM and I in the PS
(6)
Interrupt request
generated
(1) Set the system stack area.
(2) Initialize a peripheral function that can generate interrupt requests.
(3) Set the interrupt control register (ICR) in the interrupt controller.
(4) Set the peripheral function to the operation start status, and set the interrupt enable bit to enable.
(5) Set the interrupt level mask register (ILM) and interrupt enable flag (I) to interrupt acceptable.
(6) An interrupt generated in the peripheral function causes a hardware interrupt request.
(7) The interrupt processing hardware saves the registers and branches to the interrupt processing program.
(8) The interrupt processing program processes the peripheral function in response to the generated
interrupt.
(9) Clear the peripheral function interrupt request.
(10) Execute the interrupt return instruction, and return to the program before branching.
132
Figure 7.4-4 Procedure for using Hardware Interrupt
Start
Stack processing branches to
the interrupt vector
(7)
Hardware
processing
Main program
Main program
Interrupt processing program
Processing for interrupt to the
(8)
peripheral function (execute the
interrupt processing routine)
(9)
Clear the interrupt cause
Interrupt return instruction
(10)
(RETI)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb90465 series

Table of Contents