Posts Tagged ‘нападам ic flash’
Clone Protected GD32F330F8P6TR Program: TSSOP20 64 KB Copy
The GD32F330F8P6TR packs the largest flash of the 20-lead F330 members into a TSSOP20 body: 64 KB of program memory beside a Cortex-M4 core at 84 MHz with 8 KB of SRAM. It is exactly the part you find on a controller board that has outlived its supplier, where the last working firmware exists only inside a locked chip. To clone protected GD32F330F8P6TR program memory the work splits into three stages — reading the original, checking that the read is complete, and producing a donor that behaves identically in the socket.

Why this part ends up on the cloning bench
The F8P6TR was chosen by board designers who needed more code space than the 32 KB F6 without moving to a larger package, so it sits in a generation of legacy controllers, drives and metering boards that are still in service today. When the original design house is gone and no archive survives, the only authentic program is the one the microcontroller is guarding. Splicing a similar image from another board almost never works: peripheral initialisation differs between firmware versions, and the result is a board that powers up but does not behave.
Reading the original part
The read protection on the F330 family lives in the option bytes and is evaluated by the flash controller before user code runs, so a standard programmer sees an open port and an empty array. We pass the lock with a timed fault rather than an erase, which leaves the 64 KB intact, then stream the full array out over the debug port. A correct read captures more than the code: the option bytes that record the lock state and device configuration come with it, because a copy that ignores them behaves differently the first time the donor is programmed. Our approach to reading protected arrays is the same one described for general IC firmware recovery.
What a faithful copy has to match
| Item | Why it matters |
|---|---|
| 64 KB flash image | The application itself; one unread block is a dead donor |
| Option bytes | Lock level and configuration the board expects |
| Vector table integrity | A shifted table crashes before main() runs |
| Data pages | Constants and calibration stored in flash, not a separate EEPROM |
The F330 has no separate EEPROM on the die or beside it, so anything the board persists lives inside those 64 KB. That is why the read has to be whole-array, not partial. The protection scheme itself is laid out in our overview of flash memory protection methods.
Writing and verifying the donor
A blank F8P6TR takes the image, then the option bytes are written to the state you choose — most owners want the donor left open so this never happens again. After programming we read the donor back and compare the full array against the verified original, byte for byte. Only a complete match counts as a copy.
Where cloning is not the answer
Some jobs are about understanding, not replacement. If the goal is to port or audit the code, the extracted image is better served as a documented disassembly, which is how we approach GD32F330K6U6 source code rebuilds. The smaller GD32F330F6P6TR and the larger GD32F330R8T6 follow the same flow, as do our complete firmware cloning services for other families.
Scoping a clone job
Before a clone is booked we pin down three things: how many donors are needed, whether the donor should be left open or re-locked to the original state, and whether any board-unique trim values must be carried across. Most orders are small — a handful of parts to keep a line running — and the turnaround is days rather than weeks because the read is a single session. Where the board stores calibration in the part’s data pages, those ride along in the image automatically. Sending one surviving board is enough to scope the whole run, and the donor count can be set once the verified binary exists.
What you receive
A clone job returns the donor parts, the verified binary file, and a short report stating the read method, the checksum of both passes, and the option-byte state written to the donor. Send the locked chip or the whole board — both work — and we quote before any bench time starts.