Elprotronic GangPro430 User manual

GangPro430 Flash Programmer
for the TI’s MSP430Fxx microcontrollers
Remote Control Programming User’s Guide
Software version 4.5
PM015A02 Rev.15
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.
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
2.GettingStarted .......................................................... 16
2.1 SelfTestProgram ............................................. 16
2.2 MyGP430PrgProjects .......................................... 18
2.3 APIDLLDemoPrograms ....................................... 22
3.ExamplewithFPAAPIDLL............................................... 30
3.1 Example with Single FPA API DLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.2 Example with Multi-FPA API DLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.ListoftheDLLinstructions................................................ 35
4.1Multi-FPAinstructions ............................................ 42
F_Trace_ON.................................................. 42
F_Trace_OFF ................................................. 42
F_OpenInstances .............................................. 42
F_CloseInstances .............................................. 43
F_OpenInstancesAndFPAs, F_OpenInstances_AndFPAs . . . . . . . . . . . . . . 43
F_Set_FPA_index ............................................. 47
F_Get_FPA_index ............................................. 48
F_Check_FPA_index........................................... 48
F_Disable_FPA_index.......................................... 49
F_Enable_FPA_index .......................................... 49
F_LastStatus.................................................. 50
F_Multi_DLLTypeVer.......................................... 50
F_Get_FPA_SN ............................................... 51
4.2Genericinstructions ............................................... 52
F_Check_FPA_access .......................................... 52
F_Initialization................................................ 54
GangPro430 Remote Control Programming User’s Guide PM015A02 Rev.15
6

F_API_DLL_Directory ......................................... 55
F_Close_All .................................................. 55
F_GetSetup .................................................. 56
F_ConfigSetup ................................................ 56
F_SetConfig .................................................. 69
F_GetConfig ................................................. 69
F_Set_MCU_Name ............................................ 70
F_Get_Device_Info ............................................ 70
F_DispSetup.................................................. 73
F_ReportMessage, F_Report_Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
F_GetReportMessageChar ....................................... 75
F_DLLTypeVer ............................................... 76
F_ConfigFileLoad, F_Config_FileLoad . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
F_Power_Target............................................... 79
F_Reset_Target ............................................... 79
F_Get_Targets_Result .......................................... 80
F_Get_Active_Targets_Mask .................................... 81
F_Get_Targets_Vcc ............................................ 82
F_Set_fpa_io_state............................................. 82
4.3 Data Buffers access instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
F_ReadCodeFile, F_Read_CodeFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
F_Get_CodeCS ............................................... 85
F_ReadPasswFile, F_Read_PasswFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
F_Clr_Code_Buffer ............................................ 87
F_Put_Byte_to_Code_Buffer..................................... 87
F_Get_Byte_from_Code_Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
F_Put_Byte_to_Password_Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
F_Get_Byte_from_Password_Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
F_Put_Byte_to_Gang_Buffer .................................... 90
F_Get_Byte_from_Gang_Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
4.4Encapsulatedinstructions........................................... 92
F_AutoProgram ............................................... 92
F_VerifyFuseOrPassword ....................................... 94
F_Memory_Erase.............................................. 94
F_Memory_Blank_Check ....................................... 95
F_Memory_Write.............................................. 95
GangPro430 Remote Control Programming User’s Guide PM015A02 Rev.15
7

F_Memory_Verify ............................................. 95
F_Gang_Flash_Read ........................................... 96
4.4Sequentialinstructions............................................. 98
F_Open_Target_Device ......................................... 99
F_Close_Target_Device........................................ 100
F_Segment_Erase............................................. 101
F_Sectors_Blank_Check ....................................... 102
F_Write_Word ............................................... 102
F_Write_Byte................................................ 103
F_Copy_Buffer_to_Flash....................................... 104
F_Copy_Gang_Buffer_to_Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
F_Copy_Buffer_to_RAM ...................................... 106
F_Copy_Gang_Buffer_to_RAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
F_Copy_RAM_to_Gang_Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
F_Copy_Flash_to_Gang_Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
F_Set_PC_and_RUN .......................................... 110
F_Capture_PC_Addr .......................................... 112
F_Synch_CPU_JTAG ......................................... 112
F_Blow_Fuse ................................................ 113
F_Adj_DCO_Frequency ....................................... 115
F_Get_DCO_constant ......................................... 115
F_Test_DCO_Frequency ....................................... 116
F_Set_DCO_constant ......................................... 116
F_Get_DCO_Freq_result ....................................... 117
Appendix A .............................................................. 118
GangPro430 Command Line interpreter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
GangPro430 Remote Control Programming User’s Guide PM015A02 Rev.15
8

1. Introduction
GangPro430 Flash Programmer (USB ) 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 (FPAs) significantly reducing
programming speed in production.
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
GangPro430 Remote Control Programming User’s Guide PM015A02 Rev.15
9

Target devices can be connected to Gang Programmer via Gang Splitter directly to JTAG connectors
(Figure 1.1), or to the JTAG test points created on the PCB panel via nails (Figure 1.2). The second
method allows to easy and fast program a whole panel with up to 96 target devices on the panel
before depanelization.
Block diagram of the Multi-FPA application DLL using eight FPAs is presented on the Figure 1.3.
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
Figure 1.4 shows the logical connections between these dll files.
Figure 1.2
GangPro430 Remote Control Programming User’s Guide PM015A02 Rev.15
10

The main DLL file (GangPro430FPA.DLL) has the same name and structure like the old version of
the single FPA DLL and is fully back compatible with the old API-DLL. This allows to use the new
Multi-FPA API-DLL software package with the old application software written by customers -
without software modification. In this case only one FPA will be used. All other FPAs becomes
inactive. Only minor software modification is required to activate more then one FPA (up to sixteen)
from application software.
The main Multi-FPA file (FPA-selector) allows to transfer API-DLL functions coming from
application software to desired single application dll (GangPro430FPA1.DLL to
GangPro430FPA16.DLL).
Note: Software package contains one USB-FPA DLL file - the GangPro430FPA1.DLL.
Files GangPro430FPA2.DLL to GangPro430FPA16.DLL will be copied
automatically if required.
Figure 1.3
GangPro430 Remote Control Programming User’s Guide PM015A02 Rev.15
11

The GangPro430FPA.DLL file is transparent for all API-DLL functions implemented in the single
FPA API-DLLs, or otherwise, to all old single APL DLLs functions. Desired destination FPA can
be selected using the new function added to the Multi-FPA
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.
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
Figure 1.4
GangPro430 Remote Control Programming User’s Guide PM015A02 Rev.15
12

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 sequentially from FPA-1 up to FPA-64
but that process can not be seen from the application software.
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,
GangPro430 Remote Control Programming User’s Guide PM015A02 Rev.15
13

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.
GangPro430 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:
for the USB version programmer:
C:\Program Files\Elprotronic\MSP430\USB GangPro430\API-DLL
GangPro430FPA.dll - Multi-FPA selection/distribution DLL
GangPro430FPA1.dll - USB-FPA DLL
GangPro430-Dll.h - header file for C++
GangPro430-Dos-Dll.h - header file for C++ (Borland) or DOS
GangPro430FPA.lib - lib file for C++
GangPro430FPA-BC.lib - lib file for C++ (Borland)
config.ini - default configuration file for the FPAs
FPAs-setup.ini - FPAs- vs USB ports configuration file
The GangPro430FPA.dll contains two groups of the same functions used in C++ application
and Visual Basic applications All procedure names used in Visual Basic are starting from VB_xxxx,
when procedure names used in C++ are starting from F_xxxx. All functions starting from F_xxxx
using the _Cdecl declarations used in C++ . Function names starting from VB_xxxx has the
_stdcall calling declaration required in Visual Basic.
Reminding files listed above are required in run time - to initialize the flash programming
adapter (config.ini) and USB setup (FPAs-setup.ini).
When C++ application is created, then following files should be copied to the source
application directory:
GangPro430 Remote Control Programming User’s Guide PM015A02 Rev.15
14

GangPro430-Dll.h - header file for C++
GangPro430FPA.lib - lib file for C++
and to the release/debug application directory
GangPro430FPA.dll - Multi-FPA selection/distribution DLL
GangPro430FPA1.dll - USB-FPA DLL
config.ini - default configuration file for the FPAs
FPAs-setup.ini - FPAs- vs USB ports configuration file
Executable application software package in C++ the requires following files
GangPro430FPA.dll - Multi-FPA selection/distribution DLL
GangPro430FPA1.dll - USB-FPA DLL
config.ini - default configuration file for the FPAs
FPAs-setup.ini - 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:
GangPro430FPA.dll - Multi-FPA selection/distribution DLL
GangPro430FPA1.dll - USB-FPA-1 DLL
config.ini - default configuration file for the FPAs
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.
Config.ini file has default setup information. Config.ini file can be modified and taken directly form
the GangPro430 Flash Programmer (GUI) application software. To create required config.ini file
the standard GangPro430 Flash programmer software should be open and required setup (memory
option, JTAG/SBW communication speed 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 (7.0 - 2002), Visual
Basic.net (7.1 - 2003) and LabVIEW (7.1). All files and source code are located in:
C:\Program Files\Elprotronic\MSP430\USB GangPro430\API-DLL-Demo\Cpp
C:\Program Files\Elprotronic\MSP430\USB GangPro430\API-DLL-Demo\VBnet
C:\Program Files\Elprotronic\MSP430\USB GangPro430\LabVIEW
GangPro430 Remote Control Programming User’s Guide PM015A02 Rev.15
15

2. Getting Started
2.1 Self Test Program
The software package contains the GangPro430 Self Test program, that allows to test functionality
of the 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) GangPro430 -> GangPro430 Self Test
or by running the program GangPro430SelfTest.exe from the location
C:\Program Files\Elprotronic\MSP430\USB GangPro430\SelfTest
The Figure 2.1 presents the GUI of the gangPro430 Self Test.
Figure 2.1
GangPro430 Remote Control Programming User’s Guide PM015A02 Rev.15
16

Connect the Flash Programming Adapter (FPA) to PC (USB port), connect your target devices to
FPA, select desired options in following selectors (see Figure 2.1) - “Target Device”, “Target’s
Vcc” “Interface” and “Reset Pulse width” and active Target # numbers. 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.
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).
* 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:
* 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
be calibrated using the GangPro430 GUI package software when the JTAG or Spy-
Bi-Wire access is available (when the JTAG fuse is not blown). See the GangPro430
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.
GangPro430 Remote Control Programming User’s Guide PM015A02 Rev.15
17

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 GangPro430\SelfTest
and contains following files
GangPro430FPA.dll - Multi-FPA selection/distribution DLL
GangPro430FPA1.dll - USB-FPA DLL
config.ini - default configuration file for the FPAs
GangPro430SelfTest.exe - executable file
To run the executable file GandPro430SelfTest.exe it in the other location the files listed above
should be copied “as is” to destination directory.
2.2 MyGP430Prg Projects
The MyGP430Prg (My Gang Pro 430 Programmer) 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:
GangPro430FPA.lib
GangPro430-Dll.h
GP430FPA-Lib.h
GP430FPA-Lib.cpp
GP430SamplePrg.h
GP430SamplePrg.cpp
The above files are located in the following directory:
...\Elprotronic\MSP430\USB GangPro430\API-DLL-MyPrg\Cpp\scr
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:
GangPro430 Remote Control Programming User’s Guide PM015A02 Rev.15
18

GangPro430FPA.dll
GangPro430FPA 1.dll
Config.ini (optional)
You can modify files GP430SamplePrg.cpp and GP430SamplePrg.h in a way that suits you
application. However, the remaining files should not be modified. These files can be found in
directory
...\Elprotronic\MSP430\USB GangPro430\API-DLL-MyPrg\Cpp\MyGP430Prg
and are included for demonstration purposes only. The sample project can be opened by selecting
the project file MyGP430Prg.vcproj located in directory
...\Elprotronic\MSP430\USB GangPro430\API-DLL-MyPrg\Cpp\MyGP430Prg
The following dialogue box will be displayed when project executed (see figure 2.2).
Figure 2.2
GangPro430 Remote Control Programming User’s Guide PM015A02 Rev.15
19

Dialogue box contains few buttons, that call procedures listed in the mentioned above files. See
contents in the MyGP430Prg.cpp file located in the project directory, how these procedures are
called from application software. There are several useful procedures located in the GP430FPA-
Lib.cpp file that significantly simplify the FPA initialization process. See comments for each
procedures located in this file.
The first procedure named
get_FPA_and_MSP_list(..........)
searches all FPAs connected to your PC via USB ports. As the results, adapter serial numbers of the
detected FPAs are located in the FPA_SN_list[k] where k = 0 up to 15. Up to sixteen FPA SN can
be located in this data block. SN list are located starting from FPA_SN_list[0]. The same procedure
also takes a list of supported MSP microcontrollers containing MCU name, flash start and end
addresses etc. from API-DLL .The MCU list is saved in the following structure
typedef struct
{
char name[DEVICE_NAME_SIZE];
int index;
long flash_start_addr;
long flash_end_addr;
long info_flash_start_addr;
long info_segm_size;
long no_of_info_segm;
long RAM_size;
} DEVICELIST;
DEVICELIST DeviceList[300];
Up to 300 MCUs can be saved in DeviceList. When required, the size of this data block can be
increased in the future. Currently, device list contains about 120 MCUs. The MCU names in the
DeviceList are sorted in alphabetic order. Alphabetical order is convenient for users, however the
API-DLL requires fixed MCU index when selecting the particular MCU. In the structure above the
MCU index required by API-DLL is located in
DeviceList[k].index
and procedure setting the required MCU becomes as follows
GangPro430 Remote Control Programming User’s Guide PM015A02 Rev.15
20
Other manuals for GangPro430
1
Table of contents
Other Elprotronic Motherboard manuals