background image

35

Chapter 4  

4.7  WatchSystem

Path:

C:\Program Files\ADVANTECH\Watchdog\Example\Console\WatchSystem\Enable-
Disable.cpp 

Purpose: Enable watchdog timer function under System Mode. 

You can refer to the source code of “SetMode” to change mode to System 
Mode.

Summary of Contents for Watchdog Timer UNO-2171

Page 1: ...Watchdog Timer UNO 2170 UNO 2171 UNO 205XE User Manual ...

Page 2: ... or by any means without the prior written permission of Advantech Co Ltd Information provided in this manual is intended to be accurate and reli able However Advantech Co Ltd assumes no responsibility for its use nor for any infringements of the rights of third parties which may result from its use Acknowledgements Intel and Pentium are trademarks of Intel Corporation Microsoft Windows and MS DOS...

Page 3: ...not installed and used in accordance with the instruction manual may cause harmful interference to radio communications Opera tion of this equipment in a residential area is likely to cause harmful inter ference in which case the user will be required to correct the interference at his own expense Technical Support and Assistance Step 1 Visit the Advantech web site at www advantech com support whe...

Page 4: ...UNO Watchdog Timer User Manual iv ...

Page 5: ... 1 3 Event Log Database Operations 12 2 1 4 Abort Tag 16 Chapter 3 Function API s 18 3 1 Error Codes Returned by Functions 18 3 2 Data Structures 18 3 2 1 Watchdog Driver Interfaces 19 Chapter 4 Example Call Flows 28 4 1 ElapsedTme 28 4 2 RebootMachine 29 4 3 Setlog 30 4 4 Setmode 31 4 5 TimerSpan 32 4 6 WatchApplication 33 4 7 WatchSystem 35 ...

Page 6: ...UNO Watchdog Timer User Manual vi ...

Page 7: ...2 CHAPTER 1 Installation This chapter introduces how to install UNO 2170 UNO 2171 and UNO 205XE Watchdog timer driver under Windows 2K XP platform ...

Page 8: ...apter 1 Installation Step1 Insert the UNO 2000 Driver and Utility CD in the CD ROM and execute AdvWDT exe from following path UNO 2170 UNO 2171 and UNO 205XE Driver Watchdog Timer Win2K XP Click the Next button to install watchdog timer ...

Page 9: ...3 Chapter1 Step2 Enter your name and company and press Next Step3 For UNO 2170 UNO 2171 and UNO 205XE please select Advantech W83627HF WDT and then press the Next button for next step ...

Page 10: ...UNO Watchdog Timer User Manual 4 Step4 Select Typical the watchdog timer driver will be installed with the most common options Recommended for most users Step 5 Press Next to start the installation ...

Page 11: ... the watchdog timer installation If UNO 2170 UNO 2171 and UNO 205XE watchdog timer is installed successfully the relevant applications and samples will be placed in following path C Program Files ADVAN TECH Watchdog Step 7 Press OK to reboot the system ...

Page 12: ...UNO Watchdog Timer User Manual 6 ...

Page 13: ...2 CHAPTER 2 Configuration This chapter introduces how to use and configure the watchdog timer function Y ou can execute the Watchdog Timer Configuration in Control Panel ...

Page 14: ...three tags in Advantech Watchdog Service Configuration includ ing General Setting and About General Tag Display general information on the watchdog service Setting Tag Display setting information on the watchdog service About Tag Display the copyright information of the watchdog service ...

Page 15: ...play Winbond W83627HF Running Status display the watchdog current status Enabled or Disabled Elapsed Time The elapsed time from when the watchdog is enabled If the watchdog is disabled elapsed time will be 00 hour 00 minute 00 second Start Watchdog Serviced on Boot If the this check box is selected and the settings is applied by the Apply button on the main dialog then the Advantech watchdog servi...

Page 16: ...p Service if the user left clicks the button then the Advan tech watchdog service will be stopped if this operation succeeds then the caption of this button will be changed to Start Service otherwise the caption will not change a piece of warring message will popup to notify the user that the service can not be stopped now ...

Page 17: ...boot in a specified time period Definitions System mode watchdog timer is running in Windows background If the hardware is hung up it will reboot system automatically Application mode watchdog timer will be enabling when you call the APIs within your application Further information about the watchdog timer APIs please refer to Chapter 3 3 Log Event If this check box is selected and press Apply but...

Page 18: ... able only when the watchdog runs in application watch mode and the watchdog is enabled 7 Reboot Button Reboot the machine by no strobe the watchdog hardware This button is not available when the watchdog is disabled If the watchdog is enabled and the user left clicks this Reboot button then all the three buttons Enable Disable Strobe and Reboot becomes grayed no operations can cancel the rebootin...

Page 19: ...13 Chapter2 Step2 Press Apply Step3 Press Enable ...

Page 20: ...UNO Watchdog Timer User Manual 14 Step4 Open Control Panel and then click Administrative Tools Step5 Click Event Viewer ...

Page 21: ...15 Chapter2 Step6 Click the item AdsWatchdog you can view the event message ...

Page 22: ...UNO Watchdog Timer User Manual 16 2 1 4 Abort Tag This tag displays the copyright information of the watchdog timer service ...

Page 23: ...2 CHAPTER 3 Function API s ...

Page 24: ... 1 Description 1 WATCH_MODE_SYSTEM Watch the whole system the feed dog thread is supplied in the SYS driver 2 WATCH_MODE_APPLICATION Watch the specified application the user should supply the user thread to feed the dog define ADS_WA TCHDOG_CHIPSET_UNKNOWN 0 define ADS_WA TCHDOG_CHIPSET_SOM443 1 define ADS_WA TCHDOG_CHIPSET_W83977AF 2 define ADS_WA TCHDOG_CHIPSET_W83627HF 3 ...

Page 25: ...TYPE_W83977AF Winbond SuperIO W83977AF watchdog Chip 2 WATCHDOG_TYPE_W83627HF Winbond SuperIO W83627HF watchdog Chip 3 WATCHDOG_TYPE_SOM443 The 443 standard watchdog Chip 3 2 1 Watchdog Driver Interfaces LONG WDT_Init LONG o_hHandle Description Initialize the watchdog Input Parameters 1 o_hHandle Handle of the watchdog driver Return Values 1 ADS_WATCHDOG_ERROR_SUCCESS operation succeed 2 ADS_WATCH...

Page 26: ...ID_HANDLE Invalid device handle LONG WDT_Enable LONG i_hHandle Description Enable the watchdog Input Parameters 1 i_hHandle Handle of the watchdog driver Return Values 1 ADS_WATCHDOG_ERROR_SUCCESS operation succeed 2 ADS_WATCHDOG_ERROR_INV ALID_HANDLE Invalid device handle LONG WDT_Disable LONG i_hHandle Description Disable the watchdog Input Parameters 1 i_hHandle Handle of the watchdog driver Re...

Page 27: ...s running now and can not change mode LONG WDT_GetMode LONG i_hHandle WatchMode o_pWatchMode Description Get the current running mode of the watchdog Input Parameters 1 i_hHandle Handle of the watchdog driver 2 o_pWatchMode The current watch mode of the watchdog Return Values 1 ADS_WATCHDOG_ERROR_SUCCESS operation succeed 2 ADS_WATCHDOG_ERROR_INV ALID_HANDLE Invalid device handle LONG WDT_SetTimer...

Page 28: ...dog driver 2 o_pIndex The timer span index 3 o_pValue Current time span value of watchdog timer Return Values 1 ADS_WATCHDOG_ERROR_SUCCESS operation succeed 2 ADS_WATCHDOG_ERROR_INV ALID_HANDLE Invalid device handle 3 ADS_WATCHDOG_ERROR_WDT_NOTRUNNING Watchdog not running now LONG WDT_Reboot LONG i_hHandle Description Reboot the machine by the watchdog Input Parameters 1 i_hHandle Handle of the wa...

Page 29: ...type Input Parameters 1 i_hHandle Handle of the watchdog driver 2 i_ watchdogType The type of the watchdog Return Values 1 ADS_WATCHDOG_ERROR_SUCCESS operation succeed 2 ADS_WATCHDOG_ERROR_INV ALID_HANDLE Invalid device handle LONG WDT_GetType LONG i_hHandle WatchdogType o_pWatchdogType Description Get the watchdog type Input Parameters 1 i_hHandle Handle of the watchdog driver 2 o_pWatchdogType T...

Page 30: ...ble and Reboot to be logged into the system event base or not Input Parameters 1 i_hHandle Handle of the watchdog driver 2 i_bLog TRUE for log the three operations into system base FALSE for not logging Return Values 1 ADS_WATCHDOG_ERROR_SUCCESS operation succeed 2 ADS_WATCHDOG_ERROR_INV ALID_HANDLE Invalid device handle 3 ADS_WATCHDOG_ERROR_WDT_RUNNING Watchdog is run ning now LONG WDT_IsLogged L...

Page 31: ...ERROR_SUCCESS operation succeed 2 ADS_WATCHDOG_ERROR_INV ALID_HANDLE Invalid device handle LONG WDT_GetTimerSpanDescription LONG i_hHandle DWORD i_dwIndex LPTSTR o_pDescription Description Get the description of the specified timer span Input Parameters 1 i_hHandle Handle of the watchdog driver 2 i_dwIndex The timer span index 3 o_pDescription The description of the specified timer index The memor...

Page 32: ... of the watchdog driver 2 i_lErrCode The error code returned by a function call 3 o_pErrMsg The pointer to a buffer to store the error message associ ated with a specified error code The memory pointed by this pointer should be allocated and initialized before transferred into this function as well should be de allocated outside this function The buffer size should be large enough to load 64 chara...

Page 33: ...2 CHAPTER 4 Example Call Flows ...

Page 34: ...Watchdog Timer User Manual 28 Chapter 4 Example Call Flows 4 1 ElapsedTme Path C Program Files ADV ANTECH Watchdog Example Console Elapsed Time Elapsedtime cpp Purpose Get the elapsed time of watchdog timer ...

Page 35: ...29 Chapter4 4 2 RebootMachine Path C Program Files ADV ANTECH Watchdog Example Console Rebootma chine Rebootmachine cpp Purpose Describe the process of reboot machine if enable watchdog timer ...

Page 36: ...UNO Watchdog Timer User Manual 30 4 3 Setlog Path C Program Files ADV ANTECH Watchdog Example Console Setlog Set log cpp Purpose Describe how to record the watchdog timer history in event log ...

Page 37: ...31 Chapter4 4 4 Setmode Path C Program Files ADV ANTECH Watchdog Example Console Setmode Set mode cpp Purpose Describe how to switch the mode of watchdog timer system mode or application mode ...

Page 38: ...UNO Watchdog Timer User Manual 32 4 5 TimerSpan Path C Program Files ADV ANTECH Watchdog Example Console SetTimer Span Timerspan cpp Purpose Define how to set the time span of watchdog timer ...

Page 39: ...Path C Program Files ADV ANTECH Watchdog Example Console WatchApplica tion EnableDisable cpp Purpose Enable watchdog timer function under Application Mode Y ou can refer to the source code of SetMode to change mode to Application Mode ...

Page 40: ...UNO Watchdog Timer User Manual 34 ...

Page 41: ...stem Path C Program Files ADV ANTECH Watchdog Example Console WatchSystem Enable Disable cpp Purpose Enable watchdog timer function under System Mode Y ou can refer to the source code of SetMode to change mode to System Mode ...

Page 42: ...UNO Watchdog Timer User Manual 36 ...

Reviews: