Software Interrupt - Fujitsu MB90460 Series Hardware Manual

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

7.5

Software Interrupt

When the software interrupt instruction (INT instruction) is executed, the software
interrupt function transfers control from the program being executed by the CPU to the
user-defined interrupt processing program. Hardware interrupt is disabled during
execution of a software interrupt.
■ Software Interrupt Activation
Software interrupt activation
The INT instruction is used to activate a software interrupt. There is no interrupt request flag or enable flag
for software interrupt requests. When the INT instruction is executed, an interrupt request is always
generated.
Hardware interrupt suppression
Since the INT instruction does not have interrupt levels, the interrupt level mask register (ILM) is not
updated. During the execution of the INT instruction, the I flag of the condition code register (CCR) is set
to "0", and hardware interrupts are masked.
To enable hardware interrupts during software interrupt processing, set the I flag to "1" in the software
interrupt processing routine.
Software interrupt operation
When the CPU fetches the INT instruction, the software interrupt processing microcode is activated. This
microcode saves the internal CPU registers on the system stack, masks hardware interrupts (CCR: I = 0),
and branches to the corresponding interrupt vector.
See "7.2 Interrupt Causes and Interrupt Vectors", in Chapter 7 for more information about the allocation of
interrupt numbers and interrupt vectors.
■ Returning from a Software Interrupt
In the interrupt processing program, when the interrupt return instruction (RETI instruction) is executed,
the 12-byte data saved to the system stack is restored to the dedicated registers and the processing that was
being executed before branching for the interrupt is resumed.
CHAPTER 7 INTERRUPT
137

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb90465 series

Table of Contents