USER`S MANUAL

Add to My manuals
254 Pages

advertisement

USER`S MANUAL | Manualzz

INTERRUPT STRUCTURE S3F80N8_UM_REV1.10

INTERRUPT PRIORITY REGISTER (IPR)

The interrupt priority register, IPR (FFH), is used to set the relative priorities of the interrupt levels in the microcontroller’s interrupt structure. After a reset, all IPR bit values are undetermined and must therefore be written to their required settings by the initialization routine.

When more than one interrupt sources are active, the source with the highest priority level is serviced first. If two sources belong to the same interrupt level, the source with the lower vector address usually has the priority (This priority is fixed in hardware).

To support programming of the relative interrupt level priorities, they are organized into groups and subgroups by the interrupt logic. Please note that these groups (and subgroups) are used only by IPR logic for the IPR register priority definitions (see Figure 5-7):

Group A IRQ0, IRQ1

Group B IRQ2, IRQ3, IRQ4

Group C IRQ5, IRQ6, IRQ7

IPR

Group A

IPR

Group B

IPR

Group C

A1 A2 B1 B2 C1 C2

B21 B22 C21 C22

IRQ0 IRQ1 IRQ2 IRQ3 IRQ4 IRQ5 IRQ6 IRQ7

Figure 5-7. Interrupt Request Priority Groups

As you can see in Figure 5-8, IPR.7, IPR.4, and IPR.1 control the relative priority of interrupt groups A, B, and C.

For example, the setting "001B" for these bits would select the group relationship B > C > A. The setting "101B" would select the relationship C > B > A.

The functions of the other IPR bit settings are as follows:

— IPR.5 controls the relative priorities of group C interrupts.

— Interrupt group C includes a subgroup that has an additional priority relationship among the interrupt levels 5,

6, and 7. IPR.6 defines the subgroup C relationship. IPR.5 controls the interrupt group C.

— IPR.0 controls the relative priority setting of IRQ0 and IRQ1 interrupts.

5-10

MSB .7

Group priority:

D7 D4 D1

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1

= Undefined

= B > C > A

= A > B > C

= B > A > C

= C > A > B

= C > B > A

= A > C > B

= Undefined

.6

Interrupt Priority Register (IPR)

FEH, R/W

.5

.4

.3

.2

.1

.0

LSB

Group A

0 = IRQ0 > IRQ1

1 = IRQ1 > IRQ0

Group B

0 = IRQ2 > (IRQ3, IRQ4)

1 = (IRQ3, IRQ4) > IRQ2

Subgroup B

0 = IRQ3 > IRQ4

1 = IRQ4 > IRQ3

Group C

0 = IRQ5 > (IRQ6, IRQ7)

1 = (IRQ6, IRQ7) > IRQ5

Subgroup C

0 = IRQ6 > IRQ7

1 = IRQ7 > IRQ6

Figure 5-8. Interrupt Priority Register (IPR)

5-11

advertisement

Related manuals

advertisement

Table of contents