Taking a look at STM32G0 series

Anything not related to STM32
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: Taking a look at STM32G0 series

Post by dannyf »

back to PY32: the plot thickens.

Apparently PY32 is identitical to another chip from China: Air001 - https://cdn.openluat-luatcommunity.open ... C1.0.4.pdf

there is a port of Arduino for Air001 (and Air103): https://github.com/Air-duino/Arduino-AirMCU

So you could run that port on a PY32F002A/030, given the similarity between the 002A and 030.

I haven't tried it myself.
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: Taking a look at STM32G0 series

Post by dannyf »

G030 runs at 120Mhz (highest I tried) and hangs at 128Mhz. Not tested the peripherals (other than gpio + systick and uart).

that's just crazy.
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: Taking a look at STM32G0 series

Post by dannyf »

Air103 looks like an impressive chip: 17 timers and 5 uarts... More like LM4F120 than STM32F103.

I would like to get my hands on that :)
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: Taking a look at STM32G0 series

Post by dannyf »

I can now create 48-bit hardware timers on the F0 / G0 parts by chaining a 32-bit timer with a 16-bit timer.
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Taking a look at STM32G0 series

Post by ag123 »

just stumbled into this article
https://community.arm.com/arm-community ... ontrollers
apparently stm32g0x0 Cortex-M0+
https://www.st.com/en/microcontrollers- ... 030j6.html
may be slightly better stm32f0x0 Cortex-M0
https://www.st.com/en/microcontrollers- ... -line.html

but it seemed to be the 'rarely used' MPU - quite useful for 1 purpose, stumbled into this
https://community.arm.com/cfs-file/__ke ... System.pdf
it may be possible to place a few bytes as a 'protected' region so that it triggers a memory fault where the stack overlaps the heap.
this may be quite useful to troubleshoot the stack overlapping the heap in some cases. or that it may be possible to be left there to detect stack overlap heap problems in 'production' use cases, e.g. blink the led in 'special ways'

the other thing would be the 'macro trace buffer' which may be useful in debug and 'low latency io' which i'm not sure what that may be

accordingly between M0 & M0+ vs M3 etc is a 'missing' integer divide
https://en.wikipedia.org/wiki/ARM_Cortex-M
https://developer.arm.com/-/media/Arm%2 ... ble_v3.pdf
so that would need to be replaced by more instructions to do the same

accordingly, M0+ is capable of (an optional) 'single cycle IO' at gpio ports
file:///home/andrew/it/cpu/arm/DDI0484C_cortex_m0p_r0p1_trm.pdf
i'm not too sure if that applies here. it may be quite interesting to do some io reads to see how far feasible is that.
e.g. to do things like some timing measurements with
GPIOx->BSRR
GPIOx->IDR
it may be useful in some cases if it is indeed 'fast io' ;)
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: Taking a look at STM32G0 series

Post by dannyf »

the biggest downside with G0 (in tssop20 form) is the lack of onboard xtal oscillator. The f0 has one.

G0 has better peripherals and lower prices. and more space.

Personally, I prefer PY32 > F0 > G0 - as i almost always use a xtal.
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Taking a look at STM32G0 series

Post by ag123 »

I'm halfway wondering if we can patch that crystal there, but my guess is at least it'd take a custom pcb to get there.
my guess is that it is unlikely to work simply soldering the crystal at the relevant pins say using a sop - dip adapter

otherwise, we can perhaps experiment by literally patching a crystal there.
https://www.aliexpress.com/w/wholesale- ... ystal.html
the thing is those caps that normally goes with it could be a challenge at least to add them.
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: Taking a look at STM32G0 series

Post by dannyf »

it'd take a custom pcb
not sure: the OSC_OUT pin is not routed to a physical pin. so you are stuck with an external (crystal) oscillator if you want to use HSE.
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Taking a look at STM32G0 series

Post by ag123 »

dannyf wrote: Mon Sep 04, 2023 10:10 pm
it'd take a custom pcb
not sure: the OSC_OUT pin is not routed to a physical pin. so you are stuck with an external (crystal) oscillator if you want to use HSE.
they are at pin 2 (OSC_IN) and 3 (OSC_OUT) actually
viewtopic.php?p=11661#p11661
but that it is 'strange' as the HSE and LSE seemed to be 'shared'

Mistake OSC_OUT seemed to be only there on the 48 pin LQFP chip.
https://www.st.com/en/microcontrollers- ... 030f6.html

less that on chip clock, the 20 pin version is 'less a lot of things', some apps need HSE to keep the sysclock from drifting
there are slightly more expensive chip oscillators but that it is a hassle and cost more
or it'd take an extra transistor with a crystal to drive it.
https://eepower.com/technical-articles/ ... cillators/
https://www.elprocus.com/pierce-oscilla ... lications/
https://en.wikipedia.org/wiki/Talk:Pierce_oscillator
my guess is it'd probably be 'ok' even if it is 'sine' wave as the osc input would handle the wave shaping.

colpitts configuration is probably more suitable for BJT transistors, but would occupy a little board for that purpose.
https://www.electronics-tutorials.ws/os ... ystal.html
Post Reply

Return to “Off topic”