Skip to content

Support for multicore async GPIO: #542

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

Merged
merged 3 commits into from
May 16, 2023

Conversation

MabezDev
Copy link
Member

Use the correct registers depending on which core the interrupt is being serviced on. Fixed a bug in the esp32::gpio_intr which would enable the interrupt on both cores. It now enables the interrupt for the core in which listen() is called.

I didn't add an example, as running the executor on the second core is a bit ugly due to the bounds on start_app_core (we probably want to take a look at improving this).

You can use this example to test it: https://gist.github.com/MabezDev/624738016d8ee67857b96e12253f656f

Closes #539

@MabezDev MabezDev requested review from jessebraham and bjoernQ May 15, 2023 16:20
@MabezDev MabezDev force-pushed the async/gpio-multicore branch 2 times, most recently from 8aa0a04 to 8b33b02 Compare May 15, 2023 16:23
MabezDev added 2 commits May 16, 2023 13:44
Use the correct registers depending on which core the interrupt is being
serviced on. Fixed a bug in the `esp32::gpio_intr` which would enable
the interrupt on both cores. It now enables the interrupt for the core
in which `listen()` is called.
Copy link
Contributor

@JurajSadel JurajSadel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@bjoernQ bjoernQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I'm still not 100% convinced about the bits we use for int-enable on ESP32 but I really like the refactoring 👍

@MabezDev MabezDev force-pushed the async/gpio-multicore branch from e286ca3 to 25951c0 Compare May 16, 2023 13:47
@MabezDev MabezDev merged commit 45f855a into esp-rs:main May 16, 2023
SergioGasquez pushed a commit to SergioGasquez/esp-hal that referenced this pull request Jun 9, 2023
* Support for multicore async GPIO:

Use the correct registers depending on which core the interrupt is being
serviced on. Fixed a bug in the `esp32::gpio_intr` which would enable
the interrupt on both cores. It now enables the interrupt for the core
in which `listen()` is called.

* add changelog item

* Simplify GPIO interrupt status
i404788 pushed a commit to i404788/esp-hal that referenced this pull request Jul 22, 2023
* Support for multicore async GPIO:

Use the correct registers depending on which core the interrupt is being
serviced on. Fixed a bug in the `esp32::gpio_intr` which would enable
the interrupt on both cores. It now enables the interrupt for the core
in which `listen()` is called.

* add changelog item

* Simplify GPIO interrupt status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement async GPIO interrupts for Dual core chips
3 participants