Clone Protected STM32G030C8T6 Program: LQFP48 64 KB Copy
When a controller built on the STM32G030C8T6 goes end-of-life and the only surviving sample is locked, the task is not to read a few bytes but to clone protected STM32G030C8T6 program as a full, bit-exact image. This is the 64 KB flash member of the G0 value line, still an Arm Cortex-M0+ at 64 MHz with 8 KB of SRAM in an LQFP48, and it is the highest-density part before the family steps up in package or core. A clone that omits the protection state will not boot, which is why the option bytes are part of the deliverable.
Why the top density still gets locked
The STM32G030C8T6 is attractive because it packs 64 KB into the same cheap 48-lead body as the 32 KB parts, so it ends up on boards that outgrew the smaller siblings. The readout protection sits in the option bytes and gates both SWD and the USART system bootloader, and because the G0 family has no USB there is no DFU path to fall back on. Our flash protection methods notes explain how the same option-byte logic appears across families.
The difference between an image and a clone
A raw flash dump is only half the story. The STM32G030C8T6 configures its read protection, write protection and boot behaviour from option bytes that live outside the main array, and a blank replacement part boots open with every protection disabled. Write the 64 KB image alone and the clone may fail a checksum or refuse to start. A real clone therefore carries the option bytes alongside the array so the replacement matches the original security posture. The approach mirrors our firmware cloning process.
Reading the part when the port refuses
With RDP at level 1 the SWD access port links and then declines the flash window, and the bootloader read-memory command does the same. That is expected: the security level is sampled out of reset and gates every interface before user code runs. When the electrical route is closed we open the LQFP48 package by chemical etch, keep the die electrically live, and use an optical fault at the boot security check to hold the port open long enough to stream the 64 KB out. The same decapsulation service route applies to the smaller STM32G030C6T6.
A 7×7 mm LQFP48 carrying a 64 KB array has a small die centred inside a generous body, so the compound can be taken back to the silicon without reaching the lead frame. Keeping the part soldered and powered is what makes the timing attack possible: the check that gates the array is evaluated in the first instants after reset, and a light pulse placed inside that window makes the routine return a result the logic did not intend. Where a sample refuses the optical route, the bus is probed directly. Our power glitch notes and clock glitch material describe the cheaper electrical attempts made before the package is opened.
Verifying the copy is genuinely bit-exact
| Check | What it covers | Why it matters |
|---|---|---|
| Dual-pass read | every byte read twice | catches a port that closed mid-stream |
| Checksum match | image against itself | confirms no dropped block |
| Option-byte copy | level and WRP fields | replacement boots identically |
| Blank-write test | image onto fresh part | proves the clone is functional |
Verification is where a clone earns its name. After the array is captured we read it a second time and compare the passes byte for byte; a mismatch means the debug port closed during the capture and the affected block is taken again. The option bytes are copied into the same file so the replacement starts in the same state as the original, and a blank-write test onto a fresh part confirms the clone is not merely readable but runnable.
The write order is deliberate. The option bytes go on first because they carry the boot configuration and the protection state, and a clone left on defaults presents a debug port the original never had. The 64 KB follows, and the part is then reset and checked for the same start-up behaviour as the unit it replaces. Where the board is available, our dual probe and flying probe checks confirm the electrical behaviour matches as well.
What the completed clone contains
You receive the full 64 KB flash image, the option-byte record that pins the original lock and write-protection state, and a verification report listing both read passes and their checksums. Where the goal is a working replacement board, the same verified image is what gets programmed into a blank part, and the disassembly-based source reconstruction is available when the aim is to understand rather than simply reproduce. Neighbouring G0 jobs such as the STM32G030K8T6 binary duplicate follow the identical discipline.