A board that will not boot is sometimes a board whose vector checksum is wrong by one word. The LPC2129FBD64 is the 256 KB, dual-CAN member of the 64-pin LPC2100 family, with 16 KB of SRAM, four 10-bit ADC channels, two UARTs, two SPI ports and two CAN controllers with a shared acceptance filter. It was a natural fit for protocol converters. Restoring an encrypted LPC2129FBD64 program from one of these boards is less about defeating a lock and more about understanding the order in which the boot ROM makes its decisions.
The Checksum Comes Before Everything Else
On reset the boot ROM disables the overlay of its own vectors, reads the eight words at 0x00000000, and checks that they sum to zero. The reserved location at 0x14 holds the two’s complement of the other seven. If the sum is correct, execution passes to the user reset vector; if it is not, the part enters ISP mode instead. Every programming utility that writes this family recomputes 0x14 automatically, which is why engineers rarely notice the field at all.
That field is also the condition attached to CRP3. The highest protection level disables ISP entry through P0.14 only when valid user code exists. A board whose sector 0 has been disturbed is therefore in a different state from the one described by its protection word. Reading the first 32 bytes of the array, when that is possible, tells you more than any assumption about the CRP setting.
The Four Interfaces That Matter
This part exposes two UARTs, two SPI ports, a fast I2C bus and two CAN channels. Only UART0 is involved in the ISP handshake. The others are application interfaces, and none of them provides a route into flash that bypasses the boot ROM. A gateway board often brings the CAN transceivers and a service UART out to the same connector, which makes it tempting to probe the wrong pair first.
The acceptance filter RAM is a useful thing to understand while reading the recovered code. Identifier ranges and message-object assignments live in registers and SRAM, not in flash. The firmware contains the tables that initialise them; a raw image will not show the configuration that a running unit happened to hold at power-down.
What CRP1, CRP2 And CRP3 Remove
The protection word is a single 32-bit value at 0x1FC. CRP1 disables JTAG and the ISP read and compare commands, and blocks writes to sector 0, but sector erase remains available. CRP2 disables read, write-to-RAM, copy-RAM-to-flash and go, leaving only full-chip erase. CRP3 closes the P0.14 ISP entry pin when user code is valid. On early bootloader revisions only the 0x87654321 level exists at all, so the first serial exchange is a version query, not a read request.
None of these levels encrypts the array. “Encrypted” in a service description refers to the customer’s problem, not to a cipher in the silicon. The bytes at 0x00000000 are plain instruction words and constants; what makes them hard to obtain is the boot ROM refusing to hand them out. Stating that plainly saves a lot of wasted effort looking for a key that does not exist.
Rebuilding A Runnable Image
A brief that says restore encrypted LPC2129FBD64 program still starts with the vector checksum rather than a cipher.
A recovered file has to be checked the same way the boot ROM checks it. We recalculate 0x14, confirm that the reset vector points into the application, and mark which of the seventeen sectors were programmed and which were left erased. Flash programming on this family moves 256 or 512 bytes at a time and a sector or full-chip erase takes roughly 400 ms, so the sector boundaries are also the natural boundaries for verification.
ARM and Thumb code can be mixed at subroutine granularity. A gateway stack compiled for density will be largely Thumb, and a flat 32-bit disassembly will produce plausible-but-wrong instruction sequences. Where the image is going back onto a reference board, that distinction decides whether the restored firmware actually runs.
Scope And Related Work
We ask for the part marking, the board photographs and the observed boot behaviour before quoting a route. The contact page is where that intake starts. For the general ordering of protection layers see this walkthrough; the AT32F405 case is a useful contrast because that family really does implement an execute-only region. Within this family, compare the no-CAN LPC2114FBD64 and the 256 KB LPC2124FBD64, which share the same sector geometry.