Exception Processing Interrupt - Fujitsu MB90480 Series Hardware Manual

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

3.8

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.
Because exception processing occurs as the result of an unexpected operation, it
should be used only to activate recovery software required for debugging or an
emergency.
Exception processing due to execution of undefined instruction
● 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
suppressed.
• The S flag of the condition code register (CCR) is set to "1", and the system stack is enabled.
The program counter (PC) value saved to the stack is an 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 the saved PC value.
● Return from exception processing
When returning by the RETI instruction from exception processing, exception processing is
performed again because the PC is pointing to the undefined instruction. Take measures such
as resetting software.
CHAPTER 3 INTERRUPT
89

Advertisement

Table of Contents
loading

Table of Contents