STM32G030F6P6 - does TSSOP20 support 8MHz crystal? datasheet is confusing. - Page 1
Forum section: electronics / general

author: dusan
author_rank: Regular Contributor
timestamp: October 16, 2023, 03:12:08 pm
content: I'm trying to figure out if STM32G030F6P6 in TSSOP20 package supports 8MHz crystal. Here is datasheet:https://www.st.com/resource/en/datasheet/stm32g030j6.pdfOn page 31 in table 12 is: (image1)In additional function there is OSC_IN but then there is nowhere corresponding OSC_OUT.Do I need to use LQFP48 if I want to use 8MHz crystal?

author: ataradov
author_rank: Super Contributor
timestamp: October 16, 2023, 05:12:23 pm
content: You will have to use higher pin count device. The reason OSC_IN is an option is so that you can still feed the external clock. But there is no way to use internal oscillator.You may want to consider using external CMOS oscillator, they are not that expensive and the difference in board area and device cost may be worth it.

author: wek
author_rank: Frequent Contributor
timestamp: October 16, 2023, 05:21:03 pm
content: Yes, the smaller-package 'G0 support only HSE BYPASS, i.e. you'd need to use an external oscillator. ST does this also for other families such as 'L0; but in the new 'C0 family (which is derived from the 'G0) there's a better multiplexer allowing to use either LSE or HSE crystal even in small packages (OTOH there's no PLL).Another option would be to use a 32.768kHz crystal and use it to trim the HSI16 oscillator, if your application would be OK with this.JW

author: wek
author_rank: Frequent Contributor
timestamp: October 16, 2023, 05:30:46 pm
content: Quote from: ataradov on October 16, 2023, 05:12:23 pmThe price difference between the TSSOP20 and LQFP48 versions is (to me) surprisingly small, at least in our favourite local webshop:I understand the volatility of pricing etc. so I am not suggesting this is generally the optimal solution, just had a look and been surprised.JW

author: ataradov
author_rank: Super Contributor
timestamp: October 16, 2023, 05:46:19 pm
content: CMOS oscillators are available for less than 50 cents and they are so much easier to use than crystals (no need for load capacitors, no sensitive analog stuff).

author: DavidAlfa
author_rank: Super Contributor
timestamp: October 16, 2023, 07:22:58 pm
content: 2€ for a g030 is crazy, it's in lcsc for 40-30 cents!https://www.lcsc.com/product-detail/Microcontroller-Units-MCUs-MPUs-SOCs_STMicroelectronics-STM32G030F6P6TR_C529330.htmlMost G0 series are ~60 cent:https://www.lcsc.com/search?q=Stm32g010ppm 8MHz oscillator for 20 cents:https://www.lcsc.com/product-detail/Oscillators_TAE-Zhejiang-Abel-Elec-F32258MUBCE2O_C5917305.html

author: langwadt
author_rank: Super Contributor
timestamp: October 16, 2023, 07:37:39 pm
content: Quote from: ataradov on October 16, 2023, 05:46:19 pmyep, current consumption will be higher and sleep modes will be tricky, but an oscillator is a much easier solution

author: dusan
author_rank: Regular Contributor
timestamp: October 17, 2023, 05:56:39 am
content: Ok, that explains it. I can't spare extra 5mA so I will use LQFP48 package instead.

author: Veketti
author_rank: Regular Contributor
timestamp: October 29, 2023, 01:42:29 pm
content: Oh, I felt for this same trap and already got bunch of tssop20 package uc's. My question is, how good is the internal oscillator, is it accurate enough for fast Uart, i2c? Is there any rule of thumb, when you need external oscillator, other than RTC?

author: DavidAlfa
author_rank: Super Contributor
timestamp: October 29, 2023, 02:37:30 pm
content: I2C, SPI (Synchronous interfaces) are master-slave interfaces, clock driven, so no problem with the accuracy, there's only one clock.It's good enough for uart, check datasheet for HSI accuracy specs.