Page 1 of 1

Software Reset

Posted: Fri Dec 30, 2011 7:36 am
by StuGotz
I'd like to add a custom menu entry to do a "reboot". Is this function safe?

Code: Select all

void(* resetFunc) (void) = 0; //declare reset function @ address 0

resetFunc();  //call reset
I found it here http://www.arduino.cc/cgi-bin/yabb2/YaB ... 1252179482

Thanks!

Re: Software Reset

Posted: Fri Dec 30, 2011 9:30 am
by rimai
The best solution for a force reboot is to enable WDT on your features file

Code: Select all

#define WDT
Then use this to reboot:

Code: Select all

delay(1000)
The watchdog will interpret this as a lock up and reboot the controller.