Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent Arduinos from locking up #318

Closed
jamessynge opened this issue Jan 11, 2018 · 2 comments · Fixed by #1035
Closed

Prevent Arduinos from locking up #318

jamessynge opened this issue Jan 11, 2018 · 2 comments · Fixed by #1035
Labels
arduino Enhancement Hardware stale? Potentially stale issue that can be closed.
Milestone

Comments

@jamessynge
Copy link
Contributor

I screwed something up with the telemetry board on PAN006 a while agosuch that it wouldn't respond.
This should be fixed in current code, but it would be a good idea to keep ourselves from screwing up. One solution is a watchdog timer. See: https://tushev.org/articles/arduino/5/arduino-and-watchdog-timer

According to that page, this code would trigger a reset if loop() doesn't run every 8 seconds:

#include <avr/wdt.h>
void setup(){
wdt_enable(WDTO_8S);
}
void loop(){
//do stuff here
wdt_reset();
}
@wtgee
Copy link
Member

wtgee commented Jan 11, 2018

I played with the watchdog timer in the beginning (three years ago) and seem to remember I couldn't get it to work on the micro. Worth exploring again though.

@wtgee wtgee added the arduino label Jan 11, 2018
@kmeagle1515
Copy link
Contributor

@jamessynge @wtgee for timer specific threshold values are available. That mainly depends upon our requirement. So what threshold should be ideal for our system?

@wtgee wtgee added this to the V1.0 milestone Feb 16, 2020
@wtgee wtgee added Hardware stale? Potentially stale issue that can be closed. labels Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arduino Enhancement Hardware stale? Potentially stale issue that can be closed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants