Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Is it possible to use a debugger to debug watchdog timer?

Status
Not open for further replies.

Surender Reddy

Full Member level 2
Joined
Jan 28, 2012
Messages
129
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,298
Location
Bangalore, India
Activity points
2,186
Is it possible to use debugger to debug watchdog timer?

Hi,
I just want to know the wdog functionality. I know once wdog timer expires it sends a reset signal to the CPU.
For this kind of reset what is the behavior of the CPU? any RAM data retained or lost?

How to debug this interrupt mechanism?
 

Re: Is it possible to use debugger to debug watchdog timer?

How to debug this interrupt mechanism?
There are microcontrollers with special registers informing the reason for its last reset, where the whatchdog is just one of the various events which can be detected, but if you don't have such a feature built in you could define an output ( e.g a LED ) to turn on whenever the whatchdog interrupt vector is reached, being turned off just after a regular reset like power on or reset pin released.
 

Re: Is it possible to use debugger to debug watchdog timer?

Thnks andre, Is it good idea enabling wdog timer in debugging mode?
 

Re: Is it possible to use debugger to debug watchdog timer?

There are a lot of ways to activate Debug, but to be honest, I don't like debug resource when provided by external "debugger" hardware. It in general adds pieces of code which may somehow interfer on our firmware. I would prefer to make myself my own debuggin scheme such as reserving a serial port to send characters from specific parts of the program.

Another efficient debugging resource, but which unfortunatelly isn't available in runtime ( I mean, the program has to be paused ) is the JTAG resource, but it isn't available at all cores - you did not specify which one you're using.
 

Re: Is it possible to use debugger to debug watchdog timer?

I am using ARM core of CORTEX-M3, CORTEX-A7, for SOC
 

Re: Is it possible to use debugger to debug watchdog timer?

For this kind of reset what is the behavior of the CPU? any RAM data retained or lost?

The RAM data are irrelevant with the watchdog. You must instruct the compiler which variables should retain their values upon reset. IAR for example uses the keyword "__no_init", XC8 (MPLAB) uses the keyword "persistent" and so on.

If you need to keep some RAM values unchanged only when watchdog reset occurs, then after reset you must read the reset reason from the corresponding register and if the reset was a watchdog reset, then you won't touch those values. Otherwise you initialize them.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top