PostHeaderIcon Decapsulate Locked GD32F330F6P6TR Firmware: TSSOP20 32 KB Recovery

The GD32F330F6P6TR is the entry point of GigaDevice’s F330 line in its smallest footprint: a Cortex-M4 core at 84 MHz with 32 KB of flash and 4 KB of SRAM inside a 20-lead TSSOP body barely 6.5 mm long. Boards built around it carry no second storage chip, so when the firmware was never archived the MCU itself is the only copy left. To decapsulate locked GD32F330F6P6TR firmware you have to get past the read protection first, and on a part this small the productive path runs through the package rather than around it.

What twenty leads actually leave you

The TSSOP20 exposes 15 GPIO alongside power and clock pins, and the serial wire debug pins sit among them. On paper that looks like an open door. In practice the debug port links at the physical layer and then refuses to return flash contents, because the lock is not enforced by wiring but by the flash controller. The F330 carries no USB at all, so there is no DFU side entrance either; the ROM bootloader speaks USART and it answers to the same protection decision. Pin count is not the bottleneck here — the lock is, and no re-wiring of the board changes that.

Where the lock is written

The protection on this microcontroller does not live inside the application. It sits in the option bytes, in a security-protection level field that the flash memory controller samples out of reset. Level 0 leaves the part open. Level 1 blocks debug and bootloader reads of the main array. Level 2 seals the device permanently. Nearly every locked field unit we see sits at level 1, which is recoverable. The common advice to unlock by mass erase is a trap on this family: stepping the part back to level 0 erases the very 32 KB you were sent to recover. The mechanism resembles the fuse-and-lock-byte schemes described in our notes on lock bit protection, and the same principle — never trade the image for the unlock — drives our flash recovery work.

Why the electrical route stalls

Connect a probe and the SWD access port answers, then fails the moment it reads the flash window at 0x08000000. Put the part in bootloader mode and the read-memory command declines in the same place. Two different cables, one decision: the security level is evaluated before any user code runs, and both interfaces are gated by it. That is why repeated attempts with ordinary programmers produce nothing but error codes on an otherwise healthy chip.

Opening the package

When the electrical doors are shut, the package is the way in. We remove the moulding compound over the die by chemical etch, exposing the silicon face with the bonding wires intact. A TSSOP20 is a generous body for this work — the die sits centred and roomy compared with leadless packages, and the part remains electrically live after decapping. The process itself is documented on our silicon package decapsulation page.

Reading the die

Decapsulation alone does not hand over the image; it creates the working surface. With the silicon exposed, a precisely timed optical fault aimed at the security check while the part boots can make the verification fall through, leaving the debug port open for the seconds needed to stream the array out. On the F6P6TR the 32 KB of flash is a fast capture once the port holds.

Protection level Debug read USART bootloader Recoverable
0 – open yes yes not needed
1 – read lock no no yes, after decap
2 – sealed no no microprobing only

What we need to start

To begin, send the locked part or the board it sits on. A bare TSSOP20 is straightforward to fixture, and a board lets us confirm the supply rails and clock before the package is opened, which shortens the time on the bench. No schematic or archive is required for a recovery — the image is the deliverable — but a short note about what the board does helps the analysis land on the right constants instead of guessing. Decapped parts are returned in a sealed carrier so the open die is not touched in transit, and the part remains electrically live if you ever need it read again.

What comes back

Before anything leaves the bench the image is read twice and the passes are checksummed against each other; a mismatch means the port closed mid-read and the block is captured again. You receive the complete binary together with the option bytes showing the original lock state, and a disassembly where analysis is the goal. Where the aim is a replacement board, the same verified file is what gets written to a blank firmware clone. Neighbouring parts we handle the same way include the GD32F330F8P6TR, the QFN28 GD32F330G8U6TR and the GD32F330C6T6.

Comments are closed.