89
CHAPTER 3 INTERRUPT
3.8
Exception Processing Interrupt
In the F
2
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
The F
2
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.
Summary of Contents for MB90480 Series
Page 2: ......
Page 4: ......
Page 10: ...vi ...
Page 128: ...106 CHAPTER 4 RESET ...
Page 174: ...152 CHAPTER 6 LOW POWER CONSUMPTION MODE ...
Page 198: ...176 CHAPTER 7 MODE SETTING ...
Page 220: ...198 CHAPTER 9 TIMEBASE TIMER ...
Page 238: ...216 CHAPTER 11 WATCH TIMER ...
Page 280: ...258 CHAPTER 12 16 BIT INPUT OUTPUT TIMER ...
Page 406: ...384 CHAPTER 17 8 10 BIT A D CONVERTER ...
Page 478: ...456 CHAPTER 20 CHIP SELECTION FACILITY ...
Page 494: ...472 CHAPTER 21 ADDRESS MATCH DETECTION FUNCTION ...
Page 498: ...476 CHAPTER 22 ROM MIRROR FUNCTION SELECTION MODULE ...
Page 526: ...504 CHAPTER 23 2M 3M BIT FLASH MEMORY ...
Page 536: ...514 CHAPTER 24 EXAMPLES OF MB90F481B MB90F482B MB90F488B MB90F489B SERIAL PROGRAMMING ...
Page 570: ...548 CHAPTER 25 PWC TIMER ONLY MB90485 SERIES ...
Page 688: ......