Remarks
-
User can query current watchdog timer counter by MiAPI Watchdog GetRange function. It can
optionally place in either main thread or monitoring thread as user likes.
◆Design Note
=======================================
1. Behavior after watchdog reset
When watchdog timer expires, it trigger a reset signal to system. It is up
to user how motherboard behaviors after it reset. To define the behavior,
user can enter BIOS setup menu(BIOS/chipset/PCH-IO Configuration/State After
G3) and choose the desired behavior:
(A) State After G3 : S0 State --> Reboot
(B) State After G3 : S5 State --> Shut down
2. WIndows Service
It is recommended to implement your Windows service for watchdog monitoring
Function. It is due to the UAC(User Account Control) limitation that these
MiAPI application must run under administrator's privilege. Windows service
can take advantage of starting service at Windows boot with administrator
privilege, so that user monitoring application can auto-start and bypass
UAC prompt everytime watchdog reset. A basic Windows service sample is
described in next section.
Windows Service Example
========================================
A service application is designed to be long running. Therefore, it usually
polls or monitors something in the system. The monitoring is set up in the
OnStart method. However, OnStart does not actually do the monitoring. The
OnStart method must return to the operating system after the service's operation
has begun. It must not loop forever or block.
A basic Windows service in C++ is demonstrated in this code sample:
https://code.msdn.microsoft.com/windowsapps/CppWindowsService-cacf4948
Based on this sample, we will illuminate the point where MiAPI APIs may place.
To set up a simple monitoring mechanism, It starts MiAPI and configure WDT in
OnStart. It also spawn a new thread to perform monitoring functions, which we
put user applications/routines for monitoring and refresh WDT periodically.
PT-S2000HX/HXC/LX/LXC Series User's Manual
91
Need help?
Do you have a question about the IPC Series and is the answer not in the manual?