Software Interrupt - Fujitsu F2MC-16LX Hardware Manual

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

Advertisement

3.5

Software Interrupt

Software interrupt is a function used to move control to the user-defined program for
interrupt processing from a program that the CPU is being executed if a software
interrupt instruction (INT instruction) is executed. A hardware interrupt is stopped
while a software interrupt is executed.
I Start of software interrupt
❍ Software interrupt start
To start a software interrupt, execute the INT instruction. A software interrupt request has
neither the interrupt request flag nor enable flag. It always generates an interrupt request if the
INT instruction is executed.
❍ Hardware interrupt suppressed
Because the INT instruction has no interrupt levels, the interrupt level mask register (ILM) is not
updated. During INT instruction execution, the I-flag in the condition code register (CCR) is set
to "0" to mask hardware interrupts. To permit a hardware interrupt during software interrupt
processing, set the I-flag to "1" in the software interrupt processing routine.
❍ Software interrupt operation
If the CPU obtains the INT instruction and execute it, a microcode for software interrupt
processing starts. This microcode is used to store the registers inside the CPU in the system
stack and to mask hardware interrupts (set the I-flag in CCR to "0"), leading to branching to the
corresponding interrupt vector.
For the assignment of interrupt numbers to interrupt vectors, see Section 1.2, "Interrupt Factor
and Interrupt Vector".
I Return from software interrupt
If an interrupt return instruction (RETI instruction) is executed in the interrupt processing
program, the 12-byte data stored in the system stack is restored to the dedicated registers,
returning control to the processing that was executed before the interrupt processing.
CHAPTER 3 INTERRUPT
67

Advertisement

Table of Contents
loading

Table of Contents