Posts Tagged ‘копирам mcu code’

PostHeaderIcon Retrieve Secured GD32F330G8U6TR Flash: QFN28 64 KB Read

The GD32F330G8U6TR carries 64 KB of flash and 8 KB of SRAM onto a 4×4 mm QFN28 body: the full-size memory of the F330 line in a leadless package with 23 GPIO. Firmware on these parts fails the same way as everywhere else — the archive is lost, the supplier is gone, and the read protection switches on the moment you try. To retrieve secured GD32F330G8U6TR flash you need two things in order: reliable contact to a package without leads, and a way past a lock that gates every electrical entrance at once.

Decapsulated microcontroller die under recovery

The QFN28 body

Leadless packages change the handling before they change the method. The 0.5 mm pad pitch leaves no room for clip probes, so the part comes off the board for a socket or is re-balled and fixtured. Nothing about the flash protection cares which you choose; the point is a stable connection for the several minutes a capture takes, because a fixture that hiccups mid-read produces a corrupt image that looks like a locked chip. Once contact is solid, the G8U6TR behaves exactly like its 20-lead siblings on the bench.

Two doors, one lock

The part offers two electrical entrances and both are watched by the same guard. The serial wire debug port links and then refuses flash reads. The ROM bootloader, which speaks USART on this family, accepts the handshake and declines the read command in the same place. The reason is architectural: the security-protection level stored in the option bytes is sampled by the flash controller out of reset, before either interface negotiates anything. There is no combination of debugger settings that separates the two doors, because they were never separate.

Making contact and reading nothing

The first session on a locked G8U6TR always looks the same: healthy supply, correct clocking, a debug port that answers identification queries, and an array that reads back as blank or errors out. That combination is itself diagnostic — a genuinely blank part behaves differently from a locked one — and it is the point where most in-house attempts stop. The lock is real, and no amount of re-trying the documented paths returns data.

Forcing the check to fall through

Because the security decision is taken early in boot, it is exposed to a fault delivered at the right instant. A short clock or supply disturbance on the cycle where the flash controller evaluates the option bytes makes the check fall through and leaves the port open. The technique and the equipment behind it are covered in our notes on clock glitching and power glitching. With the port open, the 64 KB array streams out in one session; the capture is small enough that timing is never the limiting factor on this part.

Entrance Protected level 1 After the fault
SWD debug read blocked open
USART bootloader read declined open
Mass-erase “unlock” destroys the image not used

What the 64 KB holds

The image contains the application, its vector table, and every constant the board relies on — the F330 keeps its data in flash pages rather than a separate EEPROM. We read the array twice and compare checksums before calling a capture good, then hand over the binary with the option bytes alongside it. Where the goal is a working replacement rather than analysis, the same verified file goes into a blank through our IC cloning service.

Reading the option bytes matters

The option bytes are a small region read separately from the main array, and on the G8U6TR they record both the lock level and the device configuration the bootloader consults. A clone or a recovered image that ignores them is structurally complete but behaviourally wrong: the donor may refuse to boot, or boot with a different watchdog and clock setup than the board expects. We always capture them alongside the 64 KB and report the values, and where the goal is a working replacement the donor is written to match. This step is what separates a real recovery from a bare file dump.

Where this fits in the family

The same flow covers the GD32F330F6P6TR in its 20-lead body, the GD32F330K6U6 source-code rebuilds on QFN32, and the GD32F330C8T6 on LQFP48. Send the locked part or the board it sits on and we will tell you which entrance the G8U6TR will give up first.