Texas Instruments MSP430 manual FN0004/ InitTarget, FN0005/ ReleaseTarget, FN0006/ Erase

Page 26

PRGS430.DLL—Description

/FN0004/ InitTarget

long int InitTarget(char* lpszDeviceName)

Initializes the JTAG access to the target device, detects the device type, and reports when the detected device does not match the parameter DeviceName passed.

lpszDeviceName: name of the device in file device.cfg

Example: lFuncReturn = InitTarget (”MSP430F1121”)

/FN0005/ ReleaseTarget

long int ReleaseTarget(void)

This function performs a PUC and releases the JTAG access to the target device. All JTAG signals from the serial programming adapter are switched to Hi-Z. The device starts program execution if it is still connected to VCC.

Example: lFuncReturn = ReleaseTarget()

/FN0006/ Erase

long int Erase(long int wStart, long int wLength, long int Flags)

This function erases flash memory (if available). The protection of areas can be disabled by setting the DISABLE_TI_MEM_PROTECT−Bit in Flags.

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

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

If erasing information and main memory segments, first erase the information memory segments, then erase the main memory segments.

The mass erase sequence then would be:

Erase(InfoStart,InfoLength,0);

Erase(MainStart,MainLength,0);

The function invokes a mass erase for information or main memory if the start address and the complete memory range of the information or main memory is specified. If the range specified is not complete for that device, a segment erase of the individual segments is performed.

Flags

DISABLE_TI_MEM_PROTECT (0x01)

If this bit is set, the memory protection settings in device.cfg are ignored.

Example:

lFuncReturn = Erase(long:0xF000, long:0x1000, long:1)

2-14

Image 26
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/ SetDeviceTypeFN0006/ Erase FN0004/ InitTargetFN0005/ ReleaseTarget FN0007/ EraseFile FN0008/ EraseCheckFN00011/ VerifyData FN0009/ EraseCheckFileFN00010/ PatternCheck FN0014/ ProgramData FN00012/ VerifyFileFN00013/ VerifyFileRange FN0015/ ProgramFile PgmwitherasecheckFN0018/ ReadOutData FN0016/ BlowFuseFN0017/ SetVcc 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