Having narrowed down on a STM32 microcontroller for this project after having considered (and decided against) a PSoC 6, ESP8266, and ESP32, I will use the STM32 MCU product selector to narrow down to a specific microcontroller that satisfies my requirements.
I also found in ARM Cortex Processors that any Cortex-M will suffice for my processor requirements, where M4/M7 cores may be nicer for their greater hardware features/memory caches, but I may also wish to prioritise the lower power consumption of the M0/M0+ cores.
Although I already have prior experience with the STM32U575
/STM32U585
/STM32F779
, I will start the selection process from the beginning to get a better familiarity with the breadth of product offerings.
From the above brochure image, I see that there are four primary categories of STM32 microcontrollers—high performance, mainstream, ultra-low-power, and wireless.
Industrial
Smart home
Personal electronics
Smart city
Medical and healthcare
Series | Processor | Maximum Clock Frequency | Remarks |
---|---|---|---|
STM32H5 | M33 | 'Best combination of performance, security, and affordability' | |
STM32F4 | M4 | 'Industry's highest benchmark scores for Cortex-M-based microcontrollers' | |
STM32F2 | M3 | 'Unprecedented trade-off between price and performance' | |
STM32F7 | M7 | 'Deliver the maximum theoretical performance of the Cortex-M7 core' | |
STM32H7 | M7 | Dual-core, 'Industry's highest benchmark scores for Cortex-M-based microcontrollers' |
Series | Processor | Maximum Clock Frequency | Remarks |
---|---|---|---|
STM32C0 | M0+ | 'Most cost-effective' | |
STM32G0 | M0+ | 'Address cost-sensitive applications and bring better performance while lowering power consumption' | |
STM32F0 | M0 | 'Ideal for engineers looking to future proof their product platform' | |
STM32F1 | M3 | 'Pioneer of the STM32 family', 'high performance with first-class peripherals' | |
STM32F3 | M4 | 'Enables the most demanding real-time control for consumer and industrial applications', 'rich choice of advanced analog peripherals' | |
STM32G4 | M4 | 'Addresses all applications that require an advanced and/or rich analog peripheral set combined with a high-performance CPU' |
Industrial
Smart home
Personal electronics
Series | Processor | Maximum Clock Frequency | Remarks |
---|---|---|---|
STM32U5 | M33 | ||
STM32L5 | M33 | ||
STM32L4 | M4 | ||
STM32L4+ | M4 | ||
STM32L0 | M0+ |
'Enable wireless connectivity'
Dual-core architecture—MCU and a radio transceiver
Industrial
Smart home
IoT
Series | Processor | Maximum Clock Frequency | Remarks |
---|---|---|---|
STM32WBA | M33 | Bluetooth Low Energy 5.4 | |
STM32WB | M4 and M0+ | Bluetooth Low Energy 5.4, IEEE 802.15.4 (Zigbee and Thread) with Matter | |
STM32WB0 | M0+ | Low-power Bluetooth Low Energy 5.3 | |
STM32WL | M4 and M0+ | LoRa |
Before looking into the product selector, it looks as though I could find suitable microcontrollers in the Mainstream, Ultra Low Power, or Wireless categories—with the two former requiring some external connectivity module to meet my wireless requirements.
Of all the series, the STM32WB
looks to be the most initially attractive, as this appears to fully satisfy my connectivity & processor requirements without requiring an external module. I will need to investigate further to see whether it satisfies the other microcontroller (ie peripheral) requirements however.
Using the STM32 MCU product selector, I have applied the following filters:
Filter | Applied | Remarks |
---|---|---|
Status & Availability | Active | |
Package | All SO-type and QFP-type packages | |
RAM Size ( | Minimum | Safety factor |
Timers | Minimum 5 | Added safety factor |
Other timer functions | Dual watchdog, HR, SysTick, WWDG | Want a high-resolution timer in case I need higher duty cycle resolution for a Buck Converter; Want SysTick in case I choose to run an RTOS layer; Want a window Watchdog Timer to ensure correct display timing |
I/Os | 30 | Added safety factor |
SPI typ | Minimum 3 | One for my LED Drivers column control, 2 for a safety factor |
USB Type | USB Type-C | UCPD |
I have ensured to add a sufficient safety factor atop each of requirements in my applied filters, as I am still in the process of/yet to design many aspects of this project—including the Interface and Power circuits. I have consequently made sure to budget for enough surplus peripherals/GPIOs/resources such that I have sufficient room to grow, in case my requirements grow once I have settled on a microcontroller.
As I am only intending to produce a small handful of these boards (ie only enough prototyping/development boards to produce a final design/revision), and am not looking to commercialise/mass-manufacture these boards, I can afford to adopt a prototyping approach and over-specify my microcontroller, rather than strictly optimising my selection.
I will need to consider my USB Power Delivery controller peripheral—there are indeed STM32 microcontrollers with this feature, but I will need to consider whether it would be in fact better to delegate this to an external IC that is communicated with over SPI/I2C. My primary concern in this regard is my need for two USB Type-C Connectors, where I want to be able to have a Power Connector plugged into a USB PD source, and another Data Connector separately plugged in to my computer. I will need to ensure that this dual-connector application is supported by the microcontroller's peripherals, and that it is implemented safely.
Although full details can be found in USB Power Delivery > Implementation, I have decided to indeed apply a further filter for only microcontrollers with a UCPD peripheral. This will allow me to safely & reliably negotiate for my extended current sink requirements from the source, without requiring an external IC. This additional filter also does not box me in too heavily, as it narrows the available products (without the inclusion of QFN-type packages in the filter) from 521 to (still) 121 options.
I note that the STM32WB
wireless microcontrollers I identified earlier are only available in QFN/BGA/CSP packages—so I will either need to settle for an alternative non-wireless enabled microcontroller and use an external module, or accept that I will need to use the QFN package. My primary concern here is that these are not easily hand-solderable, and I am trying to choose parts which I can assemble myself. With that said however, I have already:
The RS-1515MBAM LEDs are less concerning as they are ordered from LCSC—so I can put them through JLCPCB's assembly service. The TLC5951DAP drivers are more of a problem, as these are not available through LCSC—such that I will need to find access to a hot-plate/hot-air station to assemble them.
At that point, what is to stop me from using a QFN package? LCSC even has STM32WB
microcontrollers in stock, so I could also have these assembled on the board for me. I will still stick with my SO-type TLC5951DAP devices however, as I suspect these two-sided packages will be easier to route nicely than a quad-flat package.
With the above considerations, I will include QFN-type packages in my search filter, and see whether STM32WBs will be suitable.
Despite the above, I must still remember that these wireless-enabled chips require an external antenna with a suitable matching network—if I choose to use one of these microcontrollers, I may be forced to use JLCPCB's more expensive controlled impedance process.
I see that none of the STM32WB
microcontrollers include a UCPD peripheral—meaning that I will need to choose between a microcontroller with wireless connectivity or with an in-built USB-C/USB PD controller peripheral.
Applying my filters to the STM32WB product selector, I see that there a number of problematic filters that cannot be met—
The maximum number of Requirements > SPIs available is 2. I suspect this should be fine however, as SPI is a bus architecture after all—hopefully the LED Drivers will be the only peripheral that I need to talk to without a chip select line.
There are no microcontrollers with a UCPD peripheral.
Conceding the above, I narrow the selection down to five microcontrollers—with the only meaningful differences being their packages, flash/RAM, and whether they support Zigbee. These five microcontrollers are:
Looking further at these microcontrollers, I think that I would rather choose a mainstream microcontroller and use an ESP32 or similar as an external connectivity module. This is due to a number of factors:
Having made the above considerations, I will dismiss the STM32WB
series of microcontrollers for this project, and look towards using an external module for wireless connectivity.
With my final filters applied as per the table above in STM32 > Product Selector, I am brought to a final short-list of 121 options.
I see that these options comprise the following series:
Series | Category | Processor |
---|---|---|
STM32G4 | Mainstream | Cortex-M4 |
STM32H5 | High Performance | Cortex-M33 |
STM32L5 | Ultra Low Power | Cortex-M33 |
STM32U5 | Ultra Low Power | Cortex-M33 |
I will further narrow my short-list by filtering out options with more than 40 Requirements > GPIO pins, as I will definitely not need more than that. This narrows the options down from 121 to 22—perfect!
At a glance, it looks like the Ultra Low Power microcontrollers are significantly better than the mainstream STM32G4
options—more flash/RAM, better processor, comparable clock speed, at just the cost of less analogue peripherals.
I see that even the option with the most flash & RAM, the STM32U585CI
, is available for NZD$11.07—in my quantities, this is not a significant from the cheaper options at ~NZD$7. I will therefore select the variants of each series with the most flash & RAM available for comparison against each other—this reduces the number of options from 22 to 10.
Taking a quick look at ST's product naming convention, I see that they take the form
such that I would expect my final part number to be an STM32abbbcdTe
for a QFP-type part.
Microcontroller | Processor | Operating Frequency | Flash | RAM | Has HR Timer | ADCs | OPAMPs | SMPS | I2Cs | SPIs | Supply Voltage |
---|---|---|---|---|---|---|---|---|---|---|---|
STM32G491CE | Cortex-M4 + FPU | No | 3 | 4 | - | 3 | 3 | ||||
STM32G4A1CE | Cortex-M4 + FPU | No | 3 | 4 | - | 4 | 3 | ||||
STM32G473CE | Cortex-M4 + FPU | No | 5 | 6 | - | 4 | 3 | ||||
STM32G483CE | Cortex-M4 + FPU | No | 5 | 6 | - | 4 | 3 | ||||
STM32G474CE | Cortex-M4 + FPU | Yes | 5 | 6 | - | 4 | 3 | ||||
STM32G484CE | Cortex-M4 + FPU | Yes | 5 | 6 | - | 4 | 3 | ||||
STM32L552CE | Cortex-M33 | No | 2 | 2 | External | 4 | 3 | ||||
STM32L562CE | Cortex-M33 | No | 2 | 2 | External | 4 | 3 | ||||
STM32U575CI | Cortex-M33 | No | 2 | 2 | Internal | 4 | 3 | ||||
STM32U585CI | Cortex-M33 | No | 2 | 2 | Internal | 4 | 3 |
Looking at the table of options above, I see that the primary difference is indeed the number of analogue peripherals available on the mainstream (G4
) vs ultra low power (L5
and U5
) series of microcontrollers.
L5
and U5
OptionsOther than the additional ADC peripheral available on the STM32L5
microcontrollers, I cannot see a good enough reason to choose one of them over the newer, faster, more efficient, STM32U5
options, if I were to select one of the Ultra Low Power microcontrollers.
The decision then comes down to be between the STM32G4
and STM32U5
options, where the U5
options have a faster Cortex-M33 processor at a slightly slower clock speed, and with fewer analogue peripherals.
Looking at the portfolio for the STM32U5
family, I see that the main difference between the STM32U575
/STM32U585
microcontrollers are the added cryptographic & on-the-fly decryption of the U585
, which does not make a difference to me. I will therefore just choose which one is cheaper/most available, if I decide to proceed with these series.
If I choose to go with a microcontroller from the Ultra Low Power U5
series of Cortex-M33 processors, either of the STM32U575
/STM32U585
will be suitable.
G4
OptionsLooking closer at the mainstream STM32G4
options, it looks like any of the G4x1
, G4x3
, or G4x4
will be suitable.
Looking at pricing on DigiKey, I see that the access line G491
is available for NZD$8.96, and the hi-resolution line G474
for NZD$10.24—a difference of NZD$1.28, which, at my quantities, is not significant. Consequently, for my project, I will choose the STM32G474
if I proceed with a general-purpose microcontroller.
Similarly with the U575
/U585
, the main difference between the G474
and G484
is the hardware crypto on the G484
—which does not make a difference to me, so I will simply choose whichever is easier to source/cheaper.
If I choose to go with a microcontroller from the Mainstream G4
series of Cortex-M4 processors, either of the STM32G474
/STM32G484
will be suitable.
In terms of my ADC requirements, I can absolutely just share a single ADC peripheral with different channels for my various signals, so the lesser peripherals available on the STM32U5
series is not a deal-breaker. Similarly, although the G474
has five 12-bit ADC (up to 16-bit with hardware oversampling), the 12- and 14-bit ADCs on the U575
will more-than-suffice for my Brightness Control and Current Sensing applications.
The U575
also doesn't actually have less SPI peripherals—it has less 'basic' SPIs, but has two additionally OCTOSPI peripherals—which can be operated as basic SPIs.
Therefore, there is nothing that stands out to me to dismiss either of these microcontrollers.
Some more considerations are:
U575
/U585
in my internship last year—perhaps it would be good to get experience with the G474
?U575
is newer and faster.U575
is lower power—which is a project specification.U575
and G474
's TTL output ports have a logic HIGH
HIGH
voltage is sufficient to switch my Current Amplifiers.OSPEEDRy[1:0] = 01
:U575
is able to drive a G474
does not provide a specification for this—only that a OSPEEDRy[1:0] = 01
.STM32G474CET6
is available from DigiKey with 1112 in stock at NZD$10.24.STM32U575CIT6Q
is available from DigiKey with 2424 in stock at NZD$10.82.Having made the above considerations, and, acknowledging that my project is, admittedly, hardly 'mixed-signal', I feel the best decision to proceed with will be the STM32U575CIT6Q
.
Although I would have liked to have played with the G474
for the first time, the U575
is the better selection for this application.