Important Program, You must keep it running, and always care about its status-it cannot be deadlocked. Of course, if a master program encounters a deadlock, it must be a design or programming mistake. The first thing we should do is to find out this bug. However, if the time is too short and the bug is "Erratic", we should first write a software "Watchdog", so we should be in a hurry for the moment.
Requirement Description of "Watchdog": the "Watchdog" does not appear in the interface window and is concealed. It regularly determines whether the target process is running in the current system. If not, it starts the target process; determine whether the target process has "no response". If yes, terminate the target process. If the number of "no response" of the target process exceeds a certain number, restart the computer system. this is for Windows.
If it is the MCU's watchdog, it is actually an automatic reset program. If the main program does not send signals to this automatic reset program within a certain period of time, this program will enable the microcontroller to automatically reset.