A dishwasher control board maker needed a copy of the secured flash heximal from its own legacy design, built on the PIC24FJ64GA004: a 16-bit PIC24 running at up to 16 MIPS, with 64 KB of program flash and 8 KB of SRAM in a 44-pin TQFP. The board had been in production for a decade, the firmware author had moved on, and the only surviving build was running in the appliances themselves. This note records the recovery as it actually proceeded, because the PIC24 family protects its array in a way that surprises engineers who only know ARM-class readout protection.
PIC24 protection lives in configuration words, not in a debug register. The FBS word controls the boot segment: BWRP write-protects it and BSS sets its security level, while FGS controls the general segment through GWRP. The detail that decides every job is this: GWRP prevents writes only, so a part with nothing but GWRP set remains fully readable through the two-wire ICSP port, and calling that part protected is the most common misdiagnosis in this family. Genuine read protection requires a boot or secure segment with BSS enabled, and a segment under that protection reads back as zeros through ICSP rather than returning an error.
The ICSP entry sequence on this part is the classic Microchip two-wire method: hold MCLR low, apply programming voltage, clock PGC while toggling PGD, and the six-bit commands shift in LSB-first just as they do on the 8-bit families. Configuration words are readable at any security level that permits entry at all, so the first session produced the FBS, FSS and FGS values within minutes. This board read back with GWRP set and no boot segment security, which meant the honest route was simply a complete, orderly readout rather than anything invasive. The full-array read through ICSP ran at the pace the programmer’s clock allows, 22,016 instruction words at 24 bits each, and finished with a checksum over the whole image.
A raw heximal from a PIC24 is a 24-bit instruction stream with phantom bytes interleaved, and it means little without the configuration word values that were read alongside it. Our delivery for this project paired the heximal with the configuration words, a decoded instruction-count map showing where the compiler had actually placed code versus the reserved boot region, and notes on the two analog-comparator calibration values the firmware computed at every power-up. Engineers who have seen a an STM32F401RET6 report will recognise the shape: the binary alone is data, the pairing of binary and configuration state is the recovery.
The 44-pin TQFP brought the PMP parallel port and 35 I/O lines out to the bench, which made instrumentation painless, and its PPS remapping meant the diagnostic UART could sit on almost any pin, a trap for anyone probing pin by pin without the configuration registers. The reading a chip in the lab service description covers the cases where the package or the security state closes those doors instead. Comparable recoveries on other 16-bit families follow the same order of operations, as the a 32 KB RL78/G13 program dump note and the a version-stamped RX62T part case show from the Renesas side.
The verified heximal reflashed onto replacement boards, passed the dishwasher’s own service-mode test cycle, and the manufacturer resumed production support with a buildable baseline. If your part carries the same family name, the configuration-word read is the correct first step: it distinguishes in ten minutes between a part that only looks locked and one that genuinely refuses to speak. The same distinction organises the heximal extraction service description and the the GD32F303CE code flash write-up, where the first diagnostic step also decided the whole quote.
One artefact from this job now travels with every report we issue for this family: the wear map. Ten thousand rated cycles per location sounds inexhaustible, but the dishwasher fleet had been through firmware-era service updates that rewrote the same rows dozens of times, and the recovered image showed it. Rows near the configuration area carried visibly more history than the code around them, and the calibration constants the firmware recomputed at every power-up sat in exactly the region the service tools had favoured. Reading that history out of the silicon gave the customer something their own records never had: an honest account of how much life the deployed fleet had left in its array, and where a future update scheme should place its rewrites.