Exceptions
5-2
Copyright © 2005-2008 ARM Limited. All rights reserved.
ARM DDI 0337G
Non-Confidential
Unrestricted Access
5.1
About the exception model
The processor and the
Nested Vectored Interrupt Controller
(NVIC) prioritize and
handle all exceptions. All exceptions are handled in Handler mode. Processor state is
automatically stored to the stack on an exception, and automatically restored from the
stack at the end of the
Interrupt Service Routine
(ISR). The vector is fetched in parallel
to the state saving, enabling efficient interrupt entry. The processor supports
tail-chaining that enables back-to-back interrupts without the overhead of state saving
and restoration. The following features enable efficient, low latency exception handling:
•
Automatic state saving and restoring. The processor pushes state registers on the
stack before entering the ISR, and pops them after exiting the ISR with no
instruction overhead.
•
Automatic reading of the vector table entry that contains the ISR address in code
memory or data SRAM. This is performed in parallel to the state saving.
Note
Vector table entries are ARM/Thumb interworking compatible.
This causes bit [0] of the vector value to load into the EPSR T-bit on exception
entry. Creating a table entry with bit [0] clear generates an INVSTATE fault on
the first instruction of the handler corresponding to this vector.
•
Support for tail-chaining. In tail-chaining, the processor handles back-to-back
interrupts without popping and pushing registers between ISRs.
•
Dynamic reprioritization of interrupts.
•
Closely-coupled interface between the processor core and the NVIC to enable
early processing of interrupts and processing of late-arriving interrupts with
higher priority.
•
Configurable number of interrupts, from 1 to 240.
•
Configurable number of interrupt priorities, from 3 to 8 bits (8 to 256 levels).
•
Separate stacks and privilege levels for Handler and Thread modes.
•
ISR control transfer using the calling conventions of the C/C++ standard
ARM
Architecture Procedure Call Standard
(AAPCS).
•
Priority masking to support critical regions.