Elprotronic FlashPro-CC User Manual

Elprotronic FlashPro-CC User Manual

Flash programmer for the cc series devices - chipcon product from ti remote control programming
Table of Contents

Advertisement

Quick Links

FlashPro-CC
Flash Programmer
for the CC series devices - Chipcon product from TI
Remote Control Programming User's Guide
PM024A02 Rev.2
December-17-2007
Elprotronic Inc.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FlashPro-CC and is the answer not in the manual?

Questions and answers

Summary of Contents for Elprotronic FlashPro-CC

  • Page 1 FlashPro-CC Flash Programmer for the CC series devices - Chipcon product from TI Remote Control Programming User’s Guide PM024A02 Rev.2 December-17-2007 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.
  • Page 6: Table Of Contents

    Table of Contents 1. Introduction ............. 9 2.
  • Page 7 F_ReportMessage, F_Report_Message ......51 F_GetReportMessageChar ........53 F_ReadCodeFile, F_Read_CodeFile .
  • Page 8 Appendix A ............. . . 84 FlashPro-CC Command Line interpreter ........84...
  • Page 9: Introduction

    1. Introduction FlashPro-CC 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 eight Flash Programming Adapters (FPAs) significantly reducing programming speed in production.
  • Page 11 Figure 1.2 Block diagram of the Multi-FPA application DLL is presented on the Figure 1.2. To support the Multi-FPA API-DLL feature, the software package contains nine dll files - the Multi-FPA API-DLL selector - eight standard single FPAs API-DLLs Figure 1.3 shows the logical connections between dll files. Remote Control Programming User’s Guide PM024A02 Rev.2...
  • Page 12 Figure 1.3 The main FlashProCC-FPAsel.dll (Multi-FPA selector) allows to transfer API-DLL functions coming from an application software to desired single application dll (FlashProCC- FPA1.dll to FlashProCC-FPA8.dll). Note: Software package contains one FlashProCC-FPA1.DLL. Files FlashProCC- FPA2.DLL to FlashProCC-FPA8.DLL will be copied automatically if required. The FlashProCC-FPAsel.dll is transparent for all API-DLL functions implemented in the single API-DLLs functions.
  • Page 13 fpa = 1 to 8 when the only one desired FPA required to be selected 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.
  • Page 14 The FlashPro-CC 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\CCxx\USB FlashPro-CC\API-DLL FlashProCC-FPAsel.dll...
  • Page 15 DLL library. The config.ini file has default setup information. This file can be modified and taken directly form the FlashPro-CC Flash Programmer application software. To create required config.ini file the standard FlashPro-CC Flash programmer software should be open and required setup (memory option, communication speed etc) should be created.
  • Page 16: Demo Program

    C:\Program Files\Elprotronic\CCxx\USB FlashPro-CC\API-DLL-Demo\Cpp Program can be activated by selecting the FlashProCC-DLL-DemoCpp.exe located in the \release subdirectory. This demo program can also be activated from the windows menu: Start->Program->Elprotronic-Flash Programmer->(CCxx) USB FlashPro-CC->FlashProCC-DLL-Demo- Remote Control Programming User’s Guide PM024A02 Rev.2...
  • Page 17 FPA-8. If for example two FPAs will be used with SN 20070031 and 20070032 then the contents of the FPA’s configuration file will be as follows: ;=================================================================== ; USB-FPA configuration setup ; Elprotronic Inc. ;------------------------------------------------------------------- Figure 2.1 Demo program dialogue screen using DLLs.
  • Page 18 ; syntax: FPA-x Serial Number where FPA-x can be FPA-1, FPA-2, FPA-3 ..up to FPA-8 Serial number - get serial number from the desires FPA's label * Minimum one FPA's must be specified FPA-x order - any (without semicolon - comment) ;FPA-1 20050116...
  • Page 19 FlashPro-CC Flash Programming software (GUI) is executed. Also buttons Power ON/OFF, RESET has the same action as related buttons in standard programmer. Refer to the FlashPro-CC Flash Flash Programmer for the CC series devices - User’s Manual for details of these functions.
  • Page 20 Button Erase Segment - F_Segment_Erase(..); Button Blank Check Segm. - F_Sectors_Blank_Check(..); Button Write Flash Block - F_Copy_Buffer_to_Flash(..); - F_Copy_Flash_to_Buffer(..) Button Read Flash Block Button Write XRAM Block - F_Copy_Buffer_to_XRAM(..); Button Read XRAM Block - F_Copy_XRAM_to_Buffer(..); Button Write direct RAM - F_Copy_Buffer_to_direct_RAM(..); Button Read direct RAM - F_Copy_direct_RAM_to_Buffer(..);...
  • Page 21 Read XRAM Block Read 16 bytes XRAM starting from address at 0xF000. On the report screen 16 bytes from each target devices taken from addresses 0xF000 to 0xF00F are displayed Write direct RAM Write 16 bytes to direct RAM at location 0x60 to 0x6F using function F_Copy_Buffer_to_direct_RAM( 0x60, 16);...
  • Page 22 is executed. When program is finished, then XRAM at location should be modified. XRAM contents can be read by pressing the Read XRAM Block button. To make a test do following steps (from the beginning): 1. FPA List 2. Initialization 3.
  • Page 23: Getting Started

    It is recommended to start the standard FlashPro-CC (GUI) programming software to verify if the hardware and the drivers setup are correct. Using the FlashPro-CC programming software the fully functional setup that satisfy desired requirements should be created. When it is done then using the “File->Save Setup as..”...
  • Page 24: Example With Multi-Fpa Api Dll

    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 FlashPro-CC (GUI) software. 1. Download data to target device F_OpenInstancesAndFPAs( “*# *”...
  • Page 25 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 an autoprogram in the standard FlashPro-CC (GUI) software. 1. Download data to all target devices (uses USB-FPAs) F_OpenInstancesAndFPAs( FPAs-setup.ini);...
  • Page 26 (but it is not required) as code data downloaded to the target devices connected to second FPA etc. In the example below the downloaded code to target devices are not the same . 2. Download independent data to target devices (uses USB-FPAs) F_OpenInstancesAndFPAs( FPAs-setup.ini);...
  • Page 27: List Of The Dll Instructions

    4. List of the DLL instructions All DLL instructions are divided to four groups - related to Multi-FPA selector, single FPA generic, single FPA encapsulated and single FPA sequential instructions. Multi-FPA specific instructions are related to the Multi-FPA DLL only. Generic instructions are related to initialization programmer process, while encapsulated and sequential instructions are related to target device’s function.
  • Page 28: Multi-Fpa Instructions

    4.1 Multi-FPA instructions The Multi-FPA API-DLL instructions are related to Multi-FPA selector only. These instructions allows to initialize all single applications dlls and select the instruction patch between application software and desired FPA and sequential/simultaneous instructions transfer management Up to eight independent FPAs can be remotely controlled from the application software.
  • Page 29: F_Closeinstances

    F_OpenInstances - API-DLL initialization in the PC. Instruction must be called first - before all other instruction. Instead this function the F_OpenInstancesAndFPAs can be used. Important: not recommended It is to use this function. Function used only for compatible with the old software.
  • Page 30 2. When the first two characters in the List string are not *#, then string contains file name or full path of the file with list of the FPA’s serial numbers, eg. “C:\Program Files\Elprotronic\FPAs-setup.ini” Return value: number of opened instances 1.
  • Page 31 String -> “*# SN1, SN2, SN3, SN4, SN5...” Where the SN1- FPA’s serial number that should be assigned to FPA-1 index SN2- FPA’s serial number that should be assigned to FPA-2 index etc. As a delimiter the comma ‘,’ or white space ‘ ’ can be used. Example: “*# 20060123, 0, 20060346, 20060222, 20060245"...
  • Page 32 “ %8.8li”, Snr[k] ); snlist += buf; F_OpenInstances_AndFPAs( snlist ); 2.The FPA list in the configuration file: String -> “C:\Program Files\Elprotronic\FPAs-setup.ini” Example of the FPA configuration file: -> semicolon - comment Syntax of the FPAs configuration specified FPA-x...
  • Page 33: F_Api_Dll_Directory

    ; NotePad editor can be used to create the FPA configuration file. When the ‘*’ is used instead FPA’s SN, then any FPA will be accepted. The ‘*’ can be used only once and on the end of the FPA’s list eg. FPA-1 20050116 FPA-3...
  • Page 34: F_Set_Fpa_Index

    F_API_DLL_Directory F_API_DLL_Directory - The DLL directory location. VALID FPA index - irrelevant - the same directory location for all DLLs. The F_API_DLL_Directory command can specify the directory path where the DLLs are located. This command is not mandatory and usually is not required. But in some application software (like in the LabVIEW) the default location of the DLLs is not transferred to the DLL.
  • Page 35: F_Get_Fpa_Index

    #define ALL_ACTIVE_FPA in the header file Return value: TRUE - if used fpa index is valid FPA_INVALID_NO - if used fpa index is not activated or out of range note: FPA_INVALID_NO -> -2 (minus 2) F_Get_FPA_index F_Get_FPA_index - Get current FPA index Syntax: BYTE MSPPRG_API F_Get_FPA_index ( void );...
  • Page 36: F_Laststatus

    Function allows to enable communication with selected FPA adapter if the mentioned FPA has been disabled using the function F_Disable_FPA_index(...). By default, all FPAs are enabled. Syntax: void MSPPRG_API F_Enable_FPA_index ( BYTE fpa ); Parameters: fpa -> 1 to MAX_FPA_INDEX where MAX_FPA_INDEX F_LastStatus F_LastStatus...
  • Page 37: F_Get_Fpa_Sn

    - Single DLL for the USB MSP430-FPA (FlashPro430) DLL ID = 0x3000 - Single API-DLL for the GangPro430 DLL ID = 0x4000 - Single API-DLL for the FlashPro-CC DLL ID = 0x5000 - Single API-DLL for the GangPro-CC DLL ID = 0x6000...
  • Page 38: Generic Instructions

    4.2 Generic instructions Generic instructions are related to initialization programmer process, configuration setup and preparation data, turning ON and OFF target’s DC and RESET target device. Any communication with the target device is provided when any of the generic instruction is executed. Generic instructions should be called before encapsulated and sequential instruction.
  • Page 39 Return value: 0 - FALSE >0 - Detected FPA’s Serial Number Example: long SN[MAX_USB_DEV_NUMBER+1]; F_OpenInstances( 1 ); // DLL initialization - one instance F_Set_FPA_index( // select access to the first instance n = 0; //no of detected FPAs for( k=1; k<=MAX_USB_DEV_NUMBER ; k++ ) SN[k] = F_Check_FPA_access(k);...
  • Page 40: F_Dlltypever

    - Single DLL for the USB MSP430-FPA (FlashPro430) DLL ID = 0x3000 - Single API-DLL for the GangPro430 DLL ID = 0x4000 - Single API-DLL for the FlashPro-CC DLL ID = 0x5000 - Single API-DLL for the GangPro-CC DLL ID = 0x6000...
  • Page 41: F_Close_All

    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 the function F_OpenInstances if none of the instances has not been activated before. That allows to use old application software without calling the new type of Multi-FPA functions. In this case the F_Check_FPA_access function can be used to activate communication between PC and Programming Adapter.
  • Page 42: F_Getsetup

    F_Close_All function should be called as the last one before *.dll is closed. When the F_Close_All is called then communication port becomes closed and all internal dynamic data will be released from the memory. To activate communication with the programmer when the function F_Close_All has been used the F_Initialization function must be called first.
  • Page 43 The F_ConfigSetup can modify configuration of the programmer. When the F_ConfigSetup is called, then the structure data block is transferred from the software application to the programmer software. Current programmer setup can be read using function setup F_GetSetup. When data block is taken from the programmer, then part or all of the configuration data can be modified and returned to programmer using F_ConfigSetup function.
  • Page 44 INT_X EraseDefBlock4StopAddr; INT_X ReadDefBlock1En; INT_X ReadDefBlock1StartAddr; INT_X ReadDefBlock1StopAddr; INT_X ReadDefBlock2En; INT_X ReadDefBlock2StartAddr; INT_X ReadDefBlock2StopAddr; INT_X ReadDefBlock3En; INT_X ReadDefBlock3StartAddr; INT_X ReadDefBlock3StopAddr; INT_X ReadDefBlock4En; INT_X ReadDefBlock4StartAddr; INT_X ReadDefBlock4StopAddr; INT_X Spare1; INT_X Spare2; INT_X Spare3; INT_X Spare4; INT_X Spare5; INT_X Spare6; INT_X Spare7; INT_X Spare8;...
  • Page 45: F_Setconfig

    F_GetSetup( &config ); //API-DLL - get configuration from the programmer config.CommSpeedIndex = SPEED_3MB_INDEX; //select JTAG interface config.FlashEraseModeIndex = ERASE_ALL_MEM_INDEX; //select all memory erase option F_ConfigSetup( config ); //API-DLL - setup configuration in the programmer F_SetConfig F_SetConfig - Setup one item of the programmer’s configuration. VALID FPA index - ( 1 to 8 ) or 0 (ALL FPAs) executed sequentially.
  • Page 46 CFG_VERIFYMODE CFG_IEEE_ADDR_MODE CFG_MAN_IEEE_ADDR_MODE CFG_BEEP_OK_EN CFG_VCCINDEX CFG_TARGET_EN_MASK CFG_RETAIN_DEF_DATA_EN CFG_RETAIN_START_ADDR CFG_RETAIN_STOP_ADDR CFG_ERASE_DEFBLOCK1_EN CFG_ERASE1_START_ADDR CFG_ERASE1_STOP_ADDR CFG_ERASE_DEFBLOCK2_EN CFG_ERASE2_START_ADDR CFG_ERASE2_STOP_ADDR CFG_ERASE_DEFBLOCK3_EN CFG_ERASE3_START_ADDR CFG_ERASE3_STOP_ADDR CFG_ERASE_DEFBLOCK4_EN CFG_ERASE4_START_ADDR CFG_ERASE4_STOP_ADDR CFG_READ_DEFBLOCK1_EN CFG_READ1_START_ADDR CFG_READ1_STOP_ADDR CFG_READ_DEFBLOCK2_EN CFG_READ2_START_ADDR CFG_READ2_STOP_ADDR CFG_READ_DEFBLOCK3_EN CFG_READ3_START_ADDR CFG_READ3_STOP_ADDR CFG_READ_DEFBLOCK4_EN CFG_READ4_START_ADDR CFG_READ4_STOP_ADDR CFG_IEEE_ADDR_LOCATION CFG_IEEE_ADDR_LOC_MODE CFG_IEEE_ADDR_LSB_FIRST // -------------- CONFIG_BLOCK - definitions ---- CFG_MICROCONTROLLER CC_ANY // 1...
  • Page 47 // 6 - CC2430F128 // 7 - CC2431F32 // 8 - CC2431F64 // 9 - CC2431F128 // 10 - CC2510F8 // 11 - CC2510F16 // 12 - CC2510F32 // 13 - CC2511F8 // 14 - CC2511F16 // 15 - CC2511F32 // CFG_POWERTARGETEN 0 ->...
  • Page 48 ERASE_INFILE_MEM_INDEX ERASE_DEF_CM_INDEX // CFG_FLASHREADMODE READ_ALL_MEM_INDEX READ_PRGMEM_ONLY_INDEX READ_INFOMEM_ONLY_INDEX READ_DEF_MEM_INDEX // CFG_FLASH_LOCKBIT // CFG_UNLOCK_DEBUG_BIT // CFG_LOCK_BITS_EN // CFG_VERIFYMODE VERIFY_NONE_INDEX VERIFY_STD_INDEX VERIFY_FAST_INDEX // CFG_IEEE_ADDR_MODE AP_IEEE_ADDR_DISABLE AP_WR_NEW_IEEE_ADDR AP_RETAIN_CODE_WR_IEEE AP_IEEE_ADDR_BLANK AP_RETAIN_IEEE_ADDR AP_ASSIGN_WR_IEEE_ADDR AP_WR_IEEE_ADDR_FROM_FILE // CFG_MAN_IEEE_ADDR_MODE AP_IEEE_ADDR_DISABLE AP_WR_NEW_IEEE_ADDR AP_RETAIN_CODE_WR_IEEE // CFG_BEEP_OK_EN // CFG_VCCINDEX VCC_2V2_INDEX VCC_2V4_INDEX VCC_2V6_INDEX VCC_2V8_INDEX VCC_3V0_INDEX VCC_3V2_INDEX...
  • Page 49 CFG_RETAIN_STOP_ADDR 0x00000 to 0x1FFFF CFG_ERASE_DEFBLOCK1_EN 0-disable 1-enable CFG_ERASE1_START_ADDR 0x00000 to 0x1FFFF CFG_ERASE1_STOP_ADDR 0x00000 to 0x1FFFF CFG_ERASE_DEFBLOCK2_EN 0-disable 1-enable CFG_ERASE2_START_ADDR 0x00000 to 0x1FFFF CFG_ERASE2_STOP_ADDR 0x00000 to 0x1FFFF CFG_ERASE_DEFBLOCK3_EN 0-disable 1-enable CFG_ERASE3_START_ADDR 0x00000 to 0x1FFFF CFG_ERASE3_STOP_ADDR 0x00000 to 0x1FFFF CFG_ERASE_DEFBLOCK4_EN 0-disable 1-enable CFG_ERASE4_START_ADDR 0x00000 to 0x1FFFF CFG_ERASE4_STOP_ADDR...
  • Page 50: F_Getconfig

    0-disable 1-enable CFG_READ2_START_ADDR 0x00000 to 0x1FFFF CFG_READ2_STOP_ADDR 0x00000 to 0x1FFFF CFG_READ_DEFBLOCK3_EN 0-disable 1-enable CFG_READ3_START_ADDR 0x00000 to 0x1FFFF CFG_READ3_STOP_ADDR 0x00000 to 0x1FFFF CFG_READ_DEFBLOCK4_EN 0-disable 1-enable CFG_READ4_START_ADDR 0x00000 to 0x1FFFF CFG_READ4_STOP_ADDR 0x00000 to 0x1FFFF CFG_IEEE_ADDR_LOCATION 0x00000 to 0x1FFF8 CFG_IEEE_ADDR_LOC_MODE 0-default 1-defined CFG_IEEE_ADDR_LSB_FIRST 0-disable 1-enable F_GetConfig...
  • Page 51: F_Dispsetup

    Index’s list - see F_SetConfig Return value: Requested setup parameter; Example: ..........F_GetSetup( config ); DeviceIndex = config.DeviceIndex; or directly DeviceIndex = F_GetConfig( CFG_MICROCONTROLLER ); ....... F_DispSetup F_DispSetup - Copy programmer’s configuration to report message buffer in text form. VALID FPA index - ( 1 to 8 ) Syntax:...
  • Page 52 VALID FPA index - ( 1 to 8 ) When any of the DLL functions is activated, a message is created and displayed on the dynamically created programmer’s dialogue box. At the end of execution the dialogue box is closed and function returns back to the application program. Reported message is closed as well. The last report message can be read by application program using F_ReportMessage function.
  • Page 53: F_Getreportmessagechar

    void CMspPrgDemoDlg::Disp_report_message() char text[REPORT_MESSAGE_MAX_SIZE]; F_ReportMessage( text ); //API-Dll - get last report message Message = text; SetDlgItemText(IDC_REPORT, Message.GetBuffer(Message.GetLength())); CEdit* pEdit = (CEdit*) GetDlgItem(IDC_REPORT); pEdit->LineScroll(pEdit->GetLineCount(), 0); UpdateWindow(); F_GetReportMessageChar F_GetReportMessageChar - Get one character of the the last report message from the programmer.
  • Page 54: F_Readcodefile, F_Read_Codefile

    ..........#include “FlashProCC-Dll.h”; Cstring Message = ""; ..........void CMspPrgDemoDlg::Disp_report_message() char text[REPORT_MESSAGE_MAX_SIZE]; INT_X k; for( k = 0; k< REPORT_MESSAGE_MAX_SIZE; k++ ) text[k] = F_GetReportMessageChar( k ); Message = text; SetDlgItemText(IDC_REPORT, Message.GetBuffer(Message.GetLength())); CEdit* pEdit = (CEdit*) GetDlgItem(IDC_REPORT); pEdit->LineScroll(pEdit->GetLineCount(), 0); UpdateWindow(); F_ReadCodeFile, F_Read_CodeFile F_ReadCodeFile - Read code data from the file and download it to internal buffer.
  • Page 55: F_Get_Codecs

    Return value: (0xFFFe & info) | state where state is defined as follows: 0 - FALSE 1 - TRUE info is defined as follows: warning -> CODE_IN_ROM CODE_IN_RAM CODE_OUT_OF_FLASH CODE_OVERWRITTEN error -> INVALID_CODE_FILE OPEN_FILE_OR_READ_ERR Example: ....st = F_ReadCodeFile( FILE_TI_FORMAT, “c:\test\demofile.txt” ); if(( st &...
  • Page 56: F_Configfileload, F_Config_Fileload

    The F_ConfigFileLoad function can download the programmer setup from the external setup file. Setup file can be created using standard FlashPro-CC (GUI) Flash Programmer software. When the setup from the file is downloaded, then old configuration setup is overwritten. The new setup can be modified using F_GetSetup and F_ConfigSetup functions.
  • Page 57: F_Clr_Code_Buffer

    filename - configuration file name including path, file name and extention Return value: 0 - FALSE 1 - TRUE (0xFFFe & info) | state where state is defined as follows: 0 - FALSE 1 - TRUE info is defined as follows: error ->...
  • Page 58: F_Put_Byte_To_Code_Buffer

    F_Put_Byte_to_Code_Buffer F_Put_Byte_to_Code_Buffer - Write code data to code buffer. VALID FPA index - ( 1 to 8 ) or 0 (ALL FPAs) executed sequentially. Instruction allows to write contents of the code to code buffer instead using the F_ReadCodeFile instruction. Contents of the downloaded code data can be modified or filled with the new data, if code buffer has been cleared first (using F_Clr_Code_Buffer function).
  • Page 59: F_Put_Ieeeaddr64_To_Buffer

    Parameters value: code address - 0x0 to MAX_FLASH_SIZE-1 (0x1FFFF) Return value: 0x00 to 0xFF - valid code data -1 (0xFFFF) - code data not initialized on particular address F_Put_IEEEAddr64_to_Buffer F_Put_IEEEAddr64_to_Buffer - Write IEEE address to buffer. VALID FPA index - ( 1 to 8 ). Instruction allows to write one unique IEEE address to buffer.
  • Page 60: F_Get_Ieeeaddr64_From_Buffer

    Instruction is functionally the same as the F_Put_IEEEAddr64_to_Buffer, but allows to transfer byte by byte of the 64 IEEE address to buffer. Function is used when the Visual Basic 6 is used, that not support the Int 64 bits data. no ->...
  • Page 61: F_Power_Target

    When no = 0, the lowest byte of the IEEEAddr is transferred. When no = 7, the highest byte of the IEEEAddr is transferred. Parameters value: no - byte number of the 64 bits IEEEAddr data Return value: one byte of the IEEEAddr F_Power_Target F_Power_Target - Turn ON or OFF power from programming adapter to target...
  • Page 62: F_Get_Targets_Vcc

    VALID FPA index - ( 1 to 8 ) or 0 (ALL FPAs) executed sequentially. Function F_Reset_Target resets target device and target device’s application program can start. Length of the RESET pulse time is specified by ResetTimeIndex in configuration setup. See F_ConfigSetup description for details.
  • Page 63: Encapsulated Instructions

    4.3 Encapsulated instructions Encapsulated functions are powerful and easy to use. When called then all device actions from the beginning to the end are done automatically and final result is reported as TRUE or FALSE. Required configuration should be set first using F_GetSetup and F_ConfigSetup functions. Encapsulated function has following sequence: Power from the programming adapter becomes ON if PowerTargetEn in configuration setup is enabled.
  • Page 64: F_Verify_Lock_Bit

    Syntax: MSPPRG_API INT_X F_AutoProgram( INT_X mode ); mode = 0; mode = 1 and up - reserved Return value: 0 - FALSE 1 - TRUE Example: ......if( F_Initialization() != TRUE ) //required API-Dll - initialization // Initialization error F_GetSetup( &config ); //API-DLL - get configuration from the programmer ......
  • Page 65: F_Memory_Erase

    F_Verify_Lock_Bits -Verify the Lock debug Bit. If debug access is disabled, then only debug bit is verified. Other bits are not accessible when the debug bit enable is clear. VALID FPA index - ( 1 to 8 ) or 0 (ALL FPAs) executed simultaneously. Lock Protection bits bit-4 0x10 - Boot Block Lock...
  • Page 66: F_Memory_Blank_Check

    0 - FALSE 1 - TRUE F_Memory_Blank_Check F_Memory_Blank_Check - Check if the Target’s Flash Memory is blank. VALID FPA index - ( 1 to 8 ) or 0 (ALL FPAs) executed simultaneously. Syntax: MSPPRG_API INT_X F_Memory_Blank_Check( void ); Return value: 0 - FALSE 1 - TRUE F_Memory_Write...
  • Page 67: F_Memory_Read

    VALID FPA index - ( 1 to 8 ) or 0 (ALL FPAs) executed simultaneously. Note: During the verification process either all memory or just the selected part of the memory is verified, depending on settings specified in the configuration setup FlashEraseModeIndex Only data taken from the Code file are compared with the target’s flash memory.
  • Page 68: F_Write_Ieee_Address

    for( addr=0x0; addr<MAX_FLASH_SIZE; addr++) data[addr] = F_Get_Byte_from_Buffer( addr ); ....F_Write_IEEE_Address F_Write_IEEE_Address - Write content taken from the IEEE Address buffer to target devices. Write IEEE address option should be enabled in the configuration setup. VALID FPA index - ( 1 to 8 ) or 0 (ALL FPAs) executed simultaneously. Syntax: INT_X MSPPRG_API F_Write_IEEE_Address( void );...
  • Page 69: F_Write_Lock_Bits

    Return value: 0 - FALSE 1 - TRUE Example: #define “FlashProCC-Dll.h”; ULONG64 IEEE; F_Read_IEEE_Address(); IEEE = F_Get_IEEEAddr64_from_Buffer(); F_Write_Lock_Bits F_Write_Lock_Bits - Write lock bits to target devices. Contents of the lock bits should be set first using configuration setup instructions. VALID FPA index - ( 1 to 8 ) or 0 (ALL FPAs) executed sequentially.
  • Page 70: Sequential Instructions

    4.4 Sequential instructions Sequential instructions allow access to the target device in any combination of the small instructions like erase, read, write sector, modify part of memory etc. Sequential instruction have an access only when communication between target device and programming adapter is initialized. This can be done when F_Open_Target_Device instruction is called.
  • Page 71: F_Open_Target_Device

    F_Open_Target_Device F_Open_Target_Device - Initialization communication with the target device. VALID FPA index - ( 1 to 8 ) or 0 (ALL FPAs) executed simultaneously. When F_Open_Target_Device is executed, then Power from the programming adapter becomes ON if PowerTargetEn in configuration setup is enabled.
  • Page 72: F_Segment_Erase

    F_Close_Target_Device - Termination communication between target device and programming adapter. VALID FPA index - ( 1 to 8 ) or 0 (ALL FPAs) executed sequentially. Instruction should be called on the end of the sequential instructions. When F_Close_Target_Device instruction is executed then: Communication between target device and programming adapter is terminated.
  • Page 73: F_Sectors_Blank_Check

    MSPPRG_API INT_X F_Segment_Erase( INT_X address ); Return value: 0 - FALSE 1 - TRUE Example: ....F_Segment_Erase(0x4000); // erase segment 0x4000 to 0x47FF F_Segment_Erase(0x4100); // erase the same segment ....F_Sectors_Blank_Check F_Sectors_Blank_Check - Blank check part or all Flash Memory. Start and stop address of the tested memory should be specified.
  • Page 74: F_Read_Byte_From_Xram

    F_Write_Byte_to_XRAM - Write one byte to XRAM. VALID FPA index - ( 1 to 8 ) or 0 (ALL FPAs). Write one byte to any XRAM location of the target devices. Parameters: address - address where XRAM is located 0xDF00 to 0xFFFF, data - one byte to be written to target device Syntax:...
  • Page 75: F_Write_Byte_To_Direct_Ram

    F_Write_Byte_to_direct_RAM F_Write_Byte_to_direct_RAM - Write one byte to direct RAM. VALID FPA index - ( 1 to 8 ) or 0 (ALL FPAs) executed sequentially. Write one byte to any direct RAM location of the target devices. Parameters: address - address where RAM is located 0x00 to 0xFF, data - one byte to be written to target device Syntax:...
  • Page 76: F_Copy_Buffer_To_Flash

    0x00 to 0xFF - valid code data -1 (0xFFFF) - FALSE Example: F_Read_Byte_from_direct_RAM( 0x60 ); F_Copy_Buffer_to_Flash F_Copy_Buffer_to_Flash - Write data from the Buffer to target devices. VALID FPA index - ( 1 to 8 ) or 0 (ALL FPAs) executed sequentially. Parameters: start address - Flash address from 0x0 to 0x1FFFF,...
  • Page 77: F_Copy_Buffer_To_Xram

    F_Copy_Flash_to_Buffer - Read specified in “size” number of bytes from Flash and save it in the temporary buffer. Starting address is specified in the “start address”. VALID FPA index - ( 1 to 8 ) or 0 (ALL FPAs) executed sequentially. Syntax: MSPPRG_API INT_X...
  • Page 78: F_Copy_Xram_To_Buffer

    MSPPRG_API INT_X F_Copy_Buffer_to_XRAM( INT_X start_address, INT_X size ); Parameters: start address - physical XRAM address 0xDF00 to 0xFFFF size - size in bytes Return value: 0 - FALSE 1 - TRUE NOTE: Specified address in the temporary XRAM/Flash buffer is the same as a physical XRAM address.
  • Page 79: F_Copy_Buffer_To_Direct_Ram

    NOTE: Specified address in the temporary XRAM/Flash buffer is the same as a physical XRAM address. Example: ........st = F_Copy_XRAM_to_Buffer( 0xF220, 0xE0 ); if( st == TRUE ) for( addr = 0xF220; addr<0xF300; addr++ ) data[addr]= F_Get_Byte_from_Buffer( addr ); else ....
  • Page 80: F_Copy_Direct_Ram_To_Buffer

    for( addr = 0x60; addr<0x7f; addr++ ) st = F_Put_Byte_To_Buffer( addr, data[addr] ); st = F_Copy_Buffer_to_direct_RAM( 0x60, 0x20 ); ....F_Copy_direct_RAM_to_Buffer F_Copy_direct_RAM_to_Buffer - Read specified in “size” number of bytes from the direct RAM and save it in the temporary buffer. Starting address is specified in the “start address”.
  • Page 81: F_Get_Byte_From_Buffer

    NOTE: DLL contains two Buffers - one is dedicated to the data READ from target devices, second one is dedicated to the data to be WRITE to the target devices. Contents of the Buffers can not be verified by writing and read the same data to the Buffers e.g. F_Put_Byte_to_Buffer (0x1000, 5);...
  • Page 82: F_Get_Mcu_Data

    F_Set_PC_and_RUN - Instructions allows to run program in microcontroller from specified PC in the XRAM or Flash location. Program should be downloaded first using the Write to Flash or XRAM procedures. Note: The F_Open_Target_Device instruction is resetting the CPU. All internal registers states are set to default value.
  • Page 83 0x40 - PCON Idle 0x20 - CPU halted 0x10 - Power Mode 0 0x08 - Halt Status 0x04 - Debug Locked 0x02 - Oscillator stable 0x01 - Stack overflow Return value: data from the MCU buffer. Remote Control Programming User’s Guide PM024A02 Rev.2...
  • Page 84: Flashpro-Cc Command Line Interpreter

    Appendix A FlashPro-CC Command Line interpreter The Multi-FPA API-DLL can be used with the command line interpreter shell. This shell allows to use the standard Command Prompt windows or script file to execute the API-DLL functions. All required files are located in the directory...
  • Page 85 Press ENTER - result ->1 (OK) Type: F_Initialization() //initialization with config taken from the config.ini //setup taken from the FlashPro-CC - with defined CCxx type, code file etc. Press ENTER - result ->1 (OK) Type: F_AutoProgram( 0 ) Press ENTER - result ->1...
  • Page 86 Example-2: Run the FP-CC-commandline.exe and type the following commands: F_OpenInstancesAndFPAs( "*# *" ) // open instances and find the first adapter (any SN) F_Initialization() F_Report_Message() F_ConfigFileLoad( "filename" ) //put vaild path and config file name F_ReadCodeFile( 1, "FileName" ) //put vaild path and code file name (TI.txt format) F_AutoProgram( 0 ) F_Report_Message() ......
  • Page 87 List of command line instructions quit() ;close the command interpreter program help() ;display list below F_Trace_ON() F_Trace_OFF() F_OpenInstances( no ) F_CloseInstances() F_OpenInstancesAndFPAs( "FileName" ) F_Set_FPA_index( fpa ) F_Get_FPA_index() F_LastStatus( fpa ) F_DLLTypeVer() F_Multi_DLLTypeVer() F_Check_FPA_access(index ) F_Get_FPA_SN( fpa ) F_APIDLL_Directory( "APIDLLpath" ) F_Initialization() F_DispSetup() F_Close_All()
  • Page 88 F_Verify_Lock_Bits() F_Memory_Erase( mode ) F_Memory_Blank_Check() F_Memory_Write( mode ) F_Memory_Verify( mode ) F_Memory_Read() F_Write_IEEE_Address() F_Read_IEEE_Address() F_Write_Lock_Bits() F_Open_Target_Device() F_Close_Target_Device() F_Segment_Erase( address ) F_Sectors_Blank_Check( start_addr, stop_addr ) F_Copy_Buffer_to_Flash( start_addr, size ) F_Flash_to_Buffer( start_addr, size ) F_Write_Byte_to_XRAM( addr, data ) F_Read_Byte_from_XRAM( addr ) F_Write_Byte_to_direct_RAM( addr, data ) F_Read_Byte_from_direct_RAM( addr ) F_Copy_Buffer_to_XRAM( start_addr, size ) F_Copy_XRAM_to_Buffer( start_addr, size )

Table of Contents