-
Notifications
You must be signed in to change notification settings - Fork 7.6k
attachInterrupt() cannot be called with interrupts disabled #7837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Replicated crash. Confirmed.
The crash appears to occur in gpio_install_isr_service(), which is an IDF function. Specifically: https://github.com/espressif/esp-idf/blob/bb25d6abd3398d0f06fb09fdc9935b791f9344ff/components/driver/gpio/gpio.c#L565. I'm guessing it's a deadlock caused by attempting to take a Semaphore while interrupts are off. To resolve the issue you'll likely need to open an issue on the IDF repository. https://github.com/espressif/esp-idf/issues You may also in interested in: espressif/esp-idf#9746 |
Hello @tkem, did you take any action and opened issue on ESP-IDF repository? |
Hello, Due to the overwhelming volume of issues currently being addressed, we have decided to close the previously received tickets. If you still require assistance or if the issue persists, please don't hesitate to reopen the ticket. Thanks. |
Board
NodeMCU-32S
Device Description
ESP32 NodeMCU Development Board
https://www.berrybase.at/esp32-nodemcu-development-board
Hardware Configuration
No.
Version
v2.0.6
IDE Name
Arduino IDE 2.0.3
Operating System
Debian GNU/Linux
Flash frequency
40MHz
PSRAM enabled
yes
Upload speed
115200
Description
I prefer to set up interrupts (on Arduino via
attachInterrupt()
) with interrupts disabled, to avoid race conditions, e.g.This works well on all Arduino boards I've encountered so far (AVR, ESP8266, Raspberry Pi Pico), but on my ESP32 board this results in a "Guru Meditation Error". See below.
I've checked existing issues and found #7211, but I think this addresses a different problem. Calling
attachInterrupt()
while interrupts are disabled is a valid use case, IMHO, at least if the surrounding code is minimal.Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: