18/09/2003
HESC-UPS Manual
Tri-M Engineering
Tel:
800.665.5600, 604.945.9565
1407 Kebet Way, Unit 100
Fax:
604.945.95
Port Coquitlam, BC, V3C 6L3
E-mail:
Canada
Web
site:
www.tri-m.com
33
Section 11 : Implementing a smart “Watchdog Timer” on the Host CPU
A smart watchdog timer can be implemented using a couple of the HESC-UPS commands. If the Host CPU fails to
“tickle” the HESC within the watchdog interval, the HESC will turn off the outputs to the Host CPU, then turn the outputs
back on resulting in a “cold boot”. The watchdog interval, as well as the interval when the outputs are turned off can be
set.
The following steps must be taken to implement the watchdog function.
1. Set the command shut down time interval in the EEProm profile to a value larger than the required watchdog
interval. This interval is in seconds and can have a value up to 65535 seconds and can be set with the SCU.exe
utility from Tri-M Engineering.
2. Set the command start up time interval in the EEProm profile for the Host CPU to remain unpowered before
starting up again. This interval is in seconds and can have a value up to 65535 seconds and can be set with the
SCU.exe utility from Tri-M Engineering.
3. The Host CPU must continue to issue the two following commands to tickle the HESC at a rate greater than the
watchdog interval for normal operation to continue.
a. Command ShutDownCmd() with the desired watchdog interval will result in the HESC to initiate it’s
shutdown process. Any watchdog value larger than the interval set in step one will be changed to the
value set in step one.
b. Command PowerSupplyStatusCmd() must be issued after the ShutDownCmd() with the shutdown
request (SD_Req) flag and the start-up request (SU_Req) flag set. Good programming practice might be
to read the PowerSupplyStatusCmd() first; OR the SD_Req and the SU_Req bits to that value; then write
this value back to the HESC. The PowerSupplyStatusCmd() must be issued before the value set by the
ShutDownCmd() times out or the HESC will shut down and not restart.