Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Auto Reset in Arduino Uno

Status
Not open for further replies.

andihong

Member level 1
Joined
May 13, 2015
Messages
33
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
216
i have a problem with arduino that stop working with gsm shield, gsm shield not even sending datas after several hours.


is there any way to auto reset arduino every 60 minutes ? with code actually. thanks before. :D
 

FenTrac

Full Member level 4
Joined
Jul 6, 2014
Messages
204
Helped
37
Reputation
74
Reaction score
39
Trophy points
28
Location
West Coast
Activity points
1,761
The ATmega328 has a watchdog timer that can be used to reset or interrupt the processor. Refer to the ATmega328 user manual for instructions on how to use it. Basically, the program that is running continually restarts the watchdog timer before it times out. If the program fails to restart the watchdog timer in time, it times out and resets or interrupts the processor, depending on how it is configured.
 

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,348
Reputation
4,690
Reaction score
2,274
Trophy points
1,413
Location
Southwest, USA
Activity points
62,506
While FenTrac's recommendation for utilizing the device watchdog timer is certainly valid, if you find the system repeatedly suffers from such "lockups" then it would be prudent for you to determine what exactly is causing the issue and modify the code or hardware accordingly. Watchdog timers are intend as a last resort "fail-safe" when the unexpected occurs, they are not intend to routinely handle issues which occur with regularity.

As Arduino code can be difficult to debug, especially with issues which occur intermittently, you might consider implementing a trace stack in some form of nonvolatile storage, which is undated regularly with data which can help determine when and why these lockups occur.

BigDog
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top