Closed AndrewCarterUK closed 4 years ago
The watchdog is not build to keep track of time, us a RealtimeClock for this purpose. Purpose of the Watchdog is to guard your process, and take an action incl reset in case something fails to update the timer. (ie never ending loops of stalled process).
Precision of longer WTD-times are not relevant in this case.
Hello, to be clear, we are using the RTC to keep track of time and not the watchdog.
The problem is that using the watchdog appears to interfere with the time retrieved from the RTC using the RTCZero library.
@javos65 @AndrewCarterUK same here, I am getting delay of my RTC when using watchdog, my short term workaround is that I update RTC time from internet every 10 min
Is there any better solution for this ?
Again: this is a watchdog timer, not an RTC. Precise timing is not the target, system stability is. If you need a time tick ie every 10.00234 seconds, use an RTC, not a watchdog... Sorry
@javos65 Hi, watchdog works just fine and thanks for that.
Rtc works fine and accuarately when not using watchdog. Once i start using watchdog i am seeing that my time taken from the rtc i use for other purpose start getting clock drift. So watchdog works but my time got from rtc is not accuarate anymore. When not using watchdog time from rtc is accurate anytime i read the time from rtc. Looks like there is a clock drift when using watchdog clear routine and watchdog is slowing down rtc.
Hi! I am currently experiencing the same problem, when trying to use the RTC while a watchdog is operating and being cleared. This problem appears to happen on both an Arduino MKR GSM and MKR WiFi. I don't know how to fix this issue either. Did you find a workaround for it? Thanks!
@miqbatalla No, I have not found any other than refreshing time from internet every X minutes.
We're using the RTCZero library.
We've done an experiment, as we noticed that we were getting unacceptable clock drift:
Every 15 seconds:
Doing this resulted in the RTC gaining about 24 seconds per hour.
Happy to help investigate this - but not sure where to start!
Thanks