The STM32 MCU tends to be more popular than the PIC32 for 32 bit MCU’s, but is it really the best microcontroller, and more importantly: when should you pick one over the other?
If you’re in a hurry, here’s a quick video with the highlights, however, if you want to know the details then read on!
The PIC (Programmable Intelligent Computers, by Microchip) and STM (by ST Microelectronics) microcontroller product lines have ranked among the top MCU’s on the market for more than a decade.
Both manufacturers offer high-quality, highly diverse microcontrollers that can support an enormous number of embedded applications, from IoT to Industrial to high quantity consumer applications.
This post will do an STM32 comparison with the PIC 32 product line across different points and give you the key factors to think about when selecting the right 32 bit MCU for your design.
- STM32 History: ARM based
- Comparing the STM32 vs. PIC32
- STM32 Comparison with PIC32 – Packaging
- Coding Tools
- Dev Tools
- Toolchain/IDE Support
- STM32 Comparison with PIC32 – Pricing
- STM32 Comparison with PIC 32 – Conclusion
- STM32 and PIC32 FAQ
A Brief Introduction
STM32 History: ARM based
In the case of STM32, ST Microelectronics didn’t actually develop the processor.
Instead, since 2006 it licenses the core IP from ARM. That doesn’t mean the products aren’t quality. ARM has one of the leading core technologies on the market.
The strategic partnership makes the STM32 a quality product line that continues to perform year after year.
ST has a long history of licensing ARM’s IP for MCUs. Its STR9 and STR7 product families are based on ARM’s ARM9E and ARM7TDMI cores, respectively.
ST adds its own peripherals to the ARM core to create its leading 32 bit microcontrollers.
It is also worth noting that ARM Holdings was founded in 1990 as a spin-off from the Acorn Computer Group and Apple.
Acorn created the very first commercial RISC processor in 1985, which became available for low-cost PCs in 1987.
Today, ARM Holdings remains a leader in electronic technologies, including supplying the semiconductors that power iPhones and iPads.
The PIC line also has an impressive history. Long before most people were thinking about the CPU, Microchip Technology was working on the PIC1650 in 1975.
The original Peripheral Interface Controller (for which PIC was initially named) was designed to improve the I/O performance of General Instrument’s CP1600, a 16-bit CPU.
The original design shared similarities to Acorn’s RISC designs, which came later. The PIC family was focused on supporting ROM- and EPROM-based programmable channel controllers early on.
By 2002, however, Flash-programmable devices became commercially available and became the Programmable Intelligent Computers we’ve come to love.
The PIC-32 family includes boards a wide variety of on-board peripherals, including UARTs, serial communication capabilities, programmable memory, motor controls and more.
Third-party and open-source tools are also supported.
It is worth noting PIC is a world-leader for MCUs in its own right, particularly when it comes to 8-bit devices.
Comparing the STM32 vs. PIC32
There are a lot of 32-bit MCUs on the market.
For small-to-medium businesses who want to make reliable, market-ready products, however, STM32 and PIC32 are the best microcontrollers for quality and customization.
The best device for you depends of course on your application. Let’s cross-compare the two across various metrics to help you find the ideal solution.
STM32 Comparison with PIC32 – Packaging
Both STM32 and PIC32 support a variety of Surface Mounted Device/Technology (SMD/SMT) packaging, allowing the direct mounting of all components to the PCB. The PIC32, however, is the only one of the two MCUs to support older Dual In-Line Packaging (DIP), allowing you to connect the MCU using through lines or a separate socket.
Which is the Best Microcontroller? If you need DIP packaging, the PIC32 is the obvious choice.
Both manufacturers offer coding support tools that are meant to help with the configuration and abstraction.
Harmony supports PIC32, and CubeMX supports STM32. However, just because both manufacturers offer coding tools does not mean the tools are created equal.
CubeMX wins hands-down for quality and robustness. It’s a high-quality tool that offers a HAL (Hardware Abstraction Layer) and libraries.
The tool also allows for easy exploration of MCUs and the initialization of peripherals. With this, the quality is consistent, and bugs are rare, particularly for the newest release.
Unfortunately, we can’t say the same for Harmony, which is so littered with bugs the PIC32 might as well not come with a coding tool at all. It also has a history of being unable to compile, particularly immediately following a new release.
Unless absolutely needed, you’re better off coding yourself.
Which Microcontroller has the best coding tools? STM32’s CubeMX.
Both STM32 and PIC32 families offer development boards and accompanying tools.
Here again, the power of ST’s Nucleo board blows Microchip’s ICD boards out of the water.
The Nucleo boards are low-cost, and the paired ST-LINK toolkit is only $22, compared to Microchip’s $200+ ensemble.
That doesn’t mean the PIC32 isn’t a strong choice for tinkers, however. It just means it is probably more affordable to build your own dev board (you just might get faster processing speeds, too).
Which Microcontroller has the best Development Tools? STM32-supported Nucleo development boards.
Both Microchip (PIC) and ST’s 32-bit lines are supported by professional toolchain software. PIC32 is supported by MPLAB X IDE, and STM32 is supported by SW2STM32, IAR, and Keil (the industry-leading software).
Both components also rely on GCC for compilation, and both support C and C++, though Microchip offers more broad support for C++.
That said, ST purchased Atollic and now offers its professional toolchain software, TrueSTUDIO, for free. It’s pretty hard not to like ST on this point.
Which is Microcontroller has the best Toolchain? PIC32 for C++, but STM32 offers professional software for free.
This is where PIC32 shines. Microchip continues to support the lone tinkerer, in continuing to support things like the DIP package, and in hosting live webinars where you can ask questions to the company’s engineering team directly.
Microchip keeps a pulse on the community, and it supports its users with free samples, active involvement in ongoing conversations, and friendly customer service agents which genuinely want to help.
STM may win in broader applications, but it’s nice to know Microchip still acts like a small business, even though it sells billions of units each year.
Which Microcontroller has the Best Community? Microchip (PIC32).
STM32 Comparison with PIC32 – Pricing
Both the STM32 and PIC32 families offer low-cost and higher-end solutions, based on the functionality needed.
Generally speaking, the PIC32 family is less expensive when you buy just a few, which is one of the reasons PICs are what many engineers learn to program on in university.
That said, as soon as you are ordering more than a thousand (or, work with a supplier that will add your smaller order to a larger one so you can get bulk pricing), the STM32 tends to be better value.
This is especially true if you purchase from a company based in China, due to wide product availability and popularity (particularly for 32bit, 100MHz, 64 to 100-pin devices).
Which is Microcontroller has the lowest cost? The PIC32 for low-quantity purchases. The STM32 for manufacturing orders.
STM32 Comparison with PIC 32 – Conclusion
Both STM32 and PIC32 are quality 32-bit microcontrollers, and at Titoma we have used them both with much success.
While the choice can come out differently for different applications, Design For Manufacturing in Asia is always foremost on our mind, and for that, we strongly prefer STM32 because of its lower unit cost and better availability (shorter lead-times) especially in China.
In addition, STM offers better development tools in terms of IDE support, HAL, and libraries.
The BEST Microcontroller for manufacturing is STM32!
STM32 and PIC32 FAQ
8 bit vs 32 bit MCU
An 8-bit microcontroller processes 8 bits of data at any time.
The number of bits used by the MCU tells you the size of the records (8 bits per register), the number of memory addresses (only 2 ^ 8 = 256 addresses), and the largest number it can process (again, 2 ^ 8 = 256 integers or 0-255 integers).
A 32-bit microcontroller can handle numbers up to 2 ^ 32. They have 32-bit arithmetic logical units, records, and bus width.
Overall, this means that 32 bits can process up to four times the amount of data, making it more technically efficient at using data.
STM32 F VS STM32I
STM32F is the core of the STM32 family that includes balanced devices targeting applications that do not require extremely low power.
They combine high performance, peripherals, and low-power, low-voltage operation. With four lines, the STM32F products target various applications in the industrial, medical, and consumer markets.
The STM32L is based on ST’s EnergyLite platform that targets ultra-low power and ultra-low-voltage applications using an optimized architecture and an ultra-low leakage process jointly owned with the STM8L family.
Which is the fastest STM32?
High-performance microcontrollers are those STM32 MCUs dedicated to CPU- intensive and multimedia applications.
They are Cortex-M3/4F/7 based MCUs, with maximum clock frequencies ranging from 120MHz (F2) up to 400MHz (H7).
List of the fastest STM32s
Have questions about the design and manufacture of electronics in Taiwan or China? Speak to us
Titoma provides B2B companies with the complete design and manufacturing of embedded electronic products, both in China and Taiwan.
Unlike most ODM manufacturers we offer our clients complete ownership of the IP, so nobody is locked in.
We engineer our products in Taiwan and are very well tapped into the China/Taiwan Component Eco-system, so key to remain competitive.
We involve a few trusted factories, right from the start of the design. This way we make sure everybody is aligned, and by avoiding surprises we avoid delays, assuring the fastest possible Time To Market (hence our name Titoma).
Talk with one of our design experts by hitting the button below, and learn how we can enable your business with a custom device, without the worries.