Skip to content
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

GPIO refactoring #6259

Merged
merged 2 commits into from
Feb 16, 2022
Merged

GPIO refactoring #6259

merged 2 commits into from
Feb 16, 2022

Conversation

P-R-O-C-H-Y
Copy link
Member

@P-R-O-C-H-Y P-R-O-C-H-Y commented Feb 11, 2022

Summary

GPIO now using ESP-IDF API on all chips.
LEDC interrupt fix removed - no longer needed.
Edited pins_arduino.h in variants according to changes in gpio.

Known issue with GPIO interrupt on chip Esp32s3. Will be fixed in ESP-IDF.
For now GPIO interrupts work only on CORE 0.

Impact

Close #6249
Close #6120

Related links

GPIO now using ESP-IDF API on all chips.
LEDC interrupt fix removed - no longer needed.
Edited pins_arduino.h in variants according to changes in gpio.
@P-R-O-C-H-Y
Copy link
Member Author

P-R-O-C-H-Y commented Feb 11, 2022

Still in progress, found some issues.
Fixed

@P-R-O-C-H-Y P-R-O-C-H-Y marked this pull request as draft February 11, 2022 14:17
@P-R-O-C-H-Y P-R-O-C-H-Y marked this pull request as ready for review February 14, 2022 10:17
@VojtechBartoska VojtechBartoska added the Area: Peripherals API Relates to peripheral's APIs. label Feb 14, 2022
@VojtechBartoska VojtechBartoska added this to the 2.0.3 milestone Feb 14, 2022
@me-no-dev me-no-dev merged commit c7cc5c9 into espressif:master Feb 16, 2022
dok-net added a commit to dok-net/arduino-esp32 that referenced this pull request Mar 25, 2022
dok-net added a commit to dok-net/arduino-esp32 that referenced this pull request Apr 3, 2022
dok-net added a commit to dok-net/arduino-esp32 that referenced this pull request Apr 4, 2022
me-no-dev pushed a commit that referenced this pull request Apr 5, 2022
@platypii
Copy link
Contributor

platypii commented Mar 4, 2023

I have an ESP32 project which was working fine, but stopped working when I updated arduino-esp32. I used git bisect to trace the regression to this commit. After this commit, my board would crash loop on start up. Nothing had changed in my project code. The error looked like:

__attachInterruptFunctionalArg(): GPIO ISR Service Failed To Start
gpio: gpio_install_isr_service(449): GPIO isr service already installed

After a lot of digging, I found the problem: I was calling attachInterrupt in the constructor of a global variable. So attachInterrupt was being called before setup(). Apparently that was okay before this PR, but does not work after this PR. Fixed my code by initializing my pins inside of setup, not before.

Sharing in case it helps others.

@P-R-O-C-H-Y P-R-O-C-H-Y deleted the GPIO_refactor branch April 19, 2023 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Peripherals API Relates to peripheral's APIs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ESP32-S2 - can't toggle GPIO9 or GPIO11 after flashing Change GPIO to use ESP-IDF API (C)
4 participants