I'd be interested to hear how many of you guys have experimented with the new watchdog feature yet, and if/how it worked out for you.
Any good examples of when it's kept your project running when it would otherwise have sat down?
I'd be interested to hear how many of you guys have experimented with the new watchdog feature yet, and if/how it worked out for you.
Any good examples of when it's kept your project running when it would otherwise have sat down?
I did not get a chance yet to play with this but was wondering if yield()
would reset the watchdog?
Ah, no, the watchdog is continuously reset with "ArduinoCloud.update()".
It's enabled by default, but you can turn it off if needs be.
Are you thinking of implementing it into an existing project or something?
it's just exploratory - no specific project
The ESP8266 runs a lot of utility functions in the background -- keeping WiFi connected, managing the TCP/IP stack, and performing other duties. Blocking these functions from running can cause the ESP8266 to crash and reset itself. So I've many codes where I use yield() when I want to block a process for a random, possible long time, and not have the board reset itself. Something like
while(condition) yield();
so I guess that my question was about forward compatibility and avoiding unexpected resets.
Absolutely welcome, this is the feature I was looking for in the last couple of months. I could workaround using "WDTZero" but this seems not to be compatible with the cloud anymore...
In order to save power and data, I do not use the cloud permanenetly so I would also need a way to reset the watchdog without the need for an "ArduinoCloud.update()".
Ah, excellent questions all! Let me ask around internally and see what we can find out for you @schwend...
Okay, sorry for the delay on this. So...
samd_watchdog_reset
on SAMD. However, we don't recommend using the internal API as it will change in the future.WDTZero
, it provides interesting capabilities that might find its way into the Arduino Cloud firmware stack at some point.As always, the challenge isn't so much about making it work for one platform, but for every supported platform.
So, in summary, you can still disable the internal watchdog via ArduinoIoTCloud.begin(ArduinoIoTPreferredConnection, false)
and there's a bit more info in the repository FAQ.
Hope this helps!
Many thanks for your feedback,
I took your advice and simply disabled the watchdog. To my surprise (and great satisfaction), the board did run smoothly without any "hang-up" for a couple of days ... This means to me that the reliability of the cloud functions has been greatly improved, which is even better than the need for a watchdog...
Anyway, to make it even safer, I would like to re-activate the watchdog, therefore, could you tell me what would be the code for " calling samd_watchdog_reset
?
I understand the challenge for implementing the functionalities of "WDTzero" in the cloud but anyway, I would strongly suggest that you realize it in a further FW update.
kind regards,
Hello again,
It happens here and there that the system "hangs-up" when calling "ArduinoCloud.update()". This means I have to re-activate the watchdog.
So let me re-iterate the question:
samd_watchdog_reset
?This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.