stm32f1 vs stm32f0 - Page 1
Forum section: electronics / general

author: profdc9
author_rank: Frequent Contributor
timestamp: December 01, 2019, 04:00:06 pm
content: Please press ALT-F4 if you are too opinionated to give a civil answer.I have been using the STM32F1 mostly because it is cheap and common, even though it is not new. Also the clockspeed and Cortex M3 instruction set are somewhat more necessary for my purposes than the M0 reduced set.Is the main reason to use STM32F0 to save cost, or are there better peripherals on the STM32F0 than the STM32F1? Is it power consumption and sleep modes? Would RISC-V microcontrollers be somewhat more attractive now as the cost of not requiring a license to the ARM cores is offset by potentially larger die size and reduced yields? I guess for a hobbyist, the cost of the microcontroller STM32F1 vs STM32F0 is not really an issue, and is more about the ease of use and capability, but for mass production cost would be a significant determining factor.Are there compelling reasons to change a design already for F1 to F0 if the cost difference of the processor is not a significant issue?

author: Kjelt
author_rank: Super Contributor
timestamp: December 01, 2019, 04:17:36 pm
content: AFAIK:For low power the L series was created, look there if you want battery operated or low power applications.F1 was the first ST Cortex M3 processor and the core is pretty old but that would not have to be a drawback but could be.F0 was created afaik as a low cost 32 bit arm upgrade from the popular 8bit STM8 series, so indeed for mass production it kicks the F1 for price but not for operations per second.The drawback was for the F1 the outdated peripheral software libraries, not sure how that is today.The limitation for F0 were no large package support (over 100 pins) but this voukd also have changed the last years. I lost track of new developments.Also the G series has now been introduced.

author: jhpadjustable
author_rank: Frequent Contributor
timestamp: December 01, 2019, 06:28:12 pm
content: Some peripherals have improved a bit after the F1s. For example, on the F0, the USB can now be run crystal-less and simultaneously with CAN, which is really nice if you want to build a USB-CAN bridge.

author: lucazader
author_rank: Regular Contributor
timestamp: December 01, 2019, 06:36:59 pm
content: If you are looking to change now, or looking for a reason to change then as Kjelt mentioned the G0 series has recently been released.Think of this as a refresh to the F0.Benefits of G0 over F1:Requires less Vcc and GND pins, more usable pins on each package size (F103C8 takes 9 power pins, G030C8 has three)Low power. The G0 is produced on a newer more power efficient process node. (the core running at 64MHz on the G0 takes less than 6mA, the F1 takes around 24mA)The G0 has newer revisions of lots of peripherals, Eg the UARTs have tx/rx pin swapping, level inversion, hardware fifo, and lots more.Faster ADCs (2.5MSPS vs 1 MSPS)Cheaper (as long as you buy genuine parts from ST). The G0 series can be had (in volume) starting at around $0.40 USD for small packages, and around $0.80 USD in larger packagesSmaller packages. Some of the new G0 series can be had in 8 pin packages!There are few reasons not to go for the G0 over the F1 as well, but I will probably leave that for anther person.

author: jhpadjustable
author_rank: Frequent Contributor
timestamp: December 01, 2019, 07:34:41 pm
content: Quote from: lucazader on December 01, 2019, 06:36:59 pmThis isn't one of those tedious advocacy threads that's better suited to reddit. You're among engineers here. Please, don't play coy, finish the story...

author: lucazader
author_rank: Regular Contributor
timestamp: December 01, 2019, 09:11:46 pm
content: The main reason with going for the F103 over the G0 would be for the general part availability.There are lots of chips in the F1 family that are readily available all over the world in large quantities.Especially when going in to volume production in china there are lots of F103's to be had, be they genuine, or not (cheaper).Another important reason would be the larger instruction set.In particular, the M3 core in the F103 supports hardware integer divide (2-12 cycles), whereas the M0 and M0+ cores do not have this feature.The general performance of the cores should be pretty similar apart from the case explained above (F1 @72MHz = 61dmpis, G0@64MHz = 59dmips, however the F1 needs an external crystal the get up to 72MHz, the G0 can do 64 with the HSI clock).These are the two examples I can think of, but I'm sure others might be able to elaborate further

author: jhpadjustable
author_rank: Frequent Contributor
timestamp: December 01, 2019, 10:08:24 pm
content: Ah, thanks, just making sure there wasn't something sinister hiding in the G series, like an I2C peripheral even more famously broken than the F103's

author: andersm
author_rank: Super Contributor
timestamp: December 01, 2019, 11:13:47 pm
content: Despite whatST's website says, there are no G0 devices with USB host or device support, at least not yet.

author: profdc9
author_rank: Frequent Contributor
timestamp: December 02, 2019, 04:11:33 am
content: Yes I have noticed that the I2C on the STM32F103 is pretty unreliable. I am not sure what do to about it or if there's a library that implements workarounds. The only sure-fire solution I've found is software I2C.

author: andersm
author_rank: Super Contributor
timestamp: December 02, 2019, 08:07:41 am
content: It's been ages since I've done I2C on an F1, but IIRC the problems only arise if you don't react in time. Making the bus interrupt-driven, and making the interrupt the only active one at the highest pre-emption level worked for us. I think that's the workaround described in the errata sheet as well.

author: GromBeestje
author_rank: Frequent Contributor
timestamp: December 02, 2019, 06:10:17 pm
content: The new G0 series have a different pinout, but for all F and L the pinout is the same. So you can easily swap an F103 wit han F072 or L152 without changing the board layout. That's what I think is one of the advantages of ST. (Why have they changed this with the G0??)The newer chips have some more flexibility then the F1 series. Like, the F1 series has a set of default and a set of alternate pins per peripheral. With the newer chips, you can select between default and alternative per pin, not per peripheral. The newer chips also have an internal pull up for USB, where the F1 needs an external resistor.Regarding the I2C. There is something about the initialisation sequence that needs to happen in a certain order, otherwise the BUSY bit will get stuck.

author: Yansi
author_rank: Super Contributor
timestamp: December 02, 2019, 06:52:40 pm
content: Quote from: profdc9 on December 02, 2019, 04:11:33 amthe I2C CPAL driver. Should implement all existing workarounds.

author: thm_w
author_rank: Super Contributor
timestamp: December 03, 2019, 01:29:30 am
content: Quote from: andersm on December 01, 2019, 11:13:47 pmI thought, oh its just that STM32G0x1 is not available yet, nope, there are some but they don't have USB. Why not make another line in the chart for the different types...STM32G031G6U6 = no USB at allSTM32G071GBU6 = USB PD onlySTM32G081KBU6 = USB PD only

author: Yansi
author_rank: Super Contributor
timestamp: December 03, 2019, 10:48:22 am
content: USB PD is still no USB.

author: hatte
author_rank: Contributor
timestamp: December 16, 2022, 08:31:45 pm
content: Reviving an old thread, I know.The recently introduced STM32G0B1 and STM32G0C1 series support USB 2.0 FS HOST/DEVICE (crystal-less).*stm32g0b1cb*stm32g0c1ccAnd the STM32L052/3 and L072/3 also supports USB 2.0 FS HOST/DEVICE (crystal-less), and is low cost (currently about US$1.30 @ 100 qty).*stm32l052t6

author: thm_w
author_rank: Super Contributor
timestamp: December 16, 2022, 10:48:52 pm
content: Seems overly confusing to me.. too much overlap with other series.I don't see the STM32L052 for $1 anywhere, its $2.50-3 at the distributors I found.They were busy making these when they could have been making IC's people actually wanted due to shortages.