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

add support for extending the cycle counter to u64 #6

Merged
merged 11 commits into from
Feb 15, 2022

Conversation

jordens
Copy link
Contributor

@jordens jordens commented Feb 2, 2022

This enables tracking time intervals of more than a couple seconds on
modern processors.
Tested on hardware (stm32h743, 400 MHz, https://github.com/quartiq/stabilizer) with spawn across overflows.

This enables tracking time intervals of more than a couple seconds on
modern processors.
@jordens jordens marked this pull request as ready for review February 3, 2022 09:16
In extend=true, the reload interrupt is not disabled (for overflow
detection), the previous `set_compare()` may have been called with a
short interval, then, if the queue is empty, the reload interrupt would
fire at very short interval.
@jordens jordens force-pushed the feature/extend branch 2 times, most recently from 6b68cb4 to 9f5ae47 Compare February 4, 2022 11:43
Also add comments clarifying the now() calls
* Move the SysTick clock source configuration to `new()`.
* Add comments about the double reset of the cycle counter.
@jordens jordens mentioned this pull request Feb 4, 2022
3 tasks
Cargo.toml Outdated Show resolved Hide resolved
depend on cortex-m 0.7.4 for `DWT::cycle_count()`

Co-authored-by: Henrik Tjäder <[email protected]>
src/lib.rs Outdated Show resolved Hide resolved
korken89
korken89 previously approved these changes Feb 15, 2022
Copy link
Contributor

@korken89 korken89 left a comment

Choose a reason for hiding this comment

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

Thanks for the effort!

Copy link
Contributor

@korken89 korken89 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 Feb 15, 2022

Build succeeded:

@bors bors bot merged commit 726a357 into rtic-rs:master Feb 15, 2022
@jordens jordens deleted the feature/extend branch February 15, 2022 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants