Page 1 of 1

How to set ESP32 reset when there's crash issue like stack overflow?

Posted: Fri Mar 17, 2023 12:02 pm
by mehmet64
hello
how set panic handler behavior in ESP32////
my project with ESP32 crash after 4 or 5 hour in working how can set self restart it

Re: How to set ESP32 reset when there's crash issue like stack overflow?

Posted: Fri Mar 17, 2023 1:04 pm
by medelec35
Flowcode has an autosave function that can be enabled within Global settings > Application tab

Re: How to set ESP32 reset when there's crash issue like stack overflow?

Posted: Fri Mar 17, 2023 4:56 pm
by chipfryer27
Hi

I think mehmet64 might be meaning when his hardware crashes?

I don't have too much experience with the ESP32 but perhaps the Watch Dog Timer would assist?

Regards

Re: How to set ESP32 reset when there's crash issue like stack overflow?

Posted: Fri Mar 17, 2023 7:44 pm
by BenR
Hello,

When you say it's crashing what exactly is happening. Emg. Does the WiFi comms stop working etc? Could you do something like trying to detect the stalled condition and for example disconnect and reconnect the WiFi.

Re: How to set ESP32 reset when there's crash issue like stack overflow?

Posted: Fri Mar 17, 2023 7:59 pm
by medelec35
chipfryer27 wrote:
Fri Mar 17, 2023 4:56 pm
Hi

I think mehmet64 might be meaning when his hardware crashes?

I don't have too much experience with the ESP32 but perhaps the Watch Dog Timer would assist?

Regards
Yes, indeed.
Thank you I had misread the post.

Re: How to set ESP32 reset when there's crash issue like stack overflow?

Posted: Sat Mar 18, 2023 8:35 am
by mnfisher
I posted a small component that allows you to query the restart reason at viewtopic.php?f=3&t=1623&p=9450&hilit=E ... tart#p9450
You can then choose different actions after crash or power on etc.

Need to check why you're getting a crash ? Stack overflow shouldn't occur - do you have some recursive code with no 'end' condition?

Martin