tests/periph/timer: fix timeout computation and overflow handling#20161
Merged
maribu merged 2 commits intoRIOT-OS:masterfrom Dec 7, 2023
Merged
tests/periph/timer: fix timeout computation and overflow handling#20161maribu merged 2 commits intoRIOT-OS:masterfrom
maribu merged 2 commits intoRIOT-OS:masterfrom
Conversation
1 task
cc20def to
cd1fb15
Compare
cd1fb15 to
deb2e52
Compare
maribu
commented
Dec 7, 2023
deb2e52 to
197f4dc
Compare
75d62b4 to
d2db78a
Compare
Member
Author
|
All green, even the spell checks |
kfessel
reviewed
Dec 7, 2023
2 tasks
kfessel
reviewed
Dec 7, 2023
- the timeout computation for the spurious IRQ test confused numerator
and denominator in a fraction
- the timeout offset between timer channels was hardcoded to 5000 from
when the timer was only tested with 1 MHz as frequency
- This resulted in slooooow test runs when running at slow
frequencies
- fix overflow handling in the spinning wait
- likely this would never overflow anyway assuming that
`timer_init()` resets the counter value, but let's not rely on
this and just fix the bug for good
2da66fd to
aa045d5
Compare
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
timer_init()resets the counter value, but let's not rely on this and just fix the bug for goodTesting procedure
The test now passes with #20160 on the 16 MHz timer
Issues/PRs references
Found during #20160