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.

Capture values of registers before code hits hardware break-point

Other Parts Discussed in Thread: SYSBIOS

I didn't knew where else to post this question. It's so generic that i was very confused.

Since i am working with CC Debuggers so thought this forum might help.

My question: Is there any way to capture values of all hardware registers before the code hits a hardware break-point.

Let's say the value of registers i want is 500msec before my code execution hits the particular hardware break-point?

  • Hi,

    In CCS, breakpoints have the capability to save memory regions to files on the host PC (therefore most or all peripheral registers but not CPU registers). However, there is no way to know if a breakpoint set at a given place in your code is exactly 500ms before the next one (memory latencies, cache, interrupts can make the timespan vary greatly).

    Another approach is to have either an interrupt tied to a hardware timer configured to run at every 500ms or use SYSBIOS and a periodic Idle function tied to the system clock. In this case, you will always have a 500ms "heartbeat" on your system where you can write code that inspects registers or transfer data to the host PC (via fopen/fwrite).

    I don't see any additional approach to this particular scenario, but maybe someone else may reply with additional ideas.

    Regards,

    Rafael