Skip to content
hw.dev
hw.dev/signal/mimiboot-samd-flash-controller-model-2026
SignalMimiBoot-Mu

MimiBoot Runs Its SAM D Flash Driver Against a Controller Model

MimiBoot runs production flash-driver code against modeled SAM D21 and D51 controllers before risking a board.

Thesis connection

Firmware can exercise destructive flash behavior on every change without reserving a physical board for the test.

#embedded#testing#verification#software
Read Original

MimiBoot now runs its production Microchip Smart ARM-based Microcontroller (SAM) D21 and D51 flash-driver source on a computer against a model of each chip's nonvolatile-memory controller. The test covers word addressing, page buffers, manual writes, cache behavior during commands, locked regions, and programming units that can be written only once after an erase.

Those details are where a bootloader can turn an update into a dead device. The D21 programs 64-byte units while the D51 uses 16-byte units, and code that assumes it can top up a partly written unit should fail. The model lets the normal host test runner exercise those rules without erasing real flash, while a configuration check now ensures every supported chip has a board definition and can join the build-all pass.

A controller model can't prove timing, electrical behavior, or recovery after power loss, and MimiBoot labels this evidence as "model" rather than "hardware." That honesty gives teams a useful testing ladder: catch address and command mistakes on every commit, then spend scarce board time on interruption and recovery tests the model cannot settle.