Skip to content
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

cpu/{gd32v,stm32}/periph/adc: make ADC clock setable #19630

Merged
merged 3 commits into from
May 11, 2024

Conversation

Enoch247
Copy link
Contributor

@Enoch247 Enoch247 commented May 19, 2023

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.h to 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.

@github-actions github-actions bot added Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports Platform: ARM Platform: This PR/issue effects ARM-based platforms labels May 19, 2023
cpu/gd32v/periph/adc.c Outdated Show resolved Hide resolved
@maribu maribu changed the title Increase adc speed cpu/{gd32v,stm32}/periph/adc: make ADC clock setable May 22, 2023
@maribu
Copy link
Member

maribu commented Jun 20, 2023

Sorry for the high latency. Feel free to squash.

@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jul 11, 2023
@riot-ci
Copy link

riot-ci commented Jul 11, 2023

Murdock results

✔️ PASSED

4ed36bf boards/nucleo-f767zi: increase ADC clock speed

Success Failures Total Runtime
10083 0 10083 14m:30s

Artifacts

Enoch247 and others added 3 commits May 10, 2024 21:58
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.
@Enoch247
Copy link
Contributor Author

Sorry for the long delay. Trying to close out these old PRs.

Copy link
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

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

lgtm, thx :)

@maribu maribu added this pull request to the merge queue May 11, 2024
Merged via the queue into RIOT-OS:master with commit 1f5e2c7 May 11, 2024
28 checks passed
@mguetschow mguetschow added this to the Release 2024.07 milestone Jun 11, 2024
@Enoch247 Enoch247 deleted the increase-adc-speed branch October 21, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants