Tom HarknessandClaude Sonnet 5 dd93406aa0 PM5: skip WFI idle sleep while a Flipper is CEP-attached
Problem

pm5_power_idle()'s WFI sleep adds ~40-50ms of latency before the main
loop notices a fresh byte on CEP's SPI1/USART1. At idle this is the
whole point of WFI - but it's also what made the original attach
handshake miss bytes (GH #3667): cep_attach_poll() runs every 50ms, and
WFI's own latency on top of that was enough to lose bytes of the
Flipper's one-shot handshake string often enough to require a physical
cable replug to recover.

Change

armsrc/appmain.c: skip pm5_power_idle() entirely once cep_is_attached()
is true, so the main loop polls CEP as fast as the hardware allows for
as long as a Flipper is physically present.

armsrc/pm5_cep.c/.h: new cep_is_attached(), true as soon as the CC
controller reports a physical attach - independent of whether the
handshake/SPI transport is actually up yet, so the loop stops sleeping
before the handshake even starts, not after. Paired with a
CEP_ACTIVITY_TIMEOUT_MS (3000ms) idle-detach: the FAP quitting doesn't
touch the CC controller's attach bit (the cable stays connected), so
losing its normal 20-120ms SPI poll cadence for this long is what
actually means it's gone - at that point cep_is_attached() still
reflects the physical attach correctly, but cep_is_active() (and
therefore this PR's WFI-skip, which gates on attachment rather than a
completed handshake) only backs off once the FAP itself has clearly quit
rather than just being between polls.

Built on top of the AT32 SPI1 errata fix (bounded waits + resync) from
the companion CEP-reliability PR - running the main loop flat-out
against an unbounded wait would have just hit that hang faster, which is
why this shipped after rather than alongside it.

Behaviour change

PM5 no longer downclocks to WFI between main-loop iterations while a
Flipper is attached over CEP (idle power draw increases for the duration
of the attach; unaffected when no Flipper is present, and unaffected on
RDV4/non-CEP builds).

Testing

- make clean && make PLATFORM=PM5 PLATFORM_EXTRAS=BWM and
  make clean && make PLATFORM=PM3RDV4 - both zero warnings.
- Hardware: this flag was active throughout all of the companion CEP-
  reliability PR's hardware testing (60s/110s/240s captures, 18x
  `hw status`, 5x attach/detach + `hf search` cycles against a real
  card) - all passed with WFI-skip engaged the whole time. Additionally
  reflashed this exact branch standalone and reconfirmed a live
  attach/detach cycle completes cleanly.
- Not tested: clang toolchain (firmware-only diff); idle power draw was
  not independently measured (no direct ammeter in this session's
  bench setup, only observed BWM telemetry prior to this change).

Checklist

- [x] Proper style of own code, no unrelated reformatting included
- [x] Builds warning-free with gcc (PM5 and RDV4)
- [ ] clang not tried (firmware-only diff)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-04 14:29:39 +02:00
2026-09-27 21:15:18 +02:00
2026-10-02 15:05:19 +02:00
2026-09-27 21:15:18 +02:00
2026-10-02 15:05:19 +02:00
2026-09-17 22:48:34 +02:00
2026-01-11 23:30:49 -07:00
2026-09-27 21:15:18 +02:00
2026-09-27 21:15:18 +02:00
2022-01-08 14:25:12 +01:00
2026-09-16 19:06:43 +02:00
2024-01-05 19:27:38 +01:00
2021-10-16 23:44:53 +02:00
2022-01-06 00:37:34 +01:00
2023-12-01 15:25:09 +01:00
2025-10-20 17:58:59 -07:00
2026-05-24 22:07:56 +02:00
2020-02-18 00:00:24 +00:00
2020-02-18 00:00:24 +00:00
2020-02-18 00:00:24 +00:00
doc
2026-09-03 08:12:04 +02:00
2022-12-10 03:45:32 +01:00

Iceman Fork - Proxmark

The Proxmark is the swiss-army tool of RFID, allowing for interactions with the vast majority of RFID tags on a global scale. Originally built by Jonathan Westhues, the device is now the goto tool for RFID Analysis for the enthusiast.

Iceman repository is considered to be the pinnacle of features and functionality, enabling a huge range of extremely useful and convenient commands and Python/LUA scripts to automate chip identification, penetration testing, and programming.

Latest Release Coverity Contributors
Latest release Coverity Status GitHub contributors
Actions OSX CI Actions Ubuntu CI Actions Windows CI
MacOS Build and Test Ubuntu Build and Test Windows Build and Test

Table of Contents

PROXMARK3 INSTALLATION AND OVERVIEW

Installation Use of the Proxmark3
Linux - Setup and Build Compilation Instructions
Linux - Important notes on ModemManager Validating Proxmark3 Client Functionality
macOS - Homebrew & Upgrading HomeBrew Tap Formula First Use and Verification
macOS - MacPorts Commands & Features
macOS - Setup and Build Standalone Modes
Windows - Setup and Build
Termux / Android - Setup and Build
iOS - Setup and Build
Blue Shark Manual Command Cheat Sheet
Advanced Compilation Parameters More Cheat Sheets
Troubleshooting Complete Client Command Set
JTAG T5577 Introduction Guide

Notes / helpful documents

Notes
Notes on UART Notes on Termux / Android Notes on paths
Notes on frame format Notes on tracelog / wireshark Notes on EMV
Notes on external flash Notes on loclass Notes on Coverity Scan Config & Run
Notes on file formats used with Proxmark3 Notes on MFU binary format Notes on FPGA & ARM
Developing standalone mode Wiki about standalone mode Notes on Magic UID cards
Notes on Color usage Makefile vs CMake Notes on Cloner guns
Notes on cliparser usage Notes on clocks Notes on MIFARE DESFire
Notes on CIPURSE Notes on NDEF type4a Unofficial MIFARE DESFire bible

How to build?

Proxmark5

The last hardware generation is called Proxmark5. It has

  • MCU: AT32F435, a 288 MHz Artery Cortex-M4
  • Gowin FPGA
  • TypeC Extended Port (CEP)
  • BLE / Wifi / Battery Addon, via a ESp32c2
  • Swappable antennas (LF, HF, UHF)
    • 125, 134, 250, 375, 500 KHz Low Frequency Antenna (LF)
    • 13.56 MHz High Frequency Antenna (HF)
    • as a addon: 860-960 MHz Ultra High Frequency Antenna (UHF), ** not developed yet **

At the moment, Proxmark5-specific instructions are all grouped in a single Getting Started guide. Read it to build, flash and run your Proxmark5 device. See the instruction links in the tables above to get the compilation environment.

  • ⚠ The firmware is not stable at the moment and is actively being developed at.
  • ⚠ Don't install the BWM addon board for now.

Proxmark3 RDV4

See the instruction links in the tables above to build, flash and run for your Proxmark3 RDV4 device.

Generic Proxmark3 platforms

In order to build this repo for generic Proxmark3 platforms we urge you to read Advanced compilation parameters

We define generic Proxmark3 platforms as following devices.

Supported

  • RDV1, RDV2, RDV3 easy
  • Ryscorp green PCB version
  • Radiowar black PCB version
  • numerous Chinese adapted versions of the RDV3 easy (kkmoon, PiSwords etc)
  • Proxmark3 SE (Special Edition) (BLE enabled)
  • Proxmark3 X
    • Note: Community tested
    • Note: unknown device hw
  • iCopy-X
    • Note: Compatible ONLY after installation of iCopy-X Open Source firmware
    • Factory firmware is not compatible (Client Commands are different / Factory UI closed source / Factory Firmware enforces tag DRM)

Not supported

  • ⚠ Proxmark Evolution (EVO)
    • Note: unknown pin assignments.
  • ⚠ Ryscorp Proxmark3 Pro
    • Note: device has different fpga and unknown pin assignments.
    • Note: Company have disappeared, leaving their customers in the dark.

Experimental support

  • ⚠ Proxmark3 Ultimate
    • Note: unknown device hw
    • Note: FPGA images is building for it. Use on your own risk.

Unknown support status

  • ⚠ VX
    • Note: unknown device hw

When it comes to these new unknown models we are depending on the community to report in if this repo works and what they did to make it work.

256KB flash memory size of generic Proxmark3 platforms

⚠ Note: You need to keep a eye on how large your ARM chip built-in flash memory is. With 512KB you are fine but if its 256KB you need to compile this repo with even less functionality. When running the ./pm3-flash-all you can see which size your device have if you have the bootloader from this repo installed. Otherwise you will find the size reported in the start message when running the Proxmark3 client ./pm3.

OBS! Read the 256KB flash memory advisory

What has changed?

See the Changelog file which we try to keep updated.

Development

⚠ Note: This is a bleeding edge repository. The maintainers actively is working out of this repository and will be periodically re-structuring the code to make it easier to comprehend, navigate, build, test, and contribute to, so DO expect significant changes to code layout on a regular basis.

👉 Remember! If you intend to contribute to the code, please read the coding style notes first. We usually merge your contributions fast since we do like the idea of getting a functionality in the Proxmark3 and weed out the bugs afterwards.

The public roadmap is an excellent start to read if you are interesting in contributing.

Supported operating systems

This repo compiles nicely on

Precompiled binaries

See Proxmark3 precompiled builds

Proxmark3 GUI

Most community driven GUI for Proxmark tends to be quite old and out-of-date. Here is a list of a few:

Official channels

Where do you find the community?

Maintainers

To all distro, package maintainers, we tried to make your life easier.

make install is now available and if you want to know more.

This document will be helpful for you

Citation

Use this bibtex to cite this repository globally:

@misc{proxmark3,
  author = {C. {Herrmann} and P. {Teuwen} and O. {Moiseenko} and M. {Walker} and others},
  title = {{Proxmark3 -- Iceman repo}},
  howpublished = {\url{https://github.com/RfidResearchGroup/proxmark3}},
  keywords = {rfid nfc iceman proxmark3 125khz 134khz 13.56mhz},
}

If you need to refer to a specific state of the repository, use a commit number or a date of access, e.g.:

  note = {Accessed: commit 12327f71a27da23831901847886aaf20e8ad3ca0}
  note = {Accessed: 2021-01-01}

Each contribution is under the copyright of its author. See AUTHORS.

The Proxmark3 source code is covered by the following licensing terms, usually referred as GPLv3 or later.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

A copy of the GPLv3 is available in LICENSE.

Some dependencies may be under other free licensing terms compatible with the Proxmark3 licensing terms, see their respective description.

Languages
C 90.4%
Python 3.2%
Lua 2.9%
Verilog 0.7%
CMake 0.5%
Other 2.1%