This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using ULINKpro/Trace to debug a crashed CPU

Hello,

I'm using ULINKpro (ETM Trace enabled) to debug a problem with my code on a LPC4357. In some situations the CPU crashes. I would like to use the "Trace Data" view to see the last instructions that the CPU was doing before it crashed.
As soon as the CPU crashes I stop the debugger. But then µVision only tells me

"Could not stop Cortex-M device! Please check the JTAG cable."

When I press the OK-Button, the debugg session is closed and I cannot see the Trace data any more.
How do I use the "Trace data" in such a situation correctly?

After this crash a normal "reset" does not recover the CPU, a power cycle is required.
This crash may be related to inter-cpu communication. CM0 and CM4 exchange a lot of data via IPC.

Thank you.

  • Not sure you can attach and postmortem after the fact.

    The trace isn't like ICE from the old days, it records transactions on the bus in real-time, and recreates operation from understanding memory content and flow.

    Things that break the debugger in Cortex-Mx systems are low power modes, and things like WFI, altering pin configurations (trace pins mixed with high order address bus bits? haven't reviewed LPC4357 pin utilization), altering system frequency.

    Try to isolate flow and function by outputting telemetry. Add Hard Fault and Stack Checking.