2025-11-27 10:32 PM
Hi there, im using Nucleo-F446RE , ST HAL and CubeMX, and im learning to configure the clock
I use HSE Bypass mode (MCO from the st-link in the nucleo), everything perfect here
In the RM i found out that, when using HSE BYPASS mode, PH1 (OSC_OU) should be left in HI-Z state
What does HI-Z means in STM32 MCUs? does it mean configuring the pin as digital input? or it means configuring the pin as analog input?
Or it depends?
When selecting HSE BYPASS MODE the chip image in the .ioc file gets set like this:
But if i try to set PH1 (OSC_OUT) as GPIO a conflict is generated, so, how can i set the state of PH1 as HI-Z?
Also, why does PH1 gets reserved and configured in the chip as OSC_OUT? is this to avoid configuring it as another thing?
And finally, what it seems very weird to me, why the clock por GPIOH is enabled when CubeMX generates the code if i cant use PH1 as a normal GPIO? (im not using any other PHx PIN)
Thanks in advance and sorry for the english, not a native speaker!
2025-11-28 12:30 AM - edited 2025-11-28 1:08 AM
Hello,
For STM32F4, if you configure HSE in Bypass mode, OSC_OUT could be used as GPIO pin (In/Out).
The documentation needs to be updated as well as the the CubeMx should keep OSC_OUT unconfigured. So the user can configure it as a GPIO pin if he wants.
Please refer also to this discussion.
I will raise that issue internally for fix (internal tickets 220390 and 222721).