
Programmable Interrupt Controller
15-16
Élan™SC520 Microcontroller User’s Manual
15.5.7
Priority Types
Each individual interrupt controller prioritizes interrupt requests by their IR number, as
shown in Figure 15-1 on page 15-3. This places IR0 as the highest priority and IR7 the
lowest, which is the default ordering.
In a cascaded environment, the full 22 priority level is as shown in Figure 15-1, with P1
being the highest and P22 the lowest priority. As a result, if two or more interrupt requests
appear simultaneously, the higher priority interrupt is serviced first and the lower priority
interrupt is pending.
The interrupt controller supports nested interrupts. The depth level of nesting affects system
performance, and the programmer must implement this with care.
The interrupt controller also supports specific and automatic rotation types.
■
In
specific rotation, the lowest priority can be programmed in the individual controller,
thus fixing all the other priorities.
– For example, in Figure 15-1, if P5 is programmed to be the lowest priority, then P6 of
Slave 1 controller would be the highest priority within this controller.
– In this case, the priority order starting with the highest priority level would follow as:
P1
–
P2 (Master), P6
–
P10 (Slave 1), P3
–
P5 (Slave 1), P11–P12 (Master), P13–P20
(Slave 2), P21–P22 (Master). This is assuming that the Master and Slave 2 controllers
are each programmed with IR7 as the lowest priority.
– In fact, the implementation shown in Figure 15-1 is of a
fixed priority scheme (with
priority ordering of P1–P22) and is a variation of the specific rotation type.
■
In
automatic rotation scheme, all priority levels within the controller are treated as equal.
– In this mode, an interrupt request after being serviced receives the lowest priority, so
that the same device requesting an interrupt is queued.
– In the worst scenario, the device would have to wait until each of the seven other
devices is serviced at most one time.
15.5.8
Configuration Information
15.5.8.1
Programming
The initialization sequence of the PIC consists of writing a sequence of two to four bytes
to each controller. The first initialization byte is written to the lower address of the controller,
(020h for the Master, 0A0h for Slave 1, and 024h for Slave 2), and all subsequent
initialization bytes are written to the upper address of the controller (021h for the Master,
0A1h for Slave 1, and 025h for Slave 2).
1. The first initialization byte, the Initialization Control Word 1 (xICW1) register, notifies the
controller that an initialization sequence is starting. This register also controls the type
of interrupt-triggering (edge- or level-sensitive), whether the controller is in a cascaded
environment or alone, and whether the fourth initialization byte, the Initialization Control
Word 4 (xICW4) register, is required or not.
2. The second byte, the Initialization Control Word 2 (xICW2) register, contains the vector
offset for the controller. For PC/AT-compatible interrupts, xICW2 should be 08h for the
Master controller and 70h for the Slave 1 controller (Slave 2 is not used in PC/AT-
compatible systems).
3. The third byte, the Initialization Control Word 3 (xICW3) register is written only if xICW1
indicates that the controller is in a cascaded environment. For the Master controller, it
Содержание Elan SC520
Страница 1: ...lan SC520 Microcontroller User s Manual Order 22004A...
Страница 4: ...iv lan SC520 Microcontroller User s Manual...
Страница 28: ...Introduction xxviii lan SC520 Microcontroller User s Manual...
Страница 42: ...Architectural Overview 1 14 lan SC520 Microcontroller User s Manual...
Страница 78: ...System Initialization 3 22 lan SC520 Microcontroller User s Manual...
Страница 108: ...Clock Generation and Control 5 10 lan SC520 Microcontroller User s Manual...
Страница 118: ...Reset Generation 6 10 lan SC520 Microcontroller User s Manual...
Страница 148: ...System Arbitration 8 24 lan SC520 Microcontroller User s Manual...
Страница 214: ...SDRAM Controller 10 36 lan SC520 Microcontroller User s Manual...
Страница 230: ...Write Buffer and Read Buffer 11 16 lan SC520 Microcontroller User s Manual...
Страница 288: ...GP Bus DMA Controller 14 22 lan SC520 Microcontroller User s Manual...
Страница 316: ...Programmable Interval Timer 16 8 lan SC520 Microcontroller User s Manual...
Страница 328: ...Software Timer 18 4 lan SC520 Microcontroller User s Manual...
Страница 346: ...Real Time Clock 20 12 lan SC520 Microcontroller User s Manual...
Страница 360: ...UART Serial Ports 21 14 lan SC520 Microcontroller User s Manual...
Страница 414: ...AMDebug Technology 26 8 lan SC520 Microcontroller User s Manual...