Fault Handling
1629
SPRUHE8E – October 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
Cortex-M3 Processor
24.8 Fault Handling
Faults are a subset of the exceptions (see
.)The following conditions generate a fault:
•
A bus error on an instruction fetch or vector table load or a data access.
•
An internally detected error such as an undefined instruction or an attempt to change state with a BX
instruction.
•
Attempting to execute an instruction from a memory region marked as Non-Executable (XN).
•
An MPU fault because of a privilege violation or an attempt to access an unmanaged region.
24.8.1 Fault Types
shows the types of fault, the handler used for the fault, the corresponding fault status register,
and the register bit that indicates the fault has occurred. See the
Cortex-M3 Peripherals
chapter for more
information about the fault status registers.
(1)
Occurs on an access to an XN region even if the MPU is disabled.
(2)
Attempting to use an instruction set other than the Thumb instruction set, or returning to a non load-store-multiple instruction with
ICI continuation
Table 24-19. Faults
Fault
Handler
Fault Status Register
Bit Name
Bus error on a vector read
Hard fault
Hard Fault Status
(HFAULTSTAT)
VECT
Fault escalated to a hard fault
Hard fault
Hard Fault Status
(HFAULTSTAT)
FORCED
MPU or default memory
mismatch on instruction access
Memory management fault
Memory Management Fault
Status (MFAULTSTAT)
IERR
(1)
MPU or default memory
mismatch on data access
Memory management fault
Memory Management Fault
Status (MFAULTSTAT)
DERR
MPU or default memory
mismatch on exception
stacking
Memory management fault
Memory Management Fault
Status (MFAULTSTAT)
MSTKE
MPU or default memory
mismatch on exception
unstacking
Memory management fault
Memory Management Fault
Status (MFAULTSTAT)
MUSTKE
Bus error during exception
stacking
Bus fault
Bus Fault Status
(BFAULTSTAT)
BSTKE
Bus error during exception
unstacking
Bus fault
Bus Fault Status
(BFAULTSTAT)
BUSTKE
Bus error during instruction
prefetch
Bus fault
Bus Fault Status
(BFAULTSTAT)
IBUS
Precise data bus error
Bus fault
Bus Fault Status
(BFAULTSTAT)
PRECISE
Imprecise data bus error
Bus fault
Bus Fault Status
(BFAULTSTAT)
IMPRE
Attempt to access a
coprocessor
Usage fault
Usage Fault Status
(UFAULTSTAT)
NOCP
Undefined instruction
Usage fault
Usage Fault Status
(UFAULTSTAT)
UNDEF
Attempt to enter an invalid
instruction set state
(2)
Usage fault
Usage Fault Status
(UFAULTSTAT)
INVSTAT
Invalid EXC_RETURN value
Usage fault
Usage Fault Status
(UFAULTSTAT)
INVPC
Illegal unaligned load or store
Usage fault
Usage Fault Status
(UFAULTSTAT)
UNALIGN
Divide by 0
Usage fault
Usage Fault Status
(UFAULTSTAT)
DIV0