HardFault_Handler

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

HardFault_Handler

2,913件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nasib on Mon Jan 28 12:22:50 MST 2013
Hi all!

I have a problem.

When i add some code lines (whatever) to my program, it jump to a HardFault_Handler(void) function ( into CDL/CMSISv2p00_LPC11Uxx/src/cr_startup_lpc11u.c/)

I have a large code, and i don't know why it happens.

Anyone knows what is exactly this function?

Thank you so much!
ラベル(1)
  • USB

0 件の賞賛
返信
2 返答(返信)

1,941件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vitah on Thu Mar 07 20:36:34 MST 2013
When you are in HardFault_Handler func, check the Stack Pointer Register.
Plus its value with 24(DEC) then get DWORD value stored at address (SP + 24) in memory.
This DWORD value is the address of last instruction that generated hardfault.

Check and correct what was wrong.

Hope it will help.
0 件の賞賛
返信

1,941件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Tue Jan 29 01:17:46 MST 2013
The processor jumps to this fault when various bad things happen that it can't handle.

Read "Cortex M0 Devices Generic User Guide" from ARM, the chapter on Fault Handling.
0 件の賞賛
返信