cancel
Showing results for 
Search instead for 
Did you mean: 

Implementing the HSE on the STM32G030K6Tx

MattH2
Associate II

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

8 REPLIES 8
waclawek.jan
Super User

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

Thank you for the prompt reply!

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

Andrew Neil
Super User

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

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

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

 

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.

If I go this route, do I just selected bypass clock source and then connect my HSE oscillator to the PC14 pin?

 

Seems like it gives you the option of PC14 or PF0 ?

Have you studied Application note AN5096, Getting started with STM32G0 Series hardware development ?


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.