Software Reset

Do you have a question on how to do something.
Ask in here.
Post Reply
StuGotz
Posts: 95
Joined: Sat Oct 15, 2011 9:17 am

Software Reset

Post 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!
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Software Reset

Post 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.
Roberto.
Post Reply