原理: 在进入硬件错误函数前会进行入栈操作,我们就可以堆栈指针定位到出问题的代码处。 理解cpu的寄存器的作用 STM32跳至硬件错误中断(HardFault_Handle) 原因及参考解决方法 https://blog.csdn.net/guowuzhou/article/details/114841261?ops_request_misc=&request_id=&biz_id=102&utm_term=GD32%20%E6%9F%A5%E6%89%BE%E7%A1%AC%E4%BB%B6%E4%B8%AD%E6%96%AD%E5%8E%9F%E5%9B%A0&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduweb~default-2-114841261.142v70control,201v4add_ask&spm=1018.2226.3001.4187 stm32 定位hardfault 的方法 https://blog.csdn.net/qq_33552551/article/details/106801444?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522168569180316800225589151%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=168569180316800225589151&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allfirst_rank_ecpm_v1~rank_v31_ecpm-3-106801444-null-null.142v88insert_down1,239v2insert_chatgpt&utm_term=STM32%20PSR%E5%AF%84%E5%AD%98%E5%99%A8&spm=1018.2226.3001.4187