Inconsistent Hard Faults on KL82Z

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Inconsistent Hard Faults on KL82Z

630 次查看
vicciu
Contributor I

Hi everyone,

I'm trying to run some code on a KL82Z MCU, however i keep running into Hard Faults constantly. The MCU is LQFP 80 and it's soldered on a socket with male pins to help me test the code without an actual PCB. My problem is that at random times the MCU would enter hard faults, usually during the initialization lines of code(every time it's at a different line). This can happen dozens of times in a row, while other times everything works perfectly. Currently all the wires are connected on a breadboard and i have 2 decoupling capacitors between the positive and negative pins on the breadboard. So far I've checked all the connected wires and they have a good connection. Does anyone have any suggestions on what can i check next?

标记 (1)
0 项奖励
回复
1 回复

539 次查看
miduo
NXP Employee
NXP Employee

Hi,

It is quite difficult to answer your question straight-forwaedly. As normal cases, the hard fault always caused by usage faults, bus faults, and memory management faults if their handler cannot be excuted. In addition, it can also be caused by a bus fault during vector fetch (reading of a vector table during exception handling). In the NVIC there is a hard fault status register that can be used to determine whether the fault was caused by a vector fetch. If not, the hard fault handler will need to check the other fault status registers to determine the cause of the hard fault.

0 项奖励
回复