如何分析hard fault

例子:

R0 = 1
R1 = 1
R2 = 10
R3 = e000ed10
R12 = 0
LR = fffffff9(中断返回线程模式使用主堆栈)
PC = 0
PSR = 60000013或60000016或60000036(Z、C、 EXCEPT_NUM:RTC_WKUP_IRQn、EXTI0_IRQn 、 USART2_IRQn)
BFAR = e000ed38(不关心)
CFSR = 20000(INVSTATE: Invalid state usage fault  the PC value stacked for the exception return points to the instruction that attempted the illegal use of the EPSR
HFSR = 40000000 (forced)
DFSR = 0
AFSR = 0

低功耗进入前发生外部中断,会导致醒来后flash唤醒时间变长,从而导致读取flash指令出错。

posted @ 2019-02-20 14:44  zhanghonglang  阅读(463)  评论(0编辑  收藏  举报