Hello,
I have a problem with ESP32 which randomly throw double exceptions and then stuck. While i was searching for a solution, i encountered this phrase from a github issue. The phrase is "we will modify the DoubleException vector to cause an RTC watchdog reset instead of entering the panic handler. This will provide less information but will be a better safeguard against the device being locked up".
Link to the issue is https://github.com/espressif/esp-idf/issues/3810.
I want to know how to do this changing vector thing.
Thank you
Changing exception vector to cause RTC WDT reset
-
- Posts: 13
- Joined: Thu Jul 30, 2020 2:40 pm
-
- Posts: 828
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Changing exception vector to cause RTC WDT reset
Changing the error from a double exception to a wdt timeout is still an error.
Double exception means you have used up so much memory that there isn't enough left to run the panic routine. This is not random. You are not managing your memory properly. This typically means that you are passing around large structures between functions, which causes them to be duplicated over and over. Pass pointers, not strings.
Double exception means you have used up so much memory that there isn't enough left to run the panic routine. This is not random. You are not managing your memory properly. This typically means that you are passing around large structures between functions, which causes them to be duplicated over and over. Pass pointers, not strings.
-
- Posts: 9730
- Joined: Thu Nov 26, 2015 4:08 am
Re: Changing exception vector to cause RTC WDT reset
Either that, or it's a hardware issue; most likely a power supply problem in that case. You don't normally get double exceptions.
-
- Posts: 13
- Joined: Thu Jul 30, 2020 2:40 pm
Re: Changing exception vector to cause RTC WDT reset
Does double exception occures only when itis unable to run panic handler?(except hardware issues).
You say it is due to running out of memory. So if that the case, ,running memory monitoring functions like stackhighwatermark, freeheap in each task should show the memory overflow when it happened, right?.
I use arduinoJson library in arduino ide. It uses dynamic memory allocation for json strings. Could that be the problem?. But documentation says it take care of the dynamic allocation.
.
In my code i pass struct pointers as you said. Not the whole struct.
Finally, if i am unable to find a way around this, is it ok to use external watchdog ic to hard reset the esp32?
Thank you.
You say it is due to running out of memory. So if that the case, ,running memory monitoring functions like stackhighwatermark, freeheap in each task should show the memory overflow when it happened, right?.
I use arduinoJson library in arduino ide. It uses dynamic memory allocation for json strings. Could that be the problem?. But documentation says it take care of the dynamic allocation.
.
In my code i pass struct pointers as you said. Not the whole struct.
Finally, if i am unable to find a way around this, is it ok to use external watchdog ic to hard reset the esp32?
Thank you.
Who is online
Users browsing this forum: No registered users and 85 guests