finds.dev← search

// the find

David-OConnor/stm32-hal

★ 242 · Rust · MIT · updated Mar 2026

This library provides access to STM32 peripherals in Rust.

A Rust HAL for STM32 microcontrollers that trades typesystem strictness for ergonomics — one crate covering F3/F4/L4/L5/G/H5/H7/WB/WL/C0 families with a consistent API across all of them. Aimed at engineers who want to ship firmware without wrestling with the `stm32yxx-hal` typestate machinery.

Cross-family coverage with identical syntax where possible means you can port from an L4 to an H7 without rewriting peripheral initialization. The inline RM excerpt comments are genuinely useful — you can cross-reference register behavior without leaving your editor. DMA support is first-class and not bolted on: `write_dma` / `read_dma` exist on most peripherals as peers to the blocking variants. The quickstart repo and real-world examples (audio passthrough, SPI IMU with CMSIS-DSP filtering) are more honest about production use than most embedded HALs.

The errata section is long and active: H735 ADC is broken as of July 2025, DMA on F4 is unimplemented, H5 is missing DMA entirely, OCTOSPI is broken, HRTIM/LPTIM are missing. The docs are built only for H735, so reading docs for any other family means mentally filtering out inapplicable entries — this is a real friction point. Dropping typestates buys ergonomics but loses compile-time guarantees about pin modes and peripheral state; bugs that `stm32f4xx-hal` would catch at compile time will show up at runtime here. 242 stars for a crate covering this many families suggests the embedded Rust community has largely consolidated on the `stm32yxx-hal` ecosystem instead.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →