-
Notifications
You must be signed in to change notification settings - Fork 2k
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: Fix stm clock configuration #18797
Conversation
Note that I still have to clean up commits... |
boards/nucleo-wl55jc/Kconfig
Outdated
@@ -22,10 +22,16 @@ config BOARD_NUCLEO_WL55JC | |||
select HAS_PERIPH_TIMER | |||
select HAS_PERIPH_UART | |||
|
|||
select BOARD_HAS_HSE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misses # Clock configuration
comment as seen on other boards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed as it is defined in the source "$(RIOTBOARD)/common/nucleo64/Kconfig"
, maybe that gets more explicit later...
cpu/stm32/dist/clk_conf/clk_conf.c
Outdated
@@ -454,7 +454,8 @@ int main(int argc, char **argv) | |||
printf("#define CLOCK_CORECLOCK (%uU)\n", coreclock); | |||
printf("/* 0: no external high speed crystal available\n" | |||
" * else: actual crystal frequency [in Hz] */\n" | |||
"#define CLOCK_HSE (%uU)\n", pll_src ? pll_in : 0); | |||
"#ifndef CONFIG_CLOCK_HSE | |||
#define CONFIG_CLOCK_HSE (%uU)\n", pll_src ? pll_in : 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting looks odd?
cpu/stm32/stm32_line.mk
Outdated
@@ -56,6 +56,7 @@ ifeq (F,$(STM32_TYPE)) | |||
ifneq (, $(filter $(STM32_ROMSIZE), 6 8)) | |||
CPU_LINE = STM32F$(STM32_MODEL)x8 | |||
else ifneq (,$(filter $(STM32_ROMSIZE), B C)) | |||
$(info ************ TEST VERSION ************) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's its purpose?
6daa059
to
6fbe89d
Compare
Commits have been cleaned up, probably supersedes #18771, all in one PR splitting is a bit of a pain. |
Note: I should not make the |
If the nightly murdock results are good I would remove the REMOVEME commit and say it is ready... |
Anyone else willing to review? This is needed to fix nightlies? if @aabadie doesn't have any strong opinions then maybe we can move with this? |
Murdock results✔️ PASSED 464f57b boards: Remove PLL overrides in kconfig
ArtifactsThis only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now. |
So this indicates that it does fix the intended failures on the nightlies. Can I squash and someone take a look? |
Go ahead |
This splits up the clock configs. It allows CPU_FAM based file sourcing and also common CPU_FAMs. The dependancies are also included in wildcards would be used for the CPU_FAM macro. This should be much more readable. This also takes into account the HSE speeds in order to match the make/header resolution. Some hidden symbols were added to make sorting many CPU_SERIES dependencies easier.
5979037
to
259c003
Compare
Since we know the HSE speed, manual overrides are not needed anymore
259c003
to
464f57b
Compare
All passing... |
Now that #18787 is merged, this is the only remaining fix needed for nightlies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK. Changes look good to me.
Testing doesn't scale to all of the STM32 boards, so I kind of fear this will break some board. But just letting this sitting here for all eternity while nightlies remain failing is not really an option. So let's merge this and fix the fallout later when the bug reports come in.
Thanks, this is mostly just matching the kconfig to the header dependency resolution, so low risk from the "production" side. I noticed a few things that were corrected though. I also tested against all stm boards with the compile_like_murdock.py script that is PRed as well. Not all apps but the ones that would be affected by USB and non-USB clock contraints. |
Contribution description
This splits the stm32 clock tree in Kconfig making it a bit easier to look at and manage.
It exposes the clock speeds allowing enough information to match the make resolution.
It also introduces some
HAVE_
symbols to make it a bit easier to manage multiple CPU_SERIES and/ors.There is a small fix to the make resolution for the stm32f303*, some boards were not running at the max possible clock speed.
Testing procedure
Green murdock with
NIGHTLY=1
Self testing based off #18771 with
as well (since this should fix the USB errors)
Issues/PRs references
Follow up #18771