New Programming Feature For Non-Volatile Memory – Preserve Range
ColdFire Processors , Power Architecture Processors , In-Circuit Flash Programming , HCS08/RS08/HC08 Micrcontrollers , MC(9)S12(X) Microcontrollers
Did you know you can safeguard data while erasing your Flash/EEPROM module during programming? P&E has added a “preserve range” function that can be used in a programming algorithm to preserve memory ranges. The function looks at the range to be preserved, saves it, and restores it after the Flash/EEPROM has been erased. The user can easily preserve code segments stored in flash with just the lines below in the programming algorithm (.s8p file):
NO_BASE_ADDRESS = [Flash Base address] ; usually defined already
PRESERVE_RANGE= [Offset Start Address]/[Offset End Address]/
Given the range contains only Flash/EEPROM memory.
Example:
If Flash/EEPROM memory starts at address 0x 00004000 and ends at 0x0000FFFF, and the user wishes to preserve ranges 0x0000CCCC to 0x0000DDDD inclusive, he would add this line the algorithm (.s8p file).
NO_BASE_ADDRESS=4000
PRESERVE_RANGE=00008CCC/00009DDD/ ; CCCC-4000/DDDD-40000
The PRESERVE_RANGE functionality also allows the user to preserve only 1 address (instead of a range) by writing the address to be preserved in the [Start Address] and [End Address] fields.
Example: If the user wishes to preserve Flash/EEPROM address 0000F123, he would write the following to the .s8p file:
PRESERVE_RANGE=0000B123/0000B123/ ; F123-4000
In addition, this functionality does not limit the user to preserving only 1 range or one address. The function can be called several times in the algorithm if several ranges and/or addresses need to be preserved, or if the Flash/EEPROM is segmented into several fields or extended into pages.
Example: For the field above (from 4000 to FFFF), if the user wished to preserve addresses 5001, 5006 and ranges CCAA-CCBB and D123-DFFF, the following segment would be added to the algorithm (given that NO_BASE_ADDRESS=4000 is defined already):
PRESERVE_RANGE=00001001/00001001/ ; 5001-4000
PRESERVE_RANGE=00001006/00001006/ ; 5006-4000
PRESERVE_RANGE=00008CAA/00008CBB/ ; CCAA-4000/CCBB-4000
PRESERVE_RANGE=00009123/00009FFF/ ; D123-4000/9FFF-4000
This functionality provides the user with a broadened flexibility for Flash/EEPROM programming for various applications.

