4.9 Using the Watchdog Timer
The watchdog timer of the I-7188XC(D) is fixed at 0.8 seconds for
MiniOS7 2.0. When the I-7188XC(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-7188XC(D).
The MiniOS7 of the I-7188XC(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-7188XC(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-7188XC(D) module. The sample code is as follows:
InitLib(); /* Initiate the 7188xc library */
EnableWDT();
while(!quit)
{
RefreshWDT();
User_function();
}
DisableWDT();
The
IsResetByWatchDogTimer()
function is used to check whether the
I-7188XC(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-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) ---
64
Содержание I-7188XC Series
Страница 87: ...I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 87...
Страница 136: ...I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 136...
Страница 142: ...Step 8 Make the project I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 142...
Страница 149: ...Step 8 Rebuild the project I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 149...