Replicate a Secured MSP430G2231 Flash Program onto a Second Mixed-Signal Part
Replicating a unit that already works onto fresh silicon fails in a predictable and misleading way on this mixed-signal part. To replicate secured MSP430G2231 flash program from one die onto another, the extracted image cannot be treated as one block of bytes, because the factory clock and converter calibration constants live in the information flash and differ on every die. Transplant them along with the code and the second board boots at the wrong frequency and returns slightly wrong conversion results, which looks like a sensor fault rather than a firmware fault.
Extracting the source image before any copying decision
Getting the first die readable is the entry condition, because no decision can be made until the code and the information flash are separated in the dump. The MSP430G2231 has 2 KB of flash and 128 bytes of SRAM.
Main flash is divided into 512-byte segments and the vector table sits at the top of the address space, so the vector region must be dumped first. Two 128-byte information segments at 0x1000 to 0x107F and 0x1080 to 0x10FF hold calibration data.

Programming the JTAG lock signature permanently disables both JTAG and Spy-Bi-Wire, and this family has no bootstrap loader, so a fused part needs physical work, as breaking locked MSP430G2452 flash memory shows.
Why a byte-for-byte copy produces a faulty clone
The part carries one factory-calibrated DCO frequency and ADC10 gain and offset constants measured on that die during production test, so a straight copy reads out cleanly and still fails.
A small MSP430G2231 DCO calibration frequency difference shifts every timing derived from it, so baud rates drift and timeouts close early. The ADC10 gain and offset constants fail the same way: the conversion stays stable, slightly wrong.
Separating code from constants before you replicate secured MSP430G2231 flash program
Both information segments are written in TLV format, a tag, a length and a value repeated across the segment. That is what makes an MSP430G2231 TLV transplant between devices possible, since each entry is located by tag rather than a fixed offset.
Calibration entries and lock data share the same format, so separation is by tag identity rather than by region. The DCO and ADC10 entries must come from the target die; the lock bits describe the source policy. Decoding that area is covered in MSP430G2121 processor memory reverse engineering.
What may and may not be copied between two MSP430G2231 dies
The table below makes the per-die column explicit, because that column is where most cloning mistakes on this family are made.
| Item | Location | Per die | Effect if copied from the source |
|---|---|---|---|
| Program code and vectors | Main flash segment | Identical by design | None, this is what should be copied |
| DCO calibration frequency | Information flash TLV | Different on every part | The copy runs at the wrong clock speed |
| ADC10 gain and offset | Information flash TLV | Different on every part | Conversion results drift from the original |
| Segment lock bits | Information flash TLV | Set by the security policy | The target may lock differently from the source |
| Unused information area | Information flash TLV | Free for the application | Wasting space the original used for data |
Read down the per-die column and the rule is simple: copy the main flash segment exactly, and leave the target information segments in place.
Writing the duplicate firmware image onto the target die
Programming works word by word and the smallest erase unit is one 512-byte segment, so main flash is erased and rewritten segment by segment while the information segments stay untouched. Each flash controller write needs 0xA5 in the high byte of FCTL1, FCTL3 or FCTL4.
Erase the segment, write the words, read it back and compare against the source dump, and verify the vector table first because a mismatch there produces a part that appears dead.

A TLV transplant between devices is a separate, deliberate operation, never bundled into the code write. Where the target factory constants are intact, transplanting the source ones imports the mismatch the split was meant to avoid, as MSP430G2152 flash data replicating shows.
Proving the copy behaves like the original
Verification is a measurement exercise, not a checksum exercise. A checksum over main flash proves the code was copied and says nothing about whether the unit measures the same. The target information area is read again in MSP430G2452 embedded memory recovery.
Run the same conversion on both parts under the same input condition and compare the raw counts before correction. A consistent offset means the ADC10 gain and offset entry is wrong or absent.
To replicate secured MSP430G2231 flash program and get a second part that behaves like the first, copy the code exactly, leave the clock and converter constants to the target die, then confirm it against the original on real measurements. ic-crack.com carries out this separated extraction and reconstruction for customers who need a working second unit.