Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

About Watch Dog Timer

Tags:

embedded

Can Anyone tell me whether we should enable or disable watch dog during the startup/boot code executes?My friend told me that we usually disable watch dog in the boot code. Can anyone one tell me what is the advantage or disadvantage of doing so??

like image 548
pdssn Avatar asked Nov 27 '09 12:11

pdssn


2 Answers

It really depends on your project. The watchdog is there to help you ensure that your program won't get "stuck" while executing code. -- If there is a chance that your program may hang during the boot-procedure, it may make sense to incorporate the watchdog there too.

That being said, I generally start the watchdog at the end of my boot-up procedures.

like image 127
Nate Avatar answered Dec 29 '22 21:12

Nate


Usually the WD (watchdog) is enabled after the boot-up procedure, because this is when the program enters its "loop" and periodically kicks the WD. During boot-up, by which I suppose you mean linear initialization of hardware and peripherals, there's much less periodicity in your code and hard to insert a WD kicking cycle.

like image 28
Eli Bendersky Avatar answered Dec 29 '22 20:12

Eli Bendersky