2.7.2.12 BusFault Status Register

The flags in the BFSR indicate the cause of a bus access fault. The bit assignments are:

Table 2-59. 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.

[2] IMPRECISERR Imprecise data bus error:

0: no imprecise data bus error

1: a data bus error has occurred, but the return address in the stack frame is not related to the instruction that caused the error.

When the processor sets this bit to 1, it does not write a fault address to the BFAR.

This is an asynchronous fault. Therefore, if it is detected when the priority of the current process is higher than the BusFault priority, the BusFault becomes pending and becomes active only when the processor returns from all higher priority processes. If a precise fault occurs before the processor enters the handler for the imprecise BusFault, the handler detects both IMPRECISERR set to 1 and one of the precise fault status bits set to 1.

[1] PRECISERR Precise data bus error:

0: no precise data bus error

1: a data bus error has occurred, and the PC value stacked for the exception return points to the instruction that caused the fault.

When the processor sets this bit is 1, it writes the faulting address to the BFAR.

[0] IBUSERR Instruction bus error:

0: no instruction bus error

1: instruction bus error.

The processor detects the instruction bus error on prefetching an instruction, but it sets the IBUSERR flag to 1 only if it attempts to issue the faulting instruction.

When the processor sets this bit is 1, it does not write a fault address to the BFAR.