Data Sheet
June 2001
DSP16410B Digital Signal Processor
Agere Systems Inc.
Agere Systems—Proprietary
Use pursuant to Company instructions
31
4 Hardware Architecture
(continued)
4.4 Interrupts and Traps
(continued)
4.4.6 Individually Enabling, Disabling, and Prioritizing Hardware Interrupts
An application can individually disable a hardware interrupt by clearing both bits of its corresponding 2-bit field in
the
inc0
or
inc1
register (see
Table 7
). Reset clears the
inc0
and
inc1
registers, individually disabling all hardware
interrupts by default. An application can individually enable a hardware interrupt at one of three priority levels by
setting one or both bits of its corresponding 2-bit field in the
inc0
or
inc1
register.
The following are the advantages of interrupt prioritization:
An ISR can service concurrent interrupts according to their priority.
Interrupt nesting is supported, i.e., an interrupt can interrupt a lower-priority ISR. See
Section 4.4.11 on page 35
for details on interrupt nesting.
If multiple concurrent interrupts with the same assigned priority occur, the core first services the interrupt that has
its status field in the relative least significant bit location of the
ins
register (see
Table 8 on page 32
), i.e., the core
first services the interrupt with the lowest vector address (see
Table 9 on page 33
).
Note:
If interrupts are globally enabled (see
Section 4.4.5 on page 30
), an application must not change
inc
0—1
. Prior to changing
inc
0—1
, the application must globally disable interrupts by executing a
di
instruction. After changing
inc
0—1
, the application can globally re-enable interrupts by executing an
ei
instruction.
The following code segment is an example of properly changing
inc
0—1
:
di
inc1=0x00001
ei
// Globally disable interrupts (default after reset).
// Enable MGIBF at level 1 priority.
// OK to globally re-enable interrupts.
di
inc1=0
ei
// Before changing inc1, first globally disable interrupts.
// Disable MGIBF.
// OK to globally re-enable interrupts.
Table 7. inc0 and inc1 (Interrupt Control) Registers 0 and 1
19—18
17—16
15—14
13—12
11—10
9—8
7—6
5—4
3—2
1—0
inc0
INT1[1:0] INT0[1:0] DMINT5[1:0] DMINT4[1:0] MXI3[1:0] MXI2[1:0] MXI1[1:0] MXI0[1:0] TIME1[1:0] TIME0[1:0]
inc1
MXI9[1:0] MXI8[1:0]
MXI7[1:0]
MXI6[1:0]
MXI5[1:0] MXI4[1:0] PHINT[1:0] XIO[1:0] SIGINT[1:0] MGIBF[1:0]
Field
Value
Description
R/W
Reset
Value
00
INT
0—1
[1:0]
DMINT
4—5
[1:0]
MXI
0—9
[1:0]
TIME
0—1
[1:0]
PHINT[1:0]
XIO[1:0]
SIGINT[1:0]
MGIBF[1:0]
See
Table 5 on page 28
for definition of MXI
0—9
(IMUX
0—9
).
00
Disable the selected interrupt (no priority).
R/W
01
Enable the selected interrupt at priority 1 (lowest).
10
Enable the selected interrupt at priority 2.
11
Enable the selected interrupt at priority 3 (highest).