Skip to content

cpu/nrf5x_common: implement timer_set()#19035

Merged
bors[bot] merged 3 commits intoRIOT-OS:masterfrom
maribu:cpu/nrf5x_common/periph_timer
Dec 23, 2022
Merged

cpu/nrf5x_common: implement timer_set()#19035
bors[bot] merged 3 commits intoRIOT-OS:masterfrom
maribu:cpu/nrf5x_common/periph_timer

Conversation

@maribu
Copy link
Copy Markdown
Member

@maribu maribu commented Dec 9, 2022

Contribution description

The fallback implementation of timer_set() in drivers/periph_common is known to fail on short relative sets. This adds a robust implementation.

Testing procedure

Run tests/periph_timer_short_relative_set at 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

@maribu maribu added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: cpu Area: CPU/MCU ports labels Dec 9, 2022
@github-actions github-actions bot added the Platform: ARM Platform: This PR/issue effects ARM-based platforms label Dec 9, 2022
@riot-ci
Copy link
Copy Markdown

riot-ci commented Dec 9, 2022

Murdock results

✔️ PASSED

a8f1a7e cpu/nrf5x_common: Implement timer_set()

Success Failures Total Runtime
6765 0 6765 10m:05s

Artifacts

@benpicco
Copy link
Copy Markdown
Contributor

Please squash directly

@maribu maribu force-pushed the cpu/nrf5x_common/periph_timer branch from 05ae63b to 8312f6c Compare December 22, 2022 21:34
@github-actions github-actions bot added Area: CI Area: Continuous Integration of RIOT components Area: tools Area: Supplementary tools labels Dec 22, 2022
@benpicco
Copy link
Copy Markdown
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.
@maribu maribu force-pushed the cpu/nrf5x_common/periph_timer branch from 8312f6c to a8f1a7e Compare December 23, 2022 13:48
@github-actions github-actions bot removed Area: CI Area: Continuous Integration of RIOT components Area: tools Area: Supplementary tools labels Dec 23, 2022
@maribu
Copy link
Copy Markdown
Member Author

maribu commented Dec 23, 2022

bors merge

@bors
Copy link
Copy Markdown
Contributor

bors bot commented Dec 23, 2022

Build succeeded:

@bors bors bot merged commit abc66dc into RIOT-OS:master Dec 23, 2022
@maribu maribu deleted the cpu/nrf5x_common/periph_timer branch December 23, 2022 22:55
@maribu
Copy link
Copy Markdown
Member Author

maribu commented Dec 23, 2022

Thx :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants