finds.dev← search

// the find

nimaltd/spif

★ 721 · C · Apache-2.0 · updated Oct 2026

W25qxx, N25Qxx and other SPI FLASH driver for stm32 HAL

A SPI NOR flash driver for STM32 HAL that auto-detects chip size and vendor quirks from JEDEC ID and supports most of the Winbond/GigaDevice/Macronix/Micron/Spansion/Adesto/Microchip chip families. Aimed at embedded C devs doing bare-metal or RTOS (FreeRTOS/ThreadX) work who need flash storage or a LittleFS backend without hand-rolling vendor-specific erase/unlock logic themselves.

Handles the annoying per-vendor edge cases explicitly instead of pretending they don't exist: SST26/AT25DF self-locking at power-up, Spansion FL-S/FL-P's different sector sizes, the 3-to-4-byte address switch above 16MB. Non-blocking job model (start write/erase, poll spif_is_busy or block on spif_wait) is the right call for anything running alongside other work. Test suite runs on a PC against a simulated flash model covering both polling and DMA paths, plus a fake RTOS harness that exercises mutex contention and timeout behavior without needing real hardware — most hobby-grade embedded drivers skip this entirely.

Integration depends on a separate pip-installed tool (stm32-installer) that edits your IDE/CMake project files in place; that's an unusual trust ask for a driver library and a second ecosystem to keep working. It also pulls in a second same-author repo (osal) for RTOS abstraction, and optionally a third (littlefs fork) — single-maintainer dependency chain, so bus factor is real if any of them stalls. DMA cache coherency on F7/H7 (buffer placement vs. data cache) is documented as the user's problem to solve, not handled by the library. No actual demo/reference project in the repo — you're assembling the first working example yourself from README snippets.

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 →