Cortex-M3 Processor (Reference Material)
UG0331 User Guide Revision 15.0
114
3.7.2.12 BusFault Status Register
The flags in the BFSR indicate the cause of a bus access fault. The bit assignments are:
Figure 43 •
MMFSR Bit Assignments
[0]
IACCVIOL
Instruction access violation flag:
0: no instruction access violation fault
1: the processor attempted an instruction fetch from a location that does not permit
execution.
This fault occurs on any access to an XN region, even when the MPU is disabled or not
present.
When this bit is 1, the PC value stacked for the exception return points to the faulting
instruction. The processor has not written a fault address to the MMAR.
Table 65 •
BFSR Bit Assignments
Bits
Name
Function
[7]
BFARVALID
BusFault Address Register
(BFAR) valid flag:
0: value in BFAR is not a valid fault address
1: BFAR holds a valid fault address.
The processor sets this bit to 1 after a BusFault where the address is known. Other
faults can set this bit to 0, such as a MemManage fault occurring later.
If a BusFault occurs and is escalated to a HardFault because of priority, the HardFault
handler must set this bit to 0. This prevents problems if returning to a stacked active
BusFault handler whose BFAR value has been overwritten.
[6:5]
Reserved.
[4]
STKERR
BusFault on stacking for exception entry:
0: no stacking fault
1: stacking for an exception entry has caused one or more BusFaults.
When the processor sets this bit to 1, the SP is still adjusted but the values in the
context area on the stack might be incorrect. The processor does not write a fault
address to the BFAR.
[3]
UNSTKERR
BusFault on unstacking for a return from exception:
0: no unstacking fault
1: unstack for an exception return has caused one or more BusFaults.
This fault is chained to the handler. This means that when the processor sets this bit
to 1, the original return stack is still present. The processor does not adjust the SP
from the failing return, does not performed a new save, and does not write a fault
address to the BFAR.
Table 64 •
MMFSR Bit Assignments
(continued)
Bits
Name
Function
7 6 5 4 3 2 1 0
BFARVALID
Reserved
STKERR
UNSTKERR
IMPRECISERR
PRECISERR
IBUSERR