STM32G4 Unlock — What You Need to Know First
STM32G4 unlock refers to the authorized recovery of firmware from STMicroelectronics’ STM32G4 series microcontrollers when the original source code or binary has been lost. The G4 family — built on the Arm Cortex-M4F core running up to 170 MHz — is widely used in motor control, digital power supplies, and industrial sensor nodes. When read-out protection (RDP) is active, recovering the flash contents requires specialized techniques, equipment, and deep knowledge of STM32 security architecture. Our lab handles STM32G4 unlock projects with typical turnaround of 5–15 working days and costs starting around USD 500, depending on the RDP level and specific part number.
How Does STM32G4 Read-Out Protection Work?

ST’s STM32G4 devices implement a three-tier protection scheme through option bytes stored in dedicated flash:
| Protection Level | Option Byte Value | Flash Read via SWD/JTAG | Downgrade Path |
|---|---|---|---|
| RDP Level 0 | 0xAA | Fully accessible | N/A — already open |
| RDP Level 1 | Any value ≠ 0xAA, ≠ 0xCC | Blocked externally; internal code executes normally | Revert to Level 0 triggers mass erase |
| RDP Level 2 | 0xCC | Permanently disabled; JTAG/SWD fused off | No software downgrade — irreversible by design |
Most STM32G4 unlock requests we receive involve RDP Level 1. At this level, the debug port is locked but the silicon has not been permanently fused. RDP Level 2 is a different challenge entirely: the JTAG/SWD interface is physically disabled, and ST designed it to be irreversible. Recovery at Level 2 requires invasive microprobing techniques on the die, which is significantly more complex and not always feasible.
Additional Security Features on STM32G4
Beyond RDP, the G4 series includes Proprietary Code Readout Protection (PCROP), write protection per flash sector, secure areas (with hide-protection), and a firewall peripheral. A chip locked with PCROP on specific sectors may still have most of its flash readable after an RDP bypass, but the PCROP-protected pages remain inaccessible unless that layer is also addressed. Our engineers evaluate all active protections during the initial feasibility assessment — not just the RDP level.
Which STM32G4 Part Numbers Can Be Unlocked?
The STM32G4 family spans four sub-lines, each with slightly different flash sizes, peripherals, and — critically — die revisions that affect unlock feasibility:
| Sub-line | Typical Parts | Flash Range | RDP L1 Feasibility | RDP L2 Feasibility |
|---|---|---|---|---|
| STM32G431 / G441 | G431KB, G441CB | 32–128 KB | High | Case-by-case |
| STM32G471 | G471RE | 512 KB | High | Case-by-case |
| STM32G473 / G483 | G473CE, G483RE | 256–512 KB | High | Case-by-case |
| STM32G474 / G484 | G474QE, G484VE | 512 KB | High | Case-by-case |
Die revision matters. Earlier silicon revisions of certain G4 parts have known errata that can be leveraged during recovery. Newer revisions may have patched specific vectors. We ask clients to provide the full part marking — including the date code and revision letter on the package — before committing to a timeline or price.
STM32G4 Unlock Process — Step by Step
1. Feasibility Check (Free)
Send us the exact part number (e.g., STM32G474RET6), the package marking photo, and a description of the protection configuration if known. We confirm the RDP level, check for PCROP/secure-area flags, and report back within 1–2 business days with a go/no-go assessment and a firm quote.
Check feasibility for your project
Send the chip marking or board details and tell us what you need to recover. Add clear photos if available.
Request a feasibility review2. Device Submission
Ship 1–3 sample devices. We recommend sending at least two: one for the primary attempt and one spare in case invasive decapping is required. Devices can be loose ICs or still mounted on the PCB — we handle both. All shipments are covered under NDA from the moment we receive them.
3. Firmware Extraction
For RDP Level 1, our engineers use a combination of fault-injection (voltage glitching on the VDD/VDDA rail, precisely timed to the RDP check during boot) and proprietary debug-session hijacking. A successful glitch forces the boot ROM to skip the RDP validation, allowing a standard SWD readout of the full flash. This is non-destructive to the device in most cases.
For RDP Level 2, the approach shifts to semi-invasive or fully invasive methods: chemical or laser decapsulation of the die, followed by microprobing or UV/laser fault injection at the fuse level. Success depends on the process node (90 nm for most G4 parts), metal layer count, and whether ST has added active shielding on that revision. We are transparent about the risk: Level 2 recovery on recent G4 silicon carries a meaningful failure probability, and we do not charge if we cannot deliver.
4. Verification & Delivery
Extracted firmware is delivered as a raw .bin or Intel HEX file. We verify the dump by programming it onto a blank STM32G4 of the same part number and confirming functional operation — or, if the client provides a test procedure, we follow that. Delivery is via encrypted file transfer.
Cost and Turnaround for STM32G4 Unlock
| Scenario | Typical Cost (USD) | Typical Turnaround |
|---|---|---|
| RDP Level 1, common G4 variant | $500 – $1,200 | 5–10 working days |
| RDP Level 1 + PCROP active | $800 – $2,000 | 7–15 working days |
| RDP Level 2 (invasive) | $2,500 – $6,000+ | 15–30 working days |
| Rush service (Level 1 only) | +50% surcharge | 3–5 working days |
Pricing depends on the exact part number, die revision, quantity of devices available for attempts, and whether PCROP or secure-area protections are also engaged. We provide a binding quote after the free feasibility check — no hidden costs.
When Is STM32G4 Unlock the Right Move?

Authorized firmware recovery is the right path when you have lost the original source code or build artifacts for a product you own. Common scenarios include:
- Legacy product maintenance: The original developer is unavailable, and you need the binary to program replacement units or diagnose field failures.
- Prototype recovery: A one-off prototype was programmed before version control was established, and the only copy of the firmware lives on the chip.
- Second-source validation: You need to verify that a contract manufacturer programmed the correct firmware revision onto production boards.
- Disaster recovery: A build server crash or repository corruption has destroyed all compiled binaries and the toolchain needed to rebuild.
We require proof of ownership or written authorization from the IP holder before starting any STM32G4 unlock project. This protects both parties and ensures compliance with applicable IP laws. For details on our authorization process and NDA framework, visit our trust and legal compliance page.
STM32G4 vs. Other STM32 Families — Unlock Difficulty Comparison
The G4 series sits in the mid-range of STM32 unlock difficulty. Compared to older STM32F1 or STM32F0 devices, the G4’s more recent silicon revision and tighter glitch-timing windows make voltage-fault injection harder to calibrate. However, it is notably easier than the STM32H7 or STM32L5 families, which add TrustZone (Arm security extensions) and more aggressive tamper detection.
If you are also working with other microcontroller families, our lab handles a broad range of devices. For example, we offer ATmega firmware recovery for Microchip AVR-based designs, as well as PIC18 unlock services for Microchip’s 8-bit PIC line. On the STMicroelectronics side, we also support the older STM8S unlock and STM8L unlock for 8-bit ST designs still common in appliance and metering applications.
What Can Go Wrong — Honest Limitations
We believe in setting realistic expectations:
- RDP Level 2 with latest silicon revision: ST continues to harden the fuse architecture. On the newest G4 die revisions, Level 2 recovery may be infeasible with current techniques. We will tell you upfront.
- Corrupted flash: If the flash contents were partially erased or corrupted before locking, the recovered binary may be incomplete. We can usually detect this during verification.
- PCROP + secure area combined: When both PCROP and the secure-area hide protection are active on overlapping sectors, those sectors may be unrecoverable even after a successful RDP bypass.
- Device damage during decapping: Invasive methods carry a small risk of bond-wire or pad damage. Sending a spare device mitigates this.
Our no-recovery, no-fee policy applies to all STM32G4 unlock projects. If we cannot extract a verified, functional firmware image, you pay nothing beyond return shipping.
Frequently Asked Questions
Can STM32G4 RDP Level 2 be unlocked without destroying the chip?
RDP Level 2 permanently disables the SWD/JTAG debug interface at the fuse level. Non-invasive methods cannot bypass this. Semi-invasive techniques (laser fault injection on the decapped die) can sometimes succeed without destroying the chip’s functionality, but the decapsulation process itself means the device cannot be reused in a sealed production environment. We always attempt to preserve the die for readout, but the original package is sacrificed.
How do I know which RDP level is set on my STM32G4?
Connect the device via an ST-Link programmer and open STM32CubeProgrammer. Navigate to the Option Bytes tab. If the tool can connect and read option bytes, the device is at RDP Level 0 or Level 1. If connection is refused entirely (no SWD response), the device is likely at RDP Level 2. You can also check the FLASH_OPTR register if you have any debug access.
Is STM32G4 firmware extraction legal?
Extracting firmware from a microcontroller you own — or for which you have written authorization from the IP holder — is legal in most jurisdictions. It falls under legitimate reverse engineering for interoperability, maintenance, or archival purposes. We require documented proof of ownership before starting work. See our authorization and compliance policy for full details.
What file format is the recovered firmware delivered in?
We deliver a raw binary (.bin) file and an Intel HEX (.hex) file. Both are compatible with STM32CubeProgrammer, ST-Link Utility, and J-Flash. If you need a specific format or memory-map annotation, let us know during the feasibility stage.
Can you also clone the full PCB, not just the firmware?
Yes. If you need a complete board reproduction — Gerber files, BOM, schematic, and firmware — we offer full PCB reverse engineering alongside IC unlock. Many clients combine both services for legacy product continuation. For other microcontroller families on the same board, such as Silicon Labs C8051 devices, we handle those in parallel.
Check feasibility for your project
Send the chip marking or board details and tell us what you need to recover. Add clear photos if available.
Request a feasibility reviewWhat do you need to recover?
Send the full marking or board photos, sample condition and required outcome. Ask for an NDA before sharing confidential files. Scope and sample handling are confirmed individually.
The article title is carried into the contact form. Add your own details and review the enquiry before sending.