Content originally posted in LPCWare by frame on Sun Jul 01 08:38:55 MST 2012
I consider it a bad idea to just do a reset upon a Hardfault.
The hardfault occured because of a specific problem, probably because of a bug. With a reset and a subsequent restart, you are hardly changing any of the conditions leading to the hardfault.
In short, you will probably create an endless reset cycle.
I would rather investigate the reason for the hardfault. Better check the system register contents for possible reasons, and use the debugger.
The basic idea for the endless loop in the hardfault handler (and other handlers) is to prevent damage by erraneous code. This might not make much of a difference for a hobbyist device, but certainly for a mass product. A customer complaining about "device is not working" is still better than one telling "device destroyed that much of my property".
I would rather see it as a help, and not try to circumvent it.