Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.
 
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.

Latest threads

Back
Top