cpu/nrf5x_common: implement timer_set()#19035
Merged
bors[bot] merged 3 commits intoRIOT-OS:masterfrom Dec 23, 2022
Merged
Conversation
maribu
commented
Dec 11, 2022
benpicco
reviewed
Dec 21, 2022
Contributor
|
Please squash directly |
05ae63b to
8312f6c
Compare
benpicco
reviewed
Dec 23, 2022
Contributor
|
Two unrelated commits have sneaked in |
A call to timer_set_absolute() should clear the periodic flag on the specified timer and channel. This adds it.
Two threads using distinct sets of channels should be able to share a timer. Hence, we need to make read-modify-write accesses on timer state atomic.
The fallback implementation of timer_set() in `drivers/periph_common` is known to fail on short relative sets. This adds a robust implementation.
8312f6c to
a8f1a7e
Compare
benpicco
approved these changes
Dec 23, 2022
Member
Author
|
bors merge |
Contributor
|
Build succeeded: |
Member
Author
|
Thx :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
The fallback implementation of timer_set() in
drivers/periph_commonis known to fail on short relative sets. This adds a robust implementation.Testing procedure
Run
tests/periph_timer_short_relative_setat least a few dozen times (or use #19030 to have a few dozen repetitions of the test case in a single run of the test application). It should now succeed.Issues/PRs references
None