Datasheet

79
SAM4S Series [DATASHEET]
11100F–ATARM–29-Jan-14
12.4.3.8 Fault Handling
Faults are a subset of the exceptions, see “Exception Model” . The following generate a fault:
A bus error on:
An instruction fetch or vector table load
A data access
An internally-detected error such as an undefined instruction
An attempt to execute an instruction from a memory region marked as Non-Executable (XN).
A privilege violation or an attempt to access an unmanaged region causing an MPU fault.
Fault Types
Table 12-11 shows the types of fault, the handler used for the fault, the corresponding fault status register, and the
register bit that indicates that the fault has occurred. See “Configurable Fault Status Register” for more information about
the fault status registers.
Notes: 1. Occurs on an access to an XN region even if the processor does not include an MPU or the MPU is disabled.
2. Attempt to use an instruction set other than the Thumb instruction set, or return to a non load/store-multiple instruction
with ICI continuation.
Fault Escalation and Hard Faults
Table 12-11. Faults
Fault Handler Bit Name Fault Status Register
Bus error on a vector read
Hard fault
VECTTBL
“Hard Fault Status Register”
Fault escalated to a hard fault FORCED
MPU or default memory map mismatch:
Memory
management
fault
––
on instruction access IACCVIOL
“MMFSR: Memory Management Fault Status
Subregister”
on data access DACCVIOL
(2)
during exception stacking MSTKERR
during exception unstacking MUNSKERR
during lazy floating-point state preservation MLSPERR
Bus error:
Bus fault
––
during exception stacking STKERR
“BFSR: Bus Fault Status Subregister”
during exception unstacking UNSTKERR
during instruction prefetch IBUSERR
during lazy floating-point state preservation LSPERR
Precise data bus error PRECISERR
Imprecise data bus error IMPRECISERR
Attempt to access a coprocessor
Usage fault
NOCP
“UFSR: Usage Fault Status Subregister”
Undefined instruction UNDEFINSTR
Attempt to enter an invalid instruction set state
(1)
INVSTATE
Invalid EXC_RETURN value INVPC
Illegal unaligned load or store UNALIGNED
Divide By 0 DIVBYZERO