Forum Index
OpenWatchdog(8/9) Fails

 
Author Message
mikep



Joined: 24 Sep 2005
Location: Austin, TX

Posted: 15 July 2008, 0:20 AM    Post subject: OpenWatchdog(8/9) Fails

The following program works correctly on ZX-24n, ZX-24ne, and ZX-1281e.
Code:
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.
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Location: Portland, OR

Posted: 15 July 2008, 2:36 AM    Post subject: Re: OpenWatchdog(8/9) Fails

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.
Back to top
Display posts from previous:   
Page 1 of 1

 



ZBasic Microcontrollers Home
All content Copyright © 2005, 2006, 2007, 2008 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group