[SOLVED] I'm wondering if the ESP32 can call a method right before it crashes
Posted: Wed Jun 12, 2019 10:32 am
Hello !
I am playing around with me-no-dev's ESPAsyncWebServer library and it doesn't work all the time.
If the ESP crashes for some reason, there's a chance that the WebServer will not work on the next boot, so I have to manually reset by pressing the EN Button.
That's why I was wondering if I can insert a server.reset() right before any ESP crash, hardware reset, software reset.
In case of a hardware reset, pressing EN Button pretty much fixes everything that went wrong in the previous iteration, like heap memory.
Also, it's easy to write server.reset() before ESP.restart().
But I have no idea what to do when it crashes.
Any thoughts ?
Thank you !
I am playing around with me-no-dev's ESPAsyncWebServer library and it doesn't work all the time.
If the ESP crashes for some reason, there's a chance that the WebServer will not work on the next boot, so I have to manually reset by pressing the EN Button.
That's why I was wondering if I can insert a server.reset() right before any ESP crash, hardware reset, software reset.
In case of a hardware reset, pressing EN Button pretty much fixes everything that went wrong in the previous iteration, like heap memory.
Also, it's easy to write server.reset() before ESP.restart().
But I have no idea what to do when it crashes.
Any thoughts ?
Thank you !