Skip to main content
Associate II
July 8, 2025
Question

Implementing the HSE on the STM32G030K6Tx

  • July 8, 2025
  • 2 replies
  • 707 views

Hi all,

I am designing a PCB using the STM32G030K6Tx and for my application I only require the HSE external crystal, which I believe I connect to GPIO pins PC14 and PC15. When I go the the .ioc file in the STM32CubeIDE (System Core -> RCC) I see there is only an option to enable the LSE and no option to enable the HSE. How do I go able enabling the HSE? I have attached an image of the relevant section of the .ioc file.

STM32G0 Series RCC

2 replies

waclawek.jan
Super User
July 8, 2025

There is no OSC_OUT pin on the 32-pin package, so you can't use a HSE crystal.

You can only use a HSE oscillator, ie. device which contains both the crystal and the oscillator and outputs the given frequency signal in itself, that connected to PC14, while enabling HSEON and setting HSEBYP in RCC_CR.

JW

MattH2Author
Associate II
July 8, 2025

Thank you for the prompt reply!

How would I implement this HSE oscillator in the .ioc file?

Andrew Neil
Super User
July 8, 2025

@MattH2 wrote:

How would I implement this HSE oscillator in the .ioc file?


You'd need to use Bypass mode

PS:

AndrewNeil_0-1751992603284.png

 

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.
Andrew Neil
Super User
July 8, 2025

@MattH2 wrote:

STM32G030K6Tx


So the LQFP-32 package:

AndrewNeil_0-1751992109317.png

 


@MattH2 wrote:

I only require the HSE external crystal, which I believe I connect to GPIO pins PC14 and PC15.


I think not - they are the OSC32 pins:

AndrewNeil_1-1751992262649.png

 

The OSC pins are on PF0 and PF1 - but not available in the LQFP-32 package?

AndrewNeil_2-1751992411886.png

 

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.
MattH2Author
Associate II
July 8, 2025

So should I use the 48 pin package? and what is its manufacturer product number?

 

Andrew Neil
Super User
July 8, 2025

If you want an internal oscillator, then yes.

But, as @waclawek.jan said, you can use an external oscillator - instead of just an external crystal.

 

PS:


@MattH2 wrote:

what is its manufacturer product number?


See the Ordering Information - posted earlier.

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.