Cortex-M3 Processor (Reference Material)
UG0331 User Guide Revision 15.0
41
Sufficient priority means the exception has greater priority than any limit set by the mask register, see
page 25. An exception with less priority than this is pending but is not handled
by the processor.
When the processor takes an exception, unless the exception is a tail-chained or a late-arriving
exception, the processor pushes information onto the current stack. This operation is referred to as
stacking
and the structure of eight data words is referred as a
stack frame
. The following figure illustrates
the information contained in the stack frame.
Figure 17 •
Exception Entry Stack Contents
Immediately after stacking, the stack pointer indicates the lowest address in the stack frame. The
alignment of the stack frame is controlled via the STKALIGN bit of the
Configuration Control Register
(CCR).
The stack frame includes the return address. This is the address of the next instruction in the interrupted
program. This value is restored to the PC at exception return so that the interrupted program resumes.
The processor performs a vector fetch that reads the exception handler start address from the vector
table. When stacking is complete, the processor starts executing the exception handler. At the same
time, the processor writes an EXC_RETURN value to the LR. This indicates which stack pointer
corresponds to the stack frame and what operation mode the processor was in before the entry occurred.
If no higher priority exception occurs during exception entry, the processor starts executing the exception
handler and automatically changes the status of the corresponding pending interrupt to active.
If another higher priority exception occurs during exception entry, the processor starts executing the
exception handler for this exception and does not change the pending status of the earlier exception.
This is the late arrival case.
3.5.3.7.2
Exception Return
Exception return occurs when the processor is in Handler mode and execution of one of the following
instructions attempts to set the PC to an EXC_RETURN value:
•
an LDM or POP instruction that loads the PC
•
an LDR instruction with PC as the destination
•
a BX instruction using any register.
The processor saves an EXC_RETURN value to the LR on exception entry. The exception mechanism
relies on this value to detect when the processor has completed an exception handler. Bits[31:4] of an
EXC_RETURN value are 0xFFFFFFF.
SP points here before interrupt
x
PSR
PC
LR
R12
R3
R2
R1
R0
<previous>
SP points here after interrupt
SP + 0x1C
SP + 0x18
SP + 0x14
SP + 0x10
SP + 0x0C
SP + 0x08
SP + 0x04
SP + 0x00
Decreasing
memory
address
Содержание SmartFusion2 MSS
Страница 1: ...UG0331 User Guide SmartFusion2 Microcontroller Subsystem ...
Страница 166: ...Cortex M3 Processor Reference Material UG0331 User Guide Revision 15 0 132 ...
Страница 200: ...Embedded NVM eNVM Controllers UG0331 User Guide Revision 15 0 166 Figure 87 System Builder Window ...
Страница 407: ...Universal Serial Bus OTG Controller UG0331 User Guide Revision 15 0 373 ...
Страница 806: ...Fabric Interface Controller UG0331 User Guide Revision 15 0 772 Figure 345 FIC Master AHB Lite Subsystem ...