cancel
Showing results for 
Search instead for 
Did you mean: 

How to set Hi-Z mode in PH1 (OSC_OUT) when using HSE BYPASS mode in STM32F446RE?

Cblue_X
Associate

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

Cblue_X_0-1764310642345.png

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:

Cblue_X_1-1764310883497.png

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)

Cblue_X_2-1764311277059.png

 



Thanks in advance and sorry for the english, not a native speaker!

 

1 REPLY 1
mƎALLEm
ST Employee

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).

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.