Restore NXP LPC2212FBD144 Flash Program

One hundred and twenty-eight kilobytes of on-chip flash, sixteen kilobytes of SRAM, and the external memory bus that comes with the 144-pin package. The LPC2212FBD144 sits between the flashless parts and the larger members of the LPC2200 line, and that position is what makes it awkward: a board built on it can hold code in two places, and the firmware decides which.

Restoring the program therefore starts with a question that has no equivalent on the 64-pin devices. Is the internal array the program, or is it a loader that brings the program in from outside?

Two memories, one address space

The controller’s memory map places the internal flash at the bottom of the address space by default, with the external banks configured through the bank configuration registers. A design that runs from internal flash leaves those registers mostly idle. A design that runs from external memory sets them at boot and may copy the bulk of its code into SRAM before jumping.

Both patterns exist on this part, and they look identical from the outside. The difference shows up in the first few hundred instructions: whether the bank registers are written, whether a block copy out of the external bus follows, and where control ends up. Reading that prologue out of the internal array usually answers the question before any external device is touched.

The internal array on this part is a hundred and twenty-eight kilobytes in eight-kilobyte sectors, with the top of the map reserved for the bootloader, so a little over a hundred and twenty are available to the application. That figure is worth stating because service documentation for 144-pin boards often quotes the headline number, and a rebuilt image that fills it will not program.

Protection, and how it is read

The word at 0x0000_01FC governs external access to the internal array. With read protection active, the debug port closes and the ISP handler refuses Read Memory, Write to RAM, Go and Copy RAM to Flash, while an erase of all user sectors remains available. The note in the user manual also matters here: the protected state disables external memory boot, which means the part will not start from the bus even if it is configured to.

That last point is a common cause of misdiagnosis. A board that refuses to boot after a service attempt, on a part that was working before, is often protected rather than damaged. Establishing the level first prevents both the wrong conclusion and the wrong remedy.

Restoring an LPC2212FBD144

  1. Read the internal array first, since its first kilobyte describes how the rest of the system is organised.
  2. Establish the protection level from the reset behaviour, with nothing written to the part.
  3. Recover the internal flash by the route the level allows, in sector-aligned blocks with per-block verification.
  4. Identify whether the external banks are used, and if so read every device on them and record the bank configuration.
  5. Rebuild the vector table, restore the checksum at 0x0000_0014, and reproduce the bank settings in the recovered image.
  6. Prove the restored system on an equivalent board with the same external memory fitted.

The restored set

A HEX file for the internal array, images of any external devices in use, and a written note on the memory map as the firmware configures it: which chip select answers where, what width each bank is set to, and whether code is shadowed into SRAM. Without that note the images are correct and unusable. Method detail is on the firmware extraction service page, and package work under IC decapsulation service.

Shipment notes

Photograph the memory devices as well as the controller, note the crystal, and say whether the board still starts. If the external memory is socketed, remove it before shipping where that is safe, because it reduces the risk in transit and makes the read simpler. The flashless version is covered for LPC2210FBD144, the larger array for LPC2214FBD144, and the four-bus 144-pin part under LPC2294HBD144.

Authorisation

Work is accepted on hardware the customer owns or maintains under contract, confirmed in writing before any package is opened. The result supports repair and spares for equipment already in service. It is not provided for the manufacture of a competing product, and requests that would need that are declined with the reasoning recorded.