
C165H
Interrupt and Trap Functions
Data Sheet
102
2001-04-19
PRELMNARY
Note:
The TRAP instruction does not change the CPU level, so software invoked trap
service routines may be interrupted by higher requests.
-EXCERPT-
Interrupt Enable bit IEN
globally enables or disables PEC operation and the
acceptance of interrupts by the CPU. When IEN is cleared, no interrupt requests are
accepted by the CPU. When IEN is set to '1', all interrupt sources, which have been
individually enabled by the interrupt enable bits in their associated control registers, are
globally enabled.
Note:
Traps are non-maskable and are therefore not affected by the IEN bit.
PSW (FF10
H
/ 88
H
)
15
14
SFR
Reset Value: 0000
H
3
2
CPU Priority ILVL
defines the current level for the operation of the CPU. This bit field
reflects the priority level of the routine that is currently executed. Upon entry into an
interrupt service routine this bit field is updated with the priority level of the request that
is being serviced. The PSW is saved on the system stack before. The CPU level
determines the minimum interrupt priority level that will be serviced. Any request on the
same or a lower level will not be acknowledged.
The current CPU priority level may be adjusted via software to control which interrupt
request sources will be acknowledged.
PEC transfers do not really interrupt the CPU, but rather “steal” a single cycle, so PEC
services do not influence the ILVL field in the PSW.
Hardware traps switch the CPU level to maximum priority (ie. 15) so no interrupt or PEC
requests will be acknowledged while an exception trap service routine is executed.
Bit
Function
N, C, V, Z, E,
MULIP, USR0
CPU status flags
(Described in section
“
The Central Processing Unit
”
)
Define the current status of the CPU (ALU, multiplication unit).
HLDEN
HOLD Enable
(Enables External Bus Arbitration)
0: Bus arbitration disabled, P6.7...P6.5 may be used for general purpose I/O
1: Bus arbitration enabled, P6.7...P6.5 serve as BREQ, HLDA, HOLD, resp.
ILVL
CPU Priority Level
Defines the current priority level for the CPU
F
H
: Highest priority level
0
H
: Lowest priority level
Interrupt Enable Control Bit
(globally enables/disables interrupt requests)
‘
0
’
: Interrupt requests are disabled
‘
1
’
: Interrupt requests are enabled
IEN
HLD
EN
-
MUL
IP
USR0
N
Z
C
V
E
5
4
1
0
11
10
9
8
7
6
13
12
rw
rw
rw
rw
-
rw
rw
rw
-
rw
-
rw
IEN
-
-
ILVL
rw