Texas Instruments MSP430 manual PRGS430.DLL-Description, FN0001/ InitCom, FN0002/ ReleaseCom

Page 25

PRGS430.DLL—Description

2.4 PRGS430.DLL—Description

The PRGS430.dll is used to communicate with the MSP−PRGS430 hardware and the connected MSP430 device.

The initialization of the PRGS430 should be done with the following sequence:

InitCom SetDeviceType

SetVCC

. InitTarget

. ...

. ReleaseTarget ReleaseCom

Several examples showing how the DLL could be used are located in the “DLL_Usage_Examples” subdirectory of the PRGS430 system.

This dll could be used separately using the following conventions:

/FN0001/ InitCom

long int InitCom(char* lpszComPort, long int lBaudRate)

InitCom initializes (opens) the given communications port, establishes communication with the PRGS430 hardware, and sets the baud rate of the MSP−PRGS430. If successful, the MSP−PRGS430 is reset and V CC is set to

0.0V (the voltage should be set after the first user action to validate the correct value).

lBaudRate: valid baud rates are: 9600, 19200, 38400, 56800, and 115200 baud. The default baud rate after installation is 115200 baud.

lpszComPort: the name of the communication port—COM1, COM2, COM3, or COM4.

Example: lFuncReturn = InitCom(”COM1” 115200)

/FN0002/ ReleaseCom

long int ReleaseCom (void)

This new function is the counterpart to InitCom. It allows to close a communication with the MSP-PRGS430 hardware.

VCC is set to 0 and all outputs are set to the Hi-Z state.

Example: IFuncReturn = ReleaseComm()

/FN0003/ SetDeviceType

Example:

lFuncReturn = SetDeviceType(char* lpszDeviceName)

Selects the device type.

lpszDeviceName: name of the device in file device.cfg

Example: lFuncReturn = SetDeviceType(”MSP430F1121”)

Operation 2-13

Image 25
Contents User’s Guide Evaluation BOARD/KIT Important Notice EVM Warnings and Restrictions Page About This Manual Read This FirstFCC Warning Contents Tables FiguresInstallation and Setup −1. ADT430 Program Icons Installing the SoftwareMSP−PRGS430 Installing the HardwarePage Operation Software/Hardware Layers of the PRGS430 Environment Programming MSP430 Devices With the GUI Basic Procedure−1. MSP430 Function Buttons and Descriptions Description of the MSP-PRGS430 GUIOperation2-5 −2. Communication Error Box Error Messages−5. Data Error −2. Error Messages Use of a Project.ini File Content of PRGS430.ini FileGeneral Definitions Command Line OptionsExample Return Values/Error Codes in .ini File FN0001/ InitCom PRGS430.DLL-DescriptionFN0002/ ReleaseCom FN0003/ SetDeviceTypeFN0005/ ReleaseTarget FN0004/ InitTargetFN0006/ Erase FN0008/ EraseCheck FN0007/ EraseFileFN00010/ PatternCheck FN0009/ EraseCheckFileFN00011/ VerifyData FN00013/ VerifyFileRange FN00012/ VerifyFileFN0014/ ProgramData Pgmwitherasecheck FN0015/ ProgramFileFN0017/ SetVcc FN0016/ BlowFuseFN0018/ ReadOutData FN0019/ ReadOutFile FN0020/ ResetFN0023/ GetDeviceCfgInfo FN0022/ SetNotificationWndFN0024/ AccessSFR Status Return Value Comment Return Values/Error Codes From PRGS430.DLLPage Hardware Basic Hints Specifications−1 -Pin Sub-D at Programming Adapter Programming Adapter Target Connector Signals−2. Target Connector Signal Functions Location of Components − MSP-PRGS430 MSP-PRGS430 Circuit DiagramsInterconnection of MSP-PRGS430 to OTP/EPROM-Based Interconnection of MSP−PRGS430 to Flash-Based MSP430 Devices Page Hex Object Format Figure A−1. Intel-Hex Object Format Intel-Hex Object FormatTI-TXT File Format Page Schematics Page Schematics B-3 Page Important Notice
Related manuals
Manual 138 pages 30.24 Kb