This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP432E401Y: How to know last statement executed before entering Default_handler

Part Number: MSP432E401Y

Tool/software: Code Composer Studio

Hi,

I have a CCS project (without RTOS ) that works OK in this dev kit: http://www.ti.com/tool/MSP-EXP432E401Y

However, when I load the same program in a custom board that my team developed, the code enters default handler after a while. Actually we now know that it enters HardFault_Handler

The questions is: Is there a way to trace back  the last statement(s) executed in my source code? I know that I could put breakpoints,  but that interferes with the timing of my application(TCP/IP communication).

Thanks

Richard

  • Richard Nole said:
    The questions is: Is there a way to trace back  the last statement(s) executed in my source code?

    From the hard fault handler you can extract the PC and SP register values at which the hard fault occurred, and then manually enter those values into the registers to allow CCS to show you the context at which the hard fault occurred. See an example analysis in Stack trace after handler HardFault