Exception Priority; Table 5-2 Priority-Based Actions Of Exceptions - ARM Cortex-M3 Technical Reference Manual

R2p0
Hide thumbs Also See for Cortex-M3:
Table of Contents

Advertisement

Exceptions
5.3

Exception priority

Action
Description
Pre-emption
New exception has higher priority than current exception priority or thread and interrupts current flow.
This is the response to a pended interrupt, causing entry to an ISR if the pended interrupt is higher priority
than the active ISR or thread. When one ISR pre-empts another, the interrupts are nested.
On exception entry the processor automatically saves processor state, which is pushed on to the stack. In
parallel with this, the vector corresponding to the interrupt is fetched. Execution of the first instruction of
the ISR starts when processor state is saved and the first instruction of the ISR enters the execute stage of
the processor pipeline. The state saving is performed over the System bus and DCode bus. The vector
fetch is performed over either the System bus or the ICode bus depending on where the vector table is
located, see Vector Table Offset Register on page 8-21.
Tail-chain
A mechanism used by the processor to speed up interrupt servicing. On completion of an ISR, if there is
a pending interrupt of higher priority than the ISR or thread that is being returned to, the stack pop is
skipped and control is transferred to the new ISR.
Return
With no pending exceptions or no pending exceptions with higher priority than a stacked ISR, the
processor pops the stack and returns to stacked ISR or Thread Mode.
On completion of an ISR the processor automatically restores the processor state by popping the stack to
the state prior to the interrupt that caused the ISR to be entered. If a new interrupt arrives during the state
restoration, and that interrupt is of higher priority than the ISR or thread that is being returned to, then the
state restoration is abandoned and the new interrupt is handled as a tail-chain.
Late-arriving
A mechanism used by the processor to speed up pre-emption. If a higher priority interrupt arrives during
state saving for a previous pre-emption, the processor switches to handling the higher priority interrupt
instead and initiates the vector fetch for that interrupt. The state saving is not effected by late arrival
because the state saved is the same for both interrupts, and the state saving continues uninterrupted. Late
arriving interrupts are managed until the first instruction of the ISR enters the execute stage of the
processor pipeline. On return, the normal tail-chaining rules apply.
5-6
Table 5-2 shows how priority affects when and how the processor takes an exception. It
lists the actions an exception can take based on priority.
In the processor exception model, priority determines when and how the processor takes
exceptions. You can:
assign software priority levels to interrupts
group priorities by splitting priority levels into pre-emption priorities and
subpriorities.
Copyright © 2005-2008 ARM Limited. All rights reserved.

Table 5-2 Priority-based actions of exceptions

Non-Confidential
ARM DDI 0337G
Unrestricted Access

Advertisement

Table of Contents
loading

Table of Contents