Skip to main content
BPart.1
Associate II
November 18, 2025
Question

STM32CubeMx doesn't allow to use OSC_OUT as GPIO when HSE is in Bypass mode

  • November 18, 2025
  • 2 replies
  • 114 views

Split from this thread.

Hi mƎALLEm, Thanks for this reply and confirming that the OSC_OUT can be used as GPIO when HSE in bypass mode. Can  you please advise I do I set this as a GPIO? CubeMX does not allow me to configure this pin. Should this be hand coded to make this possible? Thanks. Regards Billy

2 replies

mƎALLEm
Technical Moderator
November 18, 2025

@BPart.1 wrote:

CubeMX does not allow me to configure this pin. Should this be hand coded to make this possible? Thanks. Regards Billy


Hello @BPart.1 ,

Better to ask that question in CubeMx forum board and link to that thread and close that one by accepting my answer above..

Internal ticket opened for CubeMx follow-up: 222721 

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
Andrew Neil
Super User
May 13, 2026

@BPart.1 wrote:

CubeMX does not allow me to configure this pin. Should this be hand coded to make this possible? 


Indeed, it seems that this is a limitation of CubeMX - see: 

https://community.st.com/t5/stm32cubemx-mcus/how-to-set-hi-z-mode-in-ph1-osc-out-when-using-hse-bypass-mode/m-p/860116/highlight/true#M34335

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.