2026-04-27 3:53 PM
The STM32G031G8U6 in a UFQFPN28 package does not have PF0 / PF1 pins for HSE OSC_IN / OSC_OUT. It does however have OSC_IN on PC14. This is intended for an external CMOS oscillator in bypass mode.
I’m currently in the schematic design stage. My board clock is a clipped-sine TCXO used for other purposes. In some modes, I’d like to use it to clock the STM32. I’m very constrained on cost, power, and board space. The clipped-sine doesn't meet the voltage level requirements for a bypass-mode clock.
Is it possible to configure HSE as if it were a crystal, but instead supply a clipped-sine 0.8 Vpp clock from the TCXO to PC14 OSC_IN? Does the die used in UFQFPN28 even have the HSE oscillator circuit that exists in the 48 pin package?
I would set RCC_CR[HSEBYP] = 0 and RCC_CR[HSEON] = 1. I don’t see any register controlling the OSC_IN alternate function on PC14. STM32CubeIDE doesn't allow this configuration, unsurprisingly, but I would configure the registers directly.
I know others have successfully used clipped-sine injection with the HSE configured for crystal on other MCU families (presumably using the PF0 OSC_IN pin on packages where the HSE was fully supported). Not sure if it will work on the 28-pin package that doesn't support HSE as a crystal oscillator. Any thoughts?
2026-04-28 8:18 AM
The STM32G031G8U6 in a UFQFPN28 package does not support HSE.
The PC14 pin can be used as LSE input, and it can also be used in LSE bypass mode. It cannot be used as an HSE input.
You may use the internal HSI oscillator. If higher frequency precision is required, you can use an LSE crystal (32.768 kHz) and calibrate the HSI using this precise LSE crystal frequency
2026-04-28 2:25 PM
Hi, thank you for your prompt reply.
I'm confused by your statement that PC14 cannot be used as an HSE input. The STM32G031x4/x6/x8 data sheet (DS12992 Rev 4) and STM32CubeIDE (1.17.0) both indicate that PC14 can be configured as OSC_IN for the UFQFPN28 package, feeding the HSE block. See attached screenshots. Are you saying this is wrong?
As I understand the documentation, PC14 is supported as a CMOS HSE clock input in bypass mode. If that's true, can you address the original question?
Thanks.
2026-04-30 1:37 AM
Thank you for your feedback.
After double-checking, the STM32G031G8U6 in a UFQFPN28 package does support HSE in bypass mode.
Refer to DS12992 Rev 4, "5.3.7 External clock source characteristics". PC14 can be used as input for HSE in bypass mode.
2026-04-30 2:00 PM
Yes, thanks I understand that, but my original question remains:
Is it possible to configure RCC_CR[HSEBYP] = 0 and RCC_CR[HSEON] = 1 to select crystal oscillator mode (without a crystal attached) and feed the 0.8 Vpp clipped sine from the TCXO into PC14 OSC_IN on the UFQFPN28 package, ignoring the non-existent OSC_OUT pin?
It seems that should be possible if the die is the same as that used in the 48 pin package, with the OSC_OUT pin not bonded out in the 28 pin package. Perhaps the IC design team or packaging team would know the answer to this?