armhub.dev
Vendors · 43 pages
Vendors

STM32 (STMicroelectronics)

The most prolific Cortex-M family — F0 through U5, plus the H7 / H5 high-end. Strengths, ecosystem, and the right line for the job.

4 min read · 805 wordsupdated · May 12, 2026

If you've used a Cortex-M, statistically you've used an STM32. STMicroelectronics ships >2 billion STM32 units a year across a dozen families, from ultra-low-cost C0 to the 480 MHz dual-core H7. The ecosystem (HAL, CubeMX, CubeIDE, Discovery/Nucleo boards, documentation) is rough around the edges but vast — for almost any problem there's a HAL example, an AN-XXXX application note, or a community post.

The families

FamilyCoreClockPosition
STM32C0Cortex-M0+48 MHzLowest cost, 8-bit replacement
STM32F0Cortex-M048 MHzMainstream entry, legacy
STM32G0Cortex-M0+64 MHzModern mainstream entry, C0's bigger sibling
STM32L0Cortex-M0+32 MHzLow-power M0+
STM32F1Cortex-M372 MHzLegacy classic, still shipping
STM32F2Cortex-M3120 MHzConnectivity (Ethernet)
STM32F3Cortex-M472 MHzMixed-signal + analog peripherals
STM32F4Cortex-M484–180 MHzThe workhorse — most popular M4 in the world
STM32F7Cortex-M7216 MHzHigh-end M7 + L1 cache
STM32G4Cortex-M4170 MHzMotor control + digital power
STM32H7Cortex-M7 (+M4)480 MHzTop-end perf, single or dual-core
STM32H5Cortex-M33250 MHzM33 successor to F4/F7
STM32L4Cortex-M480 MHzMainstream low-power
STM32L5Cortex-M33110 MHzLow-power + TrustZone
STM32U5Cortex-M33160 MHzModern mainstream, TrustZone-first
STM32WBCortex-M4 + M0+64 MHzWireless (BLE) + app core
STM32WLCortex-M4 (+M0+)48 MHzLoRa / sub-GHz
STM32MPCortex-A7 + M4800 MHz / 209 MHzLinux + RT companion
STM32 family core and peripheral mix
corememoryradioperiph
STM32F4 / F7M4 / M7 · 84-216 MHz · big ecosystem · GP MCUSTM32G4M4 @ 170 MHz · HRTIM · OPAMPs · motor / digital powerSTM32H7M7 + M4 dual · 480 MHz · L1 cache · max perfSTM32L4 / L5M4 / M33 · 80-110 MHz · low-power · TZ on L5STM32U5M33 @ 160 MHz · TrustZone-first · secure IoTSTM32WB / WLM4 + M0+ · BLE 5 (WB) or LoRa (WL)STM32H5M33 @ 250 MHz · F4/F7 successor · OTFDECSTM32C0 / G0M0+ · 48-64 MHz · entry / costSTM32MPA7 + M4 · Linux + RT companion
The STM32 portfolio fans out by intent: F/H lines chase general-purpose throughput, G4 specialises in motor and digital-power timer fabric, L/U go after battery life, WB/WL embed a radio, and U5/L5/H5 lead with TrustZone-M for new secure designs.

How to pick a line

  • "I want cheapest possible 32-bit" → STM32C0 ($0.30–$1.00).
  • "I want a general-purpose modern entry MCU" → STM32G0.
  • "I want maximum ecosystem for an M4 mid-range design" → STM32F4 (specifically F411 or F446).
  • "I want maximum performance" → STM32H7 (single-core 480 MHz) or H7 dual-core (M7 + M4 helper).
  • "I want low-power for a battery-powered IoT device" → STM32L4 (older) or STM32U5 (newer, recommended).
  • "I want TrustZone for secure boot / PSA" → STM32U5 or L5.
  • "I want motor control or power" → STM32G4.
  • "I want Bluetooth Low Energy on chip" → STM32WB.
  • "I want LoRa on chip" → STM32WL.
  • "I need Linux + real-time" → STM32MP (Cortex-A7 + Cortex-M4 on one die).

The ecosystem

CubeMX

GUI configurator. You pick a chip, click through pin assignments and peripheral configurations, and it generates a project (Makefile, CMake, IDE-specific) with the HAL code initialised. Pretty good for bring-up; opinionated about HAL usage. Many production teams generate CubeMX code once for the init scaffolding and then write their own peripheral drivers on top.

HAL vs LL

HAL — the "Hardware Abstraction Layer". Higher level, callback-based, portable across STM32 families. HAL_UART_Init, HAL_UART_Transmit_DMA. Reasonable performance, plenty of code overhead.

LL — "Low-Layer". Inline functions directly mapping to register writes. Same as writing the registers yourself but with named macros. Faster, smaller, less portable.

Use HAL for fast development. Drop to LL (or raw registers via CMSIS) for hot paths.

CubeIDE

Eclipse-based IDE bundled by ST. Free. Works fine but slower than CLion/VS Code for the same projects. Most production teams use CubeIDE for the integrated CubeMX experience and then VS Code with CMake for daily work.

Documentation

Every chip has:

  • Datasheet — pinout, electrical characteristics, package info.
  • Reference Manual (RM) — register-level details. Often 1500+ pages.
  • Programming Manual (PM) — Cortex-M ISA reference (mostly redundant with ARM's docs).
  • Application Notes (AN) — per-topic deep dives. The hidden gold; there are excellent ANs on motor control, USB, secure boot, RTC.
  • Errata sheet — bugs in the silicon. Always check.

The RM is your daily reference once you're past bring-up. Bookmark it.

STM32-specific things to know

Two PLLs and a clock tree to study

The clock tree on STM32H7 has three PLLs feeding multiple bus and peripheral domains. Getting clocks right is the first hard problem on any STM32 project. CubeMX has a graphical clock-tree configurator — use it.

BSRR is your friend

The Bit Set/Reset Register on every STM32 GPIO is atomic — setting and clearing pins doesn't need read-modify-write. Use it instead of ODR |= .... See GPIO.

Boot pins

BOOT0 (and on some chips BOOT1) select the boot mode: from flash, from system memory (ROM bootloader), or from SRAM. The ROM bootloader supports flashing over UART, USB DFU, SPI, I²C, CAN. Saves you from a brick if SWD ever fails.

Option bytes and RDP

Each STM32 has option bytes controlling watchdog config, brown-out, write protection, and Read Out Protection (RDP):

  • RDP Level 0 — fully open.
  • RDP Level 1 — flash read disabled via SWD, but you can revert to Level 0 (mass-erasing the chip).
  • RDP Level 2 — permanently locked. SWD disabled forever. Cannot be undone.

Set Level 2 only on production binaries — and only on chips you've already qualified. Test extensively in Level 1 first.

See also