STM32

Introduction to STM32

STM32 is a family of 32-bit microcontrollers from STMicroelectronics, based on ARM Cortex-M cores. They are widely used in industrial, automotive, and IoT applications — and are a core platform in the Analog Data curriculum.


What is STM32?

STM32 devices span a wide range of performance and power profiles:

SeriesCoreSpeedUse Case
STM32F0 / F1Cortex-M0/M3Up to 72 MHzEntry-level, education
STM32F4Cortex-M4FUp to 180 MHzGeneral purpose, DSP
STM32H7Cortex-M7Up to 550 MHzHigh performance
STM32L0 / L4Cortex-M0+/M4VariesUltra-low power
STM32U5Cortex-M33Up to 160 MHzSecurity + low power
STM32G0Cortex-M0+Up to 64 MHzCost-optimized

For Analog Data workshops, we primarily use:

  • STM32F103C8T6 ("Blue Pill") — a low-cost, widely available board
  • NUCLEO-F446RE — the official ST dev board with built-in ST-LINK

STM32CubeIDE is ST's official all-in-one development environment. It bundles:

ComponentDescription
Eclipse-based IDECode editor with project management
GCC Arm ToolchainCompiler (arm-none-eabi-gcc)
STM32CubeMXGraphical pin/clock/peripheral configurator
ST-LINK GDB ServerHardware debugger interface
STM32CubeProgrammerStandalone flash/erase tool

It is free, cross-platform, and requires no separate component downloads.


ST Development Boards

NUCLEO boards include a built-in ST-LINK/V3 debugger/programmer. Just connect via USB — no separate programmer needed.

Common NUCLEO boards:

  • NUCLEO-F446RE — STM32F446, 180 MHz, 512KB Flash (used in Analog Data workshops)
  • NUCLEO-F401RE — STM32F401, 84 MHz, 512KB Flash
  • NUCLEO-L476RG — STM32L476, ultra-low power

Blue Pill (STM32F103C8T6)

The Blue Pill is a cheap bare-board (~$2). It requires a separate ST-LINK V2 programmer for flashing.

Blue Pill Flash Size Warning

Many Blue Pill boards are sold as "64KB Flash" but actually have 128KB. Check your specific board. Also note that the ST-LINK clone programmers often sold with Blue Pills are not always reliable — use a genuine ST-LINK or NUCLEO for best results.


Key Concepts Before You Start

HAL vs. LL vs. Register

STM32CubeIDE generates code using one of three abstraction levels:

LevelDescriptionUse Case
HAL (Hardware Abstraction Layer)High-level, portable, easy to useBeginners, rapid prototyping
LL (Low Layer)Thin wrapper, close to registersPerformance-critical code
Bare RegisterDirect register accessMaximum control, expert use

For workshops, we use HAL — it's what STM32CubeMX generates by default.

ST-LINK is ST's debug/programmer interface. It supports:

  • SWD (Serial Wire Debug) — 2-wire debug interface (used on most boards)
  • JTAG — 4-wire interface (more features, less common on dev boards)

NUCLEO boards have ST-LINK built in. If using a bare Blue Pill, you need a USB ST-LINK V2 dongle.


Next Steps

Choose your operating system to begin installation:

Previous
VS Code Integration