SAM3X8E Atmel Corporation, SAM3X8E Datasheet - Page 82

no-image

SAM3X8E

Manufacturer Part Number
SAM3X8E
Description
Manufacturer
Atmel Corporation
Datasheets
11.6.7.6
82
82
SAM3X/A
SAM3X/A
Exception return
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.
In parallel to the stacking operation, the processor performs a vector fetch that reads the excep-
tion 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 was 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.
Exception return occurs when the processor is in Handler mode and executes one of the follow-
ing instructions to load the EXC_RETURN value into the PC:
EXC_RETURN is the value loaded into the LR on exception entry. The exception mechanism
relies on this value to detect when the processor has completed an exception handler. The low-
est four bits of this value provide information on the return stack and processor mode.
10
The processor sets EXC_RETURN bits[31:4] to
it indicates to the processor that the exception is complete, and the processor initiates the
exception return sequence.
Table 11-10. Exception return behavior
EXC_RETURN[3:0]
bXXX0
b0001
b0011
b01X1
b1001
b1101
b1X11
• a
• a
• an
shows the EXC_RETURN[3:0] values with a description of the exception return behavior.
POP
BX
LDR
instruction with any register.
instruction that includes the PC
or
LDM
instruction with the PC as the destination.
Description
Reserved.
Return to Handler mode.
Exception return gets state from MSP.
Execution uses MSP after return.
Reserved.
Reserved.
Return to Thread mode.
Exception return gets state from MSP.
Execution uses MSP after return.
Return to Thread mode.
Exception return gets state from PSP.
Execution uses PSP after return.
Reserved.
0xFFFFFFF
. When this value is loaded into the PC
11057A–ATARM–17-Feb-12
11057A–ATARM–17-Feb-12
Table 11-

Related parts for SAM3X8E