ESP32 resetEsp32 reset due to interrupt

Why I get a reset although if I commented out all my code and only regular line as Serila.begin(115200); is compile, when I program it it reset eevry time

8/2/2024 16:50:08.002 [RX] - E (204) gpio: GPIO can only be used as input mode
[ 3][E][esp32-hal-gpio.c:130] __pinMode(): GPIO config failed
E (208) gpio: esp_ipc_call_blocking failed (0x103)
[ 7][E][esp32-hal-gpio.c:178] __attachInterruptFunctionalArg(): GPIO ISR Service Failed To Start
E (217) gpio: gpio_install_isr_service(450): GPIO isr service already installed
Guru Meditation Error: Core 0 panic’ed (LoadProhibited). Exception was unhandled.

Core 0 register dump:
PC : 0x4010a383 PS : 0x00060533 A0 : 0x800d8833 A1 : 0x3ffe3b40
A2 : 0x00000000 A3 : 0x3ffc3220 A4 : 0x3ffc3220 A5 : 0x00060523
A6 : 0x00060520 A7 : 0x00000001 A8 : 0x800d83f0 A9 : 0x3ffe3b00
A10 : 0x3ffbdc18 A11 : 0x00000002 A12 : 0x00000021 A13 : 0x3ffe3b40
A14 : 0x007bdc04 A15 : 0x003fffff SAR : 0x0000001f EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x40086c01 LEND : 0x40086c11 LCOUNT : 0xfffffff7

my code use 2 interrupts to 2 pins

To get more information about the crash, you can use the ESP32 Exception Decoder:

monitor_filters = 
  esp32_exception_decoder

Please share your platformio.ini and a minimal code to reproduce the issue.

While Sivar’s tip is, of course, a crucial one, the message trace seems pretty clear that it’s a design error in the calling code. Someone tried to use a GPIO pin that can only be used an an input. (Maybe there’s a pin that works as GPIO but not an interrupt source?) It’s hard to tell if that’s before or after, but the additional error that implies there was a double call to install_isr_service could mean you’re handling that second interrupt attachment incorrectly.

This seems like an error in the calling code and likely not within Platformio or espressif-arduino.

1 Like

I was expecting to use the exception decoder and the platformio.ini to see which function / library was the cause of the faulty call.

Unfortunately, the TO did not reply.

1 Like

Agreed all around.

In the absence of A) a repro case. B) Substantial source. C) a symbolized stack trace D) a responsive owner interested in tracking it down, this discussion just can’t go very far.

1 Like