Exception Processing Interrupt - Fujitsu MB90460 Series Hardware Manual

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

7.7

Exception Processing Interrupt

2
In the F
MC-16LX, the execution of an undefined instruction results in exception
processing.
Exception processing is basically the same as an interrupt. When the generation of an
exception processing is detected on the instruction boundary, ordinary processing is
interrupted and exception processing is executed.
Generally, exception processing occurs as the result of an unexpected operation.
Exception processing should be used only to activate recovery software required for
debugging or an emergency.
■ Exception Processing
Exception processing operation
2
The F
MC-16LX handles all codes that are not defined in the instruction map as undefined instructions.
When an undefined instruction is executed, processing equivalent to the INT #10 software interrupt
instruction is executed.
The following processing is executed before exception processing branches to the interrupt routine:
• The A, DPR, ADB, DTB, PCB, PC and PS registers are saved to the system stack.
• The I flag of the condition code register (CCR) is cleared to "0", and hardware interrupts are masked.
• The S flag of the condition code register (CCR) is set to "1", and the system stack is activated.
The program counter (PC) value saved to the stack is the exact address where the undefined instruction is
stored. For 2-byte or longer instruction codes, the code identified as undefined is stored at this address.
When the exception factor type must be determined within the exception processing routine, use this PC
value.
Return from exception processing
When the RETI instruction returns control from exception processing, exception processing restarts
because the PC is pointing to the undefined instruction. Provide a solution such as resetting the software.
CHAPTER 7 INTERRUPT
149

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb90465 series

Table of Contents