Ideas about hard resetting ESP32 through code?

Hi all,

I need to hard reset an ESP32 through code.

On the ESP8266 it has ESP.reset (hard reset) and ESP.restart (soft reset), but on the ESP32 it only has the ESP.restart (soft reset) command!

Does anyone know how to hard reset an ESP32 through code?

Any help would be awesome!



I need to hard reset an ESP32 through code.

Let's start with the obvious question.

Why do you need to do this ?

Hi UKHeliBob!

That is a very good question!

I need to do this because I am using the WiFiManager library, and to reset it's credentials I need to run a "reset credentials command" and then fully reboot the ESP32 (no, a ESP.restart does not work).

I would do it like this if I was using an ESP8266:

    wifiManager.resetSettings(); //reset all saved credentials
    ESP.reset(); //restart the ESP

Sorry for not providing this information in the first place!