cpu/{gd32v,stm32}/periph/adc: make ADC clock setable#19630
Merged
maribu merged 3 commits intoRIOT-OS:masterfrom May 11, 2024
Merged
cpu/{gd32v,stm32}/periph/adc: make ADC clock setable#19630maribu merged 3 commits intoRIOT-OS:masterfrom
maribu merged 3 commits intoRIOT-OS:masterfrom
Conversation
Enoch247
commented
May 19, 2023
maribu
reviewed
May 22, 2023
maribu
reviewed
May 22, 2023
Member
|
Sorry for the high latency. Feel free to squash. |
This patch allows boards to select a max ADC clock speed. This could be handy if the board wants to clock the ADC differently according to the board's front end analog circuitry or MCU model's ADC capabilities.
This patch ensures that the ADC's max clock speed is not exceded.
This patch increases the board's ADC clock speed to the MCU's maximum speed.
aacbac3 to
4ed36bf
Compare
Contributor
Author
|
Sorry for the long delay. Trying to close out these old PRs. |
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.
Contribution description
This patch allows boards to declare their max ADC clock speed. As an example, the nucleo-f767zi declares it's ADC clock speed to be 36MHz (the max speed of the board's MCU).
Testing procedure
The change is minor and fairly safe. I verified that the macro works by declaring it to "foo" in
periph_conf.hto trigger a compiler error. Beyond that, it is up to board maintainers to use the macro wisely.Issues/PRs references
This PR is based off #19629 and should be merged after.