ESP32 performing a software reset

In this example we will show you how to perform a software reset on the ESP32 using the Arduino IDE. Luckily the ESP32 has a method in its library that makes this easy to do. You simply need to call the restart() method

Code


void setup()
{
Serial.begin(115200);
Serial.println("Restarting in 10 seconds");
delay(10000);
ESP.restart();
}

void loop()
{
}

Output

Open the serial monitor

E (102535) wifi: esp_wifi_stop 802 wifi is not init
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0008,len:8
load:0x3fff0010,len:160
load:0x40078000,len:10632
load:0x40080000,len:252
entry 0x40080034
Restarting in 10 seconds
E (102535) wifi: esp_wifi_stop 802 wifi is not init
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0008,len:8
load:0x3fff0010,len:160
load:0x40078000,len:10632
load:0x40080000,len:252
entry 0x40080034
Restarting in 10 seconds

SHARE
Previous articleESP32 and FreeRTOS example create a task
Next articleESP32 and BMP085 example