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

[hal] sleep: restore waleup sources' interrupt priority appropriately #2227

Merged
merged 3 commits into from
Oct 28, 2020

Conversation

XuGuohui
Copy link
Member

@XuGuohui XuGuohui commented Oct 27, 2020

Problem

A wakeup source's interrupt priority is increased and never restored if it is duplicated in the wakeup source list or shares the same IRQ with other wakeup sources. Especially on Gen3, for critical SoftDevice region, a user application interrupt that would result in an error in SoftDevice.

Solution

Bump a wakeup source's interrupt priority only if it hasn't been bumped previously.

References

N/A

Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)

@XuGuohui XuGuohui added this to the 2.0.0 milestone Oct 27, 2020
Copy link
Member

@avtolstoy avtolstoy left a comment

Choose a reason for hiding this comment

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

@XuGuohui I'm approving this, but please look through the comments.

hal/src/nRF52840/sleep_hal.cpp Outdated Show resolved Hide resolved
hal/src/nRF52840/sleep_hal.cpp Outdated Show resolved Hide resolved
hal/src/nRF52840/sleep_hal.cpp Show resolved Hide resolved
hal/src/nRF52840/sleep_hal.cpp Outdated Show resolved Hide resolved
hal/src/stm32f2xx/sleep_hal.cpp Outdated Show resolved Hide resolved
hal/src/nRF52840/sleep_hal.cpp Outdated Show resolved Hide resolved
hal/src/nRF52840/sleep_hal.cpp Outdated Show resolved Hide resolved
hal/src/stm32f2xx/sleep_hal.cpp Outdated Show resolved Hide resolved
@XuGuohui XuGuohui added ready to merge PR has been reviewed and tested and removed needs review labels Oct 28, 2020
@XuGuohui XuGuohui merged commit 1888d64 into develop Oct 28, 2020
@XuGuohui XuGuohui deleted the fix/gpio_wakeup/ch66590 branch October 28, 2020 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ready to merge PR has been reviewed and tested
Projects
None yet
2 participants