← How-Tos
flipper-zero Jul 3, 2026 ◑ 4 views ◯ 2 min read

Flashing Firmware via ST-Link/SWD: Recovery & Custom Builds

flipper zerofirmwarest linkswdrecovery

When You Need This (vs Normal Update)

Normal firmware updates go through qFlipper over USB — this SWD/ST-Link method is for two specific scenarios: recovering a genuinely bricked device that won't boot/enumerate normally at all, or flashing custom firmware builds that specifically require a full low-level flash rather than an over-the-air style update.

What You Need

Connecting to Flipper's SWD Pins

Flipper's SWD debug pins are exposed on the back GPIO header — check your firmware/hardware documentation for the exact pin mapping (SWCLK, SWDIO, GND, and 3.3V) since pin assignment has been consistent across most hardware revisions but it's worth confirming against current documentation before connecting, to avoid misconnection.

Flashing Process (STM32CubeProgrammer)

  1. Open STM32CubeProgrammer, select ST-LINK as the connection type.
  2. Click Connect — it should detect the STM32WB55 chip Flipper uses and show its current flash contents/status.
  3. Load the firmware binary (.bin or .dfu file, depending on what your target firmware release provides) via the Erasing & Programming tab.
  4. Click Start Programming — this writes the full firmware image directly to flash, bypassing the normal bootloader update path entirely.

Recovery Scenario: Bricked Device

If Flipper won't boot or enumerate over USB at all (blank/frozen screen, no device manager entry), this SWD method is the actual recovery path — it writes directly to flash memory regardless of what state the existing firmware/bootloader is in, since it doesn't depend on the device's own USB stack being functional.

Custom Firmware Considerations

Popular custom firmware options (Momentum, Unleashed, RogueMaster) generally provide qFlipper-compatible update packages for normal installation — you'd only need the full SWD flash method for these if something's gone wrong with a normal update, or if you're doing firmware development work yourself and need to flash test builds directly.

Safety Note

A failed/interrupted flash via SWD can leave the device in a worse state than before if power is lost mid-write — use a stable USB connection and don't disconnect anything until STM32CubeProgrammer confirms the write completed successfully.