Decapsulate Locked STM32G474CCT6 Firmware: LQFP48 256 KB Recovery
The STM32G474CCT6 is the 256 KB member of the G474 digital-power line, built around a Cortex-M4 with FPU at 170 MHz and housed in a compact 48-lead LQFP48 body. What sets it apart from the G473 is the HRTIM high-resolution timer, a 184 ps resolution peripheral with 12 channels aimed squarely at digital power stages such as resonant converters and bridgeless PFCs. When the only sample is a locked board, the job is to decapsulate locked STM32G474CCT6 firmware and recover the control code that gives the hardware its behaviour. The part is small, but what it protects is large.
A 48-lead digital-power part
In the 48-lead LQFP48 the STM32G474CCT6 keeps the G4 Cortex-M4 with FPU at 170 MHz and 256 KB of dual-bank ECC flash, but it trades the FSMC and Quad-SPI of the 100-lead parts for the HRTIM block. The smaller body fits power supplies, motor drives and compact converters where board space is tight. Without the external-memory interfaces the 256 KB image is usually the whole program, which simplifies recovery once access is won.
Why HRTIM firmware is worth protecting
The HRTIM is the reason this firmware is valuable. At 184 ps resolution across 12 channels it generates the finely timed switching patterns that decide efficiency, ripple and protection behaviour of a digital power stage. The control loops, the dead-time compensation and the fault responses are know-how encoded in software, not in the silicon, so copying the part is copying the engineering. A competitor with the binary can clone a supply’s behaviour without ever designing the loop. That is why these units almost always ship read-protected, and why flash protection methods matter to the original maker as much as to a reverse engineer.
The lock on the silicon
As on the rest of the G4, the read protection lives in the option bytes as an RDP level, sampled out of reset before any application code runs. Level 1 blocks the SWD port and the ROM system bootloader from the main array, while level 2 seals the part permanently. The STM32G474CCT6 also supports PCROP and a securable memory area, so a hidden slice can sit inside the 256 KB even at level 1. The lock-bit background at AVR protection shows the same idea in an older part, and the principle is identical: never regress the level, or the array erases.
Opening the LQFP48
To decapsulate locked STM32G474CCT6 firmware you have to open the package first, because both electrical doors are shut. We chemically etch the moulding compound from the STM32G474CCT6 to expose the die while the bonding wires stay intact and the part remains live. A 48-lead LQFP is a smaller body than the 100-lead parts, so the die is closer to the leads, but it is still roomy compared with a leadless or wafer-level package and the etch lands cleanly. The physical step is described on our silicon package decapsulation page, and the part is returned in a sealed carrier afterwards.
Reading the die after decap
Decapsulation alone does not hand over the image, because it only creates the working surface. With the silicon exposed, a timed optical fault against the boot-time security check can make the verification fall through and open the debug port for the moments needed to stream the array out. On the G474 a power or clock glitch is an alternative surface, covered in our power glitches and clock glitch attacks notes. Either way the 256 KB is read with the option bytes attached, and the HRTIM configuration comes out as part of the image.
| Step | Action | Preserves image |
|---|---|---|
| Etch package | expose die | yes |
| Fault the check | open port | yes |
| Stream array | read flash | yes |
| Read options | capture RDP | yes |
What the image contains
A recovered STM32G474CCT6 image is the full 256 KB plus the option bytes, and within the array the HRTIM register setup is the prize. The timer’s 12 channels, the resolution trim and the fault-input routing all appear as register writes near the start of the control task, so the rebuilt view shows how the switching pattern was built. Where PCROP or a securable area was used, that hidden slice is captured too rather than skipped. The same method rebuilds neighbouring parts such as the STM32G474CET6 code recovery and the STM32G474MET6 memory decode.
What we return
You receive the complete flash binary image of the STM32G474CCT6, the option bytes recording the original lock and the securable-area state, and a verification report with the read checksums. Where the aim is a running copy, the same verified file seeds a firmware clone of the digital-power board. The disassembly-based view lets you read the HRTIM control logic even without the original source.