Skip to content

[rtic-monotonics] Panic if STM32 clock prescaler value overflows #1085

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

antonok-edm
Copy link

I recently had a confusing issue on my STM32 board where I used a TIMx driver for Monotonic and the timer was progressing ~5.5x faster than it should have been. The system clock was 80MHz and I used 1000 ticks per second for the timer. Turns out there was an overflow in the prescaler configuration. This PR adds an assertion in that case, to make debugging this problem easier for other users in the future.

@@ -13,6 +13,7 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top!

- Updated esp32c3 dependency to v0.28.0
- Updated esp32c3 dependency to v0.27.0
- Panic if STM32 prescaler value would overflow
Copy link
Contributor

Choose a reason for hiding this comment

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

This changelog entry does not belong to this release.

You should create a new "changed" header under "unreleased" header and place it there instead :)

Copy link
Author

Choose a reason for hiding this comment

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

ah, I did it too quickly 😅

should be fixed now

@antonok-edm antonok-edm requested a review from AfoHT June 24, 2025 17:21
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.

2 participants