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

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

Advertisement

3.4.3

Procedure for Using Hardwar Interrupt

To use hardware interrupts, necessary setup including the system stack area,
peripheral functions, and interrupt control registers (ICR) must be performed.
I Procedure for using hardware interrupt
Figure 3.4-4 "Procedure for using hardware interrupt" shows an example of a procedure for
using hardware interrupts.
Setup of the system
(1)
stack area
Initial setup of
(2)
peripheral functions
Setup of ICR in the
(3)
interrupt controller
Start of the operation of
peripheral functions
(4)
The interrupt enable
bit is set to "permit"
(5)
Setup of ILM and I in PS
Main program
(6)
Generation of
an interrupt request
Main program
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".
Figure 3.4-4 Procedure for using hardware interrupt
Start
Branching to stack
processing interrupt vector
(7)
Processing
by hardware
Stack processing
(8)
(9)
(10)
CHAPTER 3 INTERRUPT
Interrupt processing program
Execution of interrupt in
a peripheral function
(execution of an interrupt
processing routine)
Clearing of interrupt factor
Interrupt return instruction
(RETI)
61

Advertisement

Table of Contents
loading

Table of Contents