I use the WDT during the program run.
In some cases I want to put the 10F200 into a sleep for a very long time without wakeup on WDT but only by GPIO change.
Is there a way to disable the WDT during program run, after it was enabled?
Code:
#fuses WDT
setup_wdt(WDT_2304MS);
Thanks.
Ttelmah
Joined: 11 Mar 2010 Posts: 19538
Posted: Thu Nov 01, 2012 3:44 pm
No.
This is a 'read the data sheet' one.
On these chips, the watchdog is only disabled/enabled by a fuse. A lot of the larger chips offer a 'soiftware' option to allow the watchdog to be disabled in code, but not this one.
However it is very easy to test using restart_cause, and if this is from a watchdog restart, just go to sleep again. The CPU need only wake for a handful of instructions every (approx) 2.3 seconds, and the power consumption of this is tiny. Got units waking like this that have been running for years on a single small lithium battery....
Best Wishes
edi
Joined: 22 Dec 2003 Posts: 82
Posted: Thu Nov 01, 2012 4:09 pm
I understand it from the data sheet.
But as you mention I looked for a trick to overcome it.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum