cmd6686gx manual - RTD Embedded Technologies, Inc.
cmd6686gx manual - RTD Embedded Technologies, Inc.
cmd6686gx manual - RTD Embedded Technologies, Inc.
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Watchdog Timer Control<br />
The cpuModule includes a Watchdog Timer, which provides protection against programs "hanging",<br />
or getting stuck in an execution loop where they cannot respond correctly. When enabled, the<br />
Watchdog Timer must be periodically reset by your application program. If it is not reset before the<br />
time-out period of 1.2 seconds expires, it will cause a hardware reset of the cpuModule.<br />
Three functions have been implemented on the cpuModule for Watchdog Timer control. These are:<br />
• Watchdog Timer enable<br />
• Watchdog Timer disable<br />
• Watchdog Timer reset<br />
To enable the watchdog timer you must write a 1 to to Bit 0 of I/O register 1Eh. To ensure compatability<br />
with future designs, you should read the register and only change the bit you need to change.<br />
After you enable the watchdog timer, you must reset it at least once every 1.2 seconds by reading I/<br />
O 1Eh. The data read does not matter.<br />
To disable the watchdog timer you must write a 0 to to Bit 0 of I/O register 1Eh.<br />
Enabling the watchdog timer is illustrated in the following QuickBasic program fragment:<br />
temp = INP(&H1E)<br />
’Read I/O port 1Eh<br />
temp = temp OR 1 ’Set LSB to 1<br />
OUTPUT &H1E, temp ’Enable WDT<br />
When the watchdog timer is enabled it must be refreshed before it times out or it hardware reset the<br />
system. Refreshing the watchdog timer is illustrated in the following QuickBasic program fragment:<br />
temp = INP(&H1E)<br />
’Read I/O port 1Eh to refresh the WDT<br />
Disabling the watchdog timer is illustrated in the following QuickBasic program fragment:<br />
temp = INP(&H1E)<br />
’Read I/O port 1Eh<br />
temp = temp AND &HFE ’Clear LSB to 0<br />
OUTPUT &H1E, temp ’Disable WDT<br />
88