Texas Instruments MSP430 Computer Accessories User Manual


 
PRGS430.DLL—Description
2-18
wStart: Start address of the range that is to be erased. Allowed values :
0x0000−0xFFFE (see memory map of the corresponding device)
wLength: Length of the range
Allowed values : 0x0000−0xFFFE (see memory map of the corresponding de-
vice)
lpData: Pointer to the Data to be programmed
Flags: The bits in Flags control the operation of ProgramData().
Example: lFuncReturn = ProgramData(long:0xF000,
long:0x1000, void* lpData)
/FN0015/ ProgramFile
long int ProgramFile(char* lpszFileName, long int iFileType,
long int iFlags, char* lpszProjectIni)
This function writes data from the file to the MSP430 device. The protection
of ranges of memory locations defined in the DEVICE.CFG file can be disabled
by setting the DISABLE_TI_MEM_PROTECT−Bit in Flags.
If the PGM_WITH_ERASE option are not selected the program data is
preserved. This means that the data is read from the flash and replaced with
the new data. All other information is restored automatically. The handling of
the information memory works with the same mechanism.
For the fastest programming speed, select the PGM_WITH_ERASE and
PGM_ERASE_INFO options.
lpszFileName: Name of the file to be written into the target
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
iFlags:
DISABLE_TI_MEMPROTECT (0x01)
PGM_WITH_ERASE (0x02) // Erases the main memory before
programming
PGM_ERASE_INFO (0x04) // Erases the info memory before
programming
PGM_WITH_ERASECHECK (0x08) // Erase check by device and the
programs the device
PGM_WITH_Verify (0x10) // Read out device, merge with file to
be programmed, and write back to device