Skip to content

boards/stm32: cpu/stm32: move clock configuration from boards to cpu#15273

Merged
benpicco merged 5 commits intoRIOT-OS:masterfrom
aabadie:pr/cpu/stm32_clk_cfg_in_cpu
Oct 27, 2020
Merged

boards/stm32: cpu/stm32: move clock configuration from boards to cpu#15273
benpicco merged 5 commits intoRIOT-OS:masterfrom
aabadie:pr/cpu/stm32_clk_cfg_in_cpu

Conversation

@aabadie
Copy link
Contributor

@aabadie aabadie commented Oct 22, 2020

Contribution description

This PR moves all STM32 clock configurations located in boards/common/stm32/include to a new directory in cpu/stm32/include/clk.

A new generic clk_conf.h header is introduced to automatically include the clock configuration of a given family. This simplifies the periph_conf.h header at board level. I also looked at a way to completely remove this include from periph_conf.h but couldn't come up to working solution (due includes order and redefined constants).

The L4 max core clock define is also moved from the boards to L4 clock configuration and is determined based on the families/lines. This is cleaner and much more generic.

Some more factorization of the clock configurations themselves could be done but I prefer to keep that to follow-up PRs (and will update #14975 accordingly).

Testing procedure

This PR is only moving code around so I think a green Murdock should be enough.

Issues/PRs references

Another item ticked in #14975

@aabadie aabadie added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports labels Oct 22, 2020
@aabadie aabadie changed the title cpu/stm32: move clock configuration from boards to cpu boards/stm32: cpu/stm32: move clock configuration from boards to cpu Oct 22, 2020
@aabadie aabadie force-pushed the pr/cpu/stm32_clk_cfg_in_cpu branch from ac67e6a to 85f4d60 Compare October 22, 2020 09:18
@aabadie aabadie added State: waiting for other PR State: The PR requires another PR to be merged first and removed State: waiting for other PR State: The PR requires another PR to be merged first labels Oct 22, 2020
@aabadie aabadie force-pushed the pr/cpu/stm32_clk_cfg_in_cpu branch from 85f4d60 to 57612f8 Compare October 26, 2020 10:21
@aabadie
Copy link
Contributor Author

aabadie commented Oct 26, 2020

rebased and adapted after #15192 got merged.

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

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

Nice cleanup, no code changes.
Just two naming suggestions.

@aabadie aabadie force-pushed the pr/cpu/stm32_clk_cfg_in_cpu branch from 57612f8 to 39e06ba Compare October 27, 2020 07:45
@benpicco benpicco merged commit 2050193 into RIOT-OS:master Oct 27, 2020
@aabadie aabadie deleted the pr/cpu/stm32_clk_cfg_in_cpu branch November 16, 2021 14:38
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 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