Decode Protected STM32G474MET6 Memory: LQFP80 512 KB Read
The STM32G474MET6 is the unusual one of the family, a 512 KB G474 digital-power part in an 80-lead LQFP80 body measuring 12×12 mm with 66 I/Os, a middle footprint that sits between the 48-lead and 100-lead parts and is rarely seen in the wild. It keeps the Cortex-M4 with FPU at 170 MHz and the HRTIM high-resolution timer, and its generous pin count serves analogue-rich power designs. When the only sample is locked, the work is to decode protected STM32G474MET6 memory and turn the raw image into something readable. The package is the first puzzle, and the analogue tables are the second.
The uncommon 80-lead body
Most G4 boards pick the 48- or 100-lead part, which makes the 80-lead LQFP80 of the STM32G474MET6 a rarity on the bench. At 12×12 mm with 66 I/Os it offers more pins than the 48-lead part without the full 100-lead footprint, so designers use it where analogue routing needs room but board space is still tight. The centred die under the moulding compound is a comfortable target for decapsulation, and the lead pitch is friendly for fixturing. Rarity does not make the part harder to read once the route is chosen.
Analogue richness on 66 I/Os
The 66 I/Os feed a dense analogue front end, with five 12-bit ADCs at 4 Msps, seven comparators, six op-amps with PGA mode, seven DAC channels and the VREFBUF reference. On the STM32G474MET6 those peripherals are tuned per unit, and the tuning lives in memory-mapped calibration and gain tables rather than in the silicon. A recovered image is therefore more than code, because it is the measured character of that specific chip. Losing it means losing the factory alignment that made the board meet its spec.
Where the protection lives
As elsewhere on the G4, the readout-protection level sits in the option bytes and is sampled out of reset before application code runs. Level 1 blocks the SWD port and the ROM system bootloader from the main array, while level 2 seals the part. The STM32G474MET6 also supports PCROP and a securable memory area, so a hidden slice can sit inside the 512 KB even at level 1. The lock-bit background at AVR protection shows the same gate in an older part, and the rule is unchanged, which is never regress the level or the array erases.
Reaching the die through the package
With both electrical doors closed by RDP, decapsulation is the entrance. We chemically etch the moulding compound from the STM32G474MET6 to expose the die while the bonding wires stay intact and the part remains live. The 80-lead LQFP gives more border around the die than the 48-lead part, so the working surface is generous. The physical step is described on our silicon package decapsulation page, and the open part returns in a sealed carrier so the die is not disturbed.
Lifting the 512 KB image
Once the die is exposed, a timed optical fault against the boot-time security check can open the debug port for the moments needed to stream the array, or a power or clock glitch can skip the same check, and our power glitches and clock glitch attacks notes cover the technique. The 512 KB dual-bank flash with ECC reads bank by bank with the option bytes attached, and the read is taken twice and checksummed. The result is a single image that holds the visible array and any securable slice alike, ready for decoding. A flash recovery pass confirms the file before analysis.
| Memory region | Holds | Read with image |
|---|---|---|
| Main array | application code | yes |
| Option bytes | RDP and PCROP | yes |
| ADC calibration | per-unit trim | yes |
| Op-amp gain tables | PGA settings | yes |
| Securable area | hidden routine | yes |
Decoding the calibration tables
A raw image of the STM32G474MET6 is not yet useful, because the analogue tables have to be interpreted. The ADC calibration words set the offset and gain for each of the five converters, the op-amp gain tables fix the PGA mode and the reference buffer, and the DAC channels carry their own trim. To decode protected STM32G474MET6 memory the work is therefore part recovery and part interpretation, mapping each table to its peripheral. The same method serves the STM32G474CCT6 firmware and the STM32G474CET6 code recoveries.
What we hand back
You receive the complete flash binary image of the STM32G474MET6, the option bytes recording the original lock and securable-area state, and a decoded view of the analogue calibration and gain tables. A verification report covers the read passes and checksums, and where the goal is a working copy the same verified file seeds a firmware clone. The deliverable is a part you can read and rebuild, not just a sealed blob.