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.

RTOS/TM4C1294KCPDT: TM4C1294KCPDT

Part Number: TM4C1294KCPDT

Tool/software: TI-RTOS

Hi,

Is there any way to store the program counter value to non-volatile memory before watchdog reset.

Regards

Nikhil

  • That may be difficult. If your goal is to identify where the code was when a watchdog reset occurred, I suggest you add a check in the ResetISR() function found in startup_ccs.c that checks the WDTn bits in the Reset Cause (RESC) register. If the reset was caused by a watchdog timer, drop into an infinite loop. Then by setting a breakpoint at that loop (or just halting the CPU with the debugger) you will be able to examine the link register and the RAM in the stack location. From that you might be able to get a good idea of what was happening before the watchdog timed out.
  • Is it possible to check in ti-rtos environment?..

    Regards
    Nikhil
  • The RTOS does not have a way to get this. You can get the type of thread running: BIOS_getThreadType, but that may always be Hwi since the WDT ISR is running. You can call Task_self() to see what the current running task is.

    Todd