Taking a look at STM32G0 series

Anything not related to STM32
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Taking a look at STM32G0 series

Post by ag123 »

I've a feeling that these days some 'peripherals' are after all software, which is a reason we occasionally see a difference.
They are likely the same silicon.
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: Taking a look at STM32G0 series

Post by dannyf »

got my G031 chips. Everything worked out fine.

Except timer2 prescaler update. TIM2/3/4 fall into the same group but their prescalers behave different. Earlier STM32 chips have a bug whereby you have to set the UG bit in the EGR register to force a prescaler update. That hasn't been true on recent chips, including G030/G031, except TIM2 whereby you have to manually force an update. Not necessary on any other timers on G030/G031.
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: Taking a look at STM32G0 series

Post by dannyf »

I think STM32G030 is the same chip as STM32G031.
having played them for a while, they are not exactly the same :)

1. TIM2, LPTIM1/2, and LPUART work on G030. UID works on G030 too.
2. However, executing G031's pin assignment regime for LPUART locks up G030 - unable to restore comms with the chip. haven't found a way to recover from that.

So, something is different between those two.
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Taking a look at STM32G0 series

Post by ag123 »

stumbled into an Aliexpress ad that seem to place the STM32G030F6P6
https://www.aliexpress.com/item/1005005382119188.html
at us $0.42 a piece !
I'm not sure if you see the same and if shipping is included. But that it gets attractive enough I grabbed a few pieces :lol:

even some much less feature rich ICs are priced higher than this, e.g. some i2c IO extenders are priced for more.
sram is tight at 8 KB and flash at 32 KB isn't very 'generous', but that it packs i2c, uart, spi and a 2.5 Msps ADC, 8 timers and even RTC, DMA.
seemed ideal for some controller apps e.g. motors

for this chip SOP20, I won't bother to buy pre-made boards, so you won't lose precious pins tied down to 'unnecessary' board features.
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: Taking a look at STM32G0 series

Post by dannyf »

i'm waiting on a few py32f002s to arrive. so far, minimum changes to port stm32f030 code to that chip.

it is a fraction of what the G0s are costing now.
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Taking a look at STM32G0 series

Post by ag123 »

got my chips, I think I'd need to at least try to solder it :lol:

I noted that in the G030 G031 series
https://www.st.com/en/microcontrollers- ... -line.html
https://www.st.com/en/microcontrollers- ... 2g0x1.html

the G031F8 has got a 20 pin TSSOP chip that has got 64k flash and 8 k sram, those are 'less featured' among the AliX vendors as I'd guess most of them simply stock the G030F6 being the 'cheapest' possibly.
my guess is G031F8 is probably more suitable for C/C++ style development and is less prone to exhausting the flash program storage too quickly, i.e. can take some 'fat' lol.

one of those things I'm thinking of is try to bit bang usb full speed 12 Mbps. These days those usb 'full speed' transceivers are hard to get some of them marked obselete, e.g. the usb1t11a
https://www.mouser.com/datasheet/2/149/ ... 320893.pdf
https://www.onsemi.com/products/interfa ... s/usb1t11a
they literally cost more than microcontrollers for retail chips alone. I'd guess after all, socs with usb built-in are after all common these days and it 'isn't worth' the trouble patching another chip just to do that.

I'm thinking if I could 'abuse' things like the max3485 which purportedly can do up to 10 Mbps, trying to push 12 Mbps for usb full speed signals
https://www.analog.com/en/products/max3485.html
these are fairly abundant and rather low cost
https://www.aliexpress.com/w/wholesale-max3485.html
the idea is to 'drive' the max3485 at 12 mbps on SPI which seemed quite doable.
then for things like 'single ended zero' - a.k.a 'usb reset' , it'd probably take a transistor or try with a gpio pin to pull both the differential line to zero.

an alternative is to directly bit bang usb on the GPIOs and I kind of stumbled on how to generate the differential signals at the GPIOs, hence, looked at the max3485

there is still some incentive to bit bang usb on these 'no usb' chips as it dramatically expand the use cases, just that the small amount of flash and sram is going to prove to be a challenge.

patched this across to eevblog forum
https://www.eevblog.com/forum/microcont ... g030-g031/
Last edited by ag123 on Thu Jul 27, 2023 8:18 am, edited 2 times in total.
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Taking a look at STM32G0 series

Post by ag123 »

off topic:

on the topic of 'cheap' mcu chips, I recently stumbled into
CH32V003F4P6
https://www.wch-ic.com/products/CH32V003.html

which is a RISC V implementation.
fairly 'abundant'
https://www.aliexpress.com/w/wholesale- ... 3F4P6.html

quite a bit of rave about it
https://www.youtube.com/watch?v=L9Wrv7nW-S8
https://www.youtube.com/results?search_query=ch32v003
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: Taking a look at STM32G0 series

Post by dannyf »

The 031 and 030 are almost the same chip. Not sure of price differences.
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Taking a look at STM32G0 series

Post by ag123 »

Accordingly, g0x0 is deemed 'value' line
https://www.st.com/en/microcontrollers- ... -line.html
while g0x1 is deemed 'upgraded' line
https://www.st.com/en/microcontrollers- ... 2g0x1.html
so the x1 lines has a bit more stuff e.g. the LP peripherals

and that the x1 line has a bigger range of flash and ram sizes to choose
e.g. the x1 line has a STM32G051F8 64k flash 18k sram in a TSSOP20 package
https://www.st.com/resource/en/datashee ... g051f8.pdf
and that this one packs 2 DAC and 2 analogue comparators
this can't be found in the x0 series
so this may meet 'niche' use cases where more sram and flash is needed or for that matter the DAC

I noted AliX mostly features the g030 or g031 as may be those are the 'cheapest' or that most 'others stock that'
https://www.aliexpress.com/w/wholesale-stm32g0.html
various other part numbers seemed not stocked or featured as those may be deemed to have a lower demand or is costly to order.
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: Taking a look at STM32G0 series

Post by dannyf »

Those peripherals exist on 030s as well, even if they are not shown in the datasheet.
Post Reply

Return to “Off topic”