I have an CodeWarrior peoject with PE generated code, it some time trigger PE_ISR() and hang, I would like to trace the reason and fix it.
Is there suggestion how to trace it?
You can enable 'own handler for every interrupt', so you know which interrupt is firing.
See Oh my! An Interrupt… | MCU on Eclipse
I hope this helps,
It is Hard_Fault,
How many conditions can cause this fault?
most likely it is a misaligned access, an access to a NULL pointer or accessing a peripheral which is not clocked/powered.
Here are a few articles how to debug the reason for the hard fault:
Debugging Hard Faults on ARM Cortex-M
Debugging ARM Cortex-M Hard Faults with GDB Custom Command
A Processor Expert Component to Help with Hard Faults
For the last one with that Processor Expert component (this is what I use with my Processor Expert projects), you can find it on SourceForge:
how to install: McuOnEclipse Releases on SourceForge
Retrieving data ...