This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
可以实现检测其他任务的功能,程序运行正常的时候,定时触发该回调喂狗;假如程序出现了问题,此回调不会被触发,再次超时以后就重置,看下面解释:
In this basic watchdog example, the application is expected to define a Watchdog callback function and start the Watchdog timer by calling Watchdog_open(). If needed, Watchdog_setReload() may be called to change the timeout period. If all monitored tasks are doing alright, Watchdog_clear() should be called regularly to reload the counter so as to restart the timeout period and to avoid the Watchdog interrupt being triggered. If the Watchdog_clear() is missed and the Watchdog timer is allowed to timeout, the user-defined callback function is called. In this function, the user may do whatever is appropriate for the application. Here are some suggestions: