Author Topic: STM32 alternatives  (Read 20018 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: 11257
  • 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: 11257
  • 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: 11257
  • 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.
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1542
  • 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.)
 

Online 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.
 

Online 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: 11257
  • 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: 11257
  • 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: 11257
  • 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: 11257
  • 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
 

Online 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf