Discussion forum for the BasicX family of microcontroller chips.
|
Hi guy, I understand that the Watchdog is capable of reseting the processor after a maximum of 2048ms. However, my application require this timing to be approximately 10sec. Hence, I am trying to use Timer to accomplish this task, as follow: T1 = Timer Call ABC [...] T2 = Timer DT = T1 - T2 ' if there is a jam If (DT > 10.0) THEN Call ResetProcessor() End If But eventually, the ResetProcessor will still makes use of Watchdog to reset the processor, thus I am wondering is there a method to extend the maximum timing used in Watchdog to say 10sec. Please kindly advise. Thanks alot. |
|
|
|
From: <> > I understand that the Watchdog is capable of reseting > the processor after a maximum of 2048ms. However, my > application require this timing to be approximately > 10sec. Hence, I am trying to use Timer to accomplish > this task, as follow: [...] > If (DT > 10.0) THEN > Call ResetProcessor() > End If > > But eventually, the ResetProcessor will still makes > use of Watchdog to reset the processor, thus I am > wondering is there a method to extend the maximum > timing used in Watchdog to say 10sec. I'm not sure I understand the question. It looks like this code will reset the processor after 10 s -- is the code not working right? Regarding the watchdog timing, the 2048 ms is a hardware limitation in the processor itself. Short of changing processors, I don't know of a way to extend the timeout limit. -- Frank Manning -- NetMedia, Inc. |
|
|
|
Hummm, I read this as meaning that the call to ResetProcessor() is tacking on some time to the initial 10 seconds based on the watchdog timer value, resulting in the 10 second requirement being exceeded or that the processor is resetting long before the 10.0 seconds. Like at every 2 seconds. As the example is posted, the maximum timer value would be anywhere from 11.xxxx seconds to 11.9999+ seconds if based on the highest watchdog setting of 2048 (2 secs appox). That would be exceeding the 10.0 seconds required by the application. If this is the case the watchdog interval should be set to the lowest setting and the application modified to respond to 9.nnnn seconds plus the value used on the OpenWatchdog(nnnn) call. I would think it would be more along the lines of If (DT > (9.xxxx + nnnn) THEN Call OpenWatchdog(nnnn) Call ResetProcessor() End If where nnnn is the desired watchdog value as stated in the manual. That would get him closer to 10 seconds but never exceed it. I say closer to, since OpenWatchdog calls uses approximation values on some of the settings. In my example, I also placed the OpenWatchdog call inside that IF block, otherwise the watchdog function takes over long before the 10 seconds are up since 2 seconds (appox) is the maximum resolution value, if coded outside of the IF. The processor would be resetting itself with 8.xxxx seconds to spare long before the 10.0 seconds are up (2048 WD setting) if coded elsewhere. Might even consider using (8.xxxx + nnnn) even, since there's gonna be some time used up in system overhead as the instructions are fetched and executed by the OS. Its gonna be close but never right-on the timing mark of an exact 10.0 seconds. There is always some bxOS overhead times to consider. .db. -----Original Message----- From: Frank Manning [mailto:] Sent: Thursday, January 09, 2003 9:47 AM To: Subject: Re: [BasicX] Watchdog Vs Timer? From: <> > I understand that the Watchdog is capable of reseting > the processor after a maximum of 2048ms. However, my > application require this timing to be approximately > 10sec. Hence, I am trying to use Timer to accomplish > this task, as follow: [...] > If (DT > 10.0) THEN > Call ResetProcessor() > End If > > But eventually, the ResetProcessor will still makes > use of Watchdog to reset the processor, thus I am > wondering is there a method to extend the maximum > timing used in Watchdog to say 10sec. I'm not sure I understand the question. It looks like this code will reset the processor after 10 s -- is the code not working right? Regarding the watchdog timing, the 2048 ms is a hardware limitation in the processor itself. Short of changing processors, I don't know of a way to extend the timeout limit. -- Frank Manning -- NetMedia, Inc. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [Non-text portions of this message have been removed] |