2 s826_watchdogconfigread, 3 s826_watchdogenablewrite, S826_watchdogconfigread – Sensoray 826 User Manual
Page 67: S826_watchdogenablewrite

Quadlet
Register
Function
timing[0]
DELAY0
Timer0 interval. The program must kick the watchdog within this interval to prevent a watchdog
timeout. This must be set to a non-zero value; set to 1 for shortest possible delay.
timing[1]
DELAY1
Timer1 interval. This specifies the elapsed time from Timer1 timeout to Timer2 timeout. This must
be set to a non-zero value; set to 1 for shortest possible delay.
timing[2]
DELAY2
Timer2 interval. This specifies the elapsed time from Timer2 timeout to RST generator enable. This
must be set to a non-zero value; set to 1 for shortest possible delay.
timing[3]
PWIDTH
RST pulse width. This is ignored if PEN='0'.
timing[4]
PGAP
Time gap between RST pulses. This is ignored if PEN='0'.
Return Values
If the function succeeds, the return value is zero.
If the function fails, the return value is an error code.
Remarks
This function programs the watchdog configuration register and timing control registers. To ensure reliable operation, it
should be called only when the watchdog is disabled.
The function should only be called when the SWE bit is set (see S826_SafeWrenWrite). The function will fail without
notification (return S826_ERR_OK) if SWE=0 (see Section 10.1.1).
9.3.2 S826_WatchdogConfigRead
The S826_WatchdogConfigRead function reads the watchdog configuration.
int S826_WatchdogConfigRead(
uint board, // board identifier
uint *cfg, // configuration flags
uint timing[5] // time intervals
);
Parameters
board
826 board number. This must match the settings of the board's dip switches as described in section 2.2.
cfg
Pointer to buffer that will receive the watchdog configuration flags.
timing
Pointer to array of five quadlets that will receive the watchdog time intervals.
Return Values
If the function succeeds, the return value is zero.
If the function fails, the return value is an error code.
Remarks
See Section 9.3.1 for details about the returned cfg and timing values.
9.3.3 S826_WatchdogEnableWrite
The S826_WatchdogEnableWrite function enables or disables the watchdog system.
int S826_WatchdogEnableWrite(
uint board, // board identifier
uint enable // enable watchdog when true
);
826 Instruction Manual
62
Watchdog Timer