Elprotronic MSP430 User manual

The MSP430 Flash Programmer
Multi-FPA API-DLL User’s Guide
for the USB-MSP430-FPA and MSP-FET430UIF Adapters
Software version 4.5
PM010A05 Rev.22
April-05-2010
Elprotronic Inc.

Elprotronic Inc.
16 Crossroads Drive
Richmond Hill,
Ontario, L4E-5C9
CANADA
Web site: www.elprotronic.com
E-mail: [email protected]
Fax: 905-780-2414
Voice: 905-780-5789
Copyright © Elprotronic Inc. All rights reserved.
Disclaimer:
No part of this document may be reproduced without the prior written consent of Elprotronic Inc.
The information in this document is subject to change without notice and does not represent a
commitment on any part of Elprotronic Inc. While the information contained herein is assumed to
be accurate, Elprotronic Inc. assumes no responsibility for any errors or omissions.
In no event shall Elprotronic Inc, its employees or authors of this document be liable for special,
direct, indirect, or consequential damage, losses, costs, charges, claims, demands, claims for lost
profits, fees, or expenses of any nature or kind.
The software described in this document is furnished under a licence and may only be used or copied
in accordance with the terms of such a licence.
Disclaimer of warranties: You agree that Elprotronic Inc. has made no express warranties to You
regarding the software, hardware, firmware and related documentation. The software, hardware,
firmware and related documentation being provided to You “AS IS” without warranty or support
of any kind. Elprotronic Inc. disclaims all warranties with regard to the software, express or implied,
including, without limitation, any implied warranties of fitness for a particular purpose,
merchantability, merchantable quality or noninfringement of third-party rights.
Limit of liability: In no event will Elprotronic Inc. be liable to you for any loss of use, interruption
of business, or any direct, indirect, special incidental or consequential damages of any kind
(including lost profits) regardless of the form of action whether in contract, tort (including
negligence), strict product liability or otherwise, even if Elprotronic Inc. has been advised of the
possibility of such damages.
2

END USER LICENSE AGREEMENT
PLEASE READ THIS DOCUMENT CAREFULLY BEFORE USING THE SOFTWARE AND
THE ASSOCIATED HARDWARE. ELPROTRONIC INC. AND/OR ITS SUBSIDIARIES
(“ELPROTRONIC”) IS WILLING TO LICENSE THE SOFTWARE TO YOU AS AN
INDIVIDUAL, THE COMPANY, OR LEGAL ENTITY THAT WILL BE USING THE
SOFTWARE (REFERENCED BELOW AS “YOU” OR “YOUR”) ONLY ON THE CONDITION
THAT YOU AGREE TO ALL TERMS OF THIS LICENSE AGREEMENT. THIS IS A LEGAL
AND ENFORCABLE CONTRACT BETWEEN YOU AND ELPROTRONIC. BY OPENING THIS
PACKAGE, BREAKING THE SEAL, CLICKING “I AGREE” BUTTON OR OTHERWISE
INDICATING ASSENT ELECTRONICALLY, OR LOADING THE SOFTWARE YOU AGREE
TO THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO
THESE TERMS AND CONDITIONS, CLICK ON THE “I DO NOT AGREE” BUTTON OR
OTHERWISE INDICATE REFUSAL, MAKE NO FURTHER USE OF THE FULL PRODUCT
AND RETURN IT WITH THE PROOF OF PURCHASE TO THE DEALER FROM WHOM IT
WAS ACQUIRED WITHIN THIRTY (30) DAYS OF PURCHASE AND YOUR MONEY WILL
BE REFUNDED.
1. License.
The software, firmware and related documentation (collectively the “Product”) is the property of
Elprotronic or its licensors and is protected by copyright law. While Elprotronic continues to own
the Product, You will have certain rights to use the Product after Your acceptance of this license.
This license governs any releases, revisions, or enhancements to the Product that Elprotronic may
furnish to You. Your rights and obligations with respect to the use of this Product are as follows:
YOU MAY:
A. use this Product on many computers;
B. make one copy of the software for archival purposes, or copy the software onto the hard disk
of Your computer and retain the original for archival purposes;
C. use the software on a network
YOU MAY NOT:
A. sublicense, reverse engineer, decompile, disassemble, modify, translate, make any attempt
to discover the Source Code of the Product; or create derivative works from the Product;
B. redistribute, in whole or in part, any part of the software component of this Product;
3

C. use this software with a programming adapter (hardware) that is not a product of
Elprotronic Inc or Texas Instruments Inc.
2. Copyright
All rights, title, and copyrights in and to the Product and any copies of the Product are owned by
Elprotronic. The Product is protected by copyright laws and international treaty provisions.
Therefore, you must treat the Product like any other copyrighted material.
3. Limitation of liability.
In no event shall Elprotronic be liable to you for any loss of use, interruption of business, or any
direct, indirect, special, incidental or consequential damages of any kind (including lost profits)
regardless of the form of action whether in contract, tort (including negligence), strict product
liability or otherwise, even if Elprotronic has been advised of the possibility of such damages.
4. DISCLAIMER OF WARRANTIES.
You agree that Elprotronic has made no express warranties to You regarding the software, hardware,
firmware and related documentation. The software, hardware, firmware and related documentation
being provided to You “AS IS” without warranty or support of any kind. Elprotronic disclaims all
warranties with regard to the software and hardware, express or implied, including, without
limitation, any implied warranties of fitness for a particular purpose, merchantability, merchantable
quality or noninfringement of third-party rights.
4

NOTE: This equipment has been tested and found to comply with the limits for a Class B digital devices,
pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful
interference in a residential installation. This equipment generates, uses, and can radiate radio frequency energy
and, if not installed and used in accordance with the instruction manual, may cause harmful interference to
radio communications. However, there is no guarantee that interference will not occur in a particular
installation. If this equipment does cause harmful interference to radio or television reception, which can be
determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one
of more of the following measures:
* Reorient or relocate the receiving antenna
* Increase the separation between the equipment and receiver
* Connect the equipment into an outlet on a circuit different from that to which the receiver is connected
* Consult the dealer or an experienced radio/TV technician for help.
Warning: Changes or modifications not expressly approved by Elprotronic Inc. could void the user’s authority
to operate the equipment.
This device complies with Part 15 of the FCC Rules.
Operation is subject to the following two conditions:
(1) this device may not cause harmful interference and
(2) this device must accept any interference received,
including interference that may cause undesired
operation.
This Class B digital apparatus meets all requirements of the Canadian
Interference-Causing Equipment Regulations.
Cet appereil numerique de la classe B respecte toutes les exigences du
Reglement sur le material brouilleur du Canada.
5

Table of Contents
1. Introduction ............................................................. 9
1.1 Using TI’s MSP-FET430UIF adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2. Getting Started .......................................................... 17
2.1SelfTestProgram ................................................ 17
2.2MyMSP430PrgProjects............................................ 19
2.3APIDLLDemoProgram ........................................... 23
3. Example with API DLL ................................................... 29
3.1Example withsingle FPA ......................................... 29
3.2 Example with Multi-FPA API DLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4. List of the DLL instructions ................................................ 33
4.1Multi-FPAinstructions ............................................ 36
F_Trace_ON.................................................. 36
F_Trace_OFF ................................................. 36
F_OpenInstances .............................................. 37
F_CloseInstances .............................................. 37
F_OpenInstancesAndFPAs, F_OpenInstances_AndFPAs . . . . . . . . . . . . . . 38
F_Set_FPA_index ............................................. 43
F_Get_FPA_index ............................................. 44
F_Check_FPA_index........................................... 44
F_Disable_FPA_index.......................................... 45
F_Enable_FPA_index .......................................... 45
F_LastStatus.................................................. 46
F_Multi_DLLTypeVer.......................................... 46
F_Get_FPA_SN ............................................... 47
4.2Genericinstructions ............................................... 48
F_Check_FPA_access .......................................... 48
F_Initialization................................................ 49
F_API_DLL_Directory ......................................... 50
F_Close_All .................................................. 51
F_GetSetup .................................................. 52
6

F_ConfigSetup ................................................ 52
F_SetConfig .................................................. 63
F_GetConfig ................................................. 64
F_Set_MCU_Name ............................................ 64
F_Get_Device_Info ............................................ 65
F_DispSetup.................................................. 68
F_ReportMessage, F_ReportMessage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
F_GetReportMessageChar ....................................... 69
F_DLLTypeVer ............................................... 70
F_ConfigFileLoad, F_Config_FileLoad . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
F_Power_Target............................................... 72
F_Reset_Target ............................................... 73
F_Get_Targets_Vcc ............................................ 74
F_Set_fpa_io_state............................................. 74
4.3 Data Buffers access instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
F_ReadCodeFile, F_Read_CodeFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
F_Get_CodeCS ............................................... 77
F_ReadPasswFile, F_Read_PasswFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
F_Clr_Code_Buffer ............................................ 78
F_Put_Byte_to_Code_Buffer..................................... 79
F_Get_Byte_from_Code_Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
F_Put_Byte_to_Password_Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
F_Get_Byte_from_Password_Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
F_Put_Byte_to_Buffer .......................................... 82
F_Get_Byte_from_Buffer ....................................... 82
4.4Encapsulatedinstructions........................................... 84
F_AutoProgram ............................................... 84
F_VerifyFuseOrPassword ....................................... 85
F_Memory_Erase.............................................. 86
F_Memory_Blank_Check ....................................... 86
F_Memory_Write.............................................. 87
F_Memory_Verify ............................................. 87
F_Memory_Read .............................................. 88
F_Copy_All_Flash_to_Buffer .................................... 89
F_Restore_JTAG_Security_Fuse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
4.5Sequentialinstructions............................................. 91
F_Open_Target_Device ......................................... 92
F_Close_Target_Device......................................... 93
7

F_Segment_Erase.............................................. 93
F_Sectors_Blank_Check ........................................ 94
F_Write_Word ................................................ 95
F_Read_Word ................................................ 95
F_Write_Byte................................................. 96
F_Read_Byte ................................................. 97
F_Memory_Write_Data ......................................... 97
F_Memory_Read_Data ......................................... 98
F_Copy_Buffer_to_Flash........................................ 99
F_Copy_Flash_to_Buffer....................................... 100
F_Copy_Buffer_to_RAM ...................................... 101
F_Copy_RAM_to_Buffer ...................................... 101
F_Set_PC_and_RUN .......................................... 102
F_Capture_PC_Addr .......................................... 104
F_Synch_CPU_JTAG ......................................... 104
F_Blow_Fuse ................................................ 105
F_Adj_DCO_Frequency ....................................... 107
F_Test_DCO_Frequency ....................................... 107
4.6 Customized JTAG instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
F_init_custom_jtag ........................................... 109
F_custom_jtag_stream ......................................... 109
4.7UART......................................................... 112
F_Custon_Function ........................................... 112
Appendix A .............................................................. 115
FlashPro430 Command Line interpreter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
8

1. Introduction
The FlashPro430 (USB-MSP430-FPA) or TI’s MSP-FET430UIF adapter can be remotely
controlled from other software applications (Visual C++, Visual Basic etc.) via a DLL library. The
Multi-FPA - allows to remotely control simultaneously up to sixteen Flash Programming Adapters
(USB-MSP430-FPAs) significantly reducing programming speed in production. When the MSP-
FET430UIF adapter is used then the only one adapter can be connected.
Figure 1.1 shows the connections between PC and up to sixteen programming adapters. The
FPAs can be connected to PC USB ports directly or via USB-HUB. Direct connection to the PC is
faster but if the PC does not have required number of USB ports, then USB-HUB can be used. The
USB-HUB should be fast, otherwise speed degradation can be noticed. When the USB hub is used,
then the D-Link’s Model No: DUB-H7, P/N BDUBH7..A2 USB 2.0 HUB is recommended.
Figure 1.1
9

Block diagram of the Multi-FPA application DLL is presented on the Figure 1.2.
To support this new Multi-FPA API-DLL feature, the software package contains seventeen dll files
- the Multi-FPA API-DLL selector
- sixteen standard single FPAs API-DLLs (or one UIF API-DLL)
Figure 1.3 shows the logical connections between these dll files.
The main Multi-FPA file (FPA-selector - MSP430FPA.DLL) allows to transfer API-DLL functions
coming from application software to desired single application dll (MSP430FPA1.DLL to
MSP430FPA64.DLL or MSPFET430UIF1.DLL).
The MSP430FPA.DLL file is transparent for all API-DLL functions implemented in the single FPA
API-DLLs functions. Desired destination FPA can be selected using the function
F_Set_FPA_index( fpa );
where the
fpa = 1 to 64 when only one desired FPA required to be selected
or fpa = 0 when ALL active FPAs should be selected.
Figure 1.2
10

The selected FPA index modified by the F_Set_FPA_index( fpa ) instruction can be modified at any
time. By default, the FPA index is 1 and if only one FPA is used then fpa index does not need to be
initialized or modified. When the fpa index 1 to 64 is used, then the result is coming back to
application software from the single API-DLL via transparent Multi-FPA dll. When fpa index is 0
(ALL-FPAs) and results are the same from all FPAs, then the same result is passing back to
application software. If results are not the same, then the Multi-FPA dll is returning back value -1
(minus 1) and all recently received results can be read individually using function
F_LastStatus( fpa )
Most of the implemented functions allows to use the determined fpa index 1 to 64 or 0 (ALL-FPAs).
When functions return specific value back, like read data etc, then only determined FPA index can
be used ( fpa index from 1 to 64). When the fpa index is 0 (ALL-FPAs) then almost all functions are
executed simultaneously. Less critical functions are executed sequentiallyfrom FPA-1 up to FPA-64
but that process can not be seen from the application software.
Figure 1.3
11

When the inactive fpa index is selected, then return value from selected function is -2 (minus 2).
When all fpa has been selected (fpa index = 0) then only active FPAs will be serviced. For example
if only one FPA is active and fpa index=0, then only one FPA will be used. It is save to prepare the
universal application software that allows to remote control up to sixteen FPAs and on the startup
activate only desired number of FPAs.
It should be noticed, that all single API-DLLs used with the Multi-FPA DLL are fully independent
to each other. From that point of view it is not required that transferred data to one FPA should be
the same as the transferred data to the others FPAs. For example code data downloaded to FPA-1
can be different that the code data downloaded to the FPA-2, FPA-3 etc. But even in this case the
programming process can be done simultaneously. In this case the desired code should be read from
the code file and saved in the API-DLL-1, next code file data should be saved in the API-DLL-2 etc.
When it is done, then the F_AutoProgram can be executed simultaneously with selected all active
FPAs. All FPAs will be serviced by his own API-DLL and data packages saved in these dlls.
The following commands are supported in the DLL library:
Initialization and termination communication with the programming adapter,
Programmer configuration setup,
Programming report message,
Code data and password data read from the file,
DC power target from the programming adapter,
Reset target device,
Auto program target device ( erase, blank check, program and verify),
Password or fuse verification,
All or selected part of memory erase,
All or selected part of memory blank check,
All or selected part of memory write,
All or selected part of memory verify,
All or selected part of memory read,
Open or close communication with the target device,
Selected memory segment erase,
Selected part of memory blank check,
Selected part of memory segment write,
Selected part of memory segment read,
Security fuse blow.
12

The MSP430 Flash Programmer software package contains all required files to remotely control
programmer from a software application. When software package is installed then by default the
DLL file, library file and header file are located in:
C:\Program Files\Elprotronic\MSP430\USB FlashPro430\API-DLL
MSP430FPA.dll - Multi-FPA selection/distribution DLL
MSP430FPA1.dll - DLL for Elprotronic’s USB-MSP430-FPA
MSPFET430UIF1.dll - DLL fro TI’s MSP-FET430UIF
MSPPrg-Dll.h - header file for MS VC++
MSPPrg-Dos-Dll.h - header file for Borland, DOS etc.
MSP430FPA-BC.lib - lib file for Borland VC++
MSP430FPA.lib - lib file for MS VC++
config.ini - default configuration file for the FPAs
FPAs-setup.ini - FPAs- vs USB / UIF ports configuration file
or
C:\Program Files\Elprotronic\MSP430\FET-Pro430\API-DLL
MSP430FPA.dll - Multi-FPA selection/distribution DLL
MSPFET430UIF1.dll - DLL fro TI’s MSP-FET430UIF
MSPPrg-Dll.h - header file for C++
MSPPrg-Dos-Dll.h - header file for Borland, DOS etc.
MSP430FPA.lib - lib file for MS VC++
MSP430FPA-BC.lib - lib file for Borland VC++
config.ini - default configuration file for the FPAs
FPAs-setup.ini - FPAs- vs UIF ports configuration file
The API-DLL package in the USB FlashPro430 and in the FET-Pro430 subdirectories are exactly
the same. However for the simplicity the dll file for the USB-MSP430-FPA adapter is not included
in the FET-Pro430 package, since the only MSP-FET430UIF adapter will be used. Make sure that
your application software will not call the USB-MSP430-FPA adapter if the dll for this adapter is
not present. When the USB-MSP430-FPA adapter is used, then the package from the first
subdirectory that contains the MSP430FPA1.dll for the USB-MSP430-FPA adapter should be used.
In this package the MSPFET430UIF1.dll for the MSP-FET430UIF adapter is also included and
allows to use the USB-MSP430-FPA adapter (or adapters) only, the MSP-FET430UIF adapter or
both type of adapters at the same time. The entry dll (MSP430FPA.dll - dll selector) is selecting the
desired dll vs used adapter.
The entry dll (MSP430FPA.dll) contains two groups of the same functions used in C++
application and Visual Basic applications All procedure names used in the Visual Basic are starting
13

from VB_xxxx, (and have the _stdcall calling declaration) when procedure names used in the C++
are starting from F_xxxx (and have the _Cdecl calling declaration).
Reminding files listed above are required in run time - to initialize the flash programming
adapter. The config.ini is optional, if not present then default configuration is created.
When the MS VC++ application is created, then following files should be copied to the source
application directory:
MSPPrg-Dll.h - header file for C++
MSP430FPA.lib - lib file for C++
and to the release/debug application directory
MSP430FPA.dll - Multi-FPA selection/distribution DLL
MSP430FPA1.dll - DLL for Elprotronic’s USB-MSP430-FPA
MSPFET430UIF1.dll - DLL fro TI’s MSP-FET430UIF
config.ini - default configuration file for the FPAs
FPAs-setup.ini - (optiona) FPAs- vs USB ports configuration file
Executable application software package in C++ the requires following files
MSP430FPA.dll - Multi-FPA selection/distribution DLL
MSP430FPA1.dll - DLL for Elprotronic’s USB-MSP430-FPA
MSPFET430UIF1.dll - DLL fro TI’s MSP-FET430UIF
config.ini - default configuration file for the FPAs
FPAs-setup.ini - (optiona) FPAs- vs USB ports configuration file
When application in Visual Basic is created, then following files should be copied to the source or
executable application directory:
MSP430FPA.dll - Multi-FPA selection/distribution DLL
MSP430FPA1.dll - DLL for Elprotronic’s USB-MSP430-FPA
MSPFET430UIF1.dll - DLL fro TI’s MSP-FET430UIF
config.ini
FPAs-setup.ini - FPAs- vs USB ports configuration file
When LabView application is created, then following files taken form the location
C:\Program Files\Elprotronic\MSP430\USB FlashPro430\LabView
should be copied to the source or executable application directory:
FlashPro430-Labview.dll - LabView library
MSP430FPA.dll - Multi-FPA selection/distribution DLL
MSP430FPA1.dll - DLL for Elprotronic’s USB-MSP430-FPA
MSPFET430UIF1.dll - DLL fro TI’s MSP-FET430UIF
14

config.ini
FPAs-setup.ini - FPAs- vs USB ports configuration file
All these files ‘as is’ should be copied to destination location, where application software using DLL
library of the MSP430 Flash programmer is installed. The config.ini file has default setup
information. The config.ini file can be modified and taken directly form the MSP430 Flash
Programmer application software. To create required config.ini file the standard MSP430 Flash
programmer software should be open and required setup (memory option, JTAG/SBW/BSL interface
select etc) should be created. When this is done, programming software should be closed and the
config.ini file with the latest saved configuration copied to destination location. Note, that the
configuration setup can be modified using DLL library function.
Software package has a demo software written under Visual C++.net , Visual Basic.net and
LabVIEW - version 7.1. All files and source code are located in:
C:\Program Files\Elprotronic\MSP430\USB FlashPro430\API-DLL-Demo\Cpp
C:\Program Files\Elprotronic\MSP430\USB FlashPro430\API-DLL-Demo\VBnet
C:\Program Files\Elprotronic\MSP430\USB FlashPro430\API-DLL-Demo\VB6
C:\Program Files\Elprotronic\MSP430\USB FlashPro430\LabView
1.1 Using TI’s MSP-FET430UIF adapter
The Multi-FPA API-DLL version 4.0 and higher allows to control the TI’s MSP-FET430UIF
or EZ430 stick adapter with the same list of instructions as are used for the MSP-MSP430-FPA
adapters. The API-DLL is prepared mostly for the flash programming only and from that reason an
available list of instructions in the MSP-FET430UIF used for debugging are not used in the API-
DLL. The care should be taken, that some of the features available in the USB-MSP430-FPA
adapters are not supported in the MSP-FET430UIF adapters and vice-verse. The MSP-FET430UIF
does not support the BSL communication interface and also does not allow to calibrate the DCO
frequency. These option should be disabled in software (see software configuration) if the MSP-
FET430UIF adapter is used.
The API-DLL structure and list of instructions for the MSP-FET430UIF allows to use current
application software used for the USB-MSP430-FPA adapters without modification. Only the latest
DLLs should replace the old dlls. Also the MSPFET430UIF1.dll file should be plased with the other
dlls if the MSP-FET430UIF is used. When the USB-MSP430-FPA adapter is not used, then the
MSP430FPA1.dll can be removed. Make sure that the main dll - MSP430FPA.dll is always
installed. The MSPFET430UIF1.dll file is protected and can work without access key only first 30
15

days after first activation. After this time the access key is required. If the TI’s MSP-FET430UIF
adapter is not used, then the MSPFET430UIF.dll file can be removed to avoid the pop-up messages
with information regarding access key installation, or in the start-up definition the option - ANY
adapter should not be used. Use the FPAs serial number or FPA definition to avoid activation the
API-DLL servicing the TI’s MSP-FET430UIF adapter, or vice-verse - when the MSP-FET430UIF
adapter is used only, then do not use ANY adapter definition. Use the UIF definition instead ANY
adapter (‘*’).
When the access key for the MSPFET430UIF.dll file is not installed, then the following pop-
up message will be displayed every time when the dll is activated.
Since the application software can install and close the dll a few times on the startup then the pop-up
messages can be reentered even - 2-4 times on the startup. Press OK button and go head. After expire
time the dll without valid access key will reject the communication with application software. When
the access key is installed, then the pop-up messages are not displayed any more.
Figure 1.4
16

2. Getting Started
2.1 Self Test Program
The software package contains the FlashPro430 Self Test program, that allows to test functionality
of the ONE flash programming adapter, users target device and connections between these units.
Software package use the Multi-FPA API-DLLs. In the test results printout are listed the DLL
functions with syntax, that has been used. This printout is useful to find-out source of the problems,
as well as can be used at the startup when your application software uses one programming adapter
only. Software can be activated from the Start menu
Start -> Programs -> Elprotronic-Flash Programmers -> (MSP430) FlashPro430 -> FlashPro430 Self Test
or by running the program FlashPro430SelfTest.exe from the location
C:\Program Files\Elprotronic\MSP430\USB FlashPro430\SelfTest
The same software package can be found in the FET-Pro430 subdirectory, if the FET-Pro430
software is installed.
The Figure 2.1 presents the GUI of the FlashPro430 / FET-Pro430 Self Test.
Connect the Flash Programming Adapter (USB-MSP430-FPA or MSP-FET430UIF) to PC (USB
port), connect your target device to adapter, select desired options in following selectors (see Figure
2.1) - “Target Device”, “Target’s Vcc” “Interface” and “Reset Pulse width”. When it is done
then press the button “TEST”. When test is finished, then check if there is no any errors. Detailed
test report is displayed. The test report can be paste to Notepad and saved if required.
Note: When the MSP-FET430UIF adapter is used then only two interface can be selected
- JTAG or Spy-Bi-Wire with fixed communication speed. The BSL interface is not
supported in this adapter.
Following conditions are used during the test:
1. JTAG and Spy-Bi-Wire interface is used:
* Erased and programmed MAIN memory only. The info memory (0x1000 to 0x10FF)
is not erased and not modified. The DCO calibration data in the F2xx are not
modified. During the test it can be displayed warning that All memory blank check
failed, that of course is normal. But selected memory blank check must be OK (the
full MAIN memory in this case).
17

* All bytes of the main memory are erased, blank checked and programmed with the
randomly generated data used as a code data. Whole MAIN memory content is
verified (check sum) and also read whole data and verified byte by byte.
* One sector (location 0xFC00 to 0xFDFF) is erased and blank checked. Also contents
of the two closer sectors are verified if there are not erased. Small block of data are
saved and verified in the mentioned sector.
* Word write/read to TACCR0 (0x172) register.
* Byte/Word manipulation are used in the part of the RAM.
2. BSL interface is used (not supported in the MSP-FET430UIF):
* Due to unknown access password, the whole Flash memory - MAIN and INFO are
erased. In the F2xx microcontrollers the DCO calibration data will be erased. There
is no way to save the DCO data if the BSL password is unknown. The DCO data can
Figure 2.1
18

be calibrated using the FlashPro430 GUI package software when the JTAG or Spy-
Bi-Wire access is available (when the JTAG fuse is not blown). See the FlashPro430
manual for details.
* All MAIN memory is tested in the same way as it is used with the JTAG/Spy-Bi-
Wire interface
* Word write/read to TACCR0 (0x172) register.
* Access to RAM if size of the RAM if higher then 256 bytes. Access to RAM space
0x200 to 0x2FF is blocked due to stack and firmware located in this RAM location.
Note: The first test (Vcc value when the power is OFF) can be failed, if the external power is
connected or if the blocking capacitor on your target device connected to the Vcc line if high.
The Vcc should be below 0.4V when the power is OFF, tested 2 seconds after switching-off
the power from FPA, otherwise test failed.
The Self Test programming software package is located in directory
C:\Program Files\Elprotronic\MSP430\USB FlashPro430\SelfTest
or
C:\Program Files\Elprotronic\MSP430\FET-Pro430\SelfTest
and contains following files
MSP430FPA.dll - Multi-FPA selection/distribution DLL
MSP430FPA1.dll - USB-FPA DLL
MSPFET430UIF1.dll - DLL fro TI’s MSP-FET430UIF
config.ini - default configuration file for the FPAs
FlashPro430SelfTest.exe - executable file
To run the executable file FlashPro430SelfTest.exe it in the other location the files listed above
should be copied “as is” to destination directory.
2.2 MyMSP430Prg Projects
The MyMSP430Prg projects are examples of using the Multi-FPA API-DLL with Microsoft Visual
Studio 7.0 (2002) and for Microsoft Visual Basic 6.0. They are intended to help users create their
own application that uses the API-DLL by providing a simple starting point. When using Visual
Studio C++ include the following files should be included to your program:
MSP430FPA.lib
MSPPrg-Dll.h
MspFPA-Lib.h
19

MspFPA-Lib.cpp
MSP430SamplePrg.h
MSP430SamplePrg.cpp
The above files are located in the following directory:
...\Elprotronic\MSP430\USB FlashPro430\API-DLL-MyPrg\Cpp\scr
or
...\Elprotronic\MSP430\FET-Pro430\API-DLL-MyPrg\Cpp\scr
Files MSP430SamplePrg.cpp and MSP430SamplePrg.h can be modified in a way that suits your
application. However, the remaining files should not be modified.
To run your application you will need to allow your application access to the Multi-FPA dynamically
linked library. A simple way to do this is to copy the following files into your directory where
executable file is located:
MSP430FPA.dll
MSP430FPA1.dll - required if the USB-MSP430-FPA adapter is used
MSPFET430UIF1.dll - required if the TI’s MSP-FET430UIF is used
Config.ini (optional)
The easy demo project MyMSP430Prg uses API-DLLs and files listed above is located in directory
...\Elprotronic\MSP430\USB FlashPro430\API-DLL-MyPrg\Cpp\MyMSP430Prg
or
...\Elprotronic\MSP430\FET-Pro430\API-DLL-MyPrg\Cpp\MyMSP430Prg
and are included for demonstration purposes only. The sample project can be opened by selecting
the project file MyMSP430Prg.vcproj located in directory
...\Elprotronic\MSP430\USB FlashPro430\API-DLL-MyPrg\Cpp\MyMSP430Prg
or
...\Elprotronic\MSP430\FET-Pro430\API-DLL-MyPrg\Cpp\MyMSP430Prg
The following dialogue box will be displayed when project executed (see figure 2.2).
Dialogue box contains few buttons, that call procedures listed in the mentioned above files. See
contents in the MyMSP430Prg.cpp file located in the project directory, how these procedures are
called from application software. There are several useful procedures located in the MspFPA-
20
Table of contents
Other Elprotronic Motherboard manuals