Flash Magic Forum

In-System Programming Support => LPC2xxx => Topic started by: Andy Ayre on June 11, 2009, 04:01:30 pm

Title: Important Change Regarding Code Read Protection
Post by: Andy Ayre on June 11, 2009, 04:01:30 pm
Previously code read protection was enabled by checking a box in the main window of Flash Magic. This supported only level 2 of CRP.

Starting with Flash Magic 5.11 the code read protection setting is read from the hex file and all CRP levels are supported. If an attempt is made to set the device to CRP3 then the user is prompted for confirmation.

To set the CRP value in your project add something like the following (Keil RealView example):

Code: [Select]
const unsigned long crp __attribute__ ((at(0x1FC))) = 0x87654321;
or:

Code: [Select]
const unsigned long crp __attribute__ ((at(0x2FC))) = 0x87654321;
If you don't wish to use CRP then set the value to zero.

If you have previously programmed hex files without problems and now find that you cannot read the contents of memory or access a few other features then this change is the likely cause. Erase all the flash in the device and add the above line (or similar).

Andy