Texas Instruments MSP430 manual FN0015/ ProgramFile, Pgmwitherasecheck

Page 30

PRGS430.DLL—Description

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

2-18

Image 30
Contents User’s Guide Evaluation BOARD/KIT Important Notice EVM Warnings and Restrictions Page Read This First About This ManualFCC Warning Contents Figures TablesInstallation and Setup Installing the Software −1. ADT430 Program IconsInstalling the Hardware MSP−PRGS430Page Operation Software/Hardware Layers of the PRGS430 Environment Basic Procedure Programming MSP430 Devices With the GUIDescription of the MSP-PRGS430 GUI −1. MSP430 Function Buttons and DescriptionsOperation2-5 Error Messages −2. Communication Error Box−5. Data Error −2. Error Messages Content of PRGS430.ini File Use of a Project.ini FileCommand Line Options General DefinitionsExample Return Values/Error Codes in .ini File FN0002/ ReleaseCom PRGS430.DLL-DescriptionFN0001/ InitCom FN0003/ SetDeviceTypeFN0004/ InitTarget FN0005/ ReleaseTargetFN0006/ Erase FN0007/ EraseFile FN0008/ EraseCheckFN0009/ EraseCheckFile FN00010/ PatternCheckFN00011/ VerifyData FN00012/ VerifyFile FN00013/ VerifyFileRangeFN0014/ ProgramData FN0015/ ProgramFile PgmwitherasecheckFN0016/ BlowFuse FN0017/ SetVccFN0018/ ReadOutData FN0020/ Reset FN0019/ ReadOutFileFN0022/ SetNotificationWnd FN0023/ GetDeviceCfgInfoFN0024/ AccessSFR Return Values/Error Codes From PRGS430.DLL Status Return Value CommentPage Hardware Specifications Basic HintsProgramming Adapter Target Connector Signals −1 -Pin Sub-D at Programming Adapter−2. Target Connector Signal Functions MSP-PRGS430 Circuit Diagrams Location of Components − MSP-PRGS430Interconnection of MSP-PRGS430 to OTP/EPROM-Based Interconnection of MSP−PRGS430 to Flash-Based MSP430 Devices Page Hex Object Format Intel-Hex Object Format Figure A−1. Intel-Hex Object FormatTI-TXT File Format Page Schematics Page Schematics B-3 Page Important Notice
Related manuals
Manual 138 pages 30.24 Kb