Flash programmer for the ti's msp430fxx microcontrollers (122 pages)
Summary of Contents for Elprotronic FlashPro2000
Page 1
FlashPro2000 Flash Programmer Multi-FPA API-DLL User’s Guide Software version 1-1 PM034A02 Rev.1 May-2009 Elprotronic Inc.
Page 2
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.
Page 3
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.
Page 4
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.
Page 5
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.
1. Introduction The FlashPro2000 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-FPAs) significantly reducing programming speed in production.
Page 9
(FlashPro2000-FPA1.dll to FlashPro2000-FPA16.dll). The FlashPro2000-FPAsel.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 );...
Page 10
Initialization and termination communication with the programming adapter, Programmer configuration setup, Programming report message, Code data and password data read from the file, Reset target device, Auto program target device ( erase, blank check, program and verify), CSM Password verification, FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Page 11
Selected part of memory segment read, CSM Password write. The FlashPro2000 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\C2000\USB FlashPro2000\API-DLL FlashPro2000-FPAsel.dll...
Page 12
All these files ‘as is’ should be copied to destination location, where application software using DLL library of the FlashPro2000 Flash programmer is installed. The config.ini file has default setup information. The config.ini file can be modified and taken directly form the FlashPro2000 Flash Programmer (GUI) application software.
The easy demo project MyFP2000Prg uses API-DLLs and files listed above is located in directory ...\Elprotronic\C2000\USB FlashPro2000\API-DLL-MyPrg\Cpp\MyFP2000Prg and are included for demonstration purposes only. The sample project can be opened by selecting the project file MyFP2000Prg.vcproj located in directory FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Page 14
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]. FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Page 15
UINT16 *data ); read_data_from_buffer( int source, long addr, long size, UINT16 *data ); See the MyFP2000PrgDlg.cpp file how to strat-up communication with FPA and how to use the API-DLLs instructions. FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Below is an example of the simplified (without error handling procedures) application program written in C++ that allows to initialize one FPA, and run an autoprogram with the same features like an autoprogram in the standard FlashPro2000 (GUI) software. 1. Download data to target device F_OpenInstancesAndFPAs( “*# *”...
F_CloseInstances() function should be called as the last one after all functions are finished in similar way like the FlashPro2000 GUI software is opening once and closed at the end when job is finished. The startup initialization take few seconds (when F_OpenInstancesAndFPAs(..) and...
Page 18
Below is an example of the simplified (without error handling procedures) application program written in C++ that allows to initialize all dlls and FPA, and run an autoprogram with the same features like autoprogram in the standard FlashPro2000 application software. 1. Download data to all target devices (uses USB-FPAs) response = F_OpenInstancesAndFPAs( FPAs-setup.ini);...
Page 19
..........} while(1); //make an infinite loop until last target device programmed ..............F_CloseInstances(); See source code in the DEMO program written in Visual C++, Visual Basic or LabView for more detail. FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Code Files, which should be loaded before the encapsulated functions are used. To augment the functionality of the encapsulated functions, sequential functions can be executed immediately after to complete the programming process. FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Page 21
Close Target Device instruction should be called. When communication is terminated, then sequential instructions can not be executed. Note: Inputs / outputs has been defined as INP_X, and LONG_X. Both of them are defined as 4 bytes long (see FlashPro2000-Dll.h header file ) #define INP_X _int32...
Note: Tracing is slowing the time execution, because all information passed from application software to API-DLL are recorded in the dlltrace.txt file. Syntax: void MSPPRG_API F_Trace_ON( void ); F_Trace_OFF F_Trace_OFF - Disable tracing, See F_Trace_ON for details. Syntax: void MSPPRG_API F_Trace_OFF( void ); FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
MAX_USB_DEV_NUMBER = 16 Return value: number of opened instances F_CloseInstances F_CloseInstances - Close all active API-DLLs and free system memory. Syntax: INT_X MSPPRG_API F_CloseInstances ( void ); Parameters: void Return value: TRUE FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Return value: number of opened instances 1. The FPA list in the string: String -> “*# SN1, SN2, SN3, SN4, SN5...” Where the SN1- FPA’s serial number that should be assigned to FPA-1 index FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Page 26
Last one will be any adapter USB-FPA not listed before. Initialization examples: F_OpenInstancesAndFPAs( “*# *” ); // only one any adapter F_OpenInstancesAndFPAs( snlist ); // hardcoded SN list 2.The FPA list in the configuration file: String -> “C:\Program Files\Elprotronic\FPAs-setup.ini” FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Page 27
F_OpenInstancesAndFPAs( “*# *” ); //DLL startup and FPA assignment //by default - FPA-1 is selected. //The F_Set_FPA_index(1) is not required. F_Initialization(); //FPA 1 initialization F_ReadConfigFile( filename ); //download configuration to DLLs. F_ReadCodeFile( filename ); //download code file to DLLs. FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Page 28
//start autoprogram to all FPAs simultaneously. if( status != TRUE ) if( status == FPA_UNMATCHED_RESULTS ) // service software when results from FPAs are not the same else ..........} while(1); F_CloseInstances(); // release DLLs from memory FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
FPA. Communication with target devices connected to selected FPA will be stopped. When the F_Set_FPA_index(0) will be used, then selected FPA will be ignored. Result will not be presented in the Status results (Status and F_LastStatus(..)). FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
When function is transferred to all API-DLLs (when the fpa=0) then returned parameter (status) is the same as the returned value from the API-DLLs when the ALL returned values ARE THE SAME. If not, then returned value is FPA_UNMATCHED_RESULTS (value of the is minus 1). FPA_UNMATCHED_RESULTS FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
- FPA index of the desired status fpa index -> 1..16 Return value: Serial number of the selected FPA or FPA_INVALID_NO - if used fpa index is not activated or out of range. note: FPA_INVALID_NO -> -2 (minus 2)(0xFFFFFFFE) FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
- ( 1 to 16 ) or 0 (ALL FPAs) executed sequentially. F_Initialization function should be called after the communication with the FPA adapter is established. To make a Multi-FPA software back compatible, the F_Initialization procedure is calling FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
To activate communication with the programmer when the function F_Close_All has been used the F_Initialization function must be called first. Syntax: MSPPRG_API INT_X F_Close_All( void ); FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Page 38
0 - TMS320F240 1 - TMS320F242 2 - ..See the latest MCU list and indexes in the FlashPro2000 (GUI) software. Run software -> list available under pull down menu Setup-> MSP list Also the MCU index and MCU names can be taken from the instruction F_Get_Device_Info().
Page 39
Flash Start Address when the defined flash erase option is selected [ CFG_DEF_ERASE_STOP_ADDR 19 ] Flash End Address when the defined flash erase option is selected [ CFG_RETAIN_DEF_DATA_EN 20 ] Enable (1) / disable (0) [ CFG_RETAIN_START_ADDR 21 ] Retain Data Start Address FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Page 40
Enable (1) / disable (0) [ CFG_CLK_FERQ_IN_KHZ 32 ] External CLK frequency in kHz [ CFG_JTAG_CHAIN_POS 33 ] Devices position in the JTAG chain - from 1 to number of devices in the JTAG chain FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Index’s list - see F_SetConfig Return value: Requested setup parameter; 1 - TRUE -2 (0xFFFFFFFE) - FPA_INVALID_NO Example: ....... Interface = F_GetConfig( CFG_INTERFACE ); ....... F_Get_Device_Info F_Get_Device_Info - Get information related to selected microcontroller. FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Page 42
The max size can be tested from the API-DLL, until device name is empty when the microprocessor index is incremented from the zero up to max value. In the example below is assumed that te max FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
REPORT_MESSAGE_MAX_SIZE is de fined in the FlashPro2000-dll.h and the value is 2000. Make REPORT_MESSAGE_MAX_SIZE sure to declare characters string length no less then 2000 characters. When F_ReportMessage is called then at the end the internal report message buffer in the programmer software is cleared.
0); UpdateWindow(); F_GetReportMessageChar F_GetReportMessageChar - Get one character of the the last report message from the programmer. VALID FPA index - ( 1 to 16 ) See comment for the F_ReportMessage function. FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
The F_ConfigFileLoad function can download the programmer setup from the external setup file. Setup file can be created using standard GUI FlashPro2000 Flash Programmer software. When setup from the file is downloaded, then old configuration setup is overwritten. New setup can be modified using F_GetConfig and F_SetConfig functions.
Parameter name and value must be separated by minimum one white character like space or tabulation. See the configuration file created by the FlashPro2000 software for details. Use the Notepad to open the configuration file..
- all 16 bits width - Texas Instruments text format, Motorola *.s19 format and Intel *.hex format. When file is downloaded then contents of this file is analysed. Only code memory location valid for FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
- Read code from internal code buffer and calculate the check sum. VALID FPA index - ( 1 to 16 ). Syntax: MSPPRG_API LONG_X F_Get_CodeCS( int index ); index - index of the desired code FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Code buffer location, but flag still will be set to used. Use the F_Clr_Code_Buffer() instruction to fully clear the Code buffer before writing the new data block. Syntax: MSPPRG_API INT_X F_Put_Word_to_Code_Buffer( LONG_X address, FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Instruction allows to read or verify contents of the CSM Password buffer. Data returns value 0x0000 to 0xFFFF if in the particular Password buffer location the flag is set to used, otherwise return value -1 (minus one) if data is empty. FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
FALSE - if address is not valid -2 - FPA_INVALID_NO. Example: ........for( addr = addr_min; addr<=addr_max addr++ ) st = F_Put_Word_to_Buffer( addr, data[addr] ); st = F_Copy_Buffer_to_Flash( addr_min, size ); ....F_Get_Word_from_Buffer FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Page 58
- ( 1 to 16 ) Syntax: MSPPRG_API BYTE F_Get_Word_from_Buffer( LONG_X address ); Return value: Requested word from the specified address of the Read Data Buffer, or negative value if address is invalid FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
To write the CSM security password, the flag CFG_CSMLOCK_PASSWORD_ENABLE in the configuration setup must be enable Syntax: MSPPRG_API INT_X F_Write_CSM_Password( void ); Return value: 0 - FALSE 1 - TRUE -2 - FPA_INVALID_NO. or Status - see error list FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Status - see error list Example: See example above (F_Open_Target_Device). F_Segment_Erase F_Segment_Erase - Erase any segment of the TMS320Fxx Flash memory. VALID FPA index - ( 1 to 16 ) or 0 (ALL FPAs) executed sequentially. FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
- Read one word from RAM, registers, IO, OTP, Flash etc. VALID FPA index - ( 1 to 16 ) or 0 (ALL FPAs) executed sequentially. Read one word from any location of the target device. Parameters: address Syntax: FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Function can also be used to writing longer data block, however for this purpose it is recommended to use an encapsulated function F_Memory_Write() described in this manual. The F_Copy_Buffer_to_Flash() (the same as the F_Memory_Write_Data() FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
1 - TRUE if data has been read successfully 0 - FALSE. -2 - FPA_INVALID_NO. or Status - see error list NOTE: Specified address in the temporary flash buffer is the same as a physical FLASH address. Example: ........FlashPro2000 Multi-FPA API-DLL User’s Guide PM034A02 Rev.1...
Need help?
Do you have a question about the FlashPro2000 and is the answer not in the manual?
Questions and answers