Read STM32 clock rates from framework#19978
Merged
thinkyhead merged 3 commits intoMarlinFirmware:bugfix-2.0.xfrom Nov 1, 2020
Merged
Read STM32 clock rates from framework#19978thinkyhead merged 3 commits intoMarlinFirmware:bugfix-2.0.xfrom
thinkyhead merged 3 commits intoMarlinFirmware:bugfix-2.0.xfrom
Conversation
This eliminates HAL_TIMER_RATE and the need to override them.
FhlostonParadise
pushed a commit
to FhlostonParadise/Marlin
that referenced
this pull request
Nov 21, 2020
Co-authored-by: Scott Lahteine <[email protected]>
vgadreau
pushed a commit
to vgadreau/Marlin
that referenced
this pull request
Dec 9, 2020
Co-authored-by: Scott Lahteine <[email protected]>
tharts
pushed a commit
to tharts/Marlin
that referenced
this pull request
Jan 6, 2021
Co-authored-by: Scott Lahteine <[email protected]>
kpishere
pushed a commit
to kpishere/Marlin
that referenced
this pull request
Feb 19, 2021
Co-authored-by: Scott Lahteine <[email protected]>
W4tel-BiDi
pushed a commit
to W4tel-BiDi/Marlin
that referenced
this pull request
Apr 5, 2021
Co-authored-by: Scott Lahteine <[email protected]>
chrisjenda
pushed a commit
to chrisjenda/Marlin
that referenced
this pull request
Apr 5, 2021
Co-authored-by: Scott Lahteine <[email protected]>
thinkyhead
added a commit
to thinkyhead/Marlin
that referenced
this pull request
Apr 28, 2021
Co-authored-by: Scott Lahteine <[email protected]>
thinkyhead
added a commit
to thinkyhead/Marlin
that referenced
this pull request
Apr 29, 2021
Co-authored-by: Scott Lahteine <[email protected]>
thinkyhead
added a commit
that referenced
this pull request
Apr 30, 2021
Co-authored-by: Scott Lahteine <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
STM32 timer clock rates are not always constant across a device. Depending on the timer they may be
F_CPU,F_CPU/2, or maybe even other values (there are lots of STM32 devices, and I haven't read all their datasheets!).This change reads the timer's clock rate from the framework, rather than assuming Marlin knows the correct value. This makes our code more generic and easier to implement across the wide range of devices that will be supported by the STM32 HAL.
This also removes the ability to override
HAL_TIMER_RATE, which was added for the Rumba32. It is simply no longer necessary.I tested this on an SKR Pro, by moving the STEP timer to TIMER 10, as does the Rumba32. I both reproduced the original "double step rate" issue seen on the Rumba, then verified that this PR fixes it.
Benefits
Configurations
N/A
Related Issues
Fixes: #18961
Replaces former solution for Rumba32: #18374