
DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
719 of 808
NXP Semiconductors
UM10360
Chapter 34: Appendix: Cortex-M3 User Guide
•
Section 37–1.3.9 “System Handler Priority Registers”
•
Section 37–1.2.7 “Interrupt Priority Registers”
Remark:
Configurable priority values are in the range 0 to 31. This means that the Reset,
Hard fault, and NMI exceptions, with fixed negative priority values, always have higher
priority than any other exception.
For example, assigning a higher priority value to IRQ[0] and a lower priority value to
IRQ[1] means that IRQ[1] has higher priority than IRQ[0]. If both IRQ[1] and IRQ[0] are
asserted, IRQ[1] is processed before IRQ[0].
If multiple pending exceptions have the same priority, the pending exception with the
lowest exception number takes precedence. For example, if both IRQ[0] and IRQ[1] are
pending and have the same priority, then IRQ[0] is processed before IRQ[1].
When the processor is executing an exception handler, the exception handler is
preempted if a higher priority exception occurs. If an exception occurs with the same
priority as the exception being handled, the handler is not preempted, irrespective of the
exception number. However, the status of the new interrupt changes to pending.
3.3.6 Interrupt priority grouping
To increase priority control in systems with interrupts, the NVIC supports priority grouping.
This divides each interrupt priority register entry into two fields:
Only the group priority determines preemption of interrupt exceptions. When the
processor is executing an interrupt exception handler, another interrupt with the same
group priority as the interrupt being handled does not preempt the handler,
•
an upper field that defines the
group priority
•
a lower field that defines a
subpriority
within the group.
If multiple pending interrupts have the same group priority, the subpriority field determines
the order in which they are processed. If multiple pending interrupts have the same group
priority and subpriority, the interrupt with the lowest IRQ number is processed first.
For information about splitting the interrupt priority fields into group priority and subpriority,
see
Section 37–1.3.6 “Application Interrupt and Reset Control Register”
.
3.3.7 Exception entry and return
Descriptions of exception handling use the following terms:
•
Preemption
When the processor is executing an exception handler, an exception can preempt the
exception handler if its priority is higher than the priority of the exception being
handled. See
for more information about preemption by an interrupt.
When one exception preempts another, the exceptions are called nested exceptions.
See
more information.
•
Return
This occurs when the exception handler is completed, and: