Bao'An Shenzhen China

ARM Cortex M Firmware Readout: Full Technical Guide

Sep 5, 2026  /  PCB COPY

arm cortex m firmware readout: Engineer's workbench with a ChipWhisperer glitch board connected to a Cortex-M target via SWD

Why ARM Cortex M Firmware Readout Remains a Recurring Challenge

The ARM Cortex-M family — M0, M0+, M3, M4, M7, M23, M33 and the newer M55/M85 — powers everything from disposable IoT sensors to industrial motor drives. When a product reaches end-of-life, a supply chain collapses, or a competitor’s board lands on an engineer’s desk, the question is always the same: can the firmware be read out? Understanding arm cortex m firmware readout is therefore a core skill for any hardware reverse engineering lab.

Unlike 8-bit micros with a single lock bit, Cortex-M devices inherit ARM’s layered debug architecture and each silicon vendor’s proprietary protection scheme. The result is a patchwork of security levels, fuse mechanisms, and side-channel exposures that make every arm cortex m firmware readout project different from the last. This guide walks through the architecture, the vendor landscape, the attack techniques, and a realistic decision framework so you can plan your next extraction with confidence.

How ARM Debug Access Works at the Architecture Level

Decapped ARM Cortex-M microcontroller die under a microscope showing flash memory arrays

Before discussing locks, it helps to understand what is being locked. Every Cortex-M chip exposes a Debug Access Port (DAP) through either SWD (Serial Wire Debug) or JTAG. The DAP connects to one or more Access Ports (APs):

  • AHB-AP — gives the debugger full read/write access to the system memory map, including flash, SRAM and peripherals.
  • APB-AP — used on some parts for CoreSight trace components.
  • CTRL-AP — a Nordic Semiconductor addition that handles erase and recovery commands.

When AHB-AP is open, a $20 probe can dump the entire flash contents in seconds. Every vendor protection scheme therefore targets AHB-AP access: disabling it, gating it behind authentication, or making it conditional on an irreversible erase.

The Role of the ROM Table and Device ID

Even on a locked device, the DAP ROM table often remains readable. It leaks the part number, revision and which APs exist. This is valuable for identifying an unknown chip on a board during a complete PCB reverse engineering workflow, but it does not expose firmware bytes.

SWD vs. JTAG: Practical Differences for Readout

Most Cortex-M designs use SWD because it requires only two pins (SWDIO and SWCLK) versus JTAG’s four or five. From a firmware readout perspective, both protocols reach the same DAP, so the protection level is identical. However, SWD’s simpler electrical interface makes it easier to probe on a densely populated board — you only need to locate two test points instead of a full JTAG header. Some vendors also expose a single-wire protocol (e.g., ST’s single-wire viewer) that provides trace data but not memory access, so confirming you are on the correct pins matters.

When the debug header has been depopulated or traces cut — a common anti-tamper measure — the first task is to locate the SWD signals on the die pads or via stubs. A skilled technician with a microscope and a multimeter can usually find them in under an hour, but on BGA packages the effort rises significantly.

Vendor Protection Schemes: A Practical Comparison

ARM defines the debug architecture, but the actual security mechanism is implemented by the silicon vendor. Below is a comparison of the most common Cortex-M protection models encountered in arm cortex m firmware readout projects.

Vendor / Family Protection Mechanism Levels Reversible? Known Bypass History
STM32 (ST) RDP (Read-out Protection) 0, 1, 2 Level 1 → 0 with mass erase; Level 2 permanent Glitch attacks on some F1/F4 at RDP1
nRF52 (Nordic) APPROTECT via CTRL-AP Enabled / Disabled Erase-all recovers debug Glitch bypass published 2020
LPC (NXP) CRP Levels 1–3 CRP1, CRP2, CRP3 CRP1/2 partial; CRP3 permanent CRP1 ISP read possible in old parts
Kinetis (NXP) Flash Security Byte + MDM-AP Secured / Unsecured Mass-erase unsecures Glitch on some K-series
EFM32 (SiLabs) Debug Lock Word in flash Locked / Unlocked Mass erase unlocks Lock word overwrite on early revisions
GD32 (GigaDevice) SPC (Security Protection Code) Low / High Low → erase; High permanent Similar to STM32 F1 glitch window
SAM (Microchip) NVM Security Bit Set / Clear Chip erase clears Limited public research

The table shows a pattern: most vendors offer a “soft” lock that can be removed at the cost of a full flash erase, plus an optional permanent lock that disables debug forever. Arm cortex m firmware readout is therefore a race between the attacker and the erase-on-unlock mechanism.

For STM32 parts specifically, the RDP level determines everything — our STM32 RDP-level recovery guide covers the exact boundaries. GigaDevice clones share much of the same architecture, but GD32-specific differences can trip up anyone assuming identical behaviour.

Deep Dive: STM32 RDP Levels in Practice

Because STM32 is the most common Cortex-M family in commercial products, it deserves extra detail. RDP Level 0 means the chip is completely open — flash, SRAM, and option bytes are all readable through SWD. RDP Level 1 blocks debugger access to flash and backup SRAM, but SRAM remains partially accessible while the CPU is running. This is the level most vulnerable to voltage glitching because the protection decision is made by a software branch in the boot ROM. RDP Level 2 permanently disables the debug port by blowing an OTP fuse and also locks the option bytes, preventing any regression to Level 1 or 0.

A critical nuance: on some STM32F1 and STM32F4 revisions, the transition from RDP1 to RDP0 triggers a mass erase, but a well-timed glitch can interrupt the erase after debug is re-enabled but before the flash is wiped. This race condition is the basis of most published STM32 glitch attacks. Newer STM32L4, STM32G4, and STM32H7 parts have hardened this sequence, making the window much tighter or eliminating it entirely.

Deep Dive: Nordic nRF52 APPROTECT Bypass

The nRF52 series uses a register called APPROTECT in the UICR (User Information Configuration Registers) region. When enabled, it gates all AHB-AP access. In 2020, researchers at LimitedResults demonstrated that a single voltage glitch during the boot sequence could cause the chip to skip the APPROTECT check, leaving the debug port wide open. Nordic responded with updated silicon revisions that read the protection register multiple times, but millions of older nRF52832 and nRF52840 chips remain in the field with the vulnerable boot ROM.

TrustZone-M: The Next Layer of Complexity

ARMv8-M parts (Cortex-M23, M33, M55, M85) add TrustZone for Cortex-M. This partitions the processor into Secure and Non-Secure worlds at the hardware level. Even if debug access is open, the Secure flash region is invisible to a Non-Secure debugger unless the Secure firmware explicitly permits it.

What TrustZone Changes for Readout

  • Secure Attribution Unit (SAU) and Implementation-Defined Attribution Unit (IDAU) define which addresses are Secure. A debugger attached in Non-Secure mode sees Secure flash as all-zeros or bus-faults.
  • Secure-only debug authentication — ARM defines four signals (DBGEN, NIDEN, SPIDEN, SPNIDEN) that control invasive and non-invasive debug for each world independently. A vendor can lock Secure debug while leaving Non-Secure debug open.
  • Provisioning and lifecycle states — newer parts (STM32L5, STM32U5, NXP LPC55S) implement a device lifecycle where the chip moves from “Open” to “Secure” to “Locked” states, each with different debug permissions.

In practice, TrustZone-M makes arm cortex m firmware readout significantly harder because the most valuable code — cryptographic keys, proprietary algorithms — is placed in the Secure partition, which is isolated even from an unlocked Non-Secure debugger.

Lifecycle State Transitions: A Worked Example

Consider the NXP LPC55S69, a dual-core Cortex-M33 part. It defines five lifecycle states: Virgin, Develop, In-Field (Locked), Field Return, and Bricked. In the Develop state, both Secure and Non-Secure debug are open. Moving to In-Field locks Secure debug and requires a signed “debug credential” certificate to re-enable it. The Field Return state allows a factory-authorised probe to open debug for failure analysis, but only after presenting a device-specific challenge-response. The Bricked state is terminal — no debug, no recovery.

For an arm cortex m firmware readout attempt on an LPC55S69 in the In-Field state, the attacker must either obtain or forge the debug credential (which requires the OEM’s private key) or bypass the lifecycle check entirely via fault injection. The latter has not been publicly demonstrated on this part as of mid-2025, making it one of the harder Cortex-M targets currently in production.

Voltage Glitching and Fault Injection for ARM Cortex M Firmware Readout

When the protection bits say “no,” the next question is whether the silicon actually enforces that answer. Voltage glitching has been the most productive attack vector against Cortex-M readout protection over the past decade.

How a Glitch Attack Works

  1. The attacker identifies the moment the chip reads its protection fuse — usually during the boot sequence, within the first few hundred microseconds after reset.
  2. A precisely timed voltage dip (typically 5–20 ns wide) on the VDD rail causes the fuse-read logic to return the wrong value.
  3. The chip boots believing debug is enabled. The attacker’s probe, already connected, dumps flash before the next reset.

Published successes include the STM32F0/F1/F4 at RDP Level 1, the nRF52 APPROTECT bypass, and several NXP Kinetis parts. The equipment needed — a ChipWhisperer or custom FPGA glitch board — costs between $300 and $3,000, putting it within reach of any serious lab.

Glitch Parameter Space: What You Actually Tune

A successful glitch campaign requires sweeping four main parameters:

  • Delay after reset — the time from releasing the reset pin to firing the glitch. This is typically swept in 1 ns increments across a window of 10–500 µs.
  • Glitch width — how long the voltage dip lasts. Too short and the CPU ignores it; too long and the chip resets or corrupts state.
  • Glitch voltage — the depth of the dip. A deeper dip is more likely to flip a bit but also more likely to trigger a brown-out reset.
  • Repeat count — some setups fire multiple glitches in rapid succession to hit a double-read check.

A typical campaign runs 50,000–500,000 iterations, logging each result as “no effect,” “reset,” “crash,” or “success.” Automated scripts on the ChipWhisperer platform can complete this in 4–48 hours depending on the parameter space.

Why Glitching Does Not Always Work

  • Permanent fuses (OTP) — STM32 RDP Level 2 blows a one-time-programmable fuse. Even if the read is glitched, the debug port hardware is physically disconnected on some revisions.
  • Double-read and voting logic — newer silicon reads the protection state multiple times and compares. A single glitch is no longer sufficient.
  • Brown-out detectors and voltage monitors — the chip resets itself if VDD drops below a threshold, shrinking the glitch window to near zero.
  • Boot ROM hardening — some vendors have rewritten their boot ROM to check protection state in a loop rather than a single branch instruction.

Invasive (Die-Level) Techniques

When electrical attacks fail, the final option is physical. This involves decapping the IC and working directly on the silicon die.

Common Invasive Methods

  • UV exposure — older OTP fuses can sometimes be reset by flooding the die with ultraviolet light. Effective on some legacy Cortex-M0 parts manufactured on larger process nodes (≥ 180 nm).
  • Laser fault injection (LFI) — a focused laser beam replaces the voltage glitch, targeting the specific transistors that store or read the protection bit. More precise but requires a $50K+ setup.
  • Focused ion beam (FIB) editing — the ultimate tool: cut or reconnect traces on the die to re-route the debug enable signal. Costs $10K–$50K per attempt and requires detailed knowledge of the chip layout.
  • Micro-probing — placing needle probes directly on internal bus lines to read data as it flows from flash to the CPU. Extremely difficult on sub-90 nm nodes.

These techniques overlap with methods used in FPGA bitstream extraction and DSP chip decryption for TI and ADI parts, where die-level access is sometimes the only path forward.

Cost and Timeline Estimates for Invasive Work

Technique Equipment Cost Per-Attempt Cost Typical Timeline Success Rate
UV exposure $500–$2,000 $100–$500 1–3 days Low (process-dependent)
Laser fault injection $50K–$200K $2K–$10K 1–4 weeks Medium to high
FIB editing $500K+ (outsourced) $10K–$50K 2–6 weeks High if layout is known
Micro-probing $100K+ $5K–$20K 2–8 weeks Low on modern nodes

Realistic Decision Framework

Not every arm cortex m firmware readout project justifies laser equipment. The decision tree below reflects what actually happens in commercial recovery labs.

Step 1: Identify the Exact Part and Protection Level

Read the DAP ROM table, check option bytes (if accessible), and consult the vendor’s reference manual. If the part is at the lowest protection level, a standard debug probe may be all you need.

Step 2: Check for a Soft Lock

If the vendor scheme allows mass-erase to unlock debug, you can recover the chip for re-use but not the firmware. This is useful when you need to reprogram a bricked board but the original code is available elsewhere. Sometimes peripheral configuration registers, external EEPROM or flash data extraction, or bootloader regions survive the erase and provide partial recovery.

Step 3: Evaluate Glitching Feasibility

Check the published literature for your specific part number and silicon revision. If a glitch path is documented, the success rate is typically 60–90 % in a competent lab. If no prior work exists, budget for 2–4 weeks of characterisation.

Step 4: Consider the Full Board Context

In many real-world projects the MCU firmware is only one piece. The board may also carry a CPLD that needs readback recovery or an FPGA whose bitstream must be obtained via FPGA crack and bitstream recovery techniques. Coordinating all chip-level extractions alongside PCB reverse engineering workflows keeps the overall schedule realistic.

Step 5: Invasive Only as a Last Resort

Die-level work is slow, expensive and destructive. It makes sense for high-value IP recovery, legal forensics, or security audits — not for routine production cloning.

Common Pitfalls in ARM Cortex-M Readout Projects

  • Assuming all Cortex-M parts share the same lock scheme. An STM32 RDP Level 1 is fundamentally different from an NXP CRP3 or a Nordic APPROTECT. Always start from the vendor datasheet.
  • Ignoring silicon revision. A glitch that works on Rev A may fail on Rev Z because the vendor patched the boot ROM.
  • Forgetting external storage. Many Cortex-M designs store calibration data, encryption keys, or even secondary firmware in external SPI flash. That data is often unprotected and can be read with a clip-on probe.
  • Destroying the only sample. Invasive decapping is irreversible. If you have only one board, image every external memory and document every passive value before touching acid.
  • Overlooking bootloader modes. UART/USB/SPI bootloaders sometimes expose partial read commands even when the main debug port is locked. ST’s system bootloader, NXP’s ISP, and Nordic’s DFU each have different security boundaries.
  • Confusing protection with encryption. Most Cortex-M readout protection prevents access to flash, but the data itself is stored in plaintext. A few newer parts (STM32H7, STM32U5) offer on-the-fly flash encryption (OTFDEC), which means even a successful dump yields ciphertext without the key.

What the Future Looks Like

ARM’s Platform Security Architecture (PSA) and the shift toward ARMv8.1-M are raising the bar. Key trends include:

  • Secure debug authentication (certificate-based) — instead of a binary lock, the debugger must present a signed certificate. This is already shipping in STM32U5 and NXP LPC55S6x.
  • Hardware root of trust — immutable boot ROM that validates every stage before executing it, making glitch windows vanishingly small.
  • Anti-tamper meshes — active metal layers on the die that detect decapping and trigger key zeroisation.
  • SESIP and PSA Certified levels — industry certification schemes that require vendors to demonstrate resistance to specific attack classes, including fault injection and side-channel analysis.

These features will not eliminate arm cortex m firmware readout entirely — the history of embedded security is a history of cat-and-mouse — but they will push the cost and skill threshold higher with each generation.

Frequently Asked Questions

Can arm cortex m firmware readout be done without destroying the chip?

Yes, in many cases. If the chip is at a soft-lock level (e.g., STM32 RDP Level 1, Nordic APPROTECT on a vulnerable revision, or NXP CRP1), a voltage glitch attack can open the debug port without any physical modification to the IC. The chip remains fully functional afterwards. Only when you escalate to invasive techniques — decapping, FIB editing, or micro-probing — does the chip risk permanent damage. Even UV exposure, while non-destructive to the silicon itself, requires removing the package, which is effectively irreversible for production use.

How long does a typical arm cortex m firmware readout project take?

Timelines vary enormously depending on the protection level. An unprotected or Level-0 chip can be dumped in minutes. A soft-locked chip with a known glitch path typically takes 1–5 days including setup and verification. A permanently locked chip requiring invasive die-level work can take 4–12 weeks and may still fail. The biggest variable is whether prior research exists for your specific part number and silicon revision — if you are the first to attempt a particular chip, add 2–4 weeks for characterisation alone.

Is it legal to perform arm cortex m firmware readout on a product I purchased?

Legality depends on your jurisdiction and intent. In many countries, reading firmware from a device you own for interoperability, security research, or repair purposes is permitted under reverse engineering exceptions in copyright law (e.g., DMCA Section 1201 exemptions in the US, or the EU Software Directive). However, using extracted firmware to manufacture clones for commercial sale almost certainly infringes the original developer’s intellectual property rights. Always consult legal counsel before beginning a readout project, especially if the results will be used commercially or shared publicly.

What tools do I need to get started with Cortex-M firmware extraction?

For basic work on unprotected or soft-locked chips, you need a debug probe (J-Link, ST-Link, or CMSIS-DAP compatible), OpenOCD or the vendor’s IDE, and a steady hand for soldering to test points. For glitch attacks, the ChipWhisperer Lite ($300) or ChipWhisperer Husky ($600) provides an integrated glitch generator, target power control, and scripting environment. For invasive work, you need access to a decapping lab (fuming nitric acid or laser decap), a high-magnification microscope, and optionally a probing station or FIB — most engineers outsource this to specialist facilities rather than building in-house capability.

Bringing It All Together

Arm cortex m firmware readout is never a single technique. It is a decision chain: identify the part, map the protection level, try the cheapest electrical path first, and escalate to invasive methods only when the value justifies it. The vendor landscape is fragmented — what works on an STM32F1 will not work on an LPC55S69 — so every project starts with homework.

If your recovery project involves more than just the MCU — a full board with programmable logic, external memories, and a multilayer stackup — treating the firmware readout as one task inside a broader industrial control board reverse engineering effort keeps expectations and budgets aligned with reality.

Working on a board like this?

Send the chip marking or two photos. You get feasibility, lead time and price within 24 hours, and the check costs nothing.

Get a free quote

Related reading

WhatsApp Send board details