
...the world's most energy friendly microcontrollers
2011-02-04 - d0002_Rev1.00
110
www.energymicro.com
Bits
Name
Function
When this bit is set to 1, the PC value stacked for the exception return points to the instruction
that was preempted by the exception.
[0]
-
Reserved.
Note
The HFSR bits are sticky. This means as one or more fault occurs, the associated bits are
set to 1. A bit that is set to 1 is cleared to 0 only by writing 1 to that bit, or by a reset.
4.3.13 Memory Management Fault Address Register
The MMFAR contains the address of the location that generated a memory management fault. See the
Table 4.30. MMFAR bit assignments
Bits
Name
Function
[31:0]
ADDRESS
When the MMARVALID bit of the MMFSR is set to 1, this field holds the address of the location
that generated the memory management fault
When an unaligned access faults, the address is the actual address that faulted. Because a single read
or write instruction can be split into multiple aligned accesses, the fault address can be any address in
the range of the requested access size.
Flags in the MMFSR indicate the cause of the fault, and whether the value in the MMFAR is valid. See
4.3.14 Bus Fault Address Register
The BFAR contains the address of the location that generated a bus fault. See the register summary in
Table 4.31. BFAR bit assignments
Bits
Name
Function
[31:0]
ADDRESS
When the BFARVALID bit of the BFSR is set to 1, this field holds the address of the location that
generated the bus fault
When an unaligned access faults the address in the BFAR is the one requested by the instruction, even
if it is not the address of the fault.
Flags in the BFSR indicate the cause of the fault, and whether the value in the BFAR is valid. See
4.3.15 System control block design hints and tips
Ensure software uses aligned accesses of the correct size to access the system control block registers:
except for the CFSR and SHPR1-SHPR3, it must use aligned word accesses
for the CFSR and SHPR1-SHPR3 it can use byte or aligned halfword or word accesses.
The processor does not support unaligned accesses to system control block registers.
In a fault handler. to determine the true faulting address:
1. Read and save the MMFAR or BFAR value.
2. Read the MMARVALID bit in the MMFSR, or the BFARVALID bit in the BFSR. The MMFAR or BFAR
address is valid only if this bit is 1.