Author Topic: STM32 alternatives  (Read 20031 times)

0 Members and 1 Guest are viewing this topic.

Offline KalinTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: ca
STM32 alternatives
« on: December 31, 2018, 01:46:23 am »
I have done a couple of projects, mostly hobby level stuff, last one being a 5x5x5 LED cube to teach myself how to program mcu's. I have used an stm32f103 board for them with attolic true studio. I taught myself to use the SPL and and what it is doing at a register level which has been helpful for troubleshooting glitches and my mistakes in coding.

What I have noticed is that I am nowhere near using these chips at capacity, so that led me down a rabbit hole of other MCU's and part families. I am interested in PIC microcontrollers but it seems like there are 5million different parts in 1000 different families. Is there any way to know what parts are useful and is it that difficult to learn coming from programming arm in c?
Thanks

Sent from my SM-G965W using Tapatalk

 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11260
  • Country: us
    • Personal site
Re: STM32 alternatives
« Reply #1 on: December 31, 2018, 02:09:59 am »
Moving away from ARM is a strange move. So what if you don't use them fully? They are still mostly cheaper and easier to use than more crippled alternatives.
Alex
 

Offline KalinTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: ca
Re: STM32 alternatives
« Reply #2 on: December 31, 2018, 03:03:16 am »
I think I phrased poorly. Perhaps it would be better to ask if it would be valuable to add another line to my toolkit. I see that there are some very cheap pic microcontrollers in very small packages that the STM32 lines don't come in. Is it worth learning pic for that reason or are there other arm Lin's that would be a better choice

Sent from my SM-G965W using Tapatalk

 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11260
  • Country: us
    • Personal site
Re: STM32 alternatives
« Reply #3 on: December 31, 2018, 03:13:37 am »
I would definitely stick with ARMs unless your applications have very high volumes where PICs or other MCUs may make sense. Or you are space-limited, and want small 6- or 8-pin package.

With mainstream ARMs 14-pins SOIC or TSSOP would be the minimum package size. I don't think anyone makes smaller parts.
Alex
 

Offline eliocor

  • Supporter
  • ****
  • Posts: 519
  • Country: it
    • rhodiatoce
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: STM32 alternatives
« Reply #5 on: December 31, 2018, 04:11:00 am »
I think I phrased poorly. Perhaps it would be better to ask if it would be valuable to add another line to my toolkit. I see that there are some very cheap pic microcontrollers in very small packages that the STM32 lines don't come in. Is it worth learning pic for that reason or are there other arm Lin's that would be a better choice

You don't learn PIC or ARM. You learn principles. Then you can apply them to anything, even to the things which don't exist yet.

It is good to be aware what's available. It is good to try different things.
 
The following users thanked this post: Howardlong

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11260
  • Country: us
    • Personal site
Re: STM32 alternatives
« Reply #6 on: December 31, 2018, 04:25:30 am »
You don't learn PIC or ARM. You learn principles.
While it is true, there is no practical sense to spend a lot of time on outdated technology.

If you feel like learning something that does not exist - play with RISC-V or something like that.
Alex
 
The following users thanked this post: nugglix

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: STM32 alternatives
« Reply #7 on: December 31, 2018, 04:48:07 am »
You don't learn PIC or ARM. You learn principles.
While it is true, there is no practical sense to spend a lot of time on outdated technology.

Exactly. Technologies come and go, but the principles remain. If history is any indication, everything you see around will be outdated 10 years from now.
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1545
  • Country: au
Re: STM32 alternatives
« Reply #8 on: December 31, 2018, 05:48:24 am »
Is there any way to know what parts are useful and is it that difficult to learn coming from programming arm in c?

C is available for most MCUs so there is not much change there, mainly the peripherals differ, and the documents differ too.

If you wanted to expand a CV, knowing more than one vendor helps, and if you also know more than one core, that is a bonus.

As to what parts are useful, that also depends on what you intend to use them for :)

In some designs, wide Vcc matters, and STM32 are poor there, so someone might select an Infineon XMC1000 series, or Nuvoton  NUC series,  if they needed wide Vcc.

Or, as you mentioned already, package can matter, and 8 bit MCUs have more choices in smaller-end packages than 32b ones.

eg If all you need is a watchdog / system checker operation, who needs 32b for that ?
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: STM32 alternatives
« Reply #9 on: December 31, 2018, 06:36:03 am »
Peripherals may be significantly different between the STM32F103 and an ARM chip from some other vendor.  In fact, peripherals can vary between ARM chips from a single vendor (IIRC, ST is somewhat better than average about sharing peripherals.  But a SAM3X (Arduino Due) and a SAMD21 (Arduino Zero) are quite dissimilar.  (and a "big" ARM, like a Raspberry Pi or Beaglebone, is another beast entirely.)
 

Offline Bud

  • Super Contributor
  • ***
  • Posts: 6911
  • Country: ca
Re: STM32 alternatives
« Reply #10 on: December 31, 2018, 06:42:44 am »
I think I phrased poorly. Perhaps it would be better to ask if it would be valuable to add another line to my toolkit. I see that there are some very cheap pic microcontrollers in very small packages that the STM32 lines don't come in. Is it worth learning pic for that reason or are there other arm Lin's that would be a better choice

You don't learn PIC or ARM. You learn principles. Then you can apply them to anything
...which means you need to learn PIC or ARM  :-DD
Facebook-free life and Rigol-free shack.
 

Offline Bud

  • Super Contributor
  • ***
  • Posts: 6911
  • Country: ca
Re: STM32 alternatives
« Reply #11 on: December 31, 2018, 06:46:59 am »
I would definitely stick with ARMs unless your applications have very high volumes where PICs or other MCUs may make sense. Or you are space-limited, and want small 6- or 8-pin package.

With mainstream ARMs 14-pins SOIC or TSSOP would be the minimum package size. I don't think anyone makes smaller parts.
Low pin count PICs are very handy for simple tasks such as initializing a PLL or reading a quadrature encoder.
Facebook-free life and Rigol-free shack.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11260
  • Country: us
    • Personal site
Re: STM32 alternatives
« Reply #12 on: December 31, 2018, 06:50:59 am »
Low pin count PICs are very handy for simple tasks such as initializing a PLL or reading a quadrature encoder.
Quite likely.

My go to device is still SAM D11 in SOIC-14 package. I buy them in quantity, where the price is less than $1 and use them everywhere. Not having to switch toolchains totally worth it.

This will likely to change if you are shipping 10k+ units/year. I doubt it makes any difference below that.

SAM D11 can be replaced by cheaper D10 or D09 if you don't need USB. I just use D11 because I use them everywhere and the price difference does not matter that much in my case.
Alex
 

Offline filssavi

  • Frequent Contributor
  • **
  • Posts: 433
Re: STM32 alternatives
« Reply #13 on: December 31, 2018, 08:58:00 am »
As far as ARM go I suggest NXP(ex freescale) kinetis lineup, I think it is far superior to st one since the various MCU families (K V M etc) are actually targeted at real world applications, for example the kinetis V line is targeted at power conversion/motor control so it has a ton of pwm/timers, a lot of quadrature decoders, multiple ADC’s for simultaneous sampling
The K line is more a general purpose line, than you have the M line with better ADC’s, integrated PGAs better reference etc.

With st instead they just throw more useless communication peripherals at it, the ADC is mostly the same in the whole lineup, they are limited to only one or two decent timers (the advanced timers, the basic ones are almost useless for everything but the simplest interrupt generation tasks) and so on, basically I feel that with them you are paying for silicon that will go unused


 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11260
  • Country: us
    • Personal site
Re: STM32 alternatives
« Reply #14 on: December 31, 2018, 09:15:54 am »
The popular CP2102N is based on it.
That is still not a reason to actively learn it if you are just starting and not heavily optimizing  for cost.
Alex
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: STM32 alternatives
« Reply #15 on: December 31, 2018, 09:37:05 am »
Since dev boards etc are so cheap, and the programmer is built in, there is no real downside to trying every MCU under the sun for at least one project, or just an evaluation. You end up with a box full of little boards but that still doesn't take up much space. I used to use PIC, like the classic 16F84 which was popular with hobbyists before Arduino, then found AVRs nicer to program with C/C++. With Cortex you've got everything from M0 to M7, and there are A series boards which are quite affordable (i.e. <$100, rather than $500 like some pro boards).

I think the main thing about learning new MCUs, is that you learn how to find and solve their little quirks, like on an AM4379 with PDK v1.0.4, SPI 0 needs a small delay before putting data into the FIFO otherwise you never get a TX empty interrupt... or that on MC56F8345 linked 16-bit counters in timer capture mode occasionally latch a wrong value.

But either way, https://jaycarlson.net/microcontrollers/ is a fantastic place to start. Personally, I concentrate on ARM MCUs because that is most useful to me professionally, but it's really useful to be aware of what is out there.
Bob
"All you said is just a bunch of opinions."
 
The following users thanked this post: oilburner

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: STM32 alternatives
« Reply #16 on: December 31, 2018, 09:39:09 am »
SAM D11 can be replaced by cheaper D10 or D09 if you don't need USB. I just use D11 because I use them everywhere and the price difference does not matter that much in my case.

Do you get an employee discount?
Bob
"All you said is just a bunch of opinions."
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11260
  • Country: us
    • Personal site
Re: STM32 alternatives
« Reply #17 on: December 31, 2018, 09:40:47 am »
Do you get an employee discount?
Nope. I just buy stuff from Digi-Key as everyone else.

Even if I could get some sort of discount, I would not. I like to avoid conflict of interests.
Alex
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Re: STM32 alternatives
« Reply #18 on: December 31, 2018, 10:06:20 am »
Exactly. Technologies come and go, but the principles remain. If history is any indication, everything you see around will be outdated 10 years from now.

Except that the original 1987 BBC Basic for the original ARM CPU in the Archimedes... still runs fine on a Raspberry Pi (after 31 years). I've seen Sophie Wilson (she's the author of both) say that in a video on youtube.
The further a society drifts from truth, the more it will hate those who speak it.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3240
  • Country: gb
Re: STM32 alternatives
« Reply #19 on: December 31, 2018, 10:23:08 am »
I would definitely stick with ARMs unless your applications have very high volumes where PICs or other MCUs may make sense. Or you are space-limited, and want small 6- or 8-pin package.

With mainstream ARMs 14-pins SOIC or TSSOP would be the minimum package size. I don't think anyone makes smaller parts.

If you can deal with wafer level packaged devices then there is the Maxim MAX32660 (1.6mmx1.6mm 16 pin) and the Kinetis KL03 (2.0mmx1.6mm 20 pin).
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11260
  • Country: us
    • Personal site
Re: STM32 alternatives
« Reply #20 on: December 31, 2018, 10:26:28 am »
If you can deal with wafer level packaged devices then there is the Maxim MAX32660 (1.6mmx1.6mm 16 pin) and the Kinetis KL03 (2.0mmx1.6mm 20 pin).
Most manufacturers will have WLCSP packages. But I assume general public will not be dealing with them. They are a level above BGA, and general public is not dealing with BGAs all that well.
Alex
 

Offline nick_d

  • Regular Contributor
  • *
  • Posts: 120
Re: STM32 alternatives
« Reply #21 on: December 31, 2018, 11:29:40 am »
Another vote for the Silicon Labs Sleepy Bee EFM8. From what my client said they are the cheapest MCU he could find (at least with the fairly basic capabilities he needed which was basically a few LEDs and buttons for the user interface and control of a smart battery charger), and they use much less power than ARM. While PICs and AVRs also fit this niche, they are more expensive (AVR more than PIC). As to PIC having a bewildering array of different options, that is more of an advantage than a disadvantage. They're all pretty similar to program, although be aware that PIC12xxx have a different architecture than PIC14xxx and different again PIC18xxx and so on. Otherwise the difference is only in the pin counts, memory and on-board peripherals, so it is immaterial which one you learn on. You can pretty much breadboard your design with any Sleepy Bee, PIC, AVR or ARM MCU in the target family and then when you lay out your PCB make the final choice of which part to specify (hopefully you will know by then how much code and data space you need, how many pins and which on-board peripherals). Having said that, this is only important for large quantity. For one-offs, do whatever is easiest. And beware premature optimization: stick to the easiest and most powerful chip (likely an ARM) unless there's a reason!

cheers, Nick
 

Offline cv007

  • Frequent Contributor
  • **
  • Posts: 826
Re: STM32 alternatives
« Reply #22 on: December 31, 2018, 01:01:02 pm »
Quote
I am interested in PIC microcontrollers but it seems like there are 5million different parts in 1000 different families. Is there any way to know what parts are useful and is it that difficult to learn coming from programming arm in c?
Just go to the parametric search on their website-
https://www.microchip.com/ParamChartSearch/chart.aspx?branchID=30048
select Peripheral Pin Select- Yes
you are now looking at the 'newer' with many more features/memory/flash
choose your pin count- whatever you think you need (<=20 pin is a good start)
there are still many choices, and you will not necessarily know what features you need, so just pick one

get a $20 curiosity board, replace the included mcu with one of your choice- up to 20 pins (although nothing wrong with the included mcu)
https://www.microchip.com/DevelopmentTools/ProductDetails/DM164137

download/installed MPLABX and XC8 and you are good to go.

You are out $20 if my advice is bad.

here is some C code for a pic16f15325 as an example-
https://github.com/cv007/SNaPmate
everything is pretty simple in these chips

The downside to these 8bit chips is they are 8 bits. The upside is they are simple to use, and have some nice peripherals.

 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: STM32 alternatives
« Reply #23 on: December 31, 2018, 02:33:56 pm »
You don't learn PIC or ARM. You learn principles. Then you can apply them to anything
...which means you need to learn PIC or ARM  :-DD
[/quote]

No. You need to learn principles, not peculiarities. You know that Indian story about the elephant:

"A group of blind men heard that a strange animal, called an elephant, had been brought to the town, but none of them were aware of its shape and form. Out of curiosity, they said: "We must inspect and know it by touch, of which we are capable". So, they sought it out, and when they found it they groped about it. In the case of the first person, whose hand landed on the trunk, said "This being is like a thick snake". For another one whose hand reached its ear, it seemed like a kind of fan. As for another person, whose hand was upon its leg, said, the elephant is a pillar like a tree-trunk. The blind man who placed his hand upon its side said, "elephant is a wall". Another who felt its tail, described it as a rope. The last felt its tusk, stating the elephant is that which is hard, smooth and like a spear." (copied and pasted from Wikipedia)

You need to make sure you see the whole elephant. And for that, you need diversity. You need to try ARM and PIC and ...

<edit>More citation from Wikipedia:

"And so these men of Indostan
Disputed loud and long,
Each in his own opinion
Exceeding stiff and strong,
Though each was partly in the right
And all were in the wrong!"
« Last Edit: December 31, 2018, 02:39:27 pm by NorthGuy »
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: STM32 alternatives
« Reply #24 on: December 31, 2018, 02:40:59 pm »
Nope. I just buy stuff from Digi-Key as everyone else.

Try http://www.microchipdirect.com - it's most likely cheaper than DigiKey, especially in quantities.
 

Offline Bud

  • Super Contributor
  • ***
  • Posts: 6911
  • Country: ca
Re: STM32 alternatives
« Reply #25 on: December 31, 2018, 02:49:53 pm »
Well, principles do not magically transform into specific applications. A day will come when you need to implement them on a particular technological platform, and to do that you have to learn the platform.
Facebook-free life and Rigol-free shack.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: STM32 alternatives
« Reply #26 on: December 31, 2018, 03:07:20 pm »
Well, principles do not magically transform into specific applications. A day will come when you need to implement them on a particular technological platform, and to do that you have to learn the platform.

Not magically, but they make it easy to move into any platform, even for a short period such as a duration of a project.

If, instead, you tie yourself to a specific platform, it'll be very hard to move on. There are many people who bought bunch of PIC16F84 15 years ago, it was their "goto" chip, they were very happy with it, but now it's very hard for them to move on, even to newer PIC16s which are not really dissimilar. ataradov does the same with his SAM D3 chips and risks falling into a similar position 15 years from now.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: STM32 alternatives
« Reply #27 on: December 31, 2018, 04:19:55 pm »
I would definitely stick with ARMs unless your applications have very high volumes where PICs or other MCUs may make sense. Or you are space-limited, and want small 6- or 8-pin package.

With mainstream ARMs 14-pins SOIC or TSSOP would be the minimum package size. I don't think anyone makes smaller parts.
Low pin count PICs are very handy for simple tasks such as initializing a PLL or reading a quadrature encoder.

Use STM8 micro for that. Cheap, and very good peripberal set VERY similar to what you find on STM32 family. For anyone knowing how to STM32, this is an obvious choice.
 

Offline rhodges

  • Frequent Contributor
  • **
  • Posts: 306
  • Country: us
  • Available for embedded projects.
    • My public libraries, code samples, and projects for STM8.
Re: STM32 alternatives
« Reply #28 on: December 31, 2018, 06:14:03 pm »
Use STM8 micro for that. Cheap, and very good peripberal set VERY similar to what you find on STM32 family.
I like STM8. Anyone who is getting started, I invite to look at my public libraries for various devices:

https://github.com/unfrozen/stm8_libs/wiki
http://www.hodges.org/rh/stm8/index.html

These are built with the open source SDCC (Small Device C Compiler).
Currently developing STM8 and STM32. Past includes 6809, Z80, 8086, PIC, MIPS, PNX1302, and some 8748 and 6805. Check out my public code on github. https://github.com/unfrozen
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11260
  • Country: us
    • Personal site
Re: STM32 alternatives
« Reply #29 on: December 31, 2018, 08:27:00 pm »
Try http://www.microchipdirect.com - it's most likely cheaper than DigiKey, especially in quantities.
I work for Microchip, so I'm aware of MicrochipDirect.  I buy 100-200 pcs at a time, and it is not cheaper in my case. Especially when you factor in shipping.

With DigiKey I add MCUs to other orders, I rarely have to buy them purposefully.

The key to buying with DigiKey is to wait for low prices. Sometimes they need to clear their inventory, and the prices go down by a lot (I assume down to their purchasing price). A couple months ago they were cleaning out old Atmel inventory and a whole bunch of SAM D devices were discounted like 50%. I've got a lot of DAM D21s in TQFP32 package for less than 50 cents.
Alex
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: STM32 alternatives
« Reply #30 on: December 31, 2018, 08:47:16 pm »
I still like the 8 bit AVRs, I find them much simpler to use than ARM so where they are adequate you could look into that line, the PIC is another popular one, now that Microchip has acquired Atmel both lines come from the same source. Since C is so standardized these days it's relatively easy to move from one platform to another, at least across similar classes of stuff. I'd say play around with the software toolchain for several different microcontroller families and pick one that you like. It can be quite educational porting code from one platform to another, you can end up more proficient with both. You might play around with some of the very tiny low pin count 8 bitters and see what you can do with one, they can be deceptively powerful.
 

Offline fchk

  • Regular Contributor
  • *
  • Posts: 245
  • Country: de
Re: STM32 alternatives
« Reply #31 on: December 31, 2018, 10:19:06 pm »
Most people think of an ancient 8 bit architecture when hearing PIC. They simply don't know that PIC is so much more. There is PIC24/dsPIC, which is a bit like AVR but 16 bit databus and with much more capable peripherials and much faster, and there is PIC32, which is 32 bit MIPS. It is basically the same instruction set and architecture that was used in expensive DEC Unix workstations in the early 90's, just shrunk to the size of a 4mm*4mm QFN package and with twice the speed. (the DECstation 3000 only ran at 20 or 25 MHz, but you get 50MHz at least - top of the line is about 200-300MHz).

The peripherials are very similar across the architectures, so just use parametric search for the right combination of peripherials. Both PIC24 and PIC32/MIPS are very C friendly.

 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: STM32 alternatives
« Reply #32 on: December 31, 2018, 10:58:09 pm »
Quote
The key to buying with DigiKey is to wait for low prices.
I didn't know that digikey did that (though I've taken advantage of Newark's "closeouts")Does Digikey have a landing page for their "deals", or a search term?
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11260
  • Country: us
    • Personal site
Re: STM32 alternatives
« Reply #33 on: December 31, 2018, 11:08:01 pm »
Does Digikey have a landing page for their "deals", or a search term?
I don't think so. They just drop the prices when they need to flush the inventory. Those D21 in various packages were sitting at low prices for almost a week before all were gone.

This is the exact parts I've got https://www.digikey.com/product-detail/en/microchip-technology/ATSAMD21E15A-AUT/1611-ATSAMD21E15A-AUTCT-ND/6832769 . They are listed as obsolete and a price is $1.85. Well, I've got a 100 of them at 40.5 cents.

All "A" versions were declared obsolete.
Alex
 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: STM32 alternatives
« Reply #34 on: January 01, 2019, 12:17:26 pm »
.
« Last Edit: August 19, 2022, 02:06:47 pm by emece67 »
 

Offline thieringpeti

  • Contributor
  • Posts: 18
  • Country: hu
Re: STM32 alternatives
« Reply #35 on: January 01, 2019, 01:08:57 pm »
HI!

I've never used PIC's, but AVR's and STM32's. I think PIC's were a bit outdated architecture, so I don't recommend learning it without a noticable reason. For 8-bit applications, I recommend AVR's or 8051-based MCU families, like the Silicon Labs C8051Fxxx family.
STM32 is a very universal family. It can be easily programmed with lots of compliers, both open source and commercial. If you want to try something different, choose a widely available ARM MCU, like NXP's LPC family 32-bit ARM MCU's. These are very similar to STM32's, and many of the development software also supports them.
And keep in mind, these MCU's can be extremely cheap. Only the chinese internal-market parts (e.g. Padauk 3-cents MCU) can be cheaper than a low-end AVR, PIC or STM32.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: STM32 alternatives
« Reply #36 on: January 01, 2019, 03:09:51 pm »
I’m not sure of the viability of the 3c microcontrollers, unless you’re making super high volume and super low cost designs, or for a passing academic interest. OTP is a big reason to avoid for low to medium volume. I haven’t done any OTP stuff for about fifteen years, in fact I don’t think I know where my eeprom eraser is anymore for those expensive ceramic windowed versions of older OTP devices.

I’m also not sure that you should discount PIC16 just because it’s perceived to be an old architecture. I’d hardly say that the 8051 you’re recommending is new on the block!

Since most people nowadays write predominently in C and not assembly language, much of the underlying nonsense like bank switching is not on the programmer’s radar over 99% of the time. There have been many tweeks to the archtecture over time to improve things particularly for high level language implementation and debugging.

In the end the choice of device is down to many factors, including its features and performance, and availability of skills on the device itself and the toolchains. For example, I haven’t done Silabs 8051 for about 12 years, so it’d be low on my list. I have recently done plenty of NXP and TI M0 and M4F though, some AVR 8 and 32 bit, as well as having a pretty deep experience of the entire PIC range. Undoubtedly that biases my choices.

 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: STM32 alternatives
« Reply #37 on: January 01, 2019, 05:24:15 pm »
I think I phrased poorly. Perhaps it would be better to ask if it would be valuable to add another line to my toolkit. I see that there are some very cheap pic microcontrollers in very small packages that the STM32 lines don't come in. Is it worth learning pic for that reason or are there other arm Lin's that would be a better choice
IMHO TI's MSP430 line is good to have. I use them every now and then if I need something really low power.
If you want to stick with ARM then the LPC1000 series from NXP is interesting as well. Compared to ST's ARMs the microcontrollers from NXP's LPC series use the same peripherals. This means you can re-use low level code from one project to another.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: 00
Re: STM32 alternatives
« Reply #38 on: January 01, 2019, 06:11:09 pm »
IMHO TI's MSP430 line is good to have. I use them every now and then if I need something really low power.

How do they compare to the STM32l451xx models?
STM claims that they consume 84uA/MHz.
The STM32l452xx models can be used with an external smps and consume 36uA/MHz.

Edit: The above mentioned currents are measured with peripheral clocks disabled.
Worst case, if you enable all clocks for all peripherals, another 100uA/MHz is added. In practice it will be approx. 50uA/MHz.

« Last Edit: January 01, 2019, 06:22:12 pm by Karel »
 

Offline KalinTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: ca
Re: STM32 alternatives
« Reply #39 on: January 01, 2019, 06:34:02 pm »
Lot's of good info here. It seems like the consensus is to only use the older 8-bitters if you need the low cost or tiny package size. Thanks for everyone who pointed out the 16 bit options, something I had never really looked into. I have an msp430 dev board around somewhere but was never able to get it to work. The TI IDE was pretty confusing and I have to admit I gave up after only a few minutes of trying since I got the board pretty cheap. I think I was trying to use Energia or something but never tried their CCS IDE.
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2007
  • Country: us
Re: STM32 alternatives
« Reply #40 on: January 01, 2019, 06:55:20 pm »
Lot's of good info here. It seems like the consensus is to only use the older 8-bitters if you need the low cost or tiny package size. Thanks for everyone who pointed out the 16 bit options, something I had never really looked into. I have an msp430 dev board around somewhere but was never able to get it to work. The TI IDE was pretty confusing and I have to admit I gave up after only a few minutes of trying since I got the board pretty cheap. I think I was trying to use Energia or something but never tried their CCS IDE.

I like the MSP430s a lot.  I think 16 bits is the Goldilocks size for microcontrollers, particularly if you ever code in assembler, which I do fairly often.  And they are von Neumann architecture, which is convenient.  While they were at the beginning of the really-low-power movement, I think the others have pretty much caught up.  As for IDEs, CCS is just far too grand for what I do.  I mainly just use a command line assembler.  But I just used Energia for the first time, and it's pretty nifty.  It's an almost direct port of the Arduino IDE for MSP430 and other TI parts.  Seems to work well, and like Arduino, it's basically just GCC.  The main downside of TI stuff is the cost.  They are relatively expensive for what you get.

They also have MSP432, which is low-power ARM, but I've never tried any of those.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: STM32 alternatives
« Reply #41 on: January 01, 2019, 07:34:26 pm »
I think people often focus too much on something being "old" and therefor inferior. Pencils are old, wheels and levers are old, sometimes they're still a good tool for the job. If you have a simple task that is easily done by an 8 bit microcontroller it doesn't matter how old the architecture is, it's still viable if the part is affordable. For reasons that may not be entirely rational, it bothers me to throw a ton of silicon at a very simple problem even when the monetary cost is not all that much higher. The more complex the part, the more opportunity there is for bugs to creep in. It would be silly to use a 32 bit ARM if all you wanted to do is blink an LED.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: STM32 alternatives
« Reply #42 on: January 01, 2019, 07:39:13 pm »
IMHO TI's MSP430 line is good to have. I use them every now and then if I need something really low power.
How do they compare to the STM32l451xx models?
STM claims that they consume 84uA/MHz.
The STM32l452xx models can be used with an external smps and consume 36uA/MHz.

Edit: The above mentioned currents are measured with peripheral clocks disabled.
Worst case, if you enable all clocks for all peripherals, another 100uA/MHz is added. In practice it will be approx. 50uA/MHz.
The MSP430 can run from a watch crystal and get into single digit uA territory while doing something meaningful. What shouldn't be overlooked is time from wake-up to doing something meaningful.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: STM32 alternatives
« Reply #43 on: January 01, 2019, 07:42:53 pm »
I sat down to play with a cheap MSP430 board I got and after spending a couple hours trying to get the bloated, sluggish IDE and plugins installed, seeing cryptic errors that said to check a log but failing to mention which of numerous logs to check, I gave up, uninstalled everything, set it on the shelf and went back to the AVR.

With any programmable device, try out the software used to develop for it because that is where many seem to fall short and often you are fairly stuck with whatever toolchain is provided.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: STM32 alternatives
« Reply #44 on: January 01, 2019, 07:57:26 pm »
I always used MSP-GCC for MSP430. Olimex has a cheap programmer for MSP430 if you have a device which doesn't have the serial bootloader.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: STM32 alternatives
« Reply #45 on: January 01, 2019, 11:53:50 pm »
Most people think of an ancient 8 bit architecture when hearing PIC. They simply don't know that PIC is so much more. There is PIC24/dsPIC, which is a bit like AVR but 16 bit databus and with much more capable peripherials and much faster, and there is PIC32, which is 32 bit MIPS. It is basically the same instruction set and architecture that was used in expensive DEC Unix workstations in the early 90's, just shrunk to the size of a 4mm*4mm QFN package and with twice the speed. (the DECstation 3000 only ran at 20 or 25 MHz, but you get 50MHz at least - top of the line is about 200-300MHz).

The peripherials are very similar across the architectures, so just use parametric search for the right combination of peripherials. Both PIC24 and PIC32/MIPS are very C friendly.

16bits MCUs - no thanks really. That was a step in a wrong direction. It is a kind of catdog.

Nowdays, there is not much reason to consider anything less than 32bits, except when really pushing every cent spent or dealing with ultra simple tasks. 32bit MCUs are not expensive. The price is really similar, some times even 32bits may come cheaper to do a task, due to technology improvements over the outdated junk some 8bits are filled with (yes, I am talking to you, microchip).


 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: STM32 alternatives
« Reply #46 on: January 02, 2019, 12:12:29 am »
Nowdays, there is not much reason to consider anything less than 32bits, except when really pushing every cent spent or dealing with ultra simple tasks. 32bit MCUs are not expensive. The price is really similar, some times even 32bits may come cheaper to do a task, due to technology improvements over the outdated junk some 8bits are filled with (yes, I am talking to you, microchip).

I totally agree here. One exception would be already mentioned mass-production where every BOM cent counts. Other exception is market that may require product which is targeted at specific audience/microcontoller. As an example - shields for Arduino.

If someone who already knows stm32 is asking me what's next, I would suggest Cypress Psoc 5 LP. I suggest to not only read leaflet, but get CY8CKIT-059 and play with it's digital and especially analog blocks/peripherals. This is not just another ARM uC, this is way more than that.
 

Offline techman-001

  • Frequent Contributor
  • **
  • !
  • Posts: 748
  • Country: au
  • Electronics technician for the last 50 years
    • Mecrisp Stellaris Unofficial UserDoc
Re: STM32 alternatives
« Reply #47 on: January 02, 2019, 02:25:15 am »
Quote
I sat down to play with a cheap MSP430 board I got and after spending a couple hours trying to get the bloated, sluggish IDE and plugins installed, seeing cryptic errors that said to check a log but failing to mention which of numerous logs to check, I gave up, uninstalled everything, set it on the shelf and went back to the AVR.

With any programmable device, try out the software used to develop for it because that is where many seem to fall short and often you are fairly stuck with whatever toolchain is provided.

Agreed, but how about a GPL'd fast tethered Forth for that MSP430 ? All you need is a Tiva Connected Launchpad, which also programs the MSP430 via JTAG ...

http://hightechdoc.net/mecrisp-across/_build/html/index.html

 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: STM32 alternatives
« Reply #48 on: January 02, 2019, 03:08:10 am »
Nowdays, there is not much reason to consider anything less than 32bits, except when really pushing every cent spent or dealing with ultra simple tasks. 32bit MCUs are not expensive. The price is really similar, some times even 32bits may come cheaper to do a task, due to technology improvements over the outdated junk some 8bits are filled with (yes, I am talking to you, microchip).

I don't think the number of bits is an important selection criteria - rather you select the MCU by the set of periphery (and its speed), number of pins, shape, perhaps power consumption, etc. Even for the people who use assembler, the number of bits isn't that important - rather they would seek a specific architecture. For people who write in C, the number of bits doesn't make any difference whatsoever. Even if it did, the majority of C writers try to be platform independent, so they write to the standard (such as C99) and try to avoid thinking of MCU peculiarities. Moreover, the majority of C/C++ writers don't even have enough skills to evaluate how a particular CPU architecture would affect their code.
 
The following users thanked this post: I wanted a rude username

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11260
  • Country: us
    • Personal site
Re: STM32 alternatives
« Reply #49 on: January 02, 2019, 03:12:01 am »
I don't think the number of bits is an important selection criteria - rather you select the MCU by the set of periphery (and its speed), number of pins, shape, perhaps power consumption, etc.
It just so happens that you get more and better of everything with 32-bit MCUs. So looking first at 32-bit devices is a good selection strategy.

And just not having to think whether to use uint8_t or uint16_t for your loop variable is very nice. Even with C/C++ if you care about performance of your code, you have to think about underlying device.
Alex
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: STM32 alternatives
« Reply #50 on: January 02, 2019, 03:54:30 am »
It just so happens that you get more and better of everything with 32-bit MCUs.

I haven't noticed this. There's a huge variety of 32-bit devices (and 8-bit and 16-bit as well).

32-bit devices which try to be cheap are simply pathetic - they hardly have any periphery at all.

32-bit devices which try to be powerful tends to have lots of stuff, but you only need what you need. If you need 6 ADC channels, it doesn't matter if your MCU has 10 of 100 - you only need 6. You will rather be concerned about ensuring the desired sampling pattern ad speed with your ADC, so you have to look at peculiarities. "More of everything" may be harmful as well. The side effect of "more of everything" is usually too many pins and too expensive.

There are good compromises in the middle of these two extremes, you can find them in any varieties (8-bit, 16-bit, 32-bit). Sometimes, you get lots of MCUs meeting your criteria. Then you can pick what you like. Sometimes you hardly can find one. If it happens to be 8-bit, who cares. If it happens to be 32-bit, likewise.

There are certainly cases when you need to think of underlying architecture. Such as, if you really need lots of floating point calculations, you probably will get something with FPU (and it will be 32-bit), and not PIC16 (which would be plain stupid). But if you don't, who cares. There's no premium for having unused stuff.

 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: STM32 alternatives
« Reply #51 on: January 02, 2019, 05:56:23 am »
I always used MSP-GCC for MSP430. Olimex has a cheap programmer for MSP430 if you have a device which doesn't have the serial bootloader.

I may pull it out again some day and give it a try, but for now I dug out a ATMEGA8 I had in my stash and had my project working in less time than I spent trying to get the TI software installed.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: STM32 alternatives
« Reply #52 on: January 02, 2019, 08:04:32 am »
32-bit devices which try to be cheap are simply pathetic - they hardly have any periphery at all.

Such statements requires examples, otherwise they are just that - statements not backed by facts.

Quote
32-bit devices which try to be powerful tends to have lots of stuff, but you only need what you need. If you need 6 ADC channels, it doesn't matter if your MCU has 10 of 100 - you only need 6.

Do you know why powerful 32-bit microcontrollers have seemingly too many peripherals? - Just because they can. When you see die layout of such microcontroller, all you see is FLASH, RAM and CPU. Unless they are complex peripherals like Ethernet and USB, they take small corner yet there are gazillion of timers, serials, GPIO's and so on:

https://upload.wikimedia.org/wikipedia/commons/8/89/STM32F103VGT6-HD.jpg
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1641
  • Country: nl
Re: STM32 alternatives
« Reply #53 on: January 02, 2019, 09:26:19 am »
It's a cliche , but keeping an open mind is the best thing.

Some manufacturers will claim to have an 8-bit part with better power consumption than any MCU on the market, but who cares. In battery devices it's often the energy consumption that matters, especially with DMA and modern power saving features that make duty cycling of the CPU time possible, and aboveall finer granularity power management can make tightly bounded energy analysis non-trivial.

I think one of the strong points on many 32-bit ARM parts is that they are made on a more modern technology. This helps with active power consumption, and if the manufacturer made an effort to create a custom cell library, can also yield satisfactory results in static power consumption. For example, Microchip released the ATtiny3217 in 2018. That part consumes 5mA typ at 15MHz. Meanwhile you can get a STM32L0 that consumes <3mA at 16MHz. Add to that the more capable CPU architecture, and I would be pretty confident in choosing a 32-bit ARM part for an energy constrained application.

You can also have "too much" memory, by the way. You'll sometimes see granularity options for SRAM retention in sleep to reduce static power consumption, which may be somewhat elevated depending on the process technology.

Some MCUs are unique, for example some PICs have 2 SPI peripherals in a 20-pin package. If you need it, then you choose that part.
Another example: I was disturbed to find out the ATSAM V parts only have 2 dedicated SPIs (although some USARTs can be used as SPI-compatible), even with 144 pin packages. Then again that ATSAM V part has an integrated USB2.0HS phy, which is a solid reason to choose it over other MCUs.
Although I only needed 2 SPIs (so 2 for 2 is "sufficient"), it does mean that the flexibility of the part is reduced. It puts a constraint on the board layout, where I absolutely must use a seemingly scattered arrangement of pins on the device at 40MHz+.
« Last Edit: January 02, 2019, 09:29:40 am by hans »
 

Offline knapik

  • Regular Contributor
  • *
  • Posts: 143
  • Country: au
Re: STM32 alternatives
« Reply #54 on: January 02, 2019, 10:51:29 am »
How does STM32 specifically compare with other 32 bit ARM microcontrollers offerings from NXP, Atmel, Silicon Labs and so forth?
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: STM32 alternatives
« Reply #55 on: January 02, 2019, 03:43:07 pm »
Such statements requires examples, otherwise they are just that - statements not backed by facts.

Just go to DigiKey and find the cheapest 32-bit MCU.

Today, at quantity of 100, this happened to be SAM D10:

https://www.digikey.com/product-detail/en/microchip-technology/ATSAMD10D13A-MNT/1611-ATSAMD10D13A-MNTCT-ND

8K flash, 4K RAM, 2 timers, 3 serials, ADC, 2 comparators, DAC, RTC

Very good for the price actually. But does this look like "more of everything"?

Skipping all similar Microchip products, the next contender is Cypress PSOC:

https://www.digikey.com/product-detail/en/cypress-semiconductor-corp/CY8C4013SXI-400/CY8C4013SXI-400-ND

8K flash, 2K RAM, TCPWM, I2C

May be the next one will give us "more of everything"? It is LPC802, approaching $1 already:

https://www.digikey.com/product-detail/en/nxp-usa-inc/LPC802M001JDH16FP/568-13819-ND

16K flash, 2K RAM, 2 x USART, I2C, SPI

And I could continue several pages down with similar results until I come to the place where 32-bit MCUs start getting "more of everything".

It's either cheap or powerful, but not both at the same time.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11260
  • Country: us
    • Personal site
Re: STM32 alternatives
« Reply #56 on: January 02, 2019, 05:22:23 pm »
8K flash, 4K RAM, 2 timers, 3 serials, ADC, 2 comparators, DAC, RTC

There are 3 timers in SAM D10, one of them is called TCC, which has a bunch of advanced features (motor control stuff), but Digi-Key does not count it in its search.

Sorry, I though you  put those devices as examples of a good thing.

So what are the comparable 8-bit devices in the same price range you consider? You obviously can't compare cheap with expensive. But in the same general segment, 32-bit devices will almost always win.
« Last Edit: January 02, 2019, 05:25:00 pm by ataradov »
Alex
 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: STM32 alternatives
« Reply #57 on: January 02, 2019, 05:31:17 pm »
.
« Last Edit: August 19, 2022, 02:07:28 pm by emece67 »
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11260
  • Country: us
    • Personal site
Re: STM32 alternatives
« Reply #58 on: January 02, 2019, 05:38:22 pm »
IMHO, the price difference between a half a dollar MCU and a, say, 4 $ one is negligible for hobbyist's DIY projects, that, I think, are the interest of the OP.
Even for hobby projects, you need to be aware of the price difference. Otherwise you will just get used to solving all the tasks using the most expensive parts, making your skills less useful in a real world.
Alex
 

Offline oilburner

  • Contributor
  • Posts: 42
Re: STM32 alternatives
« Reply #59 on: January 02, 2019, 06:27:30 pm »
Since dev boards etc are so cheap, and the programmer is built in, there is no real downside to trying every MCU ...

But either way, https://jaycarlson.net/microcontrollers/ is a fantastic place to start. Personally, I concentrate on ARM MCUs because that is most useful to me professionally, but it's really useful to be aware of what is out there.

Wow, thanks for the link, some really good low cost micro controller stuff there!
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: STM32 alternatives
« Reply #60 on: January 02, 2019, 06:31:02 pm »
IMHO, the price difference between a half a dollar MCU and a, say, 4 $ one is negligible for hobbyist's DIY projects, that, I think, are the interest of the OP.
Even for hobby projects, you need to be aware of the price difference. Otherwise you will just get used to solving all the tasks using the most expensive parts, making your skills less useful in a real world.
Not true. Only very few get to work in an environment where cost cutting is really critical. The most common mistake is that people only look at the cost of a component and not what it can do for you. Cheap components often means dealing with bugs and bad documentation. That ends up eating more time more quickly then you'd think. Messing around with a silicon bug for one week can easely cost 2000 to 3000 euros in wages and other costs. If the price difference between a good and a crappy controller is 2 euros then you'd need to sell at least 1000 units to break even again. Most designers will probably work on industrial automation and telecom projects. This kind of equipment doesn't sell in large badges.

Also there tends to be feature creep. If you use a microcontroller which has some memory and CPU cycles left you can add new features quickly. This will help your employer and it will help the client.
« Last Edit: January 02, 2019, 06:37:31 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: STM32 alternatives
« Reply #61 on: January 02, 2019, 06:36:48 pm »
How does STM32 specifically compare with other 32 bit ARM microcontrollers offerings from NXP, Atmel, Silicon Labs and so forth?
Atmel is on my blacklist. I've been bitten once too many by a nasty surprise in their devices (they oversell the features in their datasheets). I can't comment on the Silabs devices.

ST microcontrollers are all over the place with different peripherals and you need a JTAG dongle to program them (especially the older ones). Newer ones have a serial bootloader but that has issues too. Fortunately I got paid my hourly rate when I had to deal with these.

The NXP LPC series has served me well for over a decade already. Not the cheapest but solid performance, very few silicon bugs, easy to use peripherals and good documentation.

All in all I would try to avoid the devices which try to compete on price. Too many silicon bugs and poor documentation.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: knapik

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11260
  • Country: us
    • Personal site
Re: STM32 alternatives
« Reply #62 on: January 02, 2019, 06:37:13 pm »
Not true.
I'm not talking about hard optimizations and using the obscure parts. But there must be a general understanding of an actual performance required for a certain task.

I unfortunately see that all the time - people use crazy Linux-based solutions for simplest tasks that a Cortex-M0+ can handle just fine.

I'm not saying you should try to consider 3 cent Chinese MCUs, not at all.
Alex
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: STM32 alternatives
« Reply #63 on: January 02, 2019, 06:48:14 pm »
There are 3 timers in SAM D10, one of them is called TCC, which has a bunch of advanced features (motor control stuff), but Digi-Key does not count it in its search.

I looked at the datasheet. I could have overlooked something of course.

Sorry, I though you  put those devices as examples of a good thing.

I actually was surprised that these devices are so inexpensive. Looks like they got quite a bit cheaper since Microchip took over. Looks like Microchip is having a huge SAM sale going. May be I should buy some.

So what are the comparable 8-bit devices in the same price range you consider? You obviously can't compare cheap with expensive. But in the same general segment, 32-bit devices will almost always win.

About the same. For 48 cents which the SAM was quoted for, you can get Busy Bee:

https://www.digikey.com/product-detail/en/silicon-labs/EFM8BB10F8G-A-QFN20/336-3164-5-ND

8K flash, 512 RAM, 4 timers, 3 PWM/PCA, ADC, 2 comparators, UART, SPI, I2C/SMBus, CRC

or PIC12F1572:



3.5K flash, 256 RAM, 4 timers, 3 PWM, UART, ADC, comparator, DAC, CWG

« Last Edit: January 02, 2019, 06:52:19 pm by NorthGuy »
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11260
  • Country: us
    • Personal site
Re: STM32 alternatives
« Reply #64 on: January 02, 2019, 06:52:10 pm »
About the same. For 48 cents which the SAM was quoted for, you can get Busy Bee:
Ok, I guess it depends on the requirements, so abstract comparisons are not useful. In that specific case, I was not looking at anything without USB device peripheral. But that is just my requirement.
Alex
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: STM32 alternatives
« Reply #65 on: January 02, 2019, 06:52:55 pm »
Not true.
I'm not talking about hard optimizations and using the obscure parts. But there must be a general understanding of an actual performance required for a certain task.

I unfortunately see that all the time - people use crazy Linux-based solutions for simplest tasks that a Cortex-M0+ can handle just fine.

I'm not saying you should try to consider 3 cent Chinese MCUs, not at all.
Then we are on the same page here  :)
IMHO a good skill to have is to not only have a good idea about the cost of the hardware but to also have a good idea about the amount of time something will take to implement.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: STM32 alternatives
« Reply #66 on: January 02, 2019, 06:55:01 pm »
About the same. For 48 cents which the SAM was quoted for, you can get Busy Bee:
Ok, I guess it depends on the requirements, so abstract comparisons are not useful. In that specific case, I was not looking at anything without USB device peripheral. But that is just my requirement.

Of course. That's exactly what I'm saying. You select the chip for your requirements. And the number of bits is not very important selection criteria (most of the time anyway).
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: STM32 alternatives
« Reply #67 on: January 03, 2019, 10:32:39 am »
Quote
[SAMD10]
8K flash, 4K RAM, 2 timers, 3 serials, ADC, 2 comparators, DAC, RTC
does this look like "more of everything"?
Well, compared to the typical 8bit processor in the same price range, or with the same amount of flash, it has significantly more RAM, more Serials (well, actually more flexible "serials"), more timers (don't forget the SysTick Timer in the ARM core, the "RTC" is a simple timer, and the TCC that Ataradov already mentioned), and a DAC...  so that's doing pretty good.
OTOH, 8k of flash doesn't go that far on an ARM, especially if you're using any of the "common" libraries :-(
(ASF (Atmels chip library) is bloated.  Newlib is pretty bloated.  the floating point is generic libgcc code that is bloated.  Peripheral manipulation is inflated by lack of "immediate" addressing modes in the CM0 instruction set.  Bleh!) (https://github.com/WestfW/SAMD10-experiments)
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5319
  • Country: gb
Re: STM32 alternatives
« Reply #68 on: January 03, 2019, 04:15:57 pm »
I don't think the number of bits is an important selection criteria - rather you select the MCU by the set of periphery (and its speed), number of pins, shape, perhaps power consumption, etc.
It just so happens that you get more and better of everything with 32-bit MCUs. So looking first at 32-bit devices is a good selection strategy.


I've always been rather disappointed with the real world power consumption of 32 bit processors in button cell or energy harvesting type applications when compared to 8 bitters, even the supposed ultra low power ones don't really come particularly close in practical scenarios.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11260
  • Country: us
    • Personal site
Re: STM32 alternatives
« Reply #69 on: January 03, 2019, 04:27:00 pm »
I've always been rather disappointed with the real world power consumption of 32 bit processors in button cell or energy harvesting type applications when compared to 8 bitters, even the supposed ultra low power ones don't really come particularly close in practical scenarios.
I have not used low power modes on non-Atmel devices, since my personal projects rarely need this. But I do have a lot of exposure into Atmel parts, and power consumption generally lower or at least very close on low power devices. And the variety of sleep options is better.

Another thing is that with 8-bit devices I have always struggled to achieve numbers mentioned in the datasheet in real life. No such thing on the 32-bit devices.  I think over time competition forced companies to apply creative measurement techniques. And transition  into the 32-bit world provided a "reset" for that race.
Alex
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: STM32 alternatives
« Reply #70 on: January 05, 2019, 12:12:16 pm »
Just go to DigiKey and find the cheapest 32-bit MCU.
Today, at quantity of 100, this happened to be SAM D10:

https://www.digikey.com/product-detail/en/microchip-technology/ATSAMD10D13A-MNT/1611-ATSAMD10D13A-MNTCT-ND

8K flash, 4K RAM, 2 timers, 3 serials, ADC, 2 comparators, DAC, RTC

Thank you for pointing out. Did not know that you can get such a well-packet ARM for 0.5$, do not agree to you that this "hardly have any periphery at all". I am curious - could you please show me 8-bitter having price better than 0.5$ @100, peripherals better than: 2+1 timers, 3 serials, 12 bit ADC and 2 comparators and 10 bit DAC?
« Last Edit: January 05, 2019, 12:23:29 pm by ogden »
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: STM32 alternatives
« Reply #71 on: January 05, 2019, 05:27:29 pm »
You're probably not gonna find an 8 bitter with that selection of features, if you're doing something that requires 12 bit ADCs and DACs you're probably going to want a more powerful CPU, 8 bit is for simpler tasks where all that extra stuff would be a waste.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: STM32 alternatives
« Reply #72 on: January 05, 2019, 06:34:50 pm »
Thank you for pointing out. Did not know that you can get such a well-packet ARM for 0.5$, do not agree to you that this "hardly have any periphery at all". I am curious - could you please show me 8-bitter having price better than 0.5$ @100, peripherals better than: 2+1 timers, 3 serials, 12 bit ADC and 2 comparators and 10 bit DAC?

This is probably an anomaly. Microchip put SAMs on huge sale. Very surprising. To me at least. Whether they're going to keep it that way or just getting rid of inventory is unknown. Does anyone know what were the prices on these SAMs a year ago?

If you skip SAM in my post, you'll see two other examples which are more expensive than SAM and have hardly any periphery.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11260
  • Country: us
    • Personal site
Re: STM32 alternatives
« Reply #73 on: January 05, 2019, 07:13:50 pm »
Does anyone know what were the prices on these SAMs a year ago?
They were basically the same. The prices on common SAM device hardly changed since acquisition. The problem is availability. Even the part in the link is a Non-Stock part.

The cheapest SAM D11 you can actually get immediately is just under $1.
Alex
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: STM32 alternatives
« Reply #74 on: January 05, 2019, 10:01:12 pm »
The cheapest SAM D11 you can actually get immediately is just under $1.

I remember I looked at PIC32MM when Microchip had just released it, it was the cheapest meaningful 32-bit MCU. It was under $1 too. Perhaps around two years ago I guess. I guess I totally overlooked cheap SAMs. I need to look at them more attentively.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: STM32 alternatives
« Reply #75 on: January 05, 2019, 10:28:05 pm »
This is probably an anomaly. Microchip put SAMs on huge sale. Very surprising. To me at least. Whether they're going to keep it that way or just getting rid of inventory is unknown. Does anyone know what were the prices on these SAMs a year ago?

If you skip SAM in my post, you'll see two other examples which are more expensive than SAM and have hardly any periphery.


I'd be surprised if they're not phasing them out, since buying Atmel, Microchip has an unnecessarily large range of different architectures, it's probably in their best interest to consolidate to some degree.

I tried using a SAM a couple different times and I was never able to get the USB bootloader to work to let me load the firmware. Finally just gave up.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: STM32 alternatives
« Reply #76 on: January 06, 2019, 08:05:18 am »
Quote
Microchip put SAMs on huge sale.
Actually, I think they're priced where they are supposed to be.There were some complaints a couple of years ago (before the acquisition) when Atmel raised the prices of the SAMD10/11 beyond what customers had been "promised."   (can't find the thread, though. :-( )
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: STM32 alternatives
« Reply #77 on: January 06, 2019, 09:08:43 am »
Thank you for pointing out. Did not know that you can get such a well-packet ARM for 0.5$, do not agree to you that this "hardly have any periphery at all". I am curious - could you please show me 8-bitter having price better than 0.5$ @100, peripherals better than: 2+1 timers, 3 serials, 12 bit ADC and 2 comparators and 10 bit DAC?

This is probably an anomaly. Microchip put SAMs on huge sale. Very surprising. To me at least. Whether they're going to keep it that way or just getting rid of inventory is unknown. Does anyone know what were the prices on these SAMs a year ago?

If you skip SAM in my post, you'll see two other examples which are more expensive than SAM and have hardly any periphery.

Ok. So you admit that your argument is kinda invalidated by first chip in the list. Then last one - Cypress Psoc 4. I strongly disagree that uC with reconfigurable peripheral and analog blocks have lack of peripherals ;) How about fact that you can create unique peripherals having no equivalents in any other microcontroller? - You just make what you want, not pick microcontroller with periphery you need.
« Last Edit: January 06, 2019, 10:07:41 am by ogden »
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: STM32 alternatives
« Reply #78 on: January 06, 2019, 11:02:27 am »
Quote
Cypress Psoc 4. I strongly disagree that uC with reconfigurable peripheral and analog blocks have lack of peripherals
Only some of the PSOC4s have the reconfigurable peripherals.   The low-end PSOC4000 don't have any programmable digital at all, and only do I2C for serial.  As you get to the 4100 and 4200 series, things get more interesting (but also more expensive.)
 
The following users thanked this post: ogden

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: STM32 alternatives
« Reply #79 on: January 06, 2019, 11:38:35 am »
Only some of the PSOC4s have the reconfigurable peripherals.   The low-end PSOC4000 don't have any programmable digital at all, and only do I2C for serial.  As you get to the 4100 and 4200 series, things get more interesting (but also more expensive.)

Thank you for clarifying. I find such psoc w/o actual psoc features useless, especially considering it's MSRP. In this case NorthGuy argument is very strong and I do agree.
 

Offline josip

  • Regular Contributor
  • *
  • Posts: 152
  • Country: hr
Re: STM32 alternatives
« Reply #80 on: January 06, 2019, 12:43:03 pm »
IMHO TI's MSP430 line is good to have. I use them every now and then if I need something really low power.

How do they compare to the STM32l451xx models?
STM claims that they consume 84uA/MHz.
The STM32l452xx models can be used with an external smps and consume 36uA/MHz.

Edit: The above mentioned currents are measured with peripheral clocks disabled.
Worst case, if you enable all clocks for all peripherals, another 100uA/MHz is added. In practice it will be approx. 50uA/MHz.

https://forum.43oh.com/topic/3416-stm32l-vs-msp430f5-whats-left-for-msp430/

BTW, I know MSP430 very well, and for some simple low cost task covered by 2xx flash series, there are OK. But I switched from MSP430F5xx (performance) USB devices to M0+, that offer much more for the same price. I don't see any point in MSP432 today, because there are plenty of others M4 devices from different vendors that offer much more, for half of the MSP432 price. And I don't understand today, direction (regarding micro-controllers) where TI is going.

Unfortunately, selection criteria for micro-controllers on digikey / mouser ... is not enough, and significant time must be spend to find the right one.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: STM32 alternatives
« Reply #81 on: January 06, 2019, 01:30:08 pm »
BTW, I know MSP430 very well, and for some simple low cost task covered by 2xx flash series, there are OK. But I switched from MSP430F5xx (performance) USB devices to M0+, that offer much more for the same price. I don't see any point in MSP432 today, because there are plenty of others M4 devices from different vendors that offer much more, for half of the MSP432 price. And I don't understand today, direction (regarding micro-controllers) where TI is going.

Msp432 seemed like gap filler from the very beginning, clearly not intended to fight for overcrowded low-end ARM MCU segment. Maybe it was push from some big customer to offer msp430 peripherals with ARM core. Maybe they prepared to move their wireless MCU's to ARM using such half-step? After all they are very strong in performance ARM and special function ARM segment, not to mention DSP and realtime MCU's. Msp430 still have it's market share as well.

My two cents: hobbyists that are TI fans shall ignore msp432 and either continue to use msp430 or try something like Tiva C series ARM for higher than msp430 performace solutions. For those like me who are not fan of any mfg, I suggest.. you guessed right - stm32 (or maybe Psoc 5LP).
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14476
  • Country: fr
Re: STM32 alternatives
« Reply #82 on: January 06, 2019, 05:22:41 pm »
The MSP432, like its older brother MSP430, was targetting very low power. Back then, with their 48MHz max clock freq. on a Cortex M4 core, it was obvious they were designed for the very low power, 32-bit MCU market.

Back when TI was working on it, it actually did make sense. There were not many ARM-based MCUs on the market that could beat the MSP432 in terms of power consumption, and they also wanted to leverage the MSP430's success. Unfortunately for TI, competitive very low power ARM MCUs began to appear on the market pretty much at the same time. They later introduced a couple of new MSP432 variants with embedded ethernet controllers that can run at up to 120MHz, so they are probably trying to catch up and not let the MSP432 line die.

I evaluated it a couple years ago. The dev boards were insanely cheap. The MCU was pretty decent. Very low power indeed, and TI's "peripheral library" was much less bloated that STM's HAL AFAIR, and easier to understand, so you could get something up and running in no time.

I eventually selected the STM32L4 line instead for various reasons (availability, much more capable, more device options, lower power for some, etc)
That said, for people using MSP430 MCUs, I wouldn't reject the MSP432 altogether. It's significantly more powerful, is ARM-based and will probably be familiar regarding its peripheral set. For those using the MSP430 for its low power characteristics, the MSP432 is a very reasonable "upgrade". Of course for those just familiar with the MSP430 by accident and not caring about low power, the MSP432 would probably not make much sense.

As to the MCU/wireless SOCs, TI already has the CC line with Cortex-M3 cores and 2.4GHz RF cores, such as the CC2640. They combine very low power and decent performance, and are pretty cheap.
 
The following users thanked this post: ogden

Online Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1673
  • Country: us
Re: STM32 alternatives
« Reply #83 on: January 08, 2019, 10:00:53 pm »
The NXP LPC series has served me well for over a decade already. Not the cheapest but solid performance, very few silicon bugs, easy to use peripherals and good documentation.

I've had a similar experience with the Infineon XMC4000-series. Not the cheapest, but well-thought-out peripherals and low bug counts. The documentation is mostly good quality, although it's a little rough in spots as I suspect the originals were written in German and translated into English.
Complexity is the number-one enemy of high-quality code.
 

Offline udok

  • Regular Contributor
  • *
  • Posts: 57
  • Country: at
Re: STM32 alternatives
« Reply #84 on: January 10, 2019, 09:12:00 am »
I did some work with the newest MSP432 last month. 

It is not cheap, but perhaps it is the only Arm M4 part with an integrated Ethernet Phy!

The eval board comes with good documentation and it is rather easy to setup a simple web server.

Performance is not bad, i achieved about 9 MByte/second with an echo server test on the
100 MBit Ethernet.


 

Offline josip

  • Regular Contributor
  • *
  • Posts: 152
  • Country: hr
Re: STM32 alternatives
« Reply #85 on: January 10, 2019, 09:27:10 am »
I did some work with the newest MSP432 last month. 

It is not cheap, but perhaps it is the only Arm M4 part with an integrated Ethernet Phy!

The eval board comes with good documentation and it is rather easy to setup a simple web server.

Performance is not bad, i achieved about 9 MByte/second with an echo server test on the
100 MBit Ethernet.

This is Tiva series that has nothing in common with MSP430, except the name.

And it was only M4 with Ethernet, 5 years ago. Not today.
« Last Edit: January 10, 2019, 11:33:18 am by josip »
 

Offline udok

  • Regular Contributor
  • *
  • Posts: 57
  • Country: at
Re: STM32 alternatives
« Reply #86 on: January 11, 2019, 11:08:26 am »
The part i was talking about is the SimpleLink MSP43E401Y / MSP432E411Y.

This is an Arm M4F with Ethernet Phy and USB 2.0 (but without Phy).

 

Offline josip

  • Regular Contributor
  • *
  • Posts: 152
  • Country: hr
Re: STM32 alternatives
« Reply #87 on: January 11, 2019, 11:38:58 am »
The part i was talking about is the SimpleLink MSP43E401Y / MSP432E411Y.

This is an Arm M4F with Ethernet Phy and USB 2.0 (but without Phy).

Yes, I know, and this part with min 3V VDD lost any connection with MSP430 family. It is renamed Tiva.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf