cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G030F6 OSC_EN

Qwang.2
Associate II

Hello,

I am using STM32G030F6, use HSE, but when I set the system clock, PA14 change to OSC_IN but while PA15 change to OSC_EN, and I can't find any specification of this defini0693W00000GW2fsQAD.pngtion, can I use it as OSC_OUT?

1 ACCEPTED SOLUTION

Accepted Solutions

PC15 ist an input push-pull output with default value low and optional pull-up or pull-down, if you configure it as OSC_EN.

Please find some more information in the reference manual RM0454, section 5.2.1, subsection External source (HSE bypass):

The OSC_OUT pin can be used as a GPIO or it can be configured as OSC_EN alternate function, to provide an enable signal to external clock synthesizer. It allows stopping the external clock source when the device enters low power modes.

Note: For details on pin availability, refer to the pinout section in the corresponding device datasheet.

(remark: as mentioned earlier OSC_OUT is not available at smaller packages than the LQFP48).

Regards

/Peter

In order 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.

View solution in original post

9 REPLIES 9
Imen.D
ST Employee

Hello @Qwang.2​  and welcome to the Community :)

Do you mean PC14 and PC15 (not PA) ?

I advise you to refer to the STM32G030 datasheet to identify the pins assignment (free/usable pins)

0693W00000GW4BBQA1.jpg 

0693W00000GW4BkQAL.jpg 

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Due to pin restrictions, the TSSOP20 is somewhat restricted in its features, e.g. OSC_OUT is not available. You can find it e.g. in the datasheet @Imen DAHMEN​ mentioned, just a few lines below: OSC_OUT is only available in LQFP48, pin 9. Within STM32CubeMX (standalone or as part of STM32CubeIDE) it is only possible to set BYPASS Clock Source, so just OSC_IN can be used for HSE and optional OSC_EN.

You need to switch to LQFP48 if you want to use HSE with a crystal instead of an external clock source/oscillator.

Regards

/Peter

In order 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.
Qwang.2
Associate II

Ok, so have can you use PC15(OSC_EN)? as an output or else? Can I just connected it with the enable pin of Oscillator? If yes, this means this pin will be output high by default? or the oscillator will not work, because it will not be enable.

PC15 ist an input push-pull output with default value low and optional pull-up or pull-down, if you configure it as OSC_EN.

Please find some more information in the reference manual RM0454, section 5.2.1, subsection External source (HSE bypass):

The OSC_OUT pin can be used as a GPIO or it can be configured as OSC_EN alternate function, to provide an enable signal to external clock synthesizer. It allows stopping the external clock source when the device enters low power modes.

Note: For details on pin availability, refer to the pinout section in the corresponding device datasheet.

(remark: as mentioned earlier OSC_OUT is not available at smaller packages than the LQFP48).

Regards

/Peter

In order 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.
Qwang.2
Associate II

Hi, Peter

As the doc say, PC15 can be configured as OSC_EN alternate function, to provide an enable signal to external clock synthesizer, my understanding is that IO should be an output, so it can enable the external oscillator, while you say it is an input. I am confused, if it is an input, how it realize function to enable the external oscillator?

Regards,

Marvin

You are right, I corrected my statement above.

Regards

/Peter

In order 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.
Qwang.2
Associate II

Hi, Peter

Thanks a lot, so I will connect PC15 with my enable pin of oscillator.

Regards,

Marvin

Qwang.2
Associate II

Hello, peter

Another question, about BOOT, I find that PA14-BOOT0, but if this MCU has 3 BOOT modes, it need 2 IOs to control, but I can't find the second IO, how can I set the BOOT mode? Or to debug, download firmware?

Regards,

Marvin​

Hi, Marvin,

it looks like the original question has been answered. Please create a new topic for further questions.

Regards

/Peter

In order 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.