Skip to content

ULP-core interrupt handling#5206

Draft
leighleighleigh wants to merge 52 commits intoesp-rs:mainfrom
leighleighleigh:leighleighleigh/ulp-interrupt-handler
Draft

ULP-core interrupt handling#5206
leighleighleigh wants to merge 52 commits intoesp-rs:mainfrom
leighleighleigh:leighleighleigh/ulp-interrupt-handler

Conversation

@leighleighleigh
Copy link
Copy Markdown
Contributor

@leighleighleigh leighleighleigh commented Mar 17, 2026

Thank you for your contribution!

We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:

Submission Checklist 📝

  • I have updated existing examples or added new ones (if applicable).
  • I have used cargo xtask fmt-packages command to ensure that all changed code is formatted correctly.
  • My changes were added to the CHANGELOG.md in the proper section.
  • I have added necessary changes to user code to the latest Migration Guide.
  • My changes are in accordance to the esp-rs developer guidelines

Extra:

Pull Request Details 📖

Description

Work-in-progress effort to add interrupt handling to the ULP cores, GPIO interrupt APIs, and GPIO wake-up.

  • Adds optional interrupt-handling support to the ULP cores, using Interrupts exported form their PACs'
    • Increases code size, so must be enabled using the interrupts feature-flag for now.
    • Adds a ULP critical section implementation, when enabled.
  • Add Io peripheral, allowing users to bind their own GPIO interrupt handlers
  • Add interrupt methods to GPIO pin types
  • Add support for GPIO/LPIO wake-up of ULP/LP cores
  • Fix bug where Peripherals::take().unwrap() would panic upon the second loop into main() due to the ULP Timer

To-Dos

  • Refactor the interrupt module, so it is easier to disable interrupts, to minimize the code size when unwanted
  • Add interrupt support for ESP32-C6-LP
  • Split-out the GPIO/LPIO wake-up feature into it's own PR, as it does not depend on interrupt support (AFAIK)
  • Split-out the Peripherals::take().unwrap() bug fix into it's own PR, as it does not depend on interrupt support

Testing

Tested on ESP32-S3 & RISCV ULP. Additional testing being performed on ESP32-C6.

Comment thread esp-lp-hal/src/lib.rs Outdated
@github-actions github-actions Bot added the merge-conflict Merge conflict detected. Automatically added/removed by CI. label Mar 23, 2026
@github-actions
Copy link
Copy Markdown

New commits in main has made this PR unmergable. Please resolve the conflicts.

@github-actions github-actions Bot removed the merge-conflict Merge conflict detected. Automatically added/removed by CI. label Mar 23, 2026
@github-actions github-actions Bot added the merge-conflict Merge conflict detected. Automatically added/removed by CI. label Mar 24, 2026
@github-actions
Copy link
Copy Markdown

New commits in main has made this PR unmergable. Please resolve the conflicts.

@github-actions github-actions Bot removed the merge-conflict Merge conflict detected. Automatically added/removed by CI. label Mar 27, 2026
@github-actions github-actions Bot added the merge-conflict Merge conflict detected. Automatically added/removed by CI. label Mar 30, 2026
@github-actions
Copy link
Copy Markdown

New commits in main has made this PR unmergable. Please resolve the conflicts.

@github-actions github-actions Bot removed the merge-conflict Merge conflict detected. Automatically added/removed by CI. label Apr 1, 2026
Comment thread esp-lp-hal/src/interrupt/generic.rs Outdated
Comment thread esp-lp-hal/src/interrupt/mod.rs Outdated
pub mod generic;
pub use generic::*;

// RISCV ULP specific interrupt handlers
Copy link
Copy Markdown
Contributor Author

@leighleighleigh leighleighleigh Apr 12, 2026

Choose a reason for hiding this comment

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

TODO: Investigate ESP32C6-LP compatibility with these new generic interrupt APIs, and add support for it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you intend these TODOs to be resolved in this PR? Should we re-classify this as a draft?

Copy link
Copy Markdown
Contributor Author

@leighleighleigh leighleighleigh Apr 13, 2026

Choose a reason for hiding this comment

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

They were mostly reminders for me - but yes, sorry about the noise!

@leighleighleigh leighleighleigh marked this pull request as draft April 13, 2026 20:17
@github-actions github-actions Bot added the merge-conflict Merge conflict detected. Automatically added/removed by CI. label Apr 13, 2026
@github-actions
Copy link
Copy Markdown

New commits in main has made this PR unmergable. Please resolve the conflicts.

@leighleighleigh leighleighleigh marked this pull request as ready for review April 13, 2026 22:30
@leighleighleigh leighleighleigh marked this pull request as draft April 13, 2026 22:30
@github-actions github-actions Bot removed the merge-conflict Merge conflict detected. Automatically added/removed by CI. label Apr 13, 2026
@leighleighleigh leighleighleigh force-pushed the leighleighleigh/ulp-interrupt-handler branch from 950b800 to f5e008f Compare April 14, 2026 10:02
@github-actions github-actions Bot added the merge-conflict Merge conflict detected. Automatically added/removed by CI. label Apr 16, 2026
@github-actions
Copy link
Copy Markdown

New commits in main has made this PR unmergable. Please resolve the conflicts.

@github-actions github-actions Bot removed the merge-conflict Merge conflict detected. Automatically added/removed by CI. label Apr 18, 2026
@leighleighleigh leighleighleigh force-pushed the leighleighleigh/ulp-interrupt-handler branch from f142583 to ebfd35f Compare April 18, 2026 04:29
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.

2 participants