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 !
[SOLVED] I'm wondering if the ESP32 can call a method right before it crashes
-
- Posts: 160
- Joined: Thu Jan 31, 2019 2:32 pm
[SOLVED] I'm wondering if the ESP32 can call a method right before it crashes
Last edited by GeorgeFlorian1 on Thu Jun 13, 2019 9:22 am, edited 1 time in total.
-
- Posts: 9729
- Joined: Thu Nov 26, 2015 4:08 am
Re: I'm wondering if the ESP32 can call a method right before it crashes
No. A crash per definition means the execution environment is unstable. If the ESP32 could happily continue running, there would be no reason for it to crash/reboot.
-
- Posts: 160
- Joined: Thu Jan 31, 2019 2:32 pm
Re: I'm wondering if the ESP32 can call a method right before it crashes
I thought so. Thank you !ESP_Sprite wrote: ↑Wed Jun 12, 2019 10:48 amNo. A crash per definition means the execution environment is unstable. If the ESP32 could happily continue running, there would be no reason for it to crash/reboot.
Re: [SOLVED] I'm wondering if the ESP32 can call a method right before it crashes
Probably its not what you are looking for, but in freertos you have stack overflow hook, which can be called right before crash (in 1 particualr case):
https://www.freertos.org/Stacks-and-sta ... cking.html
https://www.freertos.org/Stacks-and-sta ... cking.html
Who is online
Users browsing this forum: No registered users and 65 guests