cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4: OSC_OUT as GPIO when HSE in Bypass mode

Richard1156
Associate

ST moderator: post split from this thread.

Hello mƎALLEm,

Thank you for your confirmation on this issue.

I would like to provide some additional information. I have also encountered the same problem on the STM32F405RGT6.

In STM32CubeMX, when I configure both HSE or LSE to "Bypass Clock Source" mode, the tool insists on reserving PH1 (OSC_OUT) or PC15 (OSC32_OUT) as RCC pins. It blocks me from configuring them as regular GPIOs, even though the hardware (as you've confirmed) supports it.

Furthermore, I tested this on the STM32F446RE and STM32F446RC using the latest CubeMX, the problem still exists on those devices as well.

Regarding the internal tickets you mentioned (220390 for documentation, 222721 for CubeMX), may I kindly ask:

  • Has the CubeMX fix (ticket 222721) been implemented in any release yet?
  • If not, is there an estimated timeline for when we can expect this fix?

I understand if you cannot share internal details, but any update would be very helpful for our planning.

Thank you very much for your help, and sorry for my English as I'm not a native speaker.

11 REPLIES 11

Hello @waclawek.jan 

Detailed update.

More tests are done internally with the following STM32F4 part numbers: 

Product OSC_OUT in HSE_BYPASS
F407VG Not available
F429ZI                          Not available
F439ZI                          Not available
F469NI                          Not available
F413ZH                         Working
F446ZE                         Working
F401RE                        Not available
F410RB                        Working
F411RE                        Not available
F412ZG                        Working

So only the latest F4 products from F446, F410, F412 and F413 are able to use PH1 (or PF1) as GPIO independently when RCC is in HSE_BYPASS mode.

After discussion with the design, and as you said @waclawek.jan that's something linked to STM32 history and the F4 family was developed by different design teams during several years period.

Unfortunately, the GPIO characteristics of PH1 in this condition is not tested and cannot be confirmed to be safely used as a standard GPIO based on specification in the datasheet.
This is why our Reference Manual, indicates External source in HSE bypass, the PH1 (or PF1) act as OSC_OUT and the pin should be left in HI-Z state.

So we cannot guarantee using PH1 in this way, as we do not test either in validation and in production.

Based on this, all the F4 device family, PH1 must be left unconnected and we do not recommend using it as GPIO when RCC is in HSE_BYPASS mode.
On STM32CubeMX side, nothing to change with the actual config.
However, no constraint and no limitation to use PH0 and PH1 in GPIO if RCC use HSI.

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.

Thanks for the detailed info!

JW