Procedure For Using Hardware Interrupt - Fujitsu MB90480 Series Hardware Manual

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

3.4.3

Procedure for Using Hardware Interrupt

To use hardware interrupts, necessary setup including the system stack area,
peripheral functions, and interrupt control registers (ICR) must be performed.
Procedure for using hardware interrupt
Figure 3.4-4 shows an example of a procedure for using hardware interrupts.
(1)
(2)
(3)
(4)
(5)
(6)
Generation of
an interrupt request
(1) The system stack area is set up.
(2) The initial setup of peripheral functions for which interrupt requests can be generated is
performed.
(3) The interrupt control register (ICR) is set up in the interrupt controller.
(4) The peripheral function is set to the operation start state, and the interrupt enable bit is set to
"permit".
(5) The interrupt level mask register (ILM) and interrupt enable flag (I) are set to "interrupt
acceptable".
(6) A hardware interrupt request is generated by generation of a peripheral function interrupt.
Figure 3.4-4 Procedure for using hardware interrupt
Start
Setup of the system
stack area
Initial setup of
peripheral functions
Setup of ICR in the
interrupt controller
Start for the operation of
peripheral functions
The interrupt enable
bit is set to "permit"
Setup of ILM and I in PS
Main program
Main program
Stack processing
Branches to the
interrupt vector
(7)
Processing
by hardware
CHAPTER 3 INTERRUPT
Interrupt processing program
Execution of interrupt in
a peripheral function
(8)
(execution of an interrupt
processing routine)
Clearing of interrupt factor
(9)
Interrupt return instruction
(10)
(RETI)
59

Advertisement

Table of Contents
loading

Table of Contents