Add alternate clock configurations for STM32#849
Open
garethky wants to merge 2 commits intoKalicoCrew:mainfrom
Open
Add alternate clock configurations for STM32#849garethky wants to merge 2 commits intoKalicoCrew:mainfrom
garethky wants to merge 2 commits intoKalicoCrew:mainfrom
Conversation
The Mellow ALPS board needs PA3 to emit an 8Mhz signal to drive the ADS131M02's clock input. Unfortunatly this conflicts with klipper's primary timer, TIM2. This change switches to an alternate timer to allow this pin to emit a clock signal without the conflict. AI fix?
Each pin has alternate timers. If the primary timer is being used or is already configured with a different time base by another pin, the alternate timer can be used.
Contributor
Author
|
I'm doing all my ADS131M02 testing with the ALPS board that requires this to work. So its been tested to work with that. |
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.
On the Mellow ALPS ADS131M02 board they used PA3 as the clock input pin to the ADC. In the existing chip config this pin is assigned to the same clock as klipper's main timer. This causes a conflict when trying to use the new
[static_pwm_clock]feature to set up that pin to cycle at 8Mhz.This PR introduces a new feature that can try multiple pins definitions in the config until it finds one that can be programmed successfully without a conflict. This means that the alternate timers for each pin can be added to the existing config. I add one such config for the ALPS board for PA3 that uses its alternate timer.
Checklist