PRGS430.DLL—Description

Note: For some MSP430 family members, e.g., MSP430F2xxx devices, portions of flash information memory are factory preprogrammed with calibration data. Depending on which method is used for erasing the flash memory, this calibration data may be erased. Should the calibration data be conserved, it must be read out prior to the information memory erase or a flash erase method that does not affect the calibration data memory locations must be used. See the respective device data sheet for further information on preprogrammed calibration data memory locations.

/FN0007/ EraseFile

long int EraseFile(char* lpszFileName, long int iFileType, long int Flags, char* lpszProjectIni)

EraseFile() erases all addresses used in the specified file.

iFileType:

 

 

FILETYPE_AUTO

(0x00)

− Autodetection of file type (Intel-hex or

 

TI-TXT)

FILETYPE_TI_TXT

(0x01)

− File type is TI-TXT

FILETYPE_INTEL_HEX(0x02) − File type is Intel-hex

Flags:

DISABLE_TI_MEM_PROTECT (0x01)

If this bit is set, the memory protection setting device.cfg is ignored.

lpszProjectIni: name of the {project}.ini file, if protection settings from this file shall be used. If there is no protection, replace lpszProjectIni with NULL.

Example:

lFuncReturn = EraseFile(”text.txt”, long:0, long:0,

NULL)

Note: For some MSP430 family members, e.g. MSP430F2xxx devices, portions of flash information memory are factory preprogrammed with calibration data. Depending on which method is used for erasing the flash memory, this calibration data may be erased. Should the calibration data be conserved, it must be read out prior to the information memory erase or a flash erase method that does not affect the calibration data memory locations must be used. See the respective device data sheet for further information on preprogrammed calibration data memory locations.

/FN0008/ EraseCheck

long int EraseCheck(long int wStart, long int wLength)

Performs an erase check of an area of the target memory

wStart: Start address of the memory area. Allowed values : 0x0000−0xFFFE (see memory map of the corresponding device).

wLength: Size of the area. Allowed values : 0x0000−0xFFFE (see memory map of the corresponding device)

The function EraseCheck() simply uses PatternCheck(), with 0xFFFF as pattern.

EraseCheck(long int wStart, long int wLength)

{

return PatternCheck(wStart, wLength, 0xFFFF);

}

Example:

lFuncReturn = EraseCheck(long:0xF000, long:0x1000)

Operation 2-15

Page 27
Image 27
Texas Instruments MSP430 manual FN0007/ EraseFile, FN0008/ EraseCheck