GD32F103 Unlock — Authorized Firmware Recovery for GigaDevice Cortex-M3 MCUs
The GD32F103 is GigaDevice’s Cortex-M3-based general-purpose microcontroller, widely used as a pin-compatible alternative to the STM32F103. When the Security Protection Code (SPC) is enabled, on-chip flash becomes unreadable through standard debug interfaces. A GD32F103 unlock recovers that firmware — typically within 5–10 working days — so you can regain access to code you own but can no longer reprogram, duplicate for authorized production, or maintain legacy equipment.
What Protection Does the GD32F103 Use?

GigaDevice implements a two-level Security Protection Code on the GD32F103 family. Understanding which level is active on your device directly determines feasibility and approach.
| Protection Level | SPC Byte Value | Debug Access | Flash Read | Unlock Feasibility |
|---|---|---|---|---|
| Level 0 (No protection) | 0xA5 | Full SWD/JTAG | Open | No unlock needed |
| Level 1 (Read-out protection) | Any value ≠ 0xA5, ≠ 0xCC | Limited — flash read blocked | Blocked via debug | High (~90%+ success) |
| Level 2 (Permanent protection) | 0xCC | SWD/JTAG permanently disabled | Permanently blocked | Possible but requires invasive techniques; lower success rate |
Most GD32F103 devices in the field are set to Level 1. At this level, the SWD port still responds to connection but refuses flash-memory read operations. Our engineers exploit known vulnerabilities in the GD32F1xx boot-loader and flash controller to extract the contents without erasing the device. Level 2 locks out the debug port entirely; recovery then requires decapping and physical fault-injection methods, which carry higher cost and a non-trivial failure risk.
GD32F103 vs. STM32F103 — Key Differences That Matter for Unlock
Although GigaDevice markets the GD32F103 as “STM32F103-compatible,” the silicon is different. The flash controller, option-byte layout, and boot ROM differ in ways that affect unlock procedures:
- Flash architecture: GD32F103 uses a different internal charge-pump design; voltage-glitch parameters that work on STM32F103 must be re-tuned.
- Option bytes: The SPC byte address is the same (0x1FFF F800 area), but the write-back sequence timing differs by ~2–4 µs.
- Boot ROM version: GigaDevice has shipped at least three boot-loader revisions (V1.0 through V2.1) across GD32F103 production lots. Each revision has slightly different entry-point behavior, requiring per-lot calibration.
- Flash size variants: GD32F103C8 (64 KB), GD32F103CB (128 KB), GD32F103RB, GD32F103RC (256 KB), GD32F103RE (512 KB) — larger flash sizes increase extraction time proportionally.
These distinctions mean that a shop experienced only with STM32 unlocks may fail on a GD32F103 without realizing the root cause. Our lab maintains device-specific profiles for every GD32F1xx sub-variant we have encountered.
How Does the GD32F103 Unlock Process Work?
Step 1 — Device Identification and Protection-Level Check
We connect to the SWD port and read the device ID register (0xE004 2000) and the option bytes. This confirms the exact GD32F103 variant, flash density, and active SPC level. If the chip returns 0x410 as the device ID, we cross-reference the package markings to distinguish it from a genuine STM32F103 — the unlock approach differs.
Step 2 — Non-Invasive Extraction (Level 1)
For Level 1 protection, we use a combination of debug-protocol manipulation and precisely timed voltage-glitch injection on the VDD rail. The glitch window is typically 8–15 ns wide, timed against the flash controller’s access-check cycle. When successful, the protection gate is bypassed for a single read cycle, and our automated toolchain streams out the full flash contents page by page (2 KB pages on most GD32F103 variants).
Step 3 — Invasive Recovery (Level 2, if required)
Level 2 devices require decapping with fuming nitric acid, followed by targeted UV or laser fault injection on the security fuse latch. This is a destructive-to-package process — the die remains functional, but the original package is lost. Success rates drop to roughly 60–75% depending on the specific silicon revision.
Step 4 — Verification
Extracted firmware is verified by computing a CRC32 checksum against the flash-resident checksum (if the application stores one) and by disassembling the vector table to confirm valid Cortex-M3 reset and interrupt handler addresses. We deliver the binary in Intel HEX and raw .bin formats.
GD32F103 Unlock Cost and Turnaround
| Scenario | Typical Cost Range (USD) | Turnaround (Working Days) | Notes |
|---|---|---|---|
| Level 1, 64–128 KB flash | $400 – $800 | 5 – 8 | Most common; high success rate |
| Level 1, 256–512 KB flash | $600 – $1,100 | 7 – 10 | Longer extraction time |
| Level 2, any flash size | $1,500 – $3,000+ | 10 – 20 | Invasive; requires 2–3 sample chips |
| Feasibility evaluation only | Free – $50 | 1 – 2 | Non-destructive SPC level check |
Pricing depends on the protection level, flash size, and the number of sample devices you can provide. Level 2 jobs require at least two (ideally three) identical programmed samples because the invasive process risks destroying one. We quote a firm price after the feasibility evaluation — no hidden fees.
Who Needs a GD32F103 Unlock?
Authorized firmware recovery applies to specific, legitimate situations:
- Legacy equipment maintenance: The original developer is unavailable, and you need the firmware to repair or re-flash replacement boards you own.
- Production continuity: Your contract manufacturer programmed devices under your direction, but the source code was lost or corrupted. The firmware is your IP.
- Prototype recovery: An engineer left the company, and the only copy of a prototype firmware lives on a protected GD32F103 dev board.
- Migration projects: You need to port firmware from a GD32F103 to a newer GD32F303 or GD32E103 and require a binary baseline.
We require proof of ownership or written authorization before starting any GD32F103 unlock project. All work is performed under NDA. For details on our authorization and confidentiality policies, see our trust and legal compliance page.
How Does GD32F103 Compare to Other MCU Unlocks?

Engineers often ask how GD32F103 unlock difficulty stacks up against other Cortex-M and 8-bit parts. Here is a practical comparison based on our lab experience:
| MCU Family | Core | Protection Complexity | Relative Unlock Difficulty |
|---|---|---|---|
| GD32F103 | Cortex-M3 | 2-level SPC | Moderate |
| STM32WB55 | Cortex-M4 + M0+ | RDP + secure enclave | High |
| PIC16F15 | 8-bit PIC | CP bits | Low–Moderate |
| EFM32G | Cortex-M3 | Debug lock + AAP | Moderate |
| XC866 | 8051-based | BSL password | Low |
The GD32F103 sits in the moderate range — easier than multi-core secure-enclave parts like the STM32WB55, but more involved than simple 8-bit MCUs with single-bit code-protect fuses.
Common Failure Modes and Honest Caveats
We believe transparency builds trust. Here is what can go wrong:
- Newer silicon revisions: GigaDevice occasionally patches glitch vulnerabilities in new wafer lots. A technique that works on 2019-dated chips may need recalibration for 2023 production. We track lot codes and maintain updated glitch profiles, but a brand-new revision may require additional R&D time.
- Damaged SWD pads: If the SWD clock or data pads are lifted or corroded, we must micro-solder directly to the die pads — feasible but adds 1–2 days.
- Partially erased flash: If someone attempted an unlock and triggered a mass-erase, the firmware is gone. We can detect this condition during feasibility evaluation and will tell you immediately rather than charge for a futile extraction.
- Level 2 with single sample: If you can only provide one Level 2 device, we may decline the job or quote a higher price to account for the risk of total loss.
Deliverables You Receive
- Full flash dump in Intel HEX (.hex) and raw binary (.bin) formats.
- Option-byte dump (protection settings, watchdog configuration, boot mode).
- SRAM snapshot (if requested and if device state permits).
- Extraction report: device ID, SPC level, flash CRC, vector-table summary, any anomalies noted.
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 reviewFrequently Asked Questions
Can the GD32F103 be unlocked without erasing the firmware?
Yes, for Level 1 protection. Our non-invasive voltage-glitch method bypasses the read-out protection without triggering the mass-erase sequence. The original firmware remains intact on the chip after extraction. Level 2 invasive methods also preserve flash contents, though the package is destroyed in the decapping process.
How many sample chips do I need to send?
For Level 1 jobs, one programmed device is sufficient. For Level 2, we recommend sending at least two — ideally three — identical programmed units. The invasive decapping process carries a risk of die damage, and having spares prevents project delays.
Is GD32F103 unlock legal?
Firmware recovery is legal when performed on code you own or are authorized to access — for example, recovering your own production firmware, maintaining equipment you purchased, or working under a license agreement. We require written proof of ownership or authorization before beginning work. Read more on our legal and trust policies page.
Will the extracted binary run on an STM32F103 without modification?
Not necessarily. While the GD32F103 and STM32F103 share a similar peripheral set, register timing, USB peripheral behavior, and flash wait-state defaults differ. A raw binary dump from a GD32F103 may boot on an STM32F103 but exhibit subtle bugs. If cross-platform porting is your goal, let us know — we can flag likely incompatibilities in the extraction report.
What if my GD32F103 has external flash or EEPROM as well?
We can read external SPI flash or I²C EEPROM contents in the same project. Parts like the 24C256 EEPROM or SST25VF SPI flash are straightforward to dump alongside the MCU firmware. Mention all ICs on your board when requesting a quote so we can provide a bundled price.
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