Software Interrupt - Fujitsu MB90480 Series Hardware Manual

F2mc-16lx 16-bit microcontroller
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.
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 save the registers inside the CPU in the system
stack and to mask hardware interrupts (set the I-flag in CCR to "0"), leading to branch to the
corresponding interrupt vector.
For the assignment of interrupt numbers and interrupt vectors, see Section "3.2 Interrupt Factor
and Interrupt Vector".
Return from software interrupt
If an interrupt return instruction (RETI instruction) is executed in the interrupt processing
program, the 12-byte data saved 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
65

Advertisement

Table of Contents
loading

Table of Contents