Page 1 of 1
Watchdog Timer
Posted: Mon Jul 20, 2009 6:33 pm
by medelec35
If auto clear watchdog is selected in project options, does this mean we don't have to place any C icons with clear_wdt();?
I was asking because in help file it just mentions component macros.
If watchdog is enabled with program config, and just use a 10 second delay icon in a flowchart, will watchdog timer time out?
I am guessing it will, so if I require a delay longer than watchdog time out, then I will need to use a count loop with ms delay within it?
Re: Watchdog Timer
Posted: Tue Jul 21, 2009 11:06 am
by Benj
Hello
The Auto Clear Watchdog functionality does the following.
Any call to a component macro automatically adds a clear watchdog C code call.
Any call to a delay breaks the delay up into sections and automatically adds a clear watchdog C code call between each section.
So in answer to your question.
If watchdog is enabled with program config, and just use a 10 second delay icon in a flowchart, will watchdog timer time out?
No the timer should not time out.
Re: Watchdog Timer
Posted: Tue Jul 21, 2009 11:56 am
by medelec35
Thanks Ben.
I was asking because watchdog timed out during a 3 second delay while auto clear watchdog was enabled. I had to do the delay with ms and loop instead of seconds, to avoid watchdog reset.
That function is a very good idea though.
Re: Watchdog Timer
Posted: Tue Jul 21, 2009 12:36 pm
by Benj
Hello
Are you sure that seems very odd to me.
The second delay actually calls the millisecond delay a thousand times every second and the millisecond delay resets the watchdog timer.
In your programs compiled C code can you make sure the delay is generating this "Wdt_Delay_S()" and not this "delay_s()"
Re: Watchdog Timer
Posted: Tue Jul 21, 2009 7:02 pm
by medelec35
I have created a different test using a 10 second timer, and does indeed work the way you have described it should work.
Thanks again Ben.