|
楼主 |
发表于 2022-11-8 12:49:44
|
显示全部楼层
下载成功============================================================
=========寄存器值读取========================================
============================================================
R0 = 00000000
R1 = 00000015
R2 = 00000000
R3 = 000003ff
R4 = 2000ce50
R5 = 2000ce50
R6 = 00000000
R7 = 00000000
R8 = 00000000
R9 = 00000000
R10 = a5a5a5a5
R11 = a5a5a5a5
R12 = a5a5a5a5
R13(SP) = 200117e0
R14(LR) = 08039d7d
R15(PC) = 08021696
xPSR = 41000003
------------------------------------------------------------------
Read System Handler Control and State Register SHCSR = 0x00000000
------------------------------------------------------------------
MEMFAULTACT = 0
BUSFAULTACT = 0
USGFAULTACT = 0
SVCALLACT = 0
MONITORACT = 0
PENDSVACT = 0
SYSTICKACT = 0
USGFAULTPENDED = 0
MEMFAULTPENDED = 0
BUSFAULTPENDED = 0
SVCALLPENDED = 0
MEMFAULTENA = 0
BUSFAULTENA = 0
USGFAULTENA = 0
------------------------------------------------------------------
Read HardFault Status Register HSFR Register = 0x40000000
------------------------------------------------------------------
VECTBL = 0, 中断向量表无Bus Fault
FORCED = 1, forced Hard Fault
Indicates a forced Hard Fault, generated by escalation of a fault with configurable
priority that cannot be handled, either because of priority or because it is disabled
When this bit is set, the Hard Fault handler must read the other fault status registers
to find the cause of the fault
------------------------------------------------------------------
MemManage Status Register (MMFSR) = 0x00
------------------------------------------------------------------
IACCVIOL = 0, 无指令访问冲突错误
DACCVIOL = 0, 无数据访问异常
MUNSTKERR = 0, 出栈正常
MSTKERR = 0, 入栈正常
MLSPERR = 0, 浮点lazy stacking特性保存期间未发生故障
MMARVALID = 0, SCB->MMFAR寄存器没有记录异常地址
------------------------------------------------------------------
MemManage Address Register (MMFAR) = 0xb4007480
------------------------------------------------------------------
Data address for a MemManage fault. This register is updated with the address of a location
that produced a MemManage fault. The MMFSR shows the cause of the fault. This field is valid
only when MMFSR.MMARVALID is set. In implementations without unique BFAR and MMFAR
registers, the value of this register is UNKNOWN if BFSR.BFARVALID is set
------------------------------------------------------------------
BusFault Status Register (BFSR) = 0x82
------------------------------------------------------------------
IBUSERR = 0, 指令总线正常
PRECISERR = 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, it writes the faulting address to BFAR.
IMPRECISERR = 0, 数据总线正常
UNSTKERR = 0, 中断出栈时正常
STKERR = 0, 中断入栈时正常
LSPERR = 0, 浮点lazy stacking特性保存期间未生故障
BFARVALID = 1, BFAR寄存器记录有效的异常地址
The processor sets this bit 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 who is BFAR value has been
overwritten.
------------------------------------------------------------------
BusFault Address Register (BFAR) = 0xb4007480
------------------------------------------------------------------
Data address for a precise BusFault. This register is updated with the address of a location that
produced a BusFault. The BFSR shows the reason for the fault. This field is valid only when
BFSR.BFARVALID is set. In implementations without unique BFAR and MMFAR registers, the
value of this register is UNKNOWN if MMFSR.MMARVALID is set
------------------------------------------------------------------
UsageFault Status Register (UFSR) = 0x0000
------------------------------------------------------------------
UNDEFINSTR = 0, 处理器访问指令正常
INVSTATE = 0, 没有无效状态
INVPC = 0, PC加载正常
NOCP = 0, 访问协处理正常
UNALIGNED = 0, 内存对齐访问正常
DIVBYZERO = 0, 无除数为0的异常, 或者没有使能除数为0的异常
============================================================
=========异常进一步分析======================================
============================================================
进入硬件异常前, 寄存器数值, 如果出现非精确异常, 这些值是不准确的:
R0 = 00000000
R1 = e000ef34
R2 = e000e400
R3 = 2000747c
R12 = 00000004
LR = 0804e34d
PC = 080041a8
PSR = 61000000
|
|