-
-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Fix ChibiOS timer overflow for 16-bit system clock devices. #8078
Conversation
Tested on Planck EZ (STM32F303), seems to work fine. |
@drashna Did you change the ChibiOS config to use another timer than TIM2? (Just working out which pathways have been tested) |
Nope, but I can/will test that. Though, the EZ is using PWM on TIM3 |
To add fuel to the fire, was already using TIM21 on my L082. |
4b31cea
to
ce36a9c
Compare
Rebased to fix conflicts. |
ce36a9c
to
2cf89ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__attribute__ ((weak))
✔️
Description
When running a high SysTick frequency on 16-bit devices, the "simplified" timer implementation on the original PR #7597 was not tested thoroughly enough and was incorrectly ignoring overflows.
This PR support for overflow when running on 16-bit devices.
It also updates
timer_expired
andtimer_expired32
to be defines, as when compiling for debug mode, the linker has already stripped out the inline functions.Types of Changes
Checklist