Chapter 3: The STM32 Family

You have decided to use an STM32. Good choice — you are now part of the largest 32-bit microcontroller ecosystem on the planet. But with over 1,000 part numbers across a dozen families, choosing the right chip can feel overwhelming. This chapter is your map.

Why STM32?

STMicroelectronics ships over 2 billion STM32 units per year. That scale matters because it means:

  • Price: 50-500 INR per chip, even in single quantities
  • Availability: stocked by every major distributor, always in production
  • Consistent API: learn the peripheral registers on one STM32 and they are nearly identical across the entire lineup
  • Documentation: the best datasheets and reference manuals in the industry, all free
  • Community: the largest ecosystem of libraries, forums, tutorials, and example code for any MCU family
  • Embassy support: first-class async Rust support with embassy-stm32

Fun Fact: STM32 chips are inside products from Samsung, Dyson, DJI, Tesla, GoPro, and thousands of other companies. When you learn STM32, you are learning the same platform that professional engineers use in shipping products.

The Naming System: Decoding a Part Number

Every STM32 part number tells you exactly what the chip is. Let us decode STM32H743VIT6:

SegmentValueMeaning
STM32STM32STMicroelectronics 32-bit MCU
HHFamily: High Performance
77Series: Cortex-M7, 480 MHz
4343Sub-family: full peripheral set
VVPin count: 100 pins (LQFP100)
IIFlash size: 2 MB
TTPackage: LQFP (Thin Quad Flat Pack)
66Temperature range: -40 to +85 C (industrial)

Common pin count codes: C = 48 pins, R = 64 pins, V = 100 pins, Z = 144 pins, A = 169 pins.

Common Flash size codes: 8 = 64 KB, B = 128 KB, C = 256 KB, E = 512 KB, G = 1 MB, I = 2 MB.

Once you learn this system, you can glance at any STM32 part number and immediately know its class, capabilities, and package.

Think About It: If you see STM32F411CEU6, what can you tell? F4 family (Cortex-M4F), 11 series, 48-pin count (C), 512 KB Flash (E), UFQFPN package (U), industrial temperature (6). That is the "Black Pill" — the board we recommend for starting out.

The Complete Series Guide

Entry-Level: When Simple Is Enough

FamilyCoreMax ClockFlashRAMPrice RangeBest For
F0Cortex-M048 MHz16-256 KB4-32 KB50-150 INRSimple control, cost-sensitive
G0Cortex-M0+64 MHz16-512 KB8-144 KB50-150 INRModern F0 replacement, better peripherals
L0Cortex-M0+32 MHz8-192 KB2-20 KB60-180 INRUltra-low-power battery devices

These are the chips you use when you need to toggle a relay, read a temperature sensor, or drive a simple display — and you need to do it for the absolute minimum cost. No FPU, modest resources, but often all you need.

The G0 is the modern pick in this category. It has USB-C support, better ADCs, and more RAM than the aging F0, at the same price.

Mainstream: The Sweet Spot

FamilyCoreMax ClockFlashRAMPrice RangeBest For
F1Cortex-M372 MHz16 KB - 1 MB6-96 KB80-250 INRLegacy designs, huge code base
F3Cortex-M4F72 MHz16-512 KB16-80 KB100-300 INRMixed-signal, motor control
G4Cortex-M4F170 MHz32 KB - 1 MB16-128 KB120-350 INRModern F3 replacement, math-heavy

The F1 is the granddaddy — the original STM32 from 2007. Millions of designs use it. It lacks an FPU but remains popular for simple applications.

The G4 is the modern choice here. At 170 MHz with an FPU, DSP instructions, hardware math accelerators (CORDIC and FMAC), and advanced timers, it is a powerhouse for motor control, power conversion, and signal processing.

Workhorse: The One Everyone Knows

FamilyCoreMax ClockFlashRAMPrice RangeBest For
F4Cortex-M4F100-180 MHz64 KB - 2 MB64-384 KB150-400 INRGeneral purpose, learning, prototyping

The STM32F4 is the most popular STM32 family. Period. It is fast enough for most applications, cheap enough for hobby projects, and has the largest collection of tutorials, libraries, and community support.

The STM32F411 "Black Pill" board — available for under 300 INR on AliExpress — is our recommended starting board. It runs at 100 MHz, has 512 KB Flash, 128 KB RAM, and enough peripherals for anything a beginner will encounter.

Fun Fact: The STM32F4 was used in the original PX4 flight controller for drones. Many open-source autopilot designs still use it today.

High Performance: When You Need Speed

FamilyCoreMax ClockFlashRAMPrice RangeBest For
F7Cortex-M7216 MHz64 KB - 2 MB64-512 KB300-600 INRGraphics, networking, complex DSP
H7Cortex-M7480 MHz128 KB - 2 MB128 KB - 1 MB350-800 INRMaximum performance, dual-core
H5Cortex-M33250 MHz128 KB - 2 MB256-640 KB250-500 INRModern high-perf with TrustZone

The H7 is the flagship. At 480 MHz with double-precision FPU, L1 cache, and up to 1 MB of RAM, it can run a graphical user interface, process audio in real time, or serve as the brain of a robot — all without an operating system.

Some H7 variants are dual-core, with a Cortex-M7 and a Cortex-M4 on the same chip. The M7 handles heavy processing while the M4 manages real-time I/O.

Ultra-Low-Power: Years on a Battery

FamilyCoreMax ClockFlashRAMPrice RangeBest For
L4Cortex-M4F80 MHz64 KB - 1 MB40-320 KB150-400 INRBattery sensors, wearables, IoT
U5Cortex-M33160 MHz256 KB - 4 MB256-2560 KB200-500 INRNext-gen ultra-low-power, TrustZone

The L4 draws as little as 33 nA in shutdown mode. At that current, a CR2032 coin cell battery (230 mAh) would last over 800 years in standby. In practice, an L4-based sensor node that wakes every few minutes to take a measurement and go back to sleep can run for 5-10 years on a single battery.

The U5 is the modern successor with the Cortex-M33 core, TrustZone security, and even more RAM. It is ideal for secure IoT applications.

Wireless: Built-In Radio

FamilyCoreRadioBest For
WBCortex-M4F + M0+Bluetooth 5.0, Zigbee, ThreadShort-range wireless, mesh networks
WLCortex-M4 + M0+LoRa, SigfoxLong-range (km) low-power IoT

The WB series has a full Bluetooth 5.0 stack running on the M0+ core while your application runs on the M4F. No external radio module needed.

The WL series integrates a LoRa radio — capable of communication over several kilometers at extremely low power. Perfect for agricultural sensors, city infrastructure, and remote monitoring.

Choosing the Right Chip

If you are staring at this table wondering where to start, here is a simple decision matrix:

Your SituationChoose This
Learning embedded for the first timeSTM32F411 (Black Pill)
Cost-sensitive production designSTM32G030 or STM32G070
Battery-powered IoT sensorSTM32L476 or STM32U575
Motor control or power electronicsSTM32G431
Graphics, audio, or heavy DSPSTM32H743
Bluetooth or Zigbee neededSTM32WB55
Long-range wireless (LoRa)STM32WL55
Maximum security (TrustZone)STM32U575 or STM32H563

Think About It: The "best" chip is not the most powerful one — it is the cheapest one that meets your requirements. A $0.50 G0 running a simple thermostat is a better engineering decision than a $5 H7 doing the same job.

STM32H743: A Closer Look

Let us spotlight the STM32H743 to see what a high-end STM32 offers:

  • CPU: ARM Cortex-M7 at 480 MHz with double-precision FPU
  • Flash: 2 MB (dual-bank, allowing read-while-write)
  • RAM: 1 MB total (including 128 KB DTCM at zero wait states)
  • Instruction/Data cache: 16 KB each (L1 cache, just like a desktop CPU)
  • ADC: 3x 16-bit ADCs at 3.6 Msps (mega-samples per second)
  • DAC: 2x 12-bit DACs
  • Timers: 22 timers including advanced motor control timers
  • Communication: 4x UART, 6x SPI, 4x I2C, USB OTG HS, 2x CAN-FD, Ethernet MAC
  • DMA: 2x DMA controllers with 16 streams each, plus MDMA and BDMA
  • Other: JPEG codec, Chrom-ART GPU, true random number generator, CRC hardware, AES/DES crypto accelerator

This is a staggering amount of hardware for a chip that costs under 800 INR. For perspective, this single chip has more processing power and more peripherals than the entire computer that guided Apollo 11 to the moon.

Cross-Series Development with Embassy

This is where the STM32 + Embassy combination truly shines. Moving your code from one STM32 family to another requires changing three things:

  1. The chip feature in Cargo.toml
  2. The compilation target
  3. The pin names (because different packages have different pinouts)

The logic stays the same.

// This blink code works on ANY STM32 — just change the pin name

#[embassy_executor::main]
async fn main(_spawner: Spawner) {
    let p = embassy_stm32::init(Default::default());

    // On Black Pill F411: PC13
    // On Nucleo F446RE: PA5
    // On Nucleo H743ZI: PB0
    let mut led = Output::new(p.PC13, Level::High, Speed::Low);

    loop {
        led.toggle();
        Timer::after_millis(500).await;
    }
}

And in Cargo.toml:

# For STM32F411:
embassy-stm32 = { version = "0.1", features = ["stm32f411ce", "time-driver-any"] }
# target: thumbv7em-none-eabihf

# For STM32H743:
# embassy-stm32 = { version = "0.1", features = ["stm32h743vi", "time-driver-any"] }
# target: thumbv7em-none-eabihf

# For STM32G030:
# embassy-stm32 = { version = "0.1", features = ["stm32g030f6", "time-driver-any"] }
# target: thumbv6m-none-eabi

Notice how the Embassy API is identical. Output::new, led.toggle(), Timer::after_millis — these work across all STM32 families. The Embassy HAL (Hardware Abstraction Layer) translates your intent into the correct register writes for whichever chip you are targeting.

The Reference Manual: Your 3,300-Page Best Friend

Every STM32 family has a Reference Manual (RM) published by STMicroelectronics. The H7's reference manual, RM0433, is over 3,300 pages long.

Do not try to read it cover to cover. Use it as a reference:

  • Need to configure the ADC? Search for "ADC" in the PDF and read that chapter.
  • Timer not behaving? Check the timer register descriptions.
  • Weird peripheral behavior? The RM has timing diagrams, state machines, and detailed explanations for every peripheral.

The reference manual is the ultimate source of truth. Tutorials, Stack Overflow answers, and blog posts can be wrong or outdated. The RM is written by the engineers who designed the silicon. Bookmark it. You will reference it hundreds of times.

Fun Fact: The RM0433 for the STM32H7 series, if printed, would be a stack of paper about 40 cm tall. Nobody has read all 3,300 pages. But everyone has read the 50 pages that matter for their project.

Summary

The STM32 family spans from ultra-cheap entry-level chips to 480 MHz dual-core powerhouses, all sharing a consistent peripheral API and supported by Embassy's unified Rust HAL. The naming system tells you everything about a chip at a glance. For learning, start with the STM32F411 Black Pill. For production, choose the cheapest chip that meets your requirements.

The reference manual is your most important resource. It is enormous, but you only need to read the chapters relevant to the peripherals you are using. Treat it like a dictionary, not a novel.

In the next chapter, we will set up the Rust embedded development environment and get your first program running on real hardware.