-
By default, MCO2 overrides the GPIO-function of PC9. But in order to actually output the clock, the pin must be defined as an output (GPIO-feature). However, when I define a &gpioc 9 in my board .dts file, I end up with a AFRH9 having not it's default value 0 but instead 5. Apparently, doing In short: I need some GPIO action without Alternate Function being set to a GPIO function value. Any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Through commit search in git repository (search "MCO"), I found that MCOx is configured via Kconfig, hence can be activated using e.g. guiconfig. As such I did the configuration. But actually, no clock can be seen on GPIO output (here: PC9). I used the Any suggestion or pointers to a sample code or appropriate documentation would be appreciated. |
Beta Was this translation helpful? Give feedback.
-
@erwango : could you please consider whether closing this issue is appropriate? Anyway, this is a reminder for me to check the status.
I had put the mco pin control in another node. |
Beta Was this translation helpful? Give feedback.
Thanks for this feedback.
I came to the same conclusion that pinctrl-0 prop would finaly fit nicely in rcc node. Usingit in a mco node as you propose make it clean.
It also allows to instanciate the code when 2 mcos are available.
We can get STM32 clock control drivers performing the pinctrl api call in
stm32_clock_control_mco_init()
if pinctrl node is present.Once done, configuring the clock source would be an easy addition and would allow to fully remove Kconfig.