Using The Watchdog Timer - ICP DAS USA I-7188XA Series User Manual

Hide thumbs Also See for I-7188XA Series:
Table of Contents

Advertisement

4.9 Using the Watchdog Timer

The watchdog timer of the I-7188XA(D) is fixed at 0.8 seconds for
MiniOS7 2.0. When the I-7188XA(D) is first powered on, the watchdog
timer will be always enabled. If the watchdog timer is not refreshed
within 0.8 seconds, it will reboot the I-7188XA(D).
The MiniOS7 of the I-7188XA(D) will automatically refresh the watchdog
after being powered on. User programs can call the software driver to
stop the MinOS7 from refreshing the watchdog timer, but the program
must then refresh the watchdog timer manually. If the program does not
refresh the watchdog timer every 0.8 seconds, it will cause the
I-7188XA(D) to reboot.
The program must then ask the MiniOS7 to reset the watchdog timer,
then stop and return to the MiniOS7 command prompt.
Use the EnableWDT() function to enable the watchdog timer or use the
DisableWDT() function to disable it. After the watchdog is enabled, the
program should call the RefreshWDT() function before the timer count
reaches 0.8 seconds, otherwise the watchdog will reboot the
I-7188XA(D) module. The sample code is as follows:
EnableWDT();
while(!quit)
{
RefreshWDT();
User_function();
}
DisableWDT();
The IsResetByWatchDogTimer() function is used to check whether the
I-7188XA(D) module has been rebooted by the watchdog timer. This
function must be inserted at the beginning of program. The sample code
is as follows:
I-7188XA Series User's Manual ( Ver1.2, Feb/2014, 7MH-019-10 ) ---
68

Advertisement

Table of Contents
loading

This manual is also suitable for:

I-7188xaI-7188xbI-7188xcI-7188I-7188xadI-7188xbd ... Show all

Table of Contents