Important Change Regarding Code Read Protection

Started by Andy Ayre, December 09, 2010, 03:07:37 AM

Previous topic - Next topic

Andy Ayre

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):

const unsigned long crp __attribute__ ((at(0x1FC))) = 0x87654321;

or:

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
Embedded Systems Academy, Inc.
support at esacademy dot com