STM32G030F6 OSC_EN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-31 8:22 PM
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 definition, can I use it as OSC_OUT?
Solved! Go to Solution.
- Labels:
-
STM32G0 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-02 12:58 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-01 3:46 AM
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)
When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
Imen
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-01 4:09 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-01 10:18 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-02 12:58 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-02 1:11 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-02 1:21 AM
You are right, I corrected my statement above.
Regards
/Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-02 2:04 AM
Hi, Peter
Thanks a lot, so I will connect PC15 with my enable pin of oscillator.
Regards,
Marvin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-05 2:57 AM
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​
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-05 4:01 AM
Hi, Marvin,
it looks like the original question has been answered. Please create a new topic for further questions.
Regards
/Peter
