Skip to main content

Choosing an MCU

Picking a microcontroller is a trade-off between performance, peripherals, power, cost, robustness and ecosystem β€” not a single number. This page covers the common families, how to choose, and the traps to avoid.

FamilyCore / ISASweet spot
AVR (ATmega/ATtiny), PIC, 80518-bitCheap, simple, robust, low performance β€” Arduino Uno is AVR
STM32 (ST)Arm Cortex-M0/M3/M4/M7/M33The lab default β€” huge range, rich peripherals, great tooling
ESP32 (Espressif)Xtensa / RISC-VBuilt-in Wi-Fi + BLE β€” IoT
Nordic nRF52/nRF53Cortex-MBluetooth Low Energy / low power
RP2040 / RP2350 (Raspberry Pi)Cortex-M0+ / M33 + RISC-VCheap, dual-core, hobby & education
TI MSP43016-bitUltra-low-power sensing
NXP, Renesas, Microchip SAMCortex-MIndustrial / automotive breadth
GD32, WCH CH32V, SiFiveRISC-VLow-cost, open ISA, growing ecosystem

Selection criteria​

  • Performance β€” see the gotchas below; judge the core + features, not just MHz.
  • Peripherals β€” the right count and type: ADC resolution/channels, timers/PWM, UART/IΒ²C/SPI/CAN/USB/Ethernet.
  • Memory β€” enough flash + RAM, with headroom (an RTOS and stacks eat RAM).
  • Power β€” active and sleep currents, low-power modes β€” critical for battery devices.
  • Connectivity β€” is Wi-Fi/BLE/Thread/cellular integrated, or external?
  • Cost β€” unit price at your volume, plus dev-board and tooling cost.
  • Availability & lifecycle β€” current stock, longevity/EOL, and a second source. Supply shocks (2021–2022) stranded designs built around single-source parts.
  • Operating temperature β€” match the grade to the environment (see below).
  • Robustness & safety β€” brown-out detect, watchdog, ESD rating, ECC memory; safety certs (IEC 61508, ISO 26262) for critical systems.
  • Ecosystem & compatibility β€” toolchain, HAL/RTOS support, debugger, community, and pin-compatible family members so you can scale up/down without a redesign.
  • Security β€” TrustZone (Cortex-M33), secure boot, hardware crypto.

Operating temperature grades​

GradeTypical rangeUse
Commercial0 … +70 Β°CIndoor consumer
Industrialβˆ’40 … +85 Β°CMost real-world / outdoor
Automotive (AEC-Q100)βˆ’40 … +125 Β°CVehicles, harsh environments
Match the grade to the environment

A commercial-grade part in an outdoor or engine-bay device will drift or fail. For anything beyond a benign indoor setting, default to industrial (βˆ’40…+85 Β°C).

Gotchas β€” read before you commit​

Don't pick on clock speed alone​

MHz is only part of performance. Two chips at the same clock can differ several-fold:

  • Architecture / IPC β€” a Cortex-M7 does far more per cycle than an M0+; DMIPS/MHz varies by core.
  • FPU β€” without a hardware floating-point unit, every float is emulated in software (often 10Γ—+ slower). An M4 @ 80 MHz with FPU can beat an M0 @ 100 MHz on math.
  • DSP instructions β€” Cortex-M4/M7 SIMD/MAC accelerate filtering and control loops.
  • Flash wait states / cache β€” at high clocks the flash can't keep up; an accelerator/cache (or running from RAM) is what delivers the rated speed.
FPU: know what you need

Most Cortex-M4/M7 have a single-precision FPU. If your code needs double precision and the FPU is single-only, those doubles still run in software. Match the FPU to your math.

RISC-V vs. Arm​

Arm Cortex-MRISC-V
EcosystemMature β€” tools, RTOS, libraries, supportYounger, growing fast
ISALicensed (vendors pay Arm)Open, royalty-free, customizable
RiskVery low, provenTooling/fragmentation still settling
Cost trendβ€”Often cheaper silicon
  • Choose Arm for proven tooling, broad RTOS/library support, and lowest project risk (the safe default today).
  • Choose RISC-V for cost, openness, or custom silicon β€” and accept a less mature ecosystem.
Other things people forget
  • Check the errata sheet β€” silicon bugs are real and can block a peripheral you rely on.
  • Dev board + debugger availability β€” you want to prototype on day one (e.g. ST-Link/J-Link; see Programmers & Debuggers).
  • Footprint/pin compatibility within a family lets you change memory/speed late without a board respin.

A quick decision flow​

  1. Connectivity? Need Wi-Fi/BLE β†’ ESP32 / nRF. Otherwise a plain MCU.
  2. Performance & math? Heavy float/DSP β†’ Cortex-M4/M7 with FPU. Simple I/O β†’ M0+/8-bit.
  3. Environment? Outdoor/harsh β†’ industrial/automotive grade.
  4. Power? Battery β†’ low-power family (MSP430, nRF, STM32L).
  5. Cost & supply? Check unit price and live stock + a second source.
  6. Ecosystem? Favor a family your team and tools already support.

See also: Firmware Approaches and the lab's Microcontrollers hardware guide.