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 |
|
ADC |
on-chip |
STM32 ADC1 |
|
Bluetooth |
on-chip |
STM32WB Radio device1 |
|
Buzzer |
on-board |
PWM-driven passive piezo buzzer1 |
|
Charger |
on-board |
TI BQ25896 battery charger function1 |
|
Clock control |
on-chip |
STM32WB Reset and Clock controller node1 |
|
on-chip |
|||
on-chip |
STM32 MSI Clock1 |
||
on-chip |
STM32 LSE Clock1 |
||
on-chip |
STM32WB and STM32WL PLL node1 |
||
on-chip |
STM32 Clock multiplexer1 |
||
Counter |
on-chip |
STM32 counters4 |
|
CRC |
on-chip |
STM32 CRC calculation unit1 |
|
Cryptographic accelerator |
on-chip |
STM32 AES Accelerator1 |
|
Display |
on-board |
Sitronix ST7567 dot-matrix LCD controller on MIPI-DBI bus1 |
|
DMA |
on-chip |
STM32 DMA controller (V2)2 |
|
on-chip |
STM32 DMAMUX controller1 |
||
Flash controller |
on-chip |
STM32 Family flash controller1 |
|
GPIO & Headers |
on-chip |
STM32 GPIO Controller6 |
|
on-board |
GPIO pins exposed on the Flipper Zero GPIO header1 |
||
I2C |
on-chip |
||
Input |
on-board |
Group of GPIO-bound input keys1 |
|
Interrupt controller |
on-chip |
ARMv7-M NVIC (Nested Vectored Interrupt Controller)1 |
|
on-chip |
STM32 External Interrupt Controller1 |
||
LED |
on-board |
TI LP5562 LED1 |
|
Memory controller |
on-chip |
STM32 Battery Backed RAM1 |
|
Multi-Function Device |
on-board |
TI BQ25896 battery charger1 |
|
MTD |
on-chip |
STM32 flash memory1 |
|
NVMEM |
on-chip |
Fixed layout for Non-Volatile memory1 |
|
OTP memory |
on-chip |
||
PHY |
on-chip |
This binding is to be used by all the usb transceivers which are built-in with USB IP1 |
|
Pin control |
on-chip |
STM32 Pin controller1 |
|
Power management |
on-chip |
STM32 power controller1 |
|
on-chip |
STM32 wake-up lines controller1 |
||
PWM |
on-chip |
||
QSPI |
on-chip |
STM32 QSPI Controller1 |
|
Regulator |
on-board |
TI BQ25896 USB OTG boost regulator1 |
|
on-chip |
STM32 VREFBUF regulator1 |
||
Reset controller |
on-chip |
STM32 Reset and Clock Control (RCC) Controller1 |
|
RNG |
on-chip |
STM32 Random Number Generator1 |
|
RTC |
on-chip |
STM32 RTC1 |
|
Sensors |
on-chip |
STM32 quadrature decoder2 |
|
on-chip |
STM32 family TEMP node for production calibrated sensors with two calibration temperatures1 |
||
on-chip |
STM32 VREF+1 |
||
on-chip |
STM32 VBAT1 |
||
Serial controller |
on-chip |
STM32 LPUART1 |
|
on-chip |
STM32 USART1 |
||
SMbus |
on-chip |
STM32 SMBus controller2 |
|
SPI |
on-chip |
||
Timer |
on-chip |
ARMv7-M System Tick1 |
|
on-chip |
|||
on-chip |
STM32 low-power timer (LPTIM)1 |
||
USB |
on-chip |
STM32 USB controller1 |
|
Watchdog |
on-chip |
STM32 system window watchdog1 |
|
on-chip |
STM32 watchdog1 |
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:
Hold the
Left,BackandOKbuttons for a couple of seconds, then releaseLeftandBackwhile keepingOKpressed. The device enumerates as0483:df11and the display stays dark.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.