XC2200 Derivatives
System Units (Vol. 1 of 2)
Interrupt and Trap Functions
User’s Manual
5-4
V2.1, 2008-08
ICU_X2K, V2.2
5.2
Interrupt Arbitration and Control
The XC2200’s interrupt arbitration system handles interrupt requests from up to
80 sources. Interrupt requests may be triggered either by the on-chip peripherals or by
external inputs.
Interrupt processing is controlled globally by register PSW through a general interrupt
enable bit (IEN) and the CPU priority field (ILVL). Additionally, the different interrupt
sources are controlled individually by their specific interrupt control registers (… IC).
Thus, the acceptance of requests by the CPU is determined by both the individual
interrupt control registers and by the PSW. PEC services are controlled by the respective
PECCx register and by the source and destination pointers which specify the task of the
respective PEC service channel.
An interrupt request sets the associated interrupt request flag xxIR. If the requesting
interrupt node is enabled by the associated interrupt enable bit xxIE arbitration starts with
the next clock cycle, or after completion of an arbitration cycle that is already in progress.
All interrupt requests pending at the beginning of a new arbitration cycle are considered,
independently from when they were actually requested.
shows the three-stage interrupt prioritization scheme:
Figure 5-2
Interrupt Arbitration
MCD04913
OCDS
or
OCE
CPU
Arbitration
PEC/
Interrupt
Handler
CPU
Action
Control
0xxxx
(ILVL
extended
with
0 in MSB)
xxxxx
(OCDS
service
request
priority
level)
OCDS
break
request
xxxxx
(request
priority
level)
PSW
0xxxx
(PSW.ILVL
extended
with 0
in MSB)
Request
Lines
Arbitration
xxxx
(ILVL)+
x.xx
(XGLVL)
Interrupt
Request
Lines
Hardware
Traps
CPU
Stage 1:
Compared 4-Bit ILVL+
2/3-Bit XGLVL
priority levels of
interrupt sources
(64/128 priority levels)
Stage 2:
4-Bit IRQ/PEC priority level
comparated with
5-Bit OCDS priority level
Stage 3:
5-Bit request priority level
comparated with
4-Bit PSW priority level