You are viewing an older revision! See the latest version

CRP Unbricking

Table of Contents

  1. Ingredients

This page is intended to show how to manually erase the LPC1768 using the serial bootloader, which is the only way to "unbrick" an mbed if the Code Read Protection (CRP) bits have been set.

When set, the CRP bits prevent access to the the flash to prevent the image being read back from the LPC1768. This is usually done to protect a software design from being cloned or reverse engineered.

As the interface device on the mbed uses JTAG to access the flash on the LPC1768 and load the new binary image, setting the CRP bits prevents any updates to the LPC1768 flash being loaded by the mbed interface, hence no way for it to clear the CRP bits. This leaves the mbed permanently programmed.

Part of the CRP mechanism is to stop access to the LPC1768 via JTAG. It is still possible to erase the device (thereby clearing the CRP bits) using the serial boot loader interface, and here is how to do this.

Ingredients

  • One mbed, bricked. If your mbed isnt bricked, you can still practice this technique.
  • One small piece of wire
  • A Serial bootloader of your choice
  • We will be using Flash magic
  • For Windows users, the serial port driver for mbed
  • A terminal application
  • We will be using TeraTerm

All wikipages