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/stm32: model MCO clock configuration in kconfig #15706

Merged
merged 6 commits into from
Jan 8, 2021

Conversation

aabadie
Copy link
Contributor

@aabadie aabadie commented Jan 5, 2021

Contribution description

This PR adds a Kconfig configuration for the MCO (MCU Clock Output) of some STM32 families (F0/F1/F3/G0/G4/L0/L1/L4/WB). F2/F4/F7 families are not addressed by this PR because there clock configuration is not yet modeled in Kconfig (see #15632) and they provide 2 MCO outputs.

To support the fact that f1 and some f0 and f3 don't provide an MCO prescaler, the CLOCK_HAS_NO_MCO_PRE config is introduced and selected in the affected family (f1) and lines (f0/f3).

Testing procedure

Run make BOARD=<board> -C examples/hello-world menuconfig and verify that the Enable MCU Clock Output option is displayed in the STM32 clock configuration submenu. Once selected, the MCO prescaler and source can be selected. By default, the presaler is 1 and the source is PLLCLK.

Issues/PRs references

Tick an item in #14975

@aabadie aabadie added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: cpu Area: CPU/MCU ports Area: Kconfig Area: Kconfig integration labels Jan 5, 2021
cpu/stm32/kconfigs/Kconfig.clk Outdated Show resolved Hide resolved
cpu/stm32/kconfigs/Kconfig.clk Outdated Show resolved Hide resolved
@aabadie aabadie force-pushed the pr/cpu/stm32_mco_kconfig branch from 4be215b to d027454 Compare January 7, 2021 15:07
@leandrolanzieri leandrolanzieri added Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines labels Jan 8, 2021
Copy link
Contributor

@leandrolanzieri leandrolanzieri left a comment

Choose a reason for hiding this comment

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

I've tested on some hardware and the output signal seems to be configured correctly with the different options. ACK!

@leandrolanzieri leandrolanzieri added Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines labels Jan 8, 2021
@leandrolanzieri leandrolanzieri added this to the Release 2021.01 milestone Jan 8, 2021
@leandrolanzieri leandrolanzieri added the Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation label Jan 8, 2021
@leandrolanzieri leandrolanzieri merged commit 131c006 into RIOT-OS:master Jan 8, 2021
@aabadie aabadie deleted the pr/cpu/stm32_mco_kconfig branch January 8, 2021 08:49
@aabadie
Copy link
Contributor Author

aabadie commented Jan 8, 2021

Thanks for reviewing and testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports Area: Kconfig Area: Kconfig integration CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants