Page 1 of 1

OpenWatchdog(8/9) Fails

Posted: 14 July 2008, 17:20 PM
by mikep
The following program works correctly on ZX-24n, ZX-24ne, and ZX-1281e.

Code: Select all

Sub Main()
	Debug.Print "start"
	Call OpenWatchDog(7)
	Do
		Call WatchDog()
		Call Sleep(2.0)
		Debug.Print "wakeup"
	Loop
End Sub
However if 8 or 9 is used as a parameter to OpenWatchdog then the processor continually resets itself.

Re: OpenWatchdog(8/9) Fails

Posted: 14 July 2008, 19:36 PM
by dkinzer
mikep wrote:However if 8 or 9 is used as a parameter to OpenWatchdog then the processor continually resets itself.
Confirmed. In actuality, 8 and 9 have the same effect as 0 and 1 - too fast for the periodic watchdog resets thus yielding the continual reset behavior observed..

The workaround is to use &H20 and &H21 in place of 8 and 9, respectively.