Texas Instruments Computer Accessories MSP430 User Manual

M
S
P
4
3
0
F
a
m
i
l
y
S
e
r
i
a
l
P
r
o
g
r
a
m
m
i
n
g
A
d
a
p
t
e
r
User’s Guide  
July 2009  
SLAU048H  
Download from Www.Somanuals.com. All Manuals Search And Download.  
EVM WARNINGS AND RESTRICTIONS  
It is important to operate this EVM within the specified input and output ranges described in  
the EVM User’s Guide.  
Exceeding the specified input range may cause unexpected operation and/or irreversible  
damage to the EVM. If there are questions concerning the input range, please contact a TI  
field representative prior to connecting the input power.  
Applying loads outside of the specified output range may result in unintended operation and/or  
possible permanent damage to the EVM. Please consult the EVM User’s Guide prior to  
connecting any load to the EVM output. If there is uncertainty as to the load specification,  
please contact a TI field representative.  
During normal operation, some circuit components may have case temperatures greater than  
60°C. The EVM is designed to operate properly with certain components above 60°C as long  
as the input and output ranges are maintained. These components include but are not limited  
to linear regulators, switching transistors, pass transistors, and current sense resistors. These  
types of devices can be identified using the EVM schematic located in the EVM User’s Guide.  
When placing measurement probes near these devices during operation, please be aware  
that these devices may be very warm to the touch.  
Mailing Address:  
Texas Instruments  
Post Office Box 655303  
Dallas, Texas 75265  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Preface  
Read This First  
About This Manual  
This document describes the MSP430-family hardware, operation, and  
software installation and setup.  
How to Use This Manual  
This document contains the following chapters:  
- Chapter 1 − Installation and Setup  
- Chapter 2 − Operation  
- Chapter 3 − Hardware  
- Appendix A − Hex Object Format  
- Appendix B − Schematics  
Notational Conventions  
This document uses the following conventions.  
- Program code and program examples are shown in a special  
typefacesimilar to a typewriter’s.  
Here is an example of programming code:  
long int VerifyFile(char* lpszFileName, long int  
iFileType)  
Trademarks  
Microsoft Windows is a trademark of Microsoft Corporation.  
Intel is a trademark of Intel Corporation.  
v
Download from Www.Somanuals.com. All Manuals Search And Download.  
FCC Warning  
FCC Warning  
This evaluation board/kit is intended for use for ENGINEERING  
DEVELOPMENT, DEMONSTRATION, OR EVALUATION PURPOSES ONLY  
and is not considered by TI to be a finished end-product fit for general  
consumer use. It generates, uses, and can radiate radio frequency energy and  
has not been tested for compliance with the limits of computing devices  
pursuant to part 15 of FCC rules, which are designed to provide reasonable  
protection against radio frequency interference. Operation of this equipment  
in other environments may cause interference with radio communications, in  
which case the user at his own expense will be required to take whatever  
measures may be required to correct this interference.  
vi  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Contents  
1
2
Installation and Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1  
1.1  
1.2  
Installing the Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2  
Installing the Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3  
Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1  
2.1  
2.2  
Software/Hardware Layers of the PRGS430 Environment . . . . . . . . . . . . . . . . . . . . . . . . 2-2  
Programming MSP430 Devices With the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3  
2.2.1 Basic Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3  
2.2.2 Description of the MSP-PRGS430 GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4  
2.2.3 Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6  
2.2.4 Content of PRGS430.ini File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9  
2.2.5 Use of a [Project].ini File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9  
Command Line Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10  
2.3.1 General Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10  
2.3.2 Return Values/Error Codes in .ini File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12  
PRGS430.DLL—Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13  
2.4.1 Return Values/Error Codes From PRGS430.DLL . . . . . . . . . . . . . . . . . . . . . . . 2-23  
2.3  
2.4  
3
Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1  
3.1  
3.2  
3.3  
3.4  
3.5  
3.6  
Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2  
Basic Hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2  
Programming Adapter Target Connector Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3  
MSP-PRGS430 Circuit Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5  
Location of Components − MSP-PRGS430 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5  
Interconnection of MSP-PRGS430 to OTP/EPROM-Based  
MSP430 Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6  
3.7  
Interconnection of MSP−PRGS430 to Flash-Based MSP430 Devices . . . . . . . . . . . . . . 3-7  
A
B
Hex Object Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1  
A.1 Intel-Hex Object Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2  
A.2 TI-TXT File Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3  
Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1  
vii  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Figures  
1−1  
1−2  
2−1  
2−2  
2−3  
2−4  
2−5  
3−1  
3−2  
3−3  
3−4  
3−5  
A−1  
ADT430 Program Icons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2  
Serial Programming Adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3  
MSP430 Programmer Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3  
Communication Error Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6  
Communication Error Box for Blown Fuse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6  
Erase Check Error Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6  
Data Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7  
25-Pin Sub-D at Programming Adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3  
14-Pin Connector at End of Interconnect Cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3  
MSP-PRGS430 Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5  
MSP−PRGS430 Used to Program OTP/EPROM-Based MSP430 Devices . . . . . . . . . . . . 3-6  
MSP−PRGS430 Used to Program Flash-Based MSP430 Devices . . . . . . . . . . . . . . . . . . . 3-7  
Intel-Hex Object Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A−2  
Tables  
2−1  
2−2  
2−3  
3−1  
3−2  
3−3  
MSP430 Function Buttons and Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4  
Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8  
Command Line Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10  
MSP430 Hardware Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2  
Target Connector Signal Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4  
Programming Adapter Signal Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4  
viii  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 1  
Installation and Setup  
This chapter describes the process of installing and programming the  
hardware and software for the MSP430-PRGS430 programming adapter  
used with the MSP430 family of microcontrollers.  
Topic  
Page  
1.1 Installing the Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2  
1.2 Installing the Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3  
1-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Installing the Software  
1.1 Installing the Software  
To install the MSP-PRGS430 software, perform the following steps:  
NOTE: To ensure that you are using the latest version of the MSP-PRGS430  
software, you must download the installation executable from the TI web site.  
1) Browse  
to  
the  
MSP-PRGS430  
page  
on  
(http://www.ti.com/prgs430).  
2) Go to the Support Software section and click on the link to the  
MSP-PRGS430 Software (the latest version of this software can also be  
downloaded from this address: http://www.ti.com/lit/zip/slac029).  
3) Save the zip file to your local drive. After download is complete,  
uncompress the file to extract the installation exectuable  
(PRGS430_Rxxx.exe).  
4) Navigate to this saved file (PRGS430_Rxxx.exe) and run it.  
A welcoming message is displayed.  
5) Follow the setup instructions on the screen. The setup program guides  
you through the installation process.  
6) During setup, the MSP430 program icons are installed in the selected  
folder. Click on the PRGS430 Read Me First icon, shown in Figure 1−1,  
to obtain important information about the program device hardware and  
software.  
Figure 1−1. ADT430 Program Icons  
7) The appropriate program group and icons are added to the Windows  
program manager.  
8) To start the programming adapter software, click the PRGS430 icon in the  
selected program group (default: ADT430).  
1-2  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Installing the Hardware  
1.2 Installing the Hardware  
To install the programming adapter hardware, perform the following steps:  
1) Using the 9-pin SUB-D connector, connect the programming adapter to  
the serial port (COM1−COM4) of the PC.  
2) Connect an external power supply to the programming adapter. The  
voltage of the power supply must be between 14 V and 20 V dc and must  
provide a minimum of 200 mA of power. The center terminal of the supply  
connector at the programming adapter is the plus pole.  
3) The red LED on the programming adapter lights if the power supply is  
properly connected. If the LED does not light and the power supply is  
properly connected, check the F1 fuse on the programming adapter  
printed-wire board (PWB).  
4) The MSP430 devices, in a socket or on a PWB, should be connected to  
the programming adapter through the 14-pin cable.  
The programming adapter provides the selected supply voltage V  
at pin  
CC  
14 of the 25-pin SUB-D connector, or at pin 2 of the 14-pin connector to  
supply the MSP430 device. The signal name is VCC_MSP.  
If an external supply voltage V  
is used for the MSP430, the internal  
CC  
voltage VCC_MSP must be set to the same voltage level.  
Figure 1−2. Serial Programming Adapter  
Power Supply  
RS232 Out  
May Be Connected  
to an EVK  
RS232 From PC  
JTAG Connector  
for the MSP430  
Installation and Setup  
1-3  
Download from Www.Somanuals.com. All Manuals Search And Download.  
1-4  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 2  
Operation  
This chapter describes the programming procedure for MSP430 devices and  
the error messages you may encounter during the procedure.  
Topic  
Page  
2.1 Software/Hardware Layers of the PRGS430 Environment . . . . . . . . . 2-2  
2.2 Programming MSP430 Devices With the GUI . . . . . . . . . . . . . . . . . . . . 2-3  
2.3 Command Line Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10  
2.4 PRGS430.DLL—Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13  
2-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Software/Hardware Layers of the PRGS430 Environment  
2.1 Software/Hardware Layers of the PRGS430 Environment  
PC − Software  
GUI  
PRGS430.EXE  
PRGS430.INI  
CommandLine  
Function  
PRGS430.DLL  
DEVICE.CFG  
[Project] .INI  
RS232  
Serial Programming Adapter  
PRGS430  
JTAG  
Target Socket or Application  
MSP430  
There are three ways to handle and communicate with the PRGS430  
hardware:  
- Using the graphical user interface (see Section 2.2)  
- Using command line parameters (see Section 2.3)  
- Using the PRGS430.dll (see Section 2.4)  
Note: this is the fastest way if the PRGS430 should be used in an  
in-system program and test environment.  
2-2  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Programming MSP430 Devices With the GUI  
2.2 Programming MSP430 Devices With the GUI  
2.2.1 Basic Procedure  
The following steps should be used to program the MSP430 devices:  
1) Click on the Program Device icon during the installation-selected program  
group (default: ADT430). The MSP430 programmer dialog box appears.  
The status line at the bottom of the window shows the actual or the most  
recent activity (see Figure 2−1).  
The status line displays the message Connecting to adapter... until the  
programming adapter is detected and the baud rate is set.  
2) Select the correct device and supply voltage.  
3) Select the name of the object file (TI-TXT (.txt) or Intel-hex (.a43) format).  
4) Select the additional options to program, if necessary using Erase Flash,  
Erase Check, or Verify (see Note 1 at the end of Table 2−1).  
5) Click on the Program button to start programming.  
The status line at the bottom of the window shows the actual or most recent  
activity (see Figure 2−1).  
Figure 2−1. MSP430 Programmer Dialog Box  
Operation  
2-3  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Programming MSP430 Devices With the GUI  
2.2.2 Description of the MSP-PRGS430 GUI  
An MSP430 device is commonly programmed as follows:  
1) Select the file that contains the data to program from the MSP430  
programmer dialog box (see Figure 2−1).  
2) Select the device. An error message appears on the screen if the device  
selected is different or not connected.  
3) Set the required supply voltage, communication port COMx, and baud  
rate. The device configuration and memory type are selected  
automatically according to the selected device.  
4) Use the program button to start the programming operation (see Note 1  
at the end of Table 2−1).  
Table 2−1 describes the function of the buttons for different options and  
combinations for the MSP430 programmer dialog box.  
Table 2−1.MSP430 Function Buttons and Descriptions  
Button Name  
File Name  
Sub-Functions  
Description  
Selects the name of the file to program (Intel-hex or TI-TXT format)  
Selects the MSP430 device type to program via pulldown menu  
Selects the supply voltage for the MSP430  
Device Select  
Supply Voltage  
V
CC  
switch off  
If selected (default), the supply voltage is switched off after each MSP430  
access; otherwise, the supply voltage remains connected.  
An object code is programmed to the on-chip memory using the select  
options.  
With Erase Flash  
Memory is erased before programming (only with flash devices).  
The following options are possible:  
− Main and information memory  
− Main memory only  
With Erase Check  
With Verify  
Erase check is performed before programming operation is executed.  
Program  
Each section is verified after it is programmed, or an error message is  
displayed if verification fails.  
With Blow Fuse  
The code-protection fuse is blown after the entire object code, with verify, is  
programmed. This action is irreversible and disables future on-chip memory  
access (reading or programming). This step is not performed if verify is  
disabled or verify fails. A warning is displayed.  
Erase operation can be done only with flash devices, according to the  
selected option.  
By file  
Only the memory locations corresponding to the selected object file are  
erased. All other memory locations keep their old data (smart erase).  
Erase Flash  
By device  
By range  
The entire flash memory of the device is erased.  
An erase is performed depending on the values entered in the range fields.  
Checks if memory locations are erased.  
By file  
Checks only the memory locations used by the selected object file.  
By device  
Checks the entire programmable memory of the device. (No RAM is  
checked.)  
Erase Check  
By range  
An erase check is performed according to the range of memory locations in  
the range for Erase Check/Readout field.  
2-4  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Programming MSP430 Devices With the GUI  
Table 2−1.MSP430 Function Buttons and Descriptions (Continued)  
Button Name  
Sub-Functions  
Description  
Verify the data in the MSP430 device according to the selected option.  
By file  
A verification of the memory locations vs the selected object file is  
performed. (By file and by device are the same functions.)  
By device  
By range  
Verify  
Verify memory locations defined in the range field vs the data in the  
selected file. The defined range should not contain memory locations  
outside the data stored in the selected file, otherwise an error is reported.  
The on-chip security fuse is irreversibly disabled and any access, such  
as reading or programming of the MSP430, is impossible via JTAG.  
Access via bootstrap loader interface is possible for devices that support  
that interface.  
Blow Fuse  
Read Out  
Read out data from MSP430 device. When this function is executed, a  
dialog box appears; the file name for the data to store should be selected.  
By device  
By range  
Read out the entire memory of the device and store the data into the file  
selected in the file name field.  
Read out the memory locations selected by the range field and store the  
data in the file selected in the file name field.  
The reset of a MSP430 can be performed in two ways. After reset, the  
MSP430 may remain under JTAG control or can be released to operate  
normally and execute the program.  
Reset  
PUC  
A software reset of the chip is generated.  
RST/NMI  
Generates a hardware reset by applying a low pulse on RST/NMI pin.  
JTAG is released after the execution of the reset (via JTAG or RST/NMI).  
Selects the COM port to which the programming adapter is connected  
With JTAG-release  
COM Port  
Baud Rate  
Selects the baud rate for communication with the programming adapter  
hardware  
Help is available for programming MSP430 devices, command buttons,  
selectors, and the object file format used.  
Help  
The Help menu can be found in the system menu of the serial  
programming adapter software (right click on the symbol at the upper-left  
corner of the program window) or with the F1 function key.  
Note 1: 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.  
If it should be saved, the following erase options must not be used as the Info  
memory will be entirely erased:  
− Program with Erase Flash (flash-erase options: Main and Info Memory)  
or  
− Erase Flash by Device  
Instead, Erase Flash by File or by Range should be used.  
Operation  
2-5  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Programming MSP430 Devices With the GUI  
2.2.3 Error Messages  
One of the following messages may show up if JTAG communication is not  
established correctly:  
If the MSP430 device to program can not be found, the message shown in  
Figure 2−2 appears. This problem can be caused by the PRGS430 not  
being connected to the hardware, the device not inserted or incorrectly  
inserted into the socket, or the device not powered.  
The problem could be that the PRGS430 is not connected to the hardware,  
the device is not inserted or is incorrectly inserted into the socket, or the  
device is not powered.  
Figure 2−2. Communication Error Box  
If the fuse is already blown, the error message shown in Figure 2−3 appears.  
Figure 2−3. Communication Error Box for Blown Fuse  
Additional message boxes appear for general error messages, such as erase  
check (see Figure 2−4).  
Figure 2−4. Erase Check Error Message  
When a read error is detected in the input file, such as a format error, the  
following message is displayed (see Figure 2−5).  
2-6  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Programming MSP430 Devices With the GUI  
Figure 2−5. Data Error  
Operation  
2-7  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Programming MSP430 Devices With the GUI  
Table 2−2.Error Messages  
Error Type  
Communication  
Communication  
Communication  
Communication  
Communication  
MSP430  
MSP430  
MSP430  
MSP430  
MSP430  
MSP430  
MSP430  
MSP430  
Setting  
Error Message  
Communication failed!  
Adapter not connected!  
Synchronization with adapter failed!  
The present adapter is not an MSP-PRGS430!  
Missing setting of V  
!
CC  
Target not connected!  
Wrong JTAG version!  
PUC failed!  
Wrong target!  
Target fuse is blown!  
Blown fuse failed!  
Supply voltage to low!  
Fuse not released for this device!  
Unknown target!  
Setting  
No target selected!  
Setting  
Wrong V  
selected!  
CC  
Setting  
Wrong baud rate!  
Setting  
Communication port error!  
The selected range is invalid!  
Wrong argument!  
Setting  
Setting  
Setting  
Error at target address (during erase check or verify)  
Unknown command line option  
Command line option out of valid range  
DEVICE.CFG corrupted  
General error!  
Setting  
Setting  
System  
System  
System  
File type could not be detected!  
Unexpected end of file!  
System  
System  
PROJECT.INI corrupted!  
Filename mismatch  
System  
System  
Error in DEVICE.CFG  
Windows  
Error during file I/O  
2-8  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Content of PRGS430.ini File  
2.2.4 Content of PRGS430.ini File  
The last settings of the PRGS430 graphical user interface (GUI) are stored in  
the .ini file before exiting the program. This information is stored under the  
Program Device System section.  
Additionally, the following parameters are in the [Options] section and may be  
modified:  
[Options]  
\BlowFuse = 1 The blow fuse button in the GUI is disabled to prevent  
accidental blow of the irreversible fuse.  
LastResult = 0 If the program is called with command-line parameter, the  
error code which is returned to the system when exiting the program is also  
stored here.  
2.2.5 Use of a [Project].ini File  
Some default options could be changed within a [Project].ini file. This file has  
to be in the same directory as the object code file. The following variables could  
be defined or redefined there.  
The name of the file should have the same name as the object file with the  
extension .ini.  
[ProgramDevice]  
UserMemProtect = Start, Size  
UserMemProtect2 = Start, Size  
UserMemProtect3 = Start, Size  
UserMemProtectn = Start, Size  
DisableTIMemProtect = 0  
Memory ranges defined in the UserMemProtect and UserMemProtect [n]  
option are read out and reprogrammed after erase (flash device only). [n] could  
be a number 2 and be in ascending order.  
If a memory protection is activated in the device definition file from Texas  
Instruments, it could be switched off with the DisableTIMemProtect = 1 option.  
Operation  
2-9  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Command Line Options  
2.3 Command Line Options  
2.3.1 General Definitions  
0: Off  
1: On  
1: First selectable option  
2: Second selectable option  
3: Third selectable option  
The PRGS430.ini file options are used if they are not specified in the command  
line. The command line option overwrites the .ini file options.  
The program exits automatically if a command is passed via the command line  
and the command was executed. There is only a small status window opened  
during the execution.  
Only one command identifier (/cmd:) is allowed within the command line.  
Otherwise, the execution is canceled and an error is returned.  
If an error in the command line parameter is detected, the program exits with  
an error message.  
The filename may also contain a path. If special characters are used, the string  
has to be inside quotes (for example, \\server\adt430\PRG files\test.txt).  
If an error is detected within the filename, the operation is canceled and an  
error is returned.  
Table 2−3.Command Line Options  
Commands:  
/cmd:PRG  
/cmd:VFY  
/cmd:ERS  
/cmd:CHK  
/cmd:READ  
/cmd:RST  
/cmd:BLOW  
Options:  
/COM:x  
Program command  
Verify command  
Erase command  
Erase check command  
Read out command  
Reset command  
Blow fuse command  
Specifies the serial port: /COM:1, /COM:2, /COM:3, or /COM:4  
/BR:xxxxxx  
/Dev:  
Sets baud rate to be used: 9600/19200/38400/57600/115200, e.g., /BR:57600  
Selects the device according to the name in the device.cfg file, e.g., /Dev:MSP430F1121  
/SVolt:x.x  
Selects supply voltage MSP_VCC of the programming adapter. The voltage is supplied  
between GND and MSP VCC, e.g., /Svolt: 3.0.  
/SVoff:{0,1}  
Switches off supply voltage MSP_VCC after execution  
0:  
1:  
Disable (do not switch off)  
Enable (switch off)  
filename  
Specifies name of the object file to be programmed or verified  
(Second way to define the filename − space separated)  
/FILE filename  
2-10  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Command Line Options  
Table 2−3.Command Line Options (Continued)  
Options for Program Command:  
/PE:{0,1,2}  
Option program with erase (flash only)  
0:  
1:  
2:  
Without erase  
Main and Info memory  
Main memory only  
/PC:{0,1}  
/PV:{0,1}  
/PB:{0,1}  
Option program with erase check  
0:  
1:  
Disable  
Enable  
Option program with verify  
0:  
1:  
Disable  
Enable  
Option program with blow fuse (only valid with verify successful)  
0:  
1:  
Disable  
Enable  
Options for Erase/Erase Check and Verify Command  
/E:{1,2,..}  
Option erase/erasecheck/verify by file/device/range  
1:  
2:  
3:  
File  
Device  
Range  
/ERange:0xXXX,  
0xYYYY  
Option erase/erasecheck/verify range (start: 0xXXXX, length: 0xYYYY)  
Options for Read Out Command:  
/RO:{1,2} Option read out by device/range  
1:  
2:  
Device  
Range  
/RRange:0xXXXX, Option read out range (start: 0xXXXX, length: 0xYYYY)  
0xYYYY  
/Rfile:file-  
Specifies read out file name  
name,{1,2}  
1:  
2:  
TI-TXT  
Intel-hex  
(Default directory should be the last object file directory)  
Log Options:  
/Log:filename  
Specifies Log file name  
(Default directory should be the PRGS430.exe directory)  
/ALog:{0,1}  
Option accumulative Log file  
0:  
1:  
Disable  
Enable  
Example:  
PRGS430.exe ”C:\adt430\test\test.txt” /Dev:MSP430F1121  
/cmd:PRG /PE:1 /PC:0 /PV:1 /COM:2  
This command programs the file test.txt, located in the directory C:adt430\test,  
into a MSP430F149 device. The device is erased before programming. The  
erase check is disabled. The code is verified after programming. The  
programming adapter is connected to ComPort 2. The baud rate is not passed  
with the command line, so the setting in the PRGS430.ini file is used.  
Operation  
2-11  
Download from Www.Somanuals.com. All Manuals Search And Download.  
2.3.2 Return Values/Error Codes in .ini File  
The error code is returned to the PC operating system and also is stored in  
PRGS430.ini.  
File in the [Options] section:  
LastResult=0  
0
2
Ok  
Communication failed!  
Target not connected!  
Adapter not connected!  
Wrong JTAG version!  
PUC failed!  
3
4
5
6
7
Synchronization with adapter failed!  
The present adapter is not an MSP−PRGS430!  
Unknown target!  
8
9
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
101  
102  
103  
104  
105  
Wrong target!  
No target selected!  
Target fuse is blown!  
Blow fuse failed!  
Missing setting of V  
!
CC  
Wrong V  
selected!  
CC  
Wrong baudrate!  
Communication port error!  
DEVICE.CFG corrupted!  
General error!  
The selected range is invalid!  
Wrong argument!  
Error during file I/O  
File type could not be detected!  
Unexpected end of file!  
PROJECT.INI corrupted!  
Vcc voltage too low for selected function!  
Fuse not release for this device!  
Error at target address (during erase check or verify)  
Unknown command line option  
Command line option out of valid range  
Filename mismatch  
Error in device.cfg  
2-12  
Download from Www.Somanuals.com. All Manuals Search And Download.  
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  
SetV  
CC  
. 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  
is set to  
CC  
0.0 V (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.  
V
is set to 0 and all outputs are set to the Hi-Z state.  
CC  
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  
Download from Www.Somanuals.com. All Manuals Search And Download.  
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 V  
.
CC  
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  
Download from Www.Somanuals.com. All Manuals Search And Download.  
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  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PRGS430.DLL—Description  
/FN0009/ EraseCheckFile  
long int EraseCheckFile(char* lpszFileName, long int iFileType)  
This function checks if all memory addresses, which are in the file, are erased.  
lpszFilName: Name of the 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  
Function returns success or first address with mismatching data.  
Example:  
lFuncReturn = EraseCheckFile(”test.txt”, long:0)  
/FN00010/ PatternCheck  
long int PatternCheck(long int wStart, long int wLength, long int wPattern)  
Checks a memory range with word pattern passed  
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)  
wPattern: Word pattern for check  
Function returns success or first address with mismatching data.  
Example: lFuncReturn = PatternCheck(long:0xF000,  
long:0x1000, long:0xFFFF)  
/FN00011/ VerifyData  
long int VerifyData(long int wStart, long int wLength, void* lpData)  
This function verifies the content of the device with the data stored at passed  
pointer to data.  
wStart: Start address of memory area. Allowed values : 0x0000−0xFFFE (see  
memory map of the corresponding device)  
wLength: Length of the memory area to be checked. Allowed values :  
0x0000−0xFFFE (see memory map of the corresponding device)  
lpData: Pointer to buffer with data bytes in it  
Function returns success or first address with mismatching data.  
Example:  
lFuncReturn = VerifyData(long:0xF000, long:0x1000, void* lpData)  
2-16  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PRGS430.DLL—Description  
/FN00012/ VerifyFile  
long int VerifyFile(char* lpszFileName, long int iFileType)  
This function checks if the memory contents of the target device are equal to  
the file contents.  
lpszFileName: Name of the 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  
Function returns success or first address with mismatching data.  
Example: lFuncReturn = VerifyFile(”test.txt”, long:0)  
/FN00013/ VerifyFileRange  
long int VerifyFileRange(char* lpszFileName, long int iFileType, long int  
wStart, long int wLength)  
This function evaluates if the memory contents of the target device are equal  
to the file contents in a passed range.  
lpszFileName: Name of the 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  
wStart: Start address of memory area. Allowed values : 0x0000−0xFFFE (see  
memory map of the corresponding device)  
wLength: Length of the memory area to be checked. Allowed values :  
0x0000−0xFFFE (see memory map of the corresponding device)  
Function returns success or first address with mismatching data.  
Example: lFuncReturn = VerifyFileRange(”test.txt”,  
long:0,long:0xF000, long:0x1000)  
/FN0014/ ProgramData  
long int ProgramData(long int wStart, long int wLength, void* lpData  
This function writes data into an MSP430 device. 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.  
Operation  
2-17  
Download from Www.Somanuals.com. All Manuals Search And Download.  
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  
PGM_ERASE_INFO  
PGM_WITH_ERASECHECK  
PGM_WITH_Verify  
(0x02) // Erases the main memory before  
programming  
(0x04) // Erases the info memory before  
programming  
(0x08) // Erase check by device and the  
programs the device  
(0x10) // Read out device, merge with file to  
be programmed, and write back to device  
2-18  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PRGS430.DLL—Description  
Note: Use PGM_ERASE_INFO only together with the PGM_WITH_ERASE  
flag.  
lpszProjectIni  
Name of the {project}.ini file, if protection settings from this file are used. If no  
protection is required, replace lpszProjectIni with NULL.  
The added features do not need to be used—for ProgramFile according to  
older specification, just call ProgramFile(FileName, FileType, 0, NULL); if no  
{project}.ini file or erase check is used, just call:  
Example: lFuncReturn = ProgramFile(FileName, 0, 0, NULL);  
// with  
autodetect file type  
Note: If an erase or erase-check function reports an error, the function  
ProgramFile() is aborted before programming is started.  
/FN0016/ BlowFuse  
long int BlowFuse(void)  
This function blows the security fuse of the target device.  
Example: lFuncReturn = BlowFuse(void)  
/FN0017/ SetVcc  
long int SetVcc(long int iVoltage)  
This function sets the VCC_MSP voltage of the programming adapter to the  
given value.  
iVoltage: V  
in mV. (3000 −> 3 V)  
CC  
The correct MSP430 device should be selected before using this function.  
The voltage range is limited to the voltage range allowed for the selected  
MSP430 device.  
Example: lFuncReturn = SetVcc(Long:3000)  
/FN0018/ ReadOutData  
long int ReadOutData(long int wStart, long int wLength, void* lpBuffer)  
Reads out data from the device and writes it to the buffer passed  
wStart: Start address of the area to be read out. Allowed values :  
0x0000−0xFFFE (see memory map for the corresponding device)  
wLength: Length of the area. Allowed values : 0x0000−0xFFFE (see memory  
map for the corresponding device)  
lpBuffer: Pointer points to a buffer that receives the data. The buffer must be  
large enough to hold the entire data; otherwise, a fatal error of the operating  
system may occur.  
Operation  
2-19  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PRGS430.DLL—Description  
Example: lFuncReturn = ReadOutData(long:0xF000,  
long:0x1000, void* lpBuffer)  
/FN0019/ ReadOutFile  
long int ReadOutFile(long int wStart, long int wLength, char* lpszFileName,  
long int iFileType)  
Reads out data from the device and writes it to a file  
wStart: Start address of the area to be read out. Allowed values :  
0x0000−0xFFFE (see memory map of the corresponding device)  
wLength: Length of the area. Allowed values : 0x0000−0xFFFE (see memory  
map of the corresponding device)  
lpszFileName: Name of the file to receive data. If the file does not exist, it is  
created; If the file already exists, it is overwritten.  
iFileType:  
FILETYPE_TI_TXT  
(0x01)  
− file type is TI-TXT  
− file type is Intel-hex  
FILETYPE_INTEL_HEX (0x02)  
Example: lFuncReturn = ReadOutFile(long:0xF000,  
long:0x1000, ”test.out”, long:1)  
/FN0020/ Reset  
long int Reset(long int Flags)  
This function provides the reset functionality for the target.  
Flags: Flags is a bitmap and determines the type of reset.  
PUC  
0x01  
0x02  
0x04  
RST_NMI  
WITH_RELEASE  
Reset | PUC means that the JTAG sends the command to the MSP430.  
Reset | RST_NMI performs a reset via the RST/NMI pin of the MSP430. The  
JTAG is also reset.  
If the WITH_RELEASE option is selected, the device is released from the  
JTAG access after the reset.  
Example: lFuncReturn = Reset(long:5)  
2-20  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PRGS430.DLL—Description  
/FN0022/ SetNotificationWnd  
LONG SetNotificationWnd(LONG hWnd, LONG IMessageID)  
SetNotificationWnd() enables the status notification of a window. hWnd  
passes a window handle and IMessageID passes a message identifier. Each  
time a notification of the status window is necessary, the DLL sends a  
IMessageID message to the hWnd window. The execution status of an  
operation is passed in the WParam of this message. Completion status of the  
current operation is passed (0..100) in the LParam.  
The following status codes are defined:  
Status  
WParam  
Current Operation  
Connecting to SPA430  
Connecting to target  
Releasing target  
STATUS_CONNECTSPA  
STATUS_CONNECTTARGET  
STATUS_RELEASETARGET  
STATUS_RELEASESPA  
STATUS_RESETTARGET  
STATUS_ERASE  
1
3
5
7
Releasing SPA430  
Resetting target  
9
11  
13  
15  
17  
19  
21  
23  
Erasing target  
STATUS_ERASECHECK  
STATUS_PATTERNCHECK  
STATUS_VERIFY  
Erase checking target  
Pattern checking target  
Verifying target  
STATUS_PROGRAM  
Programming target  
Reading target out  
Blowing fuse  
STATUS_READOUT  
STATUS_BLOWFUSE  
/FN0023/ GetDeviceCfgInfo  
long int GetDeviceCfgInfo(long int InfoCmd, long int InfoIdx, void* lpBuf)  
InfoType:  
DEVICE_COUNT  
(0x01)  
GetDeviceCfgInfo returns number of devices in Device.cfg; InfoIdx and lpBuf  
are ignored.  
SELECT_DEVICE  
(0x02)  
Selects the given device for further commands (device number in InfoIndex,  
first device is number 0; lpBuf is ignored).  
DEVICE_NAME  
(0x03)  
Fills the name of the selected device into lpBuf; InfoIdx is ignored.  
DEVICE_ID  
(0x04)  
Fills the DeviceID into lpBuf, InfoIdx is ignored.  
DEVICE_DEFAULTOPTIONS (0x05)  
Fills the default options into lpBuf, InfoIdx is ignored.  
DEVICE_MEMDEF_COUNT (0x06)  
GetDeviceCfgInfo() returns the number of memory definitions for selected  
device; lpBuf and InfoIdx are ignored.  
Operation  
2-21  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PRGS430.DLL—Description  
DEVICE_MEMDEF  
(0x07)  
Fills the definition of a memory definition (index passed by InfoIdx) into lpBuf.  
DEVICE_MEMPROTECT_COUNT(0x08)  
GetDeviceCfgInfo() returns the number of memory-protection definitions for  
the selected device; lpBuf and InfoIdx are ignored.  
DEVICE_MEMPROTECT  
(0x09)  
Fills the definition of a memory protection definition (index passed by InfoIdx)  
into lpBuf.  
DEVICE_VCC  
(0x0A)  
GetDeviceCfgInfo() returns the Vcc setting for selected device in mV; lpBuf  
and InfoIdx are ignored.  
DEVICE_VPP  
(0x0B)  
GetDeviceCfgInfo() returns the Vpp setting for selected device in mV; lpBuf  
and InfoIdx are ignored.  
DEVICE_VFUSE  
(0x0C)  
GetDeviceCfgInfo() returns the blow-fuse setting for the selected device; lpBuf  
and InfoIdx are ignored.  
/FN0024/ AccessSFR  
long int AccessSFR(LONG wAddr, void *IpData, LONG iFlags);  
This function writes or reads data into the special function registers of the  
MSP430 device. (implemented in PRGS320.dll versions 1.05 and higher).  
wAddr: SFR address that should be accessed. Allowed values:  
0x0000−0x1FE (see the memory map of the corresponding device)  
IpData: Pointer to the data to be written, or buffer which should receive the read  
data  
Flags: The bits in Flags control the operation of AccessSFR()  
iFlags:  
SFR_READ  
SFR_Write  
(0x00)  
(0x01)  
Example: IFuncReturn = AccessSFR(long:0x0020, &IpData, 0)  
2-22  
Download from Www.Somanuals.com. All Manuals Search And Download.  
PRGS430.DLL—Description  
2.4.1 Return Values/Error Codes From PRGS430.DLL  
Status  
Return Value Comment  
OK  
0
SUCCESS  
−1  
−2  
Operation OK  
ERR_COMMUNICATION  
ERR_TARGET_NOT_CONNECTED  
ERR_SPA430_NOT_CONNECTED  
ERR_WRONG_JTAG_VERSION  
ERR_PUC_FAILED  
Communication error (SSP)  
No target connected  
−3  
−4  
No SPA430 connected  
−5  
JTAG version above 3  
−6  
PUC did not succeed  
ERR_SPA430_SYNC_FAILED  
ERR_NO_SPA430  
−7  
Could not sync SPA430  
−8  
Adapter is not SPA430  
ERR_UNKNOWN_TARGET  
ERR_WRONG_TARGET  
ERR_NO_TARGET_SELECTED  
ERR_TARGET_FUSE_BLOWN  
ERR_BLOW_FUSE_FAILED  
ERR_VCC_NOT_SET  
ERR_WRONG_VCC  
−9  
Target type unknown  
−10  
11  
−12  
−13  
−14  
−15  
−16  
−17  
−18  
−19  
−20  
−21  
−22  
−23  
−24  
−25  
−26  
−27  
1
Target type does not match  
No target selected (missing SetDeviceType() call)  
No target access because of blown fuse  
Blown-fuse command failed  
No V selected (missing SetVolt() call)  
CC  
V
CC  
out of allowed range  
ERR_WRONG_BAUDRATE  
ERR_COMPORT  
Invalid baud rate  
Error accessing the communications port  
Device.cfg corrupted  
ERR_DEVICE_CFG  
ERR_GENERAL  
General error (should not occur!)  
Wrong range specified  
ERR_RANGE  
ERR_ARGUMENT  
Wrong argument  
ERR_FILE_IO  
Error during file I/O  
ERR_FILE_DETECT  
File type could not be detected  
Unexpected end of file  
Error reading {project}.ini  
ERR_FILE_END  
ERR_PROJECT_INI  
ERR_VCC_BELOW_VCCMINPROG  
ERR_FUSE_NOT_RELEASED  
STATUS_CONNECTSPA  
STATUS_CONNECTTARGET  
STATUS_RELEASETARGET  
STATUS_RELEASESPA  
STATUS_RESETTARGET  
STATUS_ERASE  
V
to low for selected function  
CC  
Fuse not release for this device  
Connecting to SPA430  
Connecting to target  
Releasing target  
3
5
7
Releasing SPA430  
Resetting target  
9
11  
Erasing target  
STATUS_ERASECHECK  
STATUS_PATTERNCHECK  
STATUS_VERIFY  
13  
Erase checking target  
Pattern checking target  
Verifying target  
15  
17  
STATUS_PROGRAM  
STATUS_READOUT  
STATUS_BLOWFUSE  
ERR_READOUT_LOCKED  
19  
Programming target  
Reading out target  
Blowing fuse  
21  
23  
−28  
Read out prohibited  
Operation  
2-23  
Download from Www.Somanuals.com. All Manuals Search And Download.  
2-24  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Chapter 3  
Hardware  
This chapter describes the hardware for the MSP430 family of  
microcontrollers, including specifications, components of the programming  
adapters, and connection of the programming adapter to the MSP430 device  
families.  
Topic  
Page  
3.1 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2  
3.2 Basic Hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2  
3.3 Programming Adapter Target Connector Signals . . . . . . . . . . . . . . . . 3-3  
3.4 MSP-PRGS430 Circuit Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5  
3.5 Location of Components − MSP-PRGS430 . . . . . . . . . . . . . . . . . . . . . . 3-5  
3.6 Interconnection of MSP-PRGS430 to OTP/EPROM-Based  
MSP430 Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6  
3.7 Interconnection of MSP-PRGS430 to Flash-Based  
MSP430 Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7  
3-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Specifications  
3.1 Specifications  
The specifications for the MSP430 hardware are shown in Table 3−1.  
Table 3−1.MSP430 Hardware Specifications  
Temperature range  
Humidity  
10°C–45°C  
40%–70%  
Power supply  
Dimensions  
14 V–20 V, 200 mA minimum  
150 mm (W) × 30 mm (H) × 95 mm (D)  
3.2 Basic Hints  
These basic hints are useful for programming MSP430 devices or MSP430  
devices on printed-wire boards (PWB).  
- All V  
pins of an MSP430 device are tied together and connected to the  
most positive terminal of the supply.  
CC  
- All V pins of an MSP430 device are tied together and connected to the  
SS  
most negative terminal of the supply.  
- The interface should supply the MSP430 with proper conditions according  
to the device data sheet, in terms of current, voltage levels, and timing  
conditions.  
- Make sure the proper signal connections (see Section 3.3) are made.  
- Short cables to interconnect the interface to the MSP430 device or PWB;  
less than 20 cm is recommended.  
- Ensure low-impedance interconnections − especially for the path of the  
programming and fuse blow voltage.  
- When a device with a transparent window (MSP430E3xx family) is  
programmed, the window should be already covered with an opaque label  
while the device is programmed. Since ambient light contains the correct  
wavelength for erasure, keep the transparent window covered after the  
device is programmed.  
3-2  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Programming Adapter Target Connector Signals  
3.3 Programming Adapter Target Connector Signals  
The target connector signals for the programming adapter ensure  
communication between the programming adapter and MSP430 devices and  
supply low energy to systems without extra supply sources.  
Figure 3−1 and Figure 3−2 show the target connector signals for the  
programming adapter.  
Figure 3−1. 25-Pin Sub-D at Programming Adapter  
25-Pin Sub-D at the  
Programming Adapter  
1
TDO/TDI  
14  
15  
16  
17  
18  
VCC_MSP  
2
TDI/Vpp  
TMS  
3
4
XOUT / TCLK  
TCK  
Test/V  
PP  
5
6
GND  
(ACLK)  
RST/NMI  
19  
20  
21  
22  
23  
(ACLKEN)  
(TCLKEN)  
7
8
9
10  
11  
12  
24  
25  
(SIG20)  
(SMCLK)  
13  
(SENSE)  
(SMCLKEN)  
Figure 3−2. 14-Pin Connector at End of Interconnect Cable  
14-Pin Connector/Female at End  
of Interconnect Cable  
2
1
VCC_MSP  
TDO/TDI  
TDI/Vpp  
TMS  
NC  
XOUT  
TCK  
Test/V  
PP  
GND  
(ACLK)  
(ACLKEN)  
(TCLKEN)  
RST/NMI  
NC  
14 13  
Table 3−2 lists the target connector signals and describes their requirement  
statuses and functions.  
Hardware  
3-3  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Programming Adapter Target Connector Signals  
Table 3−2.Target Connector Signal Functions  
Signal/Terminal Name  
Required  
Function/Comment  
TMS  
Mandatory  
Test mode select functions according to IEEE1149.1  
TCK  
Mandatory  
Mandatory  
Test clock functions according to IEEE1149.1  
TDI/VPP  
Test data input functions according to IEEE1149.1, but  
with additional programming voltage for 3xx devices.  
TDO/TDI  
Mandatory  
Test data output functions according to IEEE1149.1, but  
additional data input is used when programming voltage  
is applied by TDI/VPP.  
GND  
Mandatory  
GND is the most-negative terminal.  
VCC_MSP  
Mandatory (if internal  
Voltage source is used with MSP430 devices or PWBs.  
supply voltage is used) The voltage level is set by software.  
XOUT  
Mandatory  
Optional  
Signal supplies the MSP430 system with clock signals.  
RST/NMI  
Test/VPP  
If not connected, RST/NMI must be held high.  
Mandatory  
Signal used to select pin or JTAG function or to apply VPP  
(depending on device)  
The output signal levels of the programming adapter are near GND or  
VCC_MSP.  
- The RST/NMI terminal of the device must be high; otherwise, the access  
to the device via JTAG system may fail.  
- The programming procedure (handling of the SW) is described in  
Chapters 1 and 2 of this manual.  
- The connections from the MSP430 terminals must follow EMI rules, such  
as short lines and ground planes. If TMS line receives one negative pulse  
by EMI strike, the fuse current is activated (with fuse version 1.0). The fuse  
current flows from TDI(/VPP) pin to GND (or VSS).  
Table 3−3.Programming Adapter Signal Levels  
Signal/Pin  
Signal/Pin Levels  
TMS  
VSS or VCC_MSP  
TCK  
VSS or VCC_MSP  
TDI/VPP  
TDO/TDI  
XOUT  
VSS or VCC_MSP or VPP  
VSS or VCC_MSP  
VSS or VCC_MSP  
RST/NMI  
Test/VPP  
VSS or VCC_MSP  
VSS or VCC_MSP or VPP  
3-4  
Download from Www.Somanuals.com. All Manuals Search And Download.  
MSP-PRGS430 Circuit Diagrams  
3.4 MSP-PRGS430 Circuit Diagrams  
The MSP-PRGS430 circuit diagrams are found in Appendix B.  
3.5 Location of Components − MSP-PRGS430  
Figure 3−3. MSP-PRGS430 Components  
MSP430P337  
Note: Do not use J2 pin 9 as RST/NMI pullup.  
Hardware  
3-5  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Interconnection of MSP-PRGS430 to OTP/EPROM-Based  
3.6 Interconnection of MSP-PRGS430 to OTP/EPROM-Based  
MSP430 Devices  
The circuit diagram in Figure 3−4 shows the connections required to program  
OTP (MSP430Pxxx) and EPROM (MSP430Exxx) based MSP430 devices  
with the MSP-PRGS430 programming adapter. Consult the device data sheet  
for the specific device location of the supply and JTAG pins. Ensure that all  
positive and negative supply pins are connected together.  
Figure 3−4. MSP−PRGS430 Used to Program OTP/EPROM-Based MSP430 Devices  
V
CC  
V
/AV /DV  
CC CC  
CC  
10 µF  
0.1 µF  
47 kΩ  
MSP430Pxxx  
MSP430Exxx  
JTAG  
RST/NMI  
TDO/TDI  
TDI/VPP  
TMS  
VCC_MSP  
TDO/TDI  
TDI/VPP  
TMS  
2
4
6
8
1
3
XOUT  
5
TEST/VPP  
TCK  
7
TCK  
GND  
10  
12  
14  
9
RST  
11  
13  
68 kΩ  
68 kΩ  
TEST/VPP  
XOUT  
V
/AV /DV  
SS SS  
SS  
The RST/NMI terminal on the MSP430 device has to be held high by an  
external resistor during access of the device through JTAG. In a noisy  
environment, consider using an additional capacitor from RST/NMI to VSS.  
Note:  
The example schematic shows a system where the target voltage is supplied  
by the MSP−PRGS430. For in-system programming with an external supply  
voltage, do not connect pin 2 of the JTAG connector. In this case, the supply  
voltage setting in the PRGS430 must be adjusted to the external supply  
voltage level. The TEST/VPP connection is only required on lower pin-count  
devices with multiplexed JTAG pins.  
3-6  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Interconnection of MSP−PRGS430 to Flash-Based MSP430 Devices  
3.7 Interconnection of MSP−PRGS430 to Flash-Based MSP430 Devices  
The circuit diagram in Figure 3−5 shows the connections required to program  
flash-based MSP430 devices (MSP430Fxxx) with the MSP−PRGS430  
programming adapter. Consult the device data sheet for the specific device  
location of the power supply and JTAG pins. Ensure that all positive and  
negative power supply pins are connected together.  
The signal TEST/VPP is only required on lower pin-count devices with  
multiplexed JTAG pins. In this case, special attention must be given to the  
circuit design around the four JTAG pins (TDO/TDI, TDI, TMS, and TCK), since  
they are shared between the applications hardware and the JTAG interface  
used by programming adapter.  
Figure 3−5. MSP−PRGS430 Used to Program Flash-Based MSP430 Devices  
V
CC  
V
/AV /DV  
CC CC  
CC  
10 µF  
0.1 µF  
47 kΩ  
MSP430Fxxx  
JTAG  
RST/NMI  
TDO/TDI  
TDI/VPP  
TMS  
VCC_MSP  
TEST/VPP  
TDO/TDI  
TDI/VPP  
TMS  
2
4
6
8
1
3
5
TCK  
7
TCK  
GND  
10  
12  
14  
9
RST  
11  
13  
TEST/VPP  
V
/AV /DV  
SS SS  
SS  
Note:  
The example schematic shows a system where the target voltage is supplied  
by the MSP-PRGS430. For in-system programming with an external supply  
voltage, do not connect pin 2 of the JTAG connector. In this case, the  
PRGS430 supply voltage setting must be adjusted to the external supply  
voltage level. The TEST/VPP connection is only required on lower pin-count  
devices with multiplexed JTAG pins.  
Hardware  
3-7  
Download from Www.Somanuals.com. All Manuals Search And Download.  
3-8  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix A  
Hex Object Format  
This appendix discusses the hex object format.  
Topic  
Page  
A.1 Intel-Hex Object Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2  
A.2 TI-TXT File Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3  
A-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Intel-Hex Object Format  
A.1 Intel-Hex Object Format  
The Intel-hex object format supports 16-bit addresses and consists of a  
nine-character (four field) prefix that defines the start of record, byte count,  
load address, record type, and a two character sumcheck suffix.  
The two record types, which are represented in the nine-character prefix, are  
described below:  
00 = Data record (begins with the colon start character)  
01 = End-of-file record  
Record type 00, the data record, begins with the colon (:) start character and  
is followed by the byte count, the address of the first data byte, the record type  
(00), and the sumcheck. The sumcheck is the 2s complement (in binary) of the  
preceding bytes in the record, including the byte count, address, and data  
bytes.  
Record type 01, the end-of-file record, also begins with the colon (:) start  
character. The colon is followed by the byte count, address, record type (01),  
and sumcheck.  
Figure A−1.Intel-Hex Object Format  
Address  
Start  
Character  
:10000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00  
:10001000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0  
:10002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0  
:10003000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD0  
:10004000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0  
Data  
Records  
:10000001FF  
Byte  
Count  
Sumcheck  
Record  
Type  
A-2  
Download from Www.Somanuals.com. All Manuals Search And Download.  
TI-TXT File Format  
A.2 TI-TXT File Format  
The TI-TXT file format used by the tool is shown as follows:  
@ADDR1  
DATA01 DATA02 ........ DATA16  
DATA17 DATA32 ........ DATA32  
........  
DATAm ........DATAn  
@ADDR2  
DATA01 .................... DATAn  
q
Whereas:  
@ADDR is the start address of a section (hexadecimal)  
DATAn represents a data byte (hexadecimal)  
q is the termination of the file  
For example:  
@F000  
31 40 00 03 B2 40 80 5A 20 01 D2 D3 22 00 D2 E3  
21 00 3F 40 E8 FD 1F 83 FE 23 F9 3F  
@FFFE  
00 F0  
Q
Restrictions:  
- The number of sections is unlimited.  
- The start address must be even.  
- Each line must have 16 data bytes, except the last line of a section.  
- Data bytes are separated by a single space.  
- The termination tag q indicates end-of-file is mandatory.  
Hex Object Format  
A-3  
Download from Www.Somanuals.com. All Manuals Search And Download.  
A-4  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix B  
Schematics  
This appendix contains the schematic diagrams for the serial programming  
adapter.  
B-1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
B-2  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Schematics  
B-3  
Download from Www.Somanuals.com. All Manuals Search And Download.  
B-4  
Download from Www.Somanuals.com. All Manuals Search And Download.  
IMPORTANT NOTICE  
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements,  
and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should  
obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are  
sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.  
TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard  
warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where  
mandated by government requirements, testing of all parameters of each product is not necessarily performed.  
TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and  
applications using TI components. To minimize the risks associated with customer products and applications, customers should provide  
adequate design and operating safeguards.  
TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right,  
or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information  
published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a  
warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual  
property of the third party, or a license from TI under the patents or other intellectual property of TI.  
Reproduction of TI information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied  
by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive  
business practice. TI is not responsible or liable for such altered documentation. Information of third parties may be subject to additional  
restrictions.  
Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all  
express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not  
responsible or liable for any such statements.  
TI products are not authorized for use in safety-critical applications (such as life support) where a failure of the TI product would reasonably  
be expected to cause severe personal injury or death, unless officers of the parties have executed an agreement specifically governing  
such use. Buyers represent that they have all necessary expertise in the safety and regulatory ramifications of their applications, and  
acknowledge and agree that they are solely responsible for all legal, regulatory and safety-related requirements concerning their products  
and any use of TI products in such safety-critical applications, notwithstanding any applications-related information or support that may be  
provided by TI. Further, Buyers must fully indemnify TI and its representatives against any damages arising out of the use of TI products in  
such safety-critical applications.  
TI products are neither designed nor intended for use in military/aerospace applications or environments unless the TI products are  
specifically designated by TI as military-grade or "enhanced plastic." Only products designated by TI as military-grade meet military  
specifications. Buyers acknowledge and agree that any such use of TI products which TI has not designated as military-grade is solely at  
the Buyer's risk, and that they are solely responsible for compliance with all legal and regulatory requirements in connection with such use.  
TI products are neither designed nor intended for use in automotive applications or environments unless the specific TI products are  
designated by TI as compliant with ISO/TS 16949 requirements. Buyers acknowledge and agree that, if they use any non-designated  
products in automotive applications, TI will not be responsible for any failure to meet such requirements.  
Following are URLs where you can obtain information on other Texas Instruments products and application solutions:  
Products  
Amplifiers  
Applications  
Audio  
Automotive  
Broadband  
Digital Control  
Medical  
Military  
Optical Networking  
Security  
amplifier.ti.com  
dataconverter.ti.com  
Data Converters  
DLP® Products  
DSP  
Clocks and Timers  
Interface  
dsp.ti.com  
interface.ti.com  
logic.ti.com  
power.ti.com  
microcontroller.ti.com  
Logic  
Power Mgmt  
Microcontrollers  
RFID  
Telephony  
Video & Imaging  
Wireless  
RF/IF and ZigBee® Solutions www.ti.com/lprf  
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265  
Copyright © 2009, Texas Instruments Incorporated  
Download from Www.Somanuals.com. All Manuals Search And Download.  

Teac Car Stereo System CR H227I User Manual
Toastmaster Mixer MAXHM5CAN User Manual
Toshiba Scanner EO1 19036 User Manual
Tripp Lite Power Supply 93 2024 User Manual
Ultimate Technology Mouse 600 POS User Manual
Uniden Cordless Telephone DECT1080 User Manual
Uniden Security Camera UDW 10003 User Manual
Uniflame Indoor Fireplace EF700SP User Manual
Vulcan Hart Hot Beverage Maker K20DL User Manual
Waterford Appliances Stove T25 LP User Manual