C161U
Interrupt and Trap Functions
Preliminary Data Sheet
135
02.2000
PRELIMINARY
PRE
LI
M
INAR
Y
- E
XCE
RP
T
-
TFR (FFAC
H / D6H)
SFR
Reset Value: 0000
H
Note: The trap service routine must clear the respective trap flag, otherwise a new trap
will be requested after exiting the service routine. Setting a trap request flag by
software causes the same effects as if it had been set by hardware.
The reset functions (hardware, software, watchdog) may be regarded as a type of trap.
Reset functions have the highest system priority (trap priority III).
Class A traps have the second highest priority (trap priority II), on the 3rd rank are class
B traps, so a class A trap can interrupt a class B trap. If more than one class A trap occur
at a time, they are prioritized internally, with the NMI trap on the highest and the stack
underflow trap on the lowest priority.
All class B traps have the same trap priority (trap priority I). When several class B traps
get active at a time, the corresponding flags in the TFR register are set and the trap
service routine is entered. Since all class B traps have the same vector, the priority of
service of simultaneously occurring class B traps is determined by software in the trap
service routine.
Bit
Function
ILLBUS
Illegal External Bus Access Flag
An external access has been attempted with no external bus defined.
ILLINA
Illegal Instruction Access Flag
A branch to an odd address has been attempted.
ILLOPA
Illegal Word Operand Access Flag
A word operand access (read or write) to an odd address has been attempted.
PRTFLT
Protection Fault Flag
A protected instruction with an illegal format has been detected.
UNDOPC
Undefined Opcode Flag
The currently decoded instruction has no valid C161U opcode.
STKUF
Stack Underflow Flag
The current stack pointer value exceeds the content of register STKUN.
STKOF
Stack Overflow Flag
The current stack pointer value falls below the content of register STKOV.
NMI
Non Maskable Interrupt Flag
A negative transition (falling edge) has been detected on pin NMI.
NMI
5
4
3
2
1
0
11
10
9
8
7
6
15
14
13
12
rw
-
rw
-
STK
UF
ILL
BUS
ILL
INA
ILL
OPA
PRT
FLT
UND
OPC
STK
OF
-
-
rw