Exception Processing Interrupt - Fujitsu MB90335 Series Hardware Manual

16-bit microcontroller
Table of Contents

Advertisement

CHAPTER 3 INTERRUPT

3.7 Exception Processing Interrupt

3.7
Exception Processing Interrupt
2
F
MC-16LX executes exception handling by executing undefined instructions.
Exception handling, basically the same as interrupt, is executed when an exception item
is detected during a period between instructions, the normal process is suspended for
this purpose.
In general, exception handling takes place as a result of unpredicted operation; it is
recommended that it be used only for debugging or for activating the recovery software
in the event of an emergency.
■ Exception Processing Interrupt
Operation of exception processing
2
F
MC-16LX regards as an undefined instruction any code not defined in the instruction map. When
executing an undefined instruction, F
instruction "INT#10".
Before control branches to the interrupt routine, the exception handling performs the following processes:
1) Saving the registers of A, DPR, ADB, DTB, PCB, PC, and PS in the system stack.
2) Clearing the I flag of the condition code register (CCR) to "0" to mask the hardware interrupt.
3) Setting the S flag of the condition code register (CCR) to "1" to enable the system stack.
The program counter (PC) value saved in the system stack indicates the address storing the undefined
instruction. For any instruction code of 2 or more bytes, the PC value indicates the address which stores the
code by which the instruction has been identified as an undefined one. The PC value is useful to determine
the type of the exception cause in the exception handling routine.
Return from exception processing
After returning from the exception handling according to the RETI instruction, control starts the exception
handling again because the PC points to an undefined instruction. Some measurement such as performing a
software reset should be taken.
84
2
MC-16LX performs a process equivalent to software interrupt
FUJITSU MICROELECTRONICS LIMITED
MB90335 Series
CM44-10137-6E

Advertisement

Table of Contents
loading

This manual is also suitable for:

F2mc-16lxMb90v330aMb90f337Mb90337

Table of Contents