Moving to STM32, noobs ask for help on selecting chip

Post here first, or if you can't find a relevant section!
Post Reply
hitech95
Posts: 3
Joined: Fri Mar 26, 2021 2:49 pm

Moving to STM32, noobs ask for help on selecting chip

Post by hitech95 »

Hi, I'm designing a new circuit using an STM32 instead of the AVR.
I've had a Nucled dev board for years... I got it like 8 years ago!

That said, I'm interested in designing something simple to start with but I cannot find a good starting point.
I've seen that there are idfferent bootloaders, cores etc.

My plan for now is to create a some sort of RTC just to start handling soemthing more than GPIOs.
Using the web mbed is quite easy but I would like to better understand how a good approach on thoose chips is.

Back in time there were none, and the core was not well documented, I remember that only CubeMX was the way to go and there was a lot of missing documentation on how to setup the build envoroment if you don't had bought the IDE + SDK.

My project beeing emulating a RTC chip hould have the following HW functions:
IRQ pin when an alarm is triggered.
SCK output of the LSE clock.
And I2C slave to communicate with a master.
SW side I just want to set the time and read it and add alarm that trigger the IRQ pin.

That said I don't completly uderstand why some chips HAVE MCO and other not. Some chips with more flash/ram does not have it or it can driven only from PLL/HSE.

Does you think that creating something similar is easy? :oops:
How hard is to port it between chips? My dev board is a STM32F4 but my final plan it to use a STM32F0.

I dont get how to compare chips that looks so similar to me, like:
STM32F030C8
STM32F070CB
STM32F051C8
Anyway looks like that there is no Value line chip that have MCO with the MUX able to witch to the LSE clock and a decent quantity of flash the STM32F030C8 was perfet but no LSE output.

My current dev board is a Nucleo F401re.

Regards,
hitech95.
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Moving to STM32, noobs ask for help on selecting chip

Post by ag123 »

welcome
do review the faqs if you have not done so
viewtopic.php?f=2&t=3
viewtopic.php?f=2&t=301
https://stm32-base.org/boards/

these are my suggestions. if you are new to this platform. get a stm32f4xx series e.g. a nucleo board to start off.
e.g. nuicleo stm32f401, stm32f411 etc
https://github.com/stm32duino/Arduino_C ... -64-boards
if you search around the forum u'd find there are some 3rd party boards such as
stm32f401 blackpill, stm32f411 blackpill, stm32f407 black board
adafruit has a stm32f405 feather board
https://learn.adafruit.com/adafruit-stm ... er-express
there is also offerings from olimex
https://www.olimex.com/Products/ARM/ST/
then micropython has a tiny board that's literally a stm32f405
https://store.micropython.org/product/PYBv1.1H

the old favourites in the forum are like the
stm32f103c8 blue pill or other such 'pill boards'
these would feature in the faqs

both stm32f103 and the stm32f4 series has built-in RTC, all it takes is for the board to support it with a 32khz crystal
but they are quite different where the hardware goes.

the f4 series generally has more sram (compared to stm32f103c8 72mhz 20k sram)
has a FPU (floating point unit), has an 'ART' accelerator (onchip cache) and some of them runs much faster than 72mhz.
an f401 runs at 84mhz (default 'recommended' speeds)
but the performance can be quite a bit better than stm32f103c8 for what looks like a mere 10mhz difference
some benchmarks based on a ported adafruit ili9341 spi lcd library and adafruit's graphics test:
https://github.com/ag88/Adafruit_ILI934 ... nd-results
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Moving to STM32, noobs ask for help on selecting chip

Post by ag123 »

porting downwards may be 'hard', stm32f4 is cortex-M4, going from M4 - M0 would probably mean 'missing things'. and those you'd need to code around it. e.g. no hardware fpu (there are floating point libs), then there would be features that is simply not there on M0 vs F4xx
mrburnette
Posts: 633
Joined: Thu Dec 19, 2019 1:23 am
Answers: 7

Re: Moving to STM32, noobs ask for help on selecting chip

Post by mrburnette »

Be kind to yourself and develop on the same hardware you will deploy... at least at the microcontroller level.

Buy a minimum of 2 dev boards, identical. Separating H/W from S/W issues often involves substituting a known-good board.
mlundin
Posts: 94
Joined: Wed Nov 04, 2020 1:20 pm
Answers: 6
Location: Sweden

Re: Moving to STM32, noobs ask for help on selecting chip

Post by mlundin »

To test and learn, the Nucleo boards with ST-Link debug on board are extremely good value and superb platforms to evaluate your ideas. They dont need any extra bootloaders, and most modern ST chips have an on chip USB bootloader that is activated with a bit of BOOT magic when booting up so no extra bootloaders are needed.

Once you have your projekt idea working well on a suitable Nucleo board you can work on your own board and chip designs. Selecting the right combination needs a careful review of project needs and careful reading of Reference Manual for the variant type and Data Sheet for the specific chip.
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: Moving to STM32, noobs ask for help on selecting chip

Post by dannyf »

Depending on your software skills code reusability can be achieved. For the longest time I wrote most of my code for various MCUs on Keik C51 and TurboC.

With that said it is generally easier to start on the same chip as you would develop. And the 32bit chips are not exactly new comer friendly. So you may want to start simple. With a 8bit chip or a Stm32f0 or stm32f1 chip. Stm32f030 is my favorite.
Post Reply

Return to “General discussion”