Software reset ESP8266

This tutorial shows hot to software reset ESP8266 in Arduino IDE. This sketch/example shows software reset using simple command ESP.restart() or ESP.reset().

Software reset for ESP8266 is required when you get trouble to connect WiFi router.

Lets see the use of software restart. This example program will show you software reset in a loop before it reaches to its max value.

ESP.reset() is a hard reset and can leave some of the registers in the old state which can lead to problems, its more or less like the reset button on the PC.

ESP.restart() tells the SDK to reboot, so its a more clean reboot.

Upload above program. after uploading open serial monitor you will find below reset

esp software reset hang issue
ESP software reset results

You will notice that it resets the ESP but wont start the program again. this is small but it is caused after only serial upload.

the boot mode:(1,7) problem is known and only happens at the first restart after serial flashing. if you do one manual reboot by power or RST pin all will work.

ESP8266 Software Reset Working after manual reset
ESP8266 Software Reset Working after manual reset

After manual reset the program will work fine as expected.

 

Leave a Reply