Duplicate Locked STM32G473QET6 Heximal: LQFP128 512 KB Copy
The STM32G473QET6 is one of the larger parts in the G4 line: a 14×14 mm LQFP128 body carrying the full 512 KB of flash, with the Cortex-M4 running at 170 MHz. That has a direct effect on the work: to duplicate locked STM32G473QET6 heximal data faithfully, the copy has to include everything the part depends on, not only the internal array.
Why the 128-lead body changes the job
On a large LQFP package the die is still small relative to the mould compound, so there is plenty of room to work around it, but the surrounding board is more complex. Boards of this class frequently place an external SPI flash beside the MCU for bulk storage and log data, and the QSPI lines run to it. The internal array holds the control code while the real payload lives outside, and a duplicate that captures only the internal 512 KB produces a board that boots and then fails the moment it reads external data. That is why the duplicate is defined as a set: internal array, option bytes, one-time programmable area and any external memory on the board.
Getting the image out of a sealed part
Readout protection at level 1 on the STM32G473QET6 closes both the SWD port and the ROM bootloader, and the securable memory area adds a further slice of the array that an ordinary read never touches. The physical routes that remain are fault injection against the boot-time security check, with the clock glitch technique and power glitching both applied to the same decision, or a decapsulation that exposes the die so the array can be read directly. The G4 dual-bank layout with ECC means the capture records which bank was live and corrects marginal cells on the fly.
The compound can be taken back to the silicon without reaching the lead frame, and the part is kept soldered and powered through the procedure, which is what makes a timed fault possible: on a 170 MHz part the security check is evaluated in the first few microseconds after reset, so the window is narrow and worth finding carefully. Where the optical route is not the right fit, the bus is probed directly, which is slower but independent of the protection level.
What a heximal file contains
A heximal image is more than a flat byte stream, and treating it as one causes most failed duplications.
| Element | Meaning | Why it matters for a duplicate |
|---|---|---|
| Address records | Where each byte belongs | Preserves multi-bank layout |
| Extended address | Selects the 1 MB segment | Needed on large images |
| Checksum per line | Detects transmission errors | Confirms a clean capture |
| Trailing records | End of block marker | Marks the file complete |
A heximal file that omits the bank structure can still load, and still boot, and still fail later. Getting this right is the same discipline described on our flash recovery page.
Rebuilding a working copy
A clone is only useful if it behaves like the part it replaces. That means the option bytes have to travel with the image, because they carry the protection state, the boot configuration and the write protection the original vendor set. The 1 KB one-time programmable area matters as well on a part where serial numbers or licence keys live. Our notes on flash protection methods explain why the option bytes are treated as part of the data rather than as configuration. The duplicate set is then written to a fresh device and verified by checksum and by a boot comparison, using the dual probe and flying probe checks that confirm the electrical behaviour matches.
The array is read twice from the live die and the two passes are compared cell by cell, so a marginal cell that one pass resolves differently from the other is caught before the file leaves the bench. The write-protection map is recorded sector by sector, because a region the original refused to erase will also refuse a programming attempt on the replacement.
What you receive
You receive the 512 KB flash image of the STM32G473QET6 in both binary and heximal form, the option bytes, the one-time programmable contents where readable, and a validation report comparing the duplicate against the original. The same bench handles the STM32G473RCT6 data decode and the STM32G473VET6 flash attack.