-
Notifications
You must be signed in to change notification settings - Fork 7.4k
stm32g0: mco: enable usage of MCO for STM32G0 #90923
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
base: main
Are you sure you want to change the base?
Conversation
@@ -35,6 +35,9 @@ | |||
#define STM32_SRC_PLL_Q (STM32_SRC_PLL_P + 1) | |||
#define STM32_SRC_PLL_R (STM32_SRC_PLL_Q + 1) | |||
|
|||
/** @brief RCC_CFGR register offset */ | |||
#define CFGR_REG 0x08 |
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.
Nitpicking: could you indent the macro value with 2 tabs, as done for the other macro definitions above and below?
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.
@etienne-lms Thank you for your review.
Before I opened the pull request, I had the macro (and some others for that matter) formatted as you suggested (two tabs). When I ran ./scripts/ci/check_compliance.py -c upstream/main..
as suggested by Running CI Tests Locally, I got errors. For example:
You may want to run clang-format on this change:
-#define CFGR_REG 0x08
+#define CFGR_REG 0x08
So my question would be: Ignore the errors given by check_compliance.py
and use tabs? Or comply to the checker?
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.
Good question! I don't think I have enough background in Zephyr to ask you to go against some of its compliance sanity tools. I'll cross-check. In the mean time, I guess you can feel free to dismiss my old developer habits driven comments.
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.
Well, I appreciate your sense for consistency, I just didn't know what to do here.
I did remove the second empty line you mentioned in your other comment.
Hey, this needs a rebase and force push to pick up the CI error workaround. |
Adds macros to be able to use the microcontroller clock output (MCO) on the STM32G0 microcontroller. Signed-off-by: Andreas Schuster <[email protected]>
The newly added mcos node contains two childreen `mco1` and `mco2` that can be used to output different clocks on the MCO pins of the stm32g0 microcontrollers. Signed-off-by: Andreas Schuster <[email protected]>
Add overlay file to enable the MCO1&2 output clock on the nucleo_g0b1re. Signed-off-by: Andreas Schuster <[email protected]>
|
To be able to use the microcontroller clock output of the STM32G0 microcontrollers some macros and device tree entries were missing. This pull requests add them. Additionally a sample overlay for the NUCLEO-G0B1RE board was added to the mco sample.