If in my program the tasks are scheduled by using Timer1, do I still need to use watchdog timer for the purpose of recovering from error when that happens.
If so, please provide some info.
Regards,
Jai
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Wed Jul 21, 2010 12:51 pm
If your main loop calls several tasks like the one shown below, then I
think the best place to put the restart_wdt() statement is in the main loop.
Code:
while(1)
{
task1();
task2();
task3();
restart_wdt();
}
This way, if one of your tasks locks up, it won't return to the main loop
and the Watchdog will reset the system.
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