HardFault_Handler

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HardFault_Handler

2,550 Views
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!
Labels (1)
0 Kudos
Reply
2 Replies

1,578 Views
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 Kudos
Reply

1,578 Views
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 Kudos
Reply