-->
Page 1 of 2

Software Restart

PostPosted: Sun Mar 29, 2015 5:06 pm
by andrew melvin
From using NodeMCU I know it is possible to give a command to software restart the module.

Is there a command for the arduino IDE...

By the way guys, thank you so much for this. I'm creating all sorts of stuff, that node would just not let me do! Thanks for all the hard work!

A

Re: Software Restart

PostPosted: Sun Mar 29, 2015 5:56 pm
by igrr
You can call C function abort(); which will cause a WDT reset in about a second.
There's also a function in the SDK, system_restart.
You can call it like this:
Code: Select allextern "C" {
#include "user_interface.h"
}

// somewhere later in the code...
system_restart();

Re: Software Restart

PostPosted: Mon Mar 30, 2015 2:23 am
by andrew melvin
Thank you :mrgreen: :D

Re: Software Restart

PostPosted: Wed Apr 01, 2015 2:24 am
by uhrheber
Speaking of watchdog timer, it seems that it is reset automatically from the SDK code running in the background.
Can I disable this and reset the WDT manually from the user code (in loop()), so the module will restart when the user code hangs?