hi!,everyone: i found if i open the watchdog in the code, it reset the system according to the register CRV, can i close it before it reset the system?
hi!,everyone: i found if i open the watchdog in the code, it reset the system according to the register CRV, can i close it before it reset the system?
Hi,
If you are wondering about the possibility of disabling (in run-time) the watchdog after it has been started, that is not possible. The purpose of a watchdog is to ensure that your program continuously feeds the watchdog, to verify that your program runs as it should. Disabling it run-time is therefore a bad idea, and I would rather suggest integrating the watchdog fully into your program.
The only way to reset/disable the watchdog is to let it timeout and cause a system reset.
Cheers, Håkon
thank you very much i thinks you are right. if WDT can be disabled when it is running, program maybe run to disable WDT sometime, so it can't make sure the program gonging currately.
cheers, lei :)
I really don't see the reason for this.
If I have my reasons to disable, or change the CSV during run (say, only in a debug scenario in order to measuring a steady current consumption of the product) - why wouldn't you let me?
Do you think I am that bad programmer that I cannot be held responsible for setting and clearing the WDT?
Why is it optional in the first place? Just make us all use your design!
Another troubling scenario:
FW Version 1 assumes that feed always happen every 1 second.
FW Version 2 is more complex and feed can happen only once in 2 seconds.
After FW upgrade (i.e. OTA) you will always get a WDT event - since CRV and all other workarounds are locked for changing.
If you are so afraid of mistakenly disabling the WDT, decide that disable value is 0xBad1dea or something, but give the power to the developers!
I am absolutely with you on this!