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

cpu/riscv_common/periph_timer: Fix timer_clear() #19112

Merged
merged 1 commit into from
Jan 9, 2023

Conversation

maribu
Copy link
Member

@maribu maribu commented Jan 8, 2023

Contribution description

Previously, timer_clear() was a no-op, resulting in spurious IRQs from already canceled timeouts. This fixes the issue.

Testing procedure

$ make BOARD=hifive1b flash test -C tests/periph_timer
[...]
Welcome to pyterm!
Bench Clock Reset Complete

ATE0-->ATE0
OK
AT+BLEINIT=0-->OK
AT+CWMODE=0-->OK

Help: Press s to start test, r to print it is ready
READY
s
START
main(): This is RIOT! (Version: 2023.01-devel-773-g441b69)

Test for peripheral TIMERs

Available timers: 1

Testing TIMER_0:
TIMER_0: initialization successful
TIMER_0: stopped
TIMER_0: set channel 0 to 5000
TIMER_0: starting
TIMER_0: channel 0 fired at SW count  3164199 - init:  3164199

TEST SUCCEEDED

(In master, the test fails with a spurious IRQ.)

Issues/PRs references

#18976

Previously, timer_clear() was a no-op, resulting in spurious IRQs from
already canceled timeouts. This fixes the issue.
@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 Jan 8, 2023
@maribu maribu requested review from aabadie and kaspar030 January 8, 2023 23:15
@github-actions github-actions bot added the Platform: RISC-V Platform: This PR/issue effects RISC-V-based platforms label Jan 8, 2023
@maribu maribu mentioned this pull request Jan 8, 2023
20 tasks
Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

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

bors merge

@bors
Copy link
Contributor

bors bot commented Jan 8, 2023

🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@bors
Copy link
Contributor

bors bot commented Jan 8, 2023

GitHub status checks took too long to complete, so bors is giving up. You can adjust bors configuration to have it wait longer if you like.

@benpicco benpicco added CI: high priority If set, builds of this PR will be queued before others CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jan 9, 2023
@riot-ci
Copy link

riot-ci commented Jan 9, 2023

Murdock results

✔️ PASSED

525751c cpu/riscv_common/periph_timer: Fix timer_clear()

Success Failures Total Runtime
6770 0 6770 12m:58s

Artifacts

@maribu
Copy link
Member Author

maribu commented Jan 9, 2023

bors retry

@bors
Copy link
Contributor

bors bot commented Jan 9, 2023

Build succeeded:

@bors bors bot merged commit ecf0ad3 into RIOT-OS:master Jan 9, 2023
@maribu maribu deleted the cpu/riscv_common/periph/coretimer.c branch January 9, 2023 10:00
@maribu
Copy link
Member Author

maribu commented Jan 9, 2023

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: high priority If set, builds of this PR will be queued before others CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: RISC-V Platform: This PR/issue effects RISC-V-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