Decode Secured STM32G473RCT6 Data: LQFP64 256 KB Read
The STM32G473RCT6 carries 256 KB of flash in a 10×10 mm LQFP64 body, and on this part the interesting content is often not the code but the data sitting alongside it. The G4 has one of the richest analog front ends anywhere: five 12-bit ADCs, seven comparators, six operational amplifiers with programmable gain, seven DAC channels and a voltage reference buffer. Any product built on that front end carries calibration tables, gain settings, offset values and sensor mapping in the same array as the control code. To decode secured STM32G473RCT6 data therefore means two distinct jobs: getting the bytes out of a sealed part, and then working out what each region of those bytes actually means.
Why the G4 makes data worth reading
Calibration data on a G4-based product is not a nicety. The op-amps and comparators have their own offsets and gains that shift with temperature and supply, and a controller that ignores the stored corrections produces a stable but wrong measurement. Vendors therefore store the correction tables at build time and often protect them. The same array also holds production data such as serial numbers, hardware revisions and customer configuration, which is why “data” recovery is a normal request here.
Getting the bytes out
At readout protection level 1 the debug port and the ROM bootloader both refuse the array, and the physical routes are the only ones left. A fault injected during boot, targeting the security check, is the usual first attempt; where the check resists, the LQFP64 body is opened chemically and the die addressed while the board keeps running. The power glitch and clock glitch methods are documented separately. The flash is the ECC-protected dual-bank type, so the capture records the live bank and corrects marginal cells as it reads.
The 10×10 mm body gives the die enough room that the compound can be taken back to the silicon without touching the lead frame, and the part is kept soldered and powered through the work. That last point is what makes the fault possible: the check that gates the array is evaluated in the first instants after reset, and on a 170 MHz part that window is only microseconds wide.
The alternative of perturbing the supply or the clock widens the same comparison window without opening anything, and because a failed attempt leaves the part locked rather than harming it, those attempts are tried first whenever the leads are still accessible. Our power glitch and clock glitch notes cover both.
Mapping the regions
Once the image exists, the work is to separate code from configuration from calibration. The regions usually follow the layout below.
| Region | Typical location | Content | Use |
|---|---|---|---|
| Vector table | Start of flash | Handler addresses | Confirms the image is real |
| Bootloader | Low addresses | Update and validation logic | Protocol recovery |
| Application | Main body | Control loops, drivers | Source reconstruction |
| Calibration tables | Upper region | ADC and op-amp coefficients | Measurement accuracy |
| One-time programmable | Separate 1 KB | Serial and licence data | Identity |
A flash recovery pass confirms the file is whole before this mapping begins, since a short capture would produce regions that look plausible but are not.
Turning tables back into settings
The calibration data is rarely stored in a form that can be read directly. It appears as a table of coefficients referenced by index, or as a polynomial whose coefficients are packed into bytes that also carry a range flag. Reconstructing it means finding the lookup structure, identifying the field layout, and checking the values against what the hardware should produce. Some fields are double-precision and some are integer scaled, and mixing them up is the common failure. Where the vendor stored the values in a protected sub-region, the physical read step is what makes them available in the first place.
The check that the decode is right is made against the hardware rather than against the file. With the recovered coefficients programmed back, the same measurement is taken and compared with the reading the original board produced, so a table that has been misread or mis-scaled shows up as a number that does not agree. The same pass confirms that the image belongs to this particular unit rather than to a similar model.
What you receive
You receive the 256 KB flash binary image of the STM32G473RCT6, the option bytes, a region map showing where code, configuration and calibration tables sit, and the decoded calibration values with their scales and units identified. The same bench handles the STM32G473RET6 program recovery and the STM32G474RCT6 data decap.