Things you like and do not like about stm32
- CraigKissell
- Posts: 1
- Joined: Sun Jul 17, 2022 2:51 pm
Things you like and do not like about stm32
Hello folks. If you have been a user of stm32, can you tell what you like and what you don’t like about it? I think this thread will help developers gain some motivation and maybe improvement for their project. Hope this topic might interest some of you.
Re: Things you like and do not like about stm32
one thing that I think is challenging is that the peripherals are slightly different from chip to chip, family to family.
ST could have standardized those modules so to minimize needed investment in software.
ST could have standardized those modules so to minimize needed investment in software.
Re: Things you like and do not like about stm32
it is one of the major mcus that has a diverse range for you to choose, with different feature sets and it is ARM based.
the stm32f4xx has that ART accelerator and FPU, which makes it one of the fastest mcus around for floating point ops (think DSPs) that has wide availability.
The same compiler tool chain can be used to build apps for both Raspberry Pico and STM32s and possibly many other ARM based (cortex-M) mcus.
This is one 'feature' that even today, its utility has not yet been fully explored. Imagine writing an 'app' that run on different ARM mcus (nordic semi? and some other ARM mcu NXP?). Single code tree, compile for different mcu with different feature sets. Not many mcus is even this close.
I think one area where this feature is used is in 3d printer boards, 1 code base - marlin firmware, many different ARM mcu platform.
the stm32f4xx has that ART accelerator and FPU, which makes it one of the fastest mcus around for floating point ops (think DSPs) that has wide availability.
The same compiler tool chain can be used to build apps for both Raspberry Pico and STM32s and possibly many other ARM based (cortex-M) mcus.
This is one 'feature' that even today, its utility has not yet been fully explored. Imagine writing an 'app' that run on different ARM mcus (nordic semi? and some other ARM mcu NXP?). Single code tree, compile for different mcu with different feature sets. Not many mcus is even this close.
I think one area where this feature is used is in 3d printer boards, 1 code base - marlin firmware, many different ARM mcu platform.
Re: Things you like and do not like about stm32
It can be done fairly easily with middleware, a layer of software that covers common tasks over a large range of chips. I have a set of routines that basically cover most 8 or 16 or 32 chips. The user application accesses the hardware only through this middle layer. Thus immensely portable from one chip to another - you simply swap in the middle layer of the target chip and you are done.
Arduino in essence is such a thing.
Arduino in essence is such a thing.
Re: Things you like and do not like about stm32
just 2 c, on mcus 'middleware' more commonly occupies resources and aggravates the problems of small memory (many mcus e.g. stm32f103c{8,b} has 20k sram) and a small amount of flash.
however, that 'middleware' is actually rather common despite the limitations of this approach.
but that as the same compiler can build for the various different ARM mcus, it is quite feasible to write a 'mono repository' code that can compile across the board to the different arm 'platforms' (mcus).
imagine 1 code base it can build and run on stm32, nxp, TI, nordic, pico, etc and all the way to RPi, android (all the phones) et.al. this is feasible, possible. Just that at the moment i'm not sure what projects is using such an approach. perhaps some RTOS may use such features.
i'm not sure just how 'standard' is CMSIS say to build 'cross mcu' apps, it is likely it at least varies between platforms so that all the 'if defs' are after all necessary.
however, that 'middleware' is actually rather common despite the limitations of this approach.
but that as the same compiler can build for the various different ARM mcus, it is quite feasible to write a 'mono repository' code that can compile across the board to the different arm 'platforms' (mcus).
imagine 1 code base it can build and run on stm32, nxp, TI, nordic, pico, etc and all the way to RPi, android (all the phones) et.al. this is feasible, possible. Just that at the moment i'm not sure what projects is using such an approach. perhaps some RTOS may use such features.
i'm not sure just how 'standard' is CMSIS say to build 'cross mcu' apps, it is likely it at least varies between platforms so that all the 'if defs' are after all necessary.
Re: Things you like and do not like about stm32
it doesn't have to be. think about flipping a pin, on most chips:on mcus 'middleware' more commonly occupies resources and aggravates the problems of small memory (many mcus e.g. stm32f103c{8,b} has 20k sram) and a small amount of flash.
Code: Select all
#define IO_FLP(port, pins) port |= (pins)
timer routines are another example: most of your timer actions execute around setting a period and then do something once that period elapses.
Code: Select all
tmr0_init(); //initialize timer0
tmr0_setPR(period1); //set tmr0 period
tmr0_act(tmr0_isr); //activate tmr0 ISR
the only reason we write code is so we don't have to write code -> a little bit exaggerated but ...