WATCHDOG timeout
WATCHDOG OFF
Starts the watchdog timer which can be used to restart the Maximite in the event of a programming or other error that halts a running program. This can be important in an unattended control situation.
‘timeout’ is the time in milliseconds (mS) before a restart is forced. This command should be placed in strategic locations in the running BASIC program to constantly reset the timer and therefore prevent it from counting down to zero.
If the timer count does reach zero (perhaps because the BASIC program has stopped running) the PIC32 processor will be automatically rebooted. When MMBasic is restarted it will then attempt to run the program RESTART.BAS which can be used to recover the situation before using RUN or CHAIN to run the main program.
At any time WATCHDOG OFF can be used to disable the watchdog timer (this is the default on a reset or power up).
See also:
CHAIN
RUN
Leave a Reply