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.

Concerto - how to capture program counter

I have an intermittent bug that I cannot track other than through the WDT interrupt. What is the procedure for capturing the program counter with the Concerto?

I'm using the f28m35h52c1.

Thanks,

Pat

 

  • Pat,

    Which core's program counter are you trying to track, and is this in C or assembly code?

    Regards,

    Reagan

  • Reagan,

    Thanks for your response. I am fairly certain that the problem originates on the CM3 side. I normally program in C.

    Pat

     

  • Pat,

    The first question I have: what would you happen if you weren't using the WDT interrupt? Meaning, would it enter a FaultISR? If this is the case, that it's actually a fault, then I would reference the attached document. This will show you how to navigate the frame that is pushed on the stack at times of faults, of which contains the PC and the LR. It will also provide additional information on how to track down what kind of fault could be occuring. A common example is accessing a peripheral before clock gating it. 

    0842.spma043-Diagnosing Software Faults in Stellaris® Microcontrollers.pdf

    As far as other things to do to check the PC, you can either use the register view within whichever debugger you're using, or place it somewhere using some assembly code. Unfortunately, you cannot directly access the PC with C code, but the C code could reference a memory location where an assembly instruction stored it. For your reference, I've also attached the ARM Cortex M3 TRM:

     7127.Cortex M3.pdf

    I hope this solves it, but do let me know if you continue to have trouble.

    -Reagan