Software Interrupt - Fujitsu MB90420/5 (A) Series Hardware Manual

F2mc-16lx family 16-bit microcontrollers
Table of Contents

Advertisement

6.5 Software Interrupt

The software interrupt is a function for transferring control from the program executed by the CPU to the
interrupt processing program defined by user by execution of a software interrupt instruction (INT
instruction). The software interrupt is stopped during execution of a software interrupt.
n Start of software interrupt
• Start of software interrupt
The software interrupt is started using the INT instruction. The software interrupt request does not have
the interrupt request flag nor enable flag and interrupt request is issued whenever the INT instruction is
executed.
• Inhibition of hardware interrupt
Since the INT instruction has no interrupt levels, the interrupt level mask register (ILM) is not updated.
During execution of the INT instruction, the I flag of the condition code register (CCR) is set to 0 to mask
the hardware interrupt. To enable the hardware interrupt during software interrupt handling, set the I flag
to 1 in the software interrupt-processing routine.
• Operation of software interrupt
When the CPU fetches and executes the INT instruction, the microcode for software interrupt handling is
started. The microcode saves the registers in the CPU in the system stack, masks the hardware interrupt
(CCR: I = 0), and then branchs to the corresponding interrupt vector.
For the allocation of the interrupt number and the interrupt vector, see Section 6.2.
n Return from software interrupt
When the interrupt return instruction (RETI instruction) is executed in the interrupt processing program, 12-
byte data saved in the system stack is returned to the dedicated registers to return to the processing being
executed before the interrupt branch.
INTERRUPT
6-21

Advertisement

Table of Contents
loading

Table of Contents