Flipper Zero

Overview

The Flipper Zero is a portable multi-tool for hardware exploration, built around an STM32WB55RG microcontroller with a 128x64 monochrome display, a five-way D-pad with a back button, an RGB LED and a Sub-GHz, NFC, RFID, infrared and Bluetooth LE radio set. See the Flipper Zero documentation [1] for more details.

Hardware

  • STM32WB55RG [3] dual-core microcontroller: Arm Cortex-M4 application core up to 64 MHz and Arm Cortex-M0+ radio core running ST’s wireless stack

  • 1 MiB flash (the upper part is reserved for the radio stack) and 256 KiB RAM

  • 128x64 monochrome Sitronix ST7567 LCD on SPI2

  • microSD card slot with card detect, sharing SPI2 with the display

  • Six push buttons: Up, Down, Left, Right, OK and Back

  • TI LP5562 LED driver on I2C1, driving the RGB LED and the display backlight

  • Speaker driven by a PWM output

  • TI BQ25896 battery charger on I2C1 for the 2100 mAh battery

  • USART1 on pins 13 (TX) and 14 (RX) of the GPIO header

  • 18-pin GPIO header

  • USB 2.0 full-speed device port

  • 32 MHz (HSE) and 32.768 kHz (LSE) crystals

Supported Features

The flipper_zero board supports the hardware features listed below.

on-chip / on-board
Feature integrated in the SoC / present on the board.
2 / 2
Number of instances that are enabled / disabled.
Click on the label to see the first instance of this feature in the board/SoC DTS files.
vnd,foo
Compatible string for the Devicetree binding matching the feature.
Click on the link to view the binding documentation.

flipper_zero/stm32wb55xx target

On-target memory for this board target: 192 KiB of RAM, 876 KiB of Flash.

Type

Location

Description

Compatible

CPU

on-chip

ARM Cortex-M4F CPU1

arm,cortex-m4f

ADC

on-chip

STM32 ADC1

st,stm32-adc

Bluetooth

on-chip

STM32WB Radio device1

st,stm32wb-rf

Buzzer

on-board

PWM-driven passive piezo buzzer1

pwm-buzzer

Charger

on-board

TI BQ25896 battery charger function1

ti,bq25896-charger

Clock control

on-chip

STM32WB Reset and Clock controller node1

st,stm32wb-rcc

on-chip

Generic fixed-rate clock provider23

fixed-clock

on-chip

STM32 MSI Clock1

st,stm32-msi-clock

on-chip

STM32 LSE Clock1

st,stm32-lse-clock

on-chip

STM32WB and STM32WL PLL node1

st,stm32wb-pll-clock

on-chip

STM32 Clock multiplexer1

st,stm32-clock-mux

Counter

on-chip

STM32 counters4

st,stm32-counter

CRC

on-chip

STM32 CRC calculation unit1

st,stm32-crc

Cryptographic accelerator

on-chip

STM32 AES Accelerator1

st,stm32-aes

Display

on-board

Sitronix ST7567 dot-matrix LCD controller on MIPI-DBI bus1

sitronix,st7567

DMA

on-chip

STM32 DMA controller (V2)2

st,stm32-dma-v2

on-chip

STM32 DMAMUX controller1

st,stm32-dmamux

Flash controller

on-chip

STM32 Family flash controller1

st,stm32-flash-controller

GPIO & Headers

on-chip

STM32 GPIO Controller6

st,stm32-gpio

on-board

GPIO pins exposed on the Flipper Zero GPIO header1

flipper,gpio-header

I2C

on-chip

STM32 I2C V2 controller11

st,stm32-i2c-v2

Input

on-board

Group of GPIO-bound input keys1

gpio-keys

Interrupt controller

on-chip

ARMv7-M NVIC (Nested Vectored Interrupt Controller)1

arm,v7m-nvic

on-chip

STM32 External Interrupt Controller1

st,stm32-exti

LED

on-board

TI LP5562 LED1

ti,lp5562

Memory controller

on-chip

STM32 Battery Backed RAM1

st,stm32-bbram

Multi-Function Device

on-board

TI BQ25896 battery charger1

ti,bq25896

MTD

on-chip

STM32 flash memory1

st,stm32-nv-flash

NVMEM

on-chip

Fixed layout for Non-Volatile memory1

fixed-layout

OTP memory

on-chip

STM32 embedded NVM OTP11

st,stm32-nvm-otp

PHY

on-chip

This binding is to be used by all the usb transceivers which are built-in with USB IP1

usb-nop-xceiv

Pin control

on-chip

STM32 Pin controller1

st,stm32-pinctrl

Power management

on-chip

STM32 power controller1

st,stm32-pwr

on-chip

STM32 wake-up lines controller1

st,stm32-pwr-wkupctrl

PWM

on-chip

STM32 PWM13

st,stm32-pwm

QSPI

on-chip

STM32 QSPI Controller1

st,stm32-qspi

Regulator

on-board

TI BQ25896 USB OTG boost regulator1

ti,bq25896-regulator

on-chip

STM32 VREFBUF regulator1

st,stm32-vrefbuf

Reset controller

on-chip

STM32 Reset and Clock Control (RCC) Controller1

st,stm32-rcc-rctl

RNG

on-chip

STM32 Random Number Generator1

st,stm32-rng

RTC

on-chip

STM32 RTC1

st,stm32-rtc

Sensors

on-chip

STM32 quadrature decoder2

st,stm32-qdec

on-chip

STM32 family TEMP node for production calibrated sensors with two calibration temperatures1

st,stm32-temp-cal

on-chip

STM32 VREF+1

st,stm32-vref

on-chip

STM32 VBAT1

st,stm32-vbat

Serial controller

on-chip

STM32 LPUART1

st,stm32-lpuart

on-chip

STM32 USART1

st,stm32-usart

SMbus

on-chip

STM32 SMBus controller2

st,stm32-smbus

SPI

on-chip

STM32 SPI controller with embedded Rx and Tx FIFOs11

st,stm32-spi-fifo

Timer

on-chip

ARMv7-M System Tick1

arm,armv7m-systick

on-chip

STM32 timers13

st,stm32-timers

on-chip

STM32 low-power timer (LPTIM)1

st,stm32-lptim

USB

on-chip

STM32 USB controller1

st,stm32-usb

Watchdog

on-chip

STM32 system window watchdog1

st,stm32-window-watchdog

on-chip

STM32 watchdog1

st,stm32-watchdog

Connections and IOs

Function

Pins

SPI2 SCK, MOSI (display and SD card)

PD1, PB15

Display CS

PC11

Display D/C, reset

PB1, PB0

Buttons Up, Down, Left, Right

PB10, PC6, PB11, PB12

Buttons OK, Back

PH3, PC13

USART1 TX, RX

PB6, PB7

SD card MISO, CS, card detect

PC2, PC12, PC10

I2C1 SCL, SDA

PA9, PA10

USB D-, D+

PA11, PA12

Speaker (TIM16 CH1)

PB8

GPIO Header

The 18-pin GPIO header is described by the flipper_header connector node. The parent pin index is the header pin number printed on the device, and the power and ground pins are not mapped. See flipper,gpio-header for the complete pin list.

The 5 V supply on pin 1 is driven by the USB OTG boost converter of the BQ25896 when no USB host is connected. It is described by the vbus_otg regulator node, which is off at boot and can be enabled through the regulator API.

System Clock

The system clock is driven directly by the 32 MHz external crystal (HSE). The 32.768 kHz crystal (LSE) clocks the RTC and LPTIM1, which is used as the system timer.

Serial Port

The Zephyr console and shell are assigned to a USB CDC ACM virtual serial port on the USB-C connector, so no serial adapter is needed. The port appears once the application has started and the host has enumerated the device. Output printed before the host opens the port can be lost.

USART1 (115200 8N1) is available on pins 13 (TX) and 14 (RX) of the GPIO header and needs a 3.3 V USB to serial adapter. To use it as the console, set CONFIG_BOARD_SERIAL_BACKEND_CDC_ACM to n and point the zephyr,console and zephyr,shell-uart chosen properties to &usart1 in a devicetree overlay.

Programming and Debugging

The flipper_zero board supports the runners and associated west commands listed below.

flash debug
dfu-util ✅ (default)

Flashing

Zephyr replaces the stock firmware, which occupies the whole flash starting at 0x08000000 and has no separate bootloader. The Zephyr image is written to the same address.

The default runner is dfu-util, which programs the board through the STM32 ROM DFU bootloader over USB:

  1. Hold the Left, Back and OK buttons for a couple of seconds, then release Left and Back while keeping OK pressed. The device enumerates as 0483:df11 and the display stays dark.

  2. Build and flash an application, for example Character frame buffer:

    west build -b flipper_zero samples/subsys/display/cfb
    west flash
    

The application starts after the flash completes. The ROM bootloader cannot be overwritten, so the device can always be recovered through the same button combination.

Warning

The stock firmware is erased. It can be restored by flashing its .dfu image with dfu-util, or with the build system of the Flipper Zero firmware [2].

Debugging

The board has no on-board debug probe and no debug runner is configured. The SWD signals are available on pins 10 (SWCLK) and 12 (SWDIO) of the GPIO header.

References