Page 1 of 1
Restart if Guru Meditation Error
Posted: Fri Nov 01, 2019 2:13 pm
by jensknudsen
Is it possible to automatically restart the ESP if it experiences a Guru Meditation Error?
Sometimes my ESP freezes and the serial monitor shows Guru Meditation Error (+some description). This of course needs debugging in itself, but it happens quite rarely and I find it hard to recreate those bugs. So for now, it would be extremely useful if the ESP restarted instead of freesing.
Any clues?
Re: Restart if Guru Meditation Error
Posted: Fri Nov 01, 2019 5:46 pm
by ESP_Dazz
In menuconfig, the config option CONFIG_ESP32_PANIC should allow you to set the panic behavior to:
- Print registers and reboot
Re: Restart if Guru Meditation Error
Posted: Fri Nov 01, 2019 6:01 pm
by jensknudsen
Thank you for your reply!
I forgot to mention that I am using Arduino to compile.. Do you know how to configure this using Arduino?
Re: Restart if Guru Meditation Error
Posted: Mon Nov 04, 2019 9:43 am
by ESP_Dazz
It should already be configured to print and reboot on Arduino, at least according to the
sdkconfig file. Could you paste the serial output of the Guru Meditation error you're seeing?
Re: Restart if Guru Meditation Error
Posted: Mon Nov 04, 2019 9:59 am
by jensknudsen
Hi,
Yes, that seems to correct, is there any way of editing this?
Here is the output I got:
Gu Meditation Error: Core panic'ed (Interrupt wdt timeout on CPU1
The missing letters and formatting might suggest problems with power(??). However I did not get any brownout detection.
Re: Restart if Guru Meditation Error
Posted: Mon Nov 04, 2019 11:29 am
by ESP_Dazz
If configured to print and reboot, the log output should look something like this (notice how it prints "Rebooting" at the end).
Code: Select all
Hello World
Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x400d395c PS : 0x00060630 A0 : 0x800d0ab1 A1 : 0x3ffb4f10
A2 : 0x00000001 A3 : 0x00000001 A4 : 0x00000001 A5 : 0x00000001
A6 : 0x00060021 A7 : 0x00060023 A8 : 0x00000000 A9 : 0x3ffb4ef0
A10 : 0x0000000a A11 : 0x8001f880 A12 : 0x06ff1ff8 A13 : 0x00000000
A14 : 0x3ffaffe0 A15 : 0x3ffb6870 SAR : 0x00000014 EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffc
ELF file SHA256: 65fb33f22df59b8c8dd3dfcc1623e455b128afd6ea5d49090eb4dcafd83d2c2a
Backtrace: 0x400d3959:0x3ffb4f10 0x400d0aae:0x3ffb4f30 0x40086fd5:0x3ffb4f50
Rebooting...
If configured to print and halt, the log output should look something like this:
Code: Select all
Hello World
Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x400d395c PS : 0x00060630 A0 : 0x800d0ab1 A1 : 0x3ffb4f10
A2 : 0x00000001 A3 : 0x00000001 A4 : 0x00000001 A5 : 0x00000001
A6 : 0x00060021 A7 : 0x00060023 A8 : 0x00000000 A9 : 0x3ffb4ef0
A10 : 0x0000000a A11 : 0x8001f880 A12 : 0x06ff1ff8 A13 : 0x00000000
A14 : 0x3ffaffe0 A15 : 0x3ffb6870 SAR : 0x00000014 EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffc
ELF file SHA256: cb4f0853599e287873217f5050ca938ed45b0455011a4c37633b9138593bdb1a
Backtrace: 0x400d3959:0x3ffb4f10 0x400d0aae:0x3ffb4f30 0x40086fd9:0x3ffb4f50
CPU halted.
If you see the log output print "Rebooting" and the ESP32 is not rebooting, then it could be an entirely different issue.
Re: Restart if Guru Meditation Error
Posted: Mon Nov 11, 2019 11:02 am
by jensknudsen
Ok, I will have to do some more testing. Thanks for your reply:)
Re: Restart if Guru Meditation Error
Posted: Mon Nov 11, 2019 8:16 pm
by idahowalker
You might want to hunt down and install the "esp exception decoder arduino", it could provide some help with hunting down the issue.