Author Topic: stm32 vs pic32  (Read 25256 times)

0 Members and 1 Guest are viewing this topic.

Offline Wolfram.ChromeTopic starter

  • Contributor
  • !
  • Posts: 49
  • Country: it
  • https://goo.gl/h2GXKY
stm32 vs pic32
« on: January 26, 2016, 01:55:40 pm »
I will start to learn digital electronics stuff,like mcu programming etc.....
For me this adventure is like an investment for my future,because i want to learn to working on only 1 Microcontroller without switching over all those which already exist around.
I want to choose one type of mcu,because im not happy if i must to learn more about 1 mcu like atmel etc etc etc....,i don't want to loose my time ......i want to take only 1 for all that possible kind of projects.
However the question is :
WHICH ONE ?
:D

 

Offline Philfreeze

  • Regular Contributor
  • *
  • Posts: 123
  • Country: ch
Re: stm32 vs pic32
« Reply #1 on: January 26, 2016, 02:35:32 pm »
- The ARM architecture is currently the giant on the market as far as I am aware of.
- Additionally there are multiple companies producting ARM Cortex based chips (NXP-Freescale, ST, Atmel etc.)
So I would go with ARM cortex to learn embedded development but I can't really recommend a specific family like STM32 or LPC because I don't have a lot of experience with them.

I would wait for a second or third opinion just to be sure. (Maybe I am wrong)
 

Offline alexanderbrevig

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: no
  • Musician, developer and EE hobbyist
    • alexanderbrevig.com
Re: stm32 vs pic32
« Reply #2 on: January 26, 2016, 03:07:35 pm »
My opinion would be to go for something that you will get up and running. If you know how to do basic things, like manipulate pins on the micro controller, you can usually find other chips to interface with other things.
My suggestion would be to go for the MSP430 Launchpad from Texas Instruments. Support is great, and it is very cheap.
Of course the Arduino and similar platforms makes it super-easy to get something going, but if you want to dive right in, the MSP430 would be my choice.

I think it's more important being able to pick up a new micro controller and figure out how to use it, rather than knowing how to shoehorn a specific part into every project. Sometimes you only need 8bit with three pins, and sometimes you need 32bit ARM with 50 pins.

Good luck!
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: stm32 vs pic32
« Reply #3 on: January 26, 2016, 03:27:24 pm »
Nearly a decade I looked at both ST and NXP ARM devices and choose to use the ones from NXP due to much more mature peripherals at that time. In the meanwhile I looked at ST several times but still didn't see compelling reasons to use ST's devices. One of the nice features of the NXP devices is the serial bootloader and some USB enabled devices can be programmed by just copying the firmware into the device like you are copying a file onto a USB stick.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: stm32 vs pic32
« Reply #4 on: January 26, 2016, 03:34:14 pm »
I find PIC32 much easier than STM32 because I was already familiar with PIC24/dsPIC33 and most of the peripherals are identical or similar.
STM32 is a total different beast: It has more and more powerful peripherals. If you need them they are great, but you have to read 1000-2000 pages of the reference manual (or at least the section for the peripheral, but it still can have hundreds of pages).
I would not recommend STM32 or PIC32 as the first processor to learn, because there is so much you can make wrong.
AVR (arduino) is probably better because it does all the low level stuff for you (if you want).

If you know how to program a microcontroller it is quite easy to change to a different one.


 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: stm32 vs pic32
« Reply #5 on: January 26, 2016, 03:39:27 pm »
Nearly a decade I looked at both ST and NXP ARM devices and choose to use the ones from NXP due to much more mature peripherals at that time. In the meanwhile I looked at ST several times but still didn't see compelling reasons to use ST's devices. One of the nice features of the NXP devices is the serial bootloader and some USB enabled devices can be programmed by just copying the firmware into the device like you are copying a file onto a USB stick.

NXP also has a free (up to 256k) IDE that is easy to install and runs on all three OSs. This was a key factor for me.

OP, to standardize on 32bit processor I would choose ARM over PIC. You need to choose the vendor, level (M0, M3, etc) and actual IC. This of course depends on your preferences and what you want to do with it. For me the LPC11u35 was a good fit, small footprint, USB loader, free IDE and mbed compatible. Definitely not the only good ARM choice.

 

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1668
  • Country: us
Re: stm32 vs pic32
« Reply #6 on: January 26, 2016, 05:09:26 pm »
Hmmm. Interesting question. Based purely on a popularity contest ARM is the way to go as it's currently the darling of at least a dozen companies making variants of the Cortex-M0/3/4/7. The PIC32, on the other  hand, is a one-act play from Microchip.

Narrowing the decision down to STM32 and PIC32 complicates things somewhat. STM32 is based on the ARM Cortex-M series, while PIC32 is based on MIPS32. Both of these are nice and viable 32-bit architectures, so there's really no reason to choose one or the other purely on the basis of the core. The core is only one part of a microcontroller, however, and both support roughly the same set of peripherals. In my opinion, the PIC32 peripherals are somewhat simpler and easier to understand than the equivalent STM32 peripherals, but that's a minor point.

Development support is another matter. There are many more options with STM32 (and ARM in general) than there are for PIC32. I know of three development environments for PIC32: MPLAB X/XC32 by Microchip, mikroC by Mikroelektronika, and EmBitz. MPLAB X and EmBitz are free and mikroC is not (although at USD$300 it's not too pricey). There are many others for STM32, include some expensive commercial products (IAR and Keil), some medium priced commercial tools (Rowley CrossWorks and VisualGDB), and free tools (EmBitz, Atollic TrueStudio).

STM32 has an advantage over PIC32 when it comes to hardware debuggers. Microchip has the $48 PICkit3, but it's slow and only usable with the PIC32 if you have lots of time on your hands. The next step up is the ICD-3, at $200, which is much faster than the PICkit3. ST has the ST-LINK/V2, which is only around $20, and it's faster than the $200 ICD-3.

Bottom line: you could choose either STM32 or PIC32 and get along fine. Skills learned on the STM32 are more transferable to other manufacturer's parts based on the ARM Cortex-M, so in my opinion that's really the primary reason to go with that choice over the PIC32 (that, and the wider choice of development tools and cheaper hardware debuggers).

Complexity is the number-one enemy of high-quality code.
 

Offline MT

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: aq
Re: stm32 vs pic32
« Reply #7 on: January 26, 2016, 06:01:28 pm »
i don't want to loose my time
No matter what you chose that you are guaranteed!

My "bare metal" experience are PIC32 is faster to get something real application like up and running (not a blinky led or wiggle leg) but beyond that STM is way more usable when you run into demanding applications, DAC's for instance or way better Timers but all depends on your application(note; i haven't dealt with PIC32 in couple of years). Now when MCHP bought Atmel and will get access to already made 300Mhz ARM MCU while later PIC32 seams to be a drag due to silicon bugs....well all this without even mention everything else that's terrible with PIC and ST and TI and NXP, etc they all contain a bad or two in their specific way
no matter what you chose, just be prepared for it!
« Last Edit: January 26, 2016, 08:05:15 pm by MT »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: stm32 vs pic32
« Reply #8 on: January 26, 2016, 07:53:24 pm »
The answer depends on why you want to learn.

If you want to make a living out of this, go after any of the arm chips - much more marketable / fashionable.

If you just want to learn for fun, any will do. Most arm chips have fairly advanced peripherals that can be difficult for a newbie. The exception here might be msp432. The hardware complexity has driven the oems to provide various libraries which can be difficult to learn.

Pic32 in comparison has much simpler (or primitive, depending on your perspective) peripherals that a newbie can get up and running quickly.

From the point of the cores, it makes zero difference to the programmer aa you are likely coding in a high level language like C.
================================
https://dannyelectronics.wordpress.com/
 

Offline Muxr

  • Super Contributor
  • ***
  • Posts: 1369
  • Country: us
Re: stm32 vs pic32
« Reply #9 on: January 26, 2016, 08:01:29 pm »
Nearly a decade I looked at both ST and NXP ARM devices and choose to use the ones from NXP due to much more mature peripherals at that time. In the meanwhile I looked at ST several times but still didn't see compelling reasons to use ST's devices. One of the nice features of the NXP devices is the serial bootloader and some USB enabled devices can be programmed by just copying the firmware into the device like you are copying a file onto a USB stick.

NXP also has a free (up to 256k) IDE that is easy to install and runs on all three OSs. This was a key factor for me.

OP, to standardize on 32bit processor I would choose ARM over PIC. You need to choose the vendor, level (M0, M3, etc) and actual IC. This of course depends on your preferences and what you want to do with it. For me the LPC11u35 was a good fit, small footprint, USB loader, free IDE and mbed compatible. Definitely not the only good ARM choice.
I just decided to give NXP a try based on your post. STM32 has had more attractive small quantity small chip prices but NXP seems pretty close now, they used to cost more or my memory might be failing. I've been using STM32, but I really don't care for the CooCox toolchain. It's been occasionally crashing on me and it's pretty quirky, also it didn't exactly have full support for the part I was using. That I wouldn't mind just staying in OS X, since it's my OS of choice.

Just ordered me a pair of Expresso dev boards for the part I am looking into using. Cheers!
« Last Edit: January 26, 2016, 08:06:05 pm by Muxr »
 

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1668
  • Country: us
Re: stm32 vs pic32
« Reply #10 on: January 26, 2016, 09:08:34 pm »
but I really don't care for the CooCox toolchain. It's been occasionally crashing on me and it's pretty quirky, also it didn't exactly have full support for the part I was using. That I wouldn't mind just staying in OS X, since it's my OS of choice.

Give Rowley CrossWorks for ARM a try. It supports NXP, ST, TI, and most other ARM variants, is not based on Eclipse, and it has a native OS X version.
Complexity is the number-one enemy of high-quality code.
 

Offline Muxr

  • Super Contributor
  • ***
  • Posts: 1369
  • Country: us
Re: stm32 vs pic32
« Reply #11 on: January 26, 2016, 09:13:24 pm »
but I really don't care for the CooCox toolchain. It's been occasionally crashing on me and it's pretty quirky, also it didn't exactly have full support for the part I was using. That I wouldn't mind just staying in OS X, since it's my OS of choice.

Give Rowley CrossWorks for ARM a try. It supports NXP, ST, TI, and most other ARM variants, is not based on Eclipse, and it has a native OS X version.
Thanks, will check it out.
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4420
  • Country: dk
Re: stm32 vs pic32
« Reply #12 on: January 26, 2016, 11:30:13 pm »
Nearly a decade I looked at both ST and NXP ARM devices and choose to use the ones from NXP due to much more mature peripherals at that time. In the meanwhile I looked at ST several times but still didn't see compelling reasons to use ST's devices. One of the nice features of the NXP devices is the serial bootloader and some USB enabled devices can be programmed by just copying the firmware into the device like you are copying a file onto a USB stick.

ST devices also have buildin serial/CAN/USB/I2C/SPI bootloader
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: stm32 vs pic32
« Reply #13 on: January 27, 2016, 12:42:58 am »
Nearly a decade I looked at both ST and NXP ARM devices and choose to use the ones from NXP due to much more mature peripherals at that time. In the meanwhile I looked at ST several times but still didn't see compelling reasons to use ST's devices. One of the nice features of the NXP devices is the serial bootloader and some USB enabled devices can be programmed by just copying the firmware into the device like you are copying a file onto a USB stick.
ST devices also have buildin serial/CAN/USB/I2C/SPI bootloader
Perhaps but (probably) only on more recent devices. NXP has serial (UART) bootloaders on all their ARM microcontrollers right from their earliest devices and kept the protocol the same!
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Muxr

  • Super Contributor
  • ***
  • Posts: 1369
  • Country: us
Re: stm32 vs pic32
« Reply #14 on: January 27, 2016, 03:01:57 am »
Nearly a decade I looked at both ST and NXP ARM devices and choose to use the ones from NXP due to much more mature peripherals at that time. In the meanwhile I looked at ST several times but still didn't see compelling reasons to use ST's devices. One of the nice features of the NXP devices is the serial bootloader and some USB enabled devices can be programmed by just copying the firmware into the device like you are copying a file onto a USB stick.
ST devices also have buildin serial/CAN/USB/I2C/SPI bootloader
Perhaps but (probably) only on more recent devices. NXP has serial (UART) bootloaders on all their ARM microcontrollers right from their earliest devices and kept the protocol the same!
Perhaps off topic, but maybe you know. I just skimmed over the user manual for the NXP LPC 1125 (http://www.nxp.com/documents/user_manual/UM10398.pdf) part I plan on using in a project I've been working on. I saw no mention of the DMA data transfer. When I used a comparable STM32 Cortex M0 part, I remember having to setup DMA for faster SPI transfers. NXP seems to be using a FIFO register which appears to be much easier to use. Am I getting this right, or am I missing something?

edit: actually nevermind I did some more research, it looks like the 1125 doesn't have DMA controllers, there are other parts that do, like the 1225. Need to get familiar with NXPs models and the selection of ARM MCUs.
« Last Edit: January 27, 2016, 03:19:56 am by Muxr »
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: stm32 vs pic32
« Reply #15 on: January 27, 2016, 04:28:22 am »
ST devices also have buildin serial/CAN/USB/I2C/SPI bootloader

How does the ST USB bootloader work, disk drive emulation and a simple file copy or does it require installed software on the host to load an image?
 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1193
  • Country: ca
    • VE7XEN Blog
Re: stm32 vs pic32
« Reply #16 on: January 27, 2016, 05:08:39 am »
ST devices also have buildin serial/CAN/USB/I2C/SPI bootloader

How does the ST USB bootloader work, disk drive emulation and a simple file copy or does it require installed software on the host to load an image?
It's based on DFU which is a USB-IF standard but does require software on the host. The ST software is DfuSe. dfu-util is cross-platform and open-source.

Note that the USB bootloader is not included in all STM32 variants with a USB peripheral, and it's not that easy to figure out which include it.
73 de VE7XEN
He/Him
 

Offline janekm

  • Supporter
  • ****
  • Posts: 515
  • Country: gb
Re: stm32 vs pic32
« Reply #17 on: January 27, 2016, 05:34:24 am »
One factor that can be interesting to consider is that ST is seriously price-dumping in China to mop up the low-cost market... So if you're planning to build anything for what really low cost is a factor that's attractive.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: stm32 vs pic32
« Reply #18 on: January 27, 2016, 10:39:53 am »
Very few people end up working on really high volume products where the price difference between various parts matter. Looking at the price of a single part is a foolish thing to do and can land you in serious trouble. A cheap choice may lead to extra components and/or extra (software) engineering costs.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: stm32 vs pic32
« Reply #19 on: January 27, 2016, 11:48:38 am »
I'll mention that I think ARM and MIPS CPU cores are similar enough "philosophically" WRT their implementation in microcontrollers that whatever you learn on one will be helpful if you ever have to use the other.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: stm32 vs pic32
« Reply #20 on: January 27, 2016, 11:55:00 am »
Quote
When I used a comparable STM32 Cortex M0 part, I remember having to setup DMA for faster SPI transfers.

It is fairly unusual for the lower-end parts like the M0 to have DMA - msp430s are some of the exceptions.

It is very unusual for any part to use DMA exclusively for peripheral data transfer - so there is likely a spi data register somewhere there.
================================
https://dannyelectronics.wordpress.com/
 

Offline SteveyG

  • Supporter
  • ****
  • Posts: 987
  • Country: gb
  • Soldering Equipment Guru
Re: stm32 vs pic32
« Reply #21 on: January 27, 2016, 01:04:32 pm »
Playing devils advocate here, what in all honesty do you even need a 32-bit MCU for? People using M0/3/4/7 for hobby use are generally barely going to use the capabilities of the device and waste a lot of time in the process. If you want to learn, it would make more sense to start with something straightfoward like an MSP430 (if you can deal with Code Composer) or an AVR or a PIC18/24 where the datasheets are much smaller and easier to understand for a newbie.

We've had seriously complex medical systems with full colour graphics interfaces etc running on small 16-bit MCUs.
YouTube Channel: https://www.youtube.com/user/sdgelectronics/
Use code: “SDG5” to get 5% off JBC Equipment at Kaisertech
 

Offline Molenaar

  • Regular Contributor
  • *
  • Posts: 73
  • Country: nl
Re: stm32 vs pic32
« Reply #22 on: January 27, 2016, 02:50:01 pm »
I'd look at the Hercules series from TI. Powerful MCUs, but it is easy to start development with HALCoGEN, which will generate actually useful code for initialization and setting up the peripherals. The TMS570LS1224 launchpad would be a good and cheap start.
 

Offline Muxr

  • Super Contributor
  • ***
  • Posts: 1369
  • Country: us
Re: stm32 vs pic32
« Reply #23 on: January 27, 2016, 03:02:29 pm »
Very few people end up working on really high volume products where the price difference between various parts matter. Looking at the price of a single part is a foolish thing to do and can land you in serious trouble. A cheap choice may lead to extra components and/or extra (software) engineering costs.
For one offs or a few boards here or there I agree but if you even make 100pcs of something, saving a few bucks here or there on a component adds up to $10+ in savings on each board. Why throw that money away if a different components does the job. I'd rather buy a piece of test equipment for that $1000 than give it to Maxim, Ti or someone.

And sometimes it isn't about saving money either, it's about optimizing your design. For instance you save cost on supporting components so that you can include an expensive FPGA in the design, or an expensive display, so that you can meet your target price without compromising profit... as an example. You save cost where it doesn't matter so that you can splurge where it matters.

At the end of the day this is my hobby, I do this for fun, price optimization is actually fun to me. Seeing how cheap I can make something is pretty entertaining. Also my recent purchases of Keithley 2015, Maynuo DC load and the RTM1054 oscilloscope were all funded by the products I sold.

If I don't make it profitable, there is no point in producing it for general public. If all I am doing is making one offs for myself, then yeah I am not going to care about a few dollars price difference between two components.

I should also elaborate. I do this on quality parts, I don't skimp reliability for the price advantage. For instance I always use Nichicon caps etc.. but microcontrollers from STM and NXP are comparable in quality, if one is cheaper than the other than it makes sense to go for the cheaper one. Right now they are comparable, but a year ago when I was looking at them, STM had an advantage.
« Last Edit: January 27, 2016, 04:13:07 pm by Muxr »
 

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1668
  • Country: us
Re: stm32 vs pic32
« Reply #24 on: January 27, 2016, 04:56:02 pm »
Playing devils advocate here, what in all honesty do you even need a 32-bit MCU for?

"Because it's there" -- George Herbert Mallory
Complexity is the number-one enemy of high-quality code.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf