English
Language : 

C161V_96 Datasheet, PDF (90/260 Pages) Siemens Semiconductor Group – 16-Bit CMOS Single-Chip Microcontrollers
10Jul97@15:19h
Interrupt and Trap Functions / C161
The eight hardware trap functions of the C161 are divided into two classes:
Class A traps are
• external Non-Maskable Interrupt (NMI)
• Stack Overflow
• Stack Underflow trap
These traps share the same trap priority, but have an individual vector address.
Class B traps are
• Undefined Opcode
• Protection Fault
• Illegal Word Operand Access
• Illegal Instruction Access
• Illegal External Bus Access Trap
These traps share the same trap priority, and the same vector address.
The bit-addressable Trap Flag Register (TFR) allows a trap service routine to identify the kind of
trap which caused the exception. Each trap function is indicated by a separate request flag. When
a hardware trap occurs, the corresponding request flag in register TFR is set to '1'.
TFR (FFACH / D6H)
SFR
Reset Value: 0000H
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
STK STK
UND
PRT ILL ILL ILL
NMI OF UF -
-
-
-
- OPC -
-
- FLT OPA INA BUS
rw rw rw -
-
-
-
- rw -
-
- rw rw rw rw
Bit
ILLBUS
ILLINA
ILLOPA
PRTFLT
UNDOPC
STKUF
STKOF
NMI
Function
Illegal External Bus Access Flag
An external access has been attempted with no external bus defined.
Illegal Instruction Access Flag
A branch to an odd address has been attempted.
Illegal Word Operand Access Flag
A word operand access (read or write) to an odd address has been attempted.
Protection Fault Flag
A protected instruction with an illegal format has been detected.
Undefined Opcode Flag
The currently decoded instruction has no valid C161 opcode.
Stack Underflow Flag
The current stack pointer value exceeds the content of register STKUN.
Stack Overflow Flag
The current stack pointer value falls below the content of register STKOV.
Non Maskable Interrupt Flag
A negative transition (falling edge) has been detected on pin NMI.
Semiconductor Group
5-24