How do I enable watchdog in the debugger?

Status
Not open for further replies.

naseeam

Member
My Embedded Application does not do it's intended function because it watchog resets. However, it does do it's intended function in the debugger because I think watchdog is disabled in the debugger.
How do I enable watchdog in the debugger? Will the debugger stop at the instruction causing the watchdog reset? I need to know which instruction is causing the watchdog reset.

My target embedded board is Freescale PowerPC MPC555 Microcontroller based. My software application is loaded and run in this board. My debugger is Lauterbach Trace32.

Thanks.
 
From my experience, you can't use WDT in debug mode, because it will reset the device when the debugger stops code excecution. You must put CLRWDT statements in your code to clear the WDT before it overflows. You can also completely disable WDT or use scaling to make the time longer.
 
Last edited:
How do I enable watchdog in Lauterbach Trace32 Debugger?

Is there a way to strobe the watchdog in debug mode so device is not reset when the debugger stops? Lauterbach Trace32 debugger has rich scripting language. How can we write a debugger script to pet watchdog?

>> You must put CLRWDT statements in your code to clear the WDT before it overflows.
Are you saying to put this statement in the debugger script while debugging?

I cannot completely disable the watchog or increase watchdog timeout because I need to know why my application software is watchdog timing out.

Thanks.
 
Use the scripts to disable the WDT when the program breaks. That is better then strobing it because you can examine the WDT.

Look in the Lauterbach docs for examples of post break scripts. I am guessing here.
 
from the little i know you have to reset the watchdog timer before it times out and resets the chip as if you don't reset it it is assumed that the program has hung and will reset the microcontroller automatically
 
I cannot completely disable the watchog or increase watchdog timeout because I need to know why my application software is watchdog timing out.

Thanks.

Make sure you clear the WD when you are in a delay loop, also decide on how long your program can "hang" before having negative effects, and pre/post-scale your WDT to that time. I would think, completely disable the WDT, run your program and see if it gets stuck somewhere, if it does not get stuck you either have to make the WDT period longer, or you did not put enough clear WDT statements in you code (or they the clear statements are in the wrong places).
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…