I have tried Enable_HW_WDT() function but it is not worked. It is mentioned In user manual that Watchdog Timer will be enabled for 2 Seconds timeout after reset, but it is not happening…
please suggest…
Please upgrade to Dynamic C 10.72A for any work you’re doing, to ensure that you won’t run into any known/fixed issues. What code are you using to test?
Be aware that the periodic interrupt will hit that watchdog, so it will only timeout if your program disables interrupts for an extended period of time.
You’re probably better off using virtual watchdogs. Take a look at Samples/VDRIVER/VIRT_WD.C. One benefit is that you can have a timer for various portions of your program to ensure that everything is running correctly. Leave the underlying hardware watchdog alone and it will ensure that the periodic interrupt is getting hit.
hi Tom,
Thanks for the reply,
i figured it out after i posted my query that the periodic interrupt will hit that watchdog before time out condition as u said.
So i commented the Hitwd() routine in library file and continuously called in my code in while loop, so far code is running fine. is it okay to modify the library file?? otherwise i will try with timer…
It’s OK to modify libraries, but it’s generally better if you don’t. That way, you can upgrade to newer versions of the compiler and not need to port your library changes. Also, you run the risk of introducing bugs or unintended side effects into the library, as other code may be dependent on that functionality.
Try to accomplish your goal with the virtual watchdogs.