SLAU358Q September   2011  – October 2019

 

  1.   Read This First
    1.     If You Need Assistance
    2.     Trademarks
    3.     Related Documentation From Texas Instruments
    4.     FCC and CE Compliance
  2. 1Introduction
    1. 1.1 Software Installation
    2. 1.2 Driver Installation
    3. 1.3 Hardware Installation
  3. 2Operation
    1. 2.1 Programming MSP Flash Devices Using the MSP Gang Programmer
      1. 2.1.1  Programming Using Interactive Mode
        1. 2.1.1.1 GO
        2. 2.1.1.2 Erase
        3. 2.1.1.3 Blank Check
        4. 2.1.1.4 Program
        5. 2.1.1.5 Verify
        6. 2.1.1.6 Read
      2. 2.1.2  Programming From Image
      3. 2.1.3  Programming From Script
        1. 2.1.3.1 Script Limitations
        2. 2.1.3.2 Command Syntax
        3. 2.1.3.3 Instructions
      4. 2.1.4  Programming in Standalone Mode
      5. 2.1.5  Memory Setup for GO, Erase, Program, Verify, and Read
        1. 2.1.5.1 Writing and Reading BSL Flash Sectors in the MSP430F5xx and MSP430F6xx MCUs
      6. 2.1.6  Secure Device Setup and Memory Protection
      7. 2.1.7  Programming MCU With IP Encapsulated Segment
      8. 2.1.8  Serialization
      9. 2.1.9  Creating and Using Images
      10. 2.1.10 Programming From Image File
      11. 2.1.11 Programming From SD Card
      12. 2.1.12 File Extensions
      13. 2.1.13 Checksum Calculation
      14. 2.1.14 Commands Combined With the Executable File
    2. 2.2 Data Viewers
    3. 2.3 Status Messages
    4. 2.4 Self Test
    5. 2.5 Label
    6. 2.6 Preferences
      1. 2.6.1 USB ID Number
      2. 2.6.2 COM Port
      3. 2.6.3 LCD Contrast
      4. 2.6.4 Checksum – Gang430 Standard
    7. 2.7 Benchmarks
      1. 2.7.1 Benchmarks for MSP430F5xx
      2. 2.7.2 Benchmarks for MSP430FR5xx
      3. 2.7.3 Benchmarks for MSP430F2xx
      4. 2.7.4 Benchmarks for MSP432P401R
  4. 3Firmware
    1. 3.1 Commands
    2. 3.2 Firmware Interface Protocol
    3. 3.3 Synchronization Sequence
    4. 3.4 Command Messages
      1. 3.4.1 Frame Structure
      2. 3.4.2 Checksum
    5. 3.5 Detailed Description of Commands
      1. 3.5.1 General
      2. 3.5.2 Commands Supported by the BOOT Loader
        1. 3.5.2.1  "Hello" Command
        2. 3.5.2.2  Boot Commands Disable
        3. 3.5.2.3  Boot Commands Enable
        4. 3.5.2.4  Get Diagnostic Command
        5. 3.5.2.5  Select Baud Rate Command
        6. 3.5.2.6  Erase Firmware Command
        7. 3.5.2.7  Load Firmware Command
        8. 3.5.2.8  Exit from Firmware Update Command
        9. 3.5.2.9  Get Label Command
        10. 3.5.2.10 Get Progress Status
      3. 3.5.3 Commands Supported by Application Firmware
        1. 3.5.3.1 Select Image Command
        2. 3.5.3.2 Main Process Command
        3. 3.5.3.3 Set Temporary Configuration in MSP-GANG Command
        4. 3.5.3.4 Get Selected Status Command
        5. 3.5.3.5 Read From Gang Data Buffer Command
        6. 3.5.3.6 Write to Gang Data Buffer Command
      4. 3.5.4 API Firmware Commands That Should Not be Used
        1. 3.5.4.1  Interactive Process Command
        2. 3.5.4.2  Erase Image Command
        3. 3.5.4.3  Read Info Memory From MSP-GANG Command
        4. 3.5.4.4  Write to MSP-GANG Info Memory Command
        5. 3.5.4.5  Verify Access Key Command
        6. 3.5.4.6  Write to Image Block Command
        7. 3.5.4.7  Verify Image Check Sum Command
        8. 3.5.4.8  Read Image Header Command
        9. 3.5.4.9  Disable API Interrupts Command
        10. 3.5.4.10 Display Message on LCD Display Command
        11. 3.5.4.11 Set IO State Command
  5. 4Dynamic Link Library for MSP-GANG Programmer
    1. 4.1 Gang430.dll Wrapper Description
    2. 4.2 MSP-GANG.dll Description
      1. 4.2.1  MSPGANG_GetDataBuffers_ptr
      2. 4.2.2  MSPGANG_SetGangBuffer, MSPGANG_GetGangBuffer
      3. 4.2.3  MSPGANG_GetDevice
      4. 4.2.4  MSPGANG_LoadFirmware
      5. 4.2.5  MSPGANG_InitCom
      6. 4.2.6  MSPGANG_ReleaseCom
      7. 4.2.7  MSPGANG_GetErrorString
      8. 4.2.8  MSPGANG_SelectBaudrate
      9. 4.2.9  MSPGANG_GetDiagnostic
      10. 4.2.10 MSPGANG_MainProcess
      11. 4.2.11 MSPGANG_InteractiveProcess
      12. 4.2.12 MSPGANG_Interactive_Open_Target_Device
      13. 4.2.13 MSPGANG_Interactive_Close_Target_Device
      14. 4.2.14 MSPGANG_Interactive_DefReadTargets
      15. 4.2.15 MSPGANG_Interactive_ReadTargets
      16. 4.2.16 MSPGANG_Interactive_ReadBytes
      17. 4.2.17 MSPGANG_Interactive_WriteWord_to_RAM
      18. 4.2.18 MSPGANG_Interactive_WriteByte_to_RAM
      19. 4.2.19 MSPGANG_Interactive_WriteBytes_to_RAM
      20. 4.2.20 MSPGANG_Interactive_WriteBytes_to_FLASH
      21. 4.2.21 MSPGANG_Interactive_Copy_Gang_Buffer_to_RAM
      22. 4.2.22 MSPGANG_Interactive_Copy_Gang_Buffer_to_FLASH
      23. 4.2.23 MSPGANG_Interactive_EraseSectors
      24. 4.2.24 MSPGANG_Interactive_BlankCheck
      25. 4.2.25 MSPGANG_Interactive_DCO_Test
      26. 4.2.26 MSPGANG_SelectImage
      27. 4.2.27 MSPGANG_EraseImage
      28. 4.2.28 MSPGANG_CreateGangImage
      29. 4.2.29 MSPGANG_LoadImageBlock
      30. 4.2.30 MSPGANG_VerifyPSAImageBlock
      31. 4.2.31 MSPGANG_ReadImageBlock
      32. 4.2.32 MSPGANG_Read_Code_File
      33. 4.2.33 MSPGANG_Save_Config, MSPGANG_Load_Config, MSPGANG_Default_Config
      34. 4.2.34 MSPGANG_SetConfig, MSPGANG_GetConfig
      35. 4.2.35 MSPGANG_GetNameConfig, MSPGANG_SetNameConfig
      36. 4.2.36 MSPGANG_SetTmpGANG_Config
      37. 4.2.37 MSPGANG_GetLabel
      38. 4.2.38 MSPGANG_GetInfoMemory, MSPGANG_SetInfoMemory
      39. 4.2.39 MSPGANG_Get_qty_MCU_Type, MSPGANG_Set_MCU_Type, MSPGANG_Get_MCU_TypeName, MSPGANG_Get_qty_MCU_Family, MSPGANG_Get_MCU_FamilyName, MSPGANG_Get_MCU_Name
      40. 4.2.40 MSPGANG_Set_MCU_Name
      41. 4.2.41 MSPGANG_HW_devices
      42. 4.2.42 MSPGANG_GetProgressStatus
      43. 4.2.43 MSPGANG_GetAPIStatus
      44. 4.2.44 MSPGANG_Set_IO_State
      45. 4.2.45 MSPGANG_Convert_Address
      46. 4.2.46 MSPGANG_Memory_Header_text
      47. 4.2.47 MSPGANG_Interactive_ClrLockedDevice
      48. 4.2.48 MSPGANG_Get_Code_Info
      49. 4.2.49 MSPGANG_MakeSound
      50. 4.2.50 MSPGANG_CallBack_ProgressBar
      51. 4.2.51 MSPGANG_GetPCHardwareFingerprint
      52. 4.2.52 MSPGANG_Flash_valid_addr
  6. 5Schematics
    1. 5.1 Schematics
  7. 6Frequently Asked Questions
    1. 6.1 Question: Why does device init, connect, or programming fail?
    2. 6.2 Question: Can I use single wires for connection between MSP-GANG and target device?
    3. 6.3 Question: How to serialize parts?
    4. 6.4 Question: How to have parts run after programming?
    5. 6.5 Question: What are possible reasons for the part to fail Verify step?
  8.   Revision History

Status Messages

The current status is always displayed at the bottom of the progress bar, as shown in Figure 2-1, and previous status and error messages are shown in the history window in the bottom left corner. are displayed in the report window.

All procedures in the MSP Gang Programmer are divided into small tasks to be executed in series. When first task is finished successfully, then the next task is started. Each task has is own consecutive number assigned by the task manager when the image is created. The most commonly executed tasks are listed below:

  • Initialization
  • Open Target Device
  • Close Target Device
  • Erase
    • Segment
    • Main memory
    • Info memory
    • BSL memory
  • Blank check
  • Program
  • Gang Program (program unique data to each target)
  • Write RAM
  • Write GANG RAM (write unique data to each target)
  • Verify
  • Read memory
  • Save Info-A
  • DCO calibration
  • Retain Info-A
  • SetPC and run
  • Capture PC and Stop
  • Stop PC
  • Secure device
  • Finish

For example, the operations Erase, Program ,and Verify execute the following tasks:

  • Initialization
  • Open Target Device
  • Erase
  • Blank check
  • Program
  • Verify
  • Close target and finish.

These tasks execute the easiest programming process in small MCU devices. The aforementioned tasks can be divided into smaller tasks that only erase one segment, erase info segment, or erase one block of the main memory. For that reason, many more tasks are displayed in the report window than are described above. For example, when programming the MSP430F5438 the following information would be displayed in the report window:

Executing Main Process... ............. 2 : init target 3 : erasing-Info 4 : erasing-Info 5 : erasing-Info 6 : erasing-Main 7 : erasing-Main 8 : erasing-Main 9 : erasing-Main 10 : erasing-Main 11 : erasing-Main 12 : erasing-Main 13 : erasing-Main 14 : erasing-Main 15 : Blank-1800 16 : Blank-1880 17 : Blank-1900 18 : Blank-5C00 19 : Blank-10000 20 : Blank-20000 21 : Blank-30000 22 : Blank-40000 23 : Write-FC00 24 : Write-FC90 25 : Write-FD10 26 : Write-FD80 27 : Write-FFE2 28 : Verify-FC00 29 : Verify-FC90 30 : Verify-FD10 31 : Verify-FD80 32 : Verify-FFE2 33 : Gl.Verify-1800 34 : Gl.Verify-5C00 35 : Gl.Verify-10000 36 : Gl.Verify-20000 37 : Gl.Verify-30000 38 : Gl.Verify-40000 39 : closing target 40 : Done 0 : Finished

This report indicates that sectors INFO-B, INFO-C, INFO-D, and the main memory block have been erased (tasks 2 to 14) blank checked (tasks 15 to 22), programmed (tasks 23 to 27) and verified (tasks 28 to 38). Finally, access to target devices is closed and the programming process is finished. Length of task description (including consecutive task number) is limited to 16 characters to be able display this information on the third line of the MSP Gang Programmer LCD display.

The MSP Gang Programmer can process up to 1000 tasks per one image saved in internal memory. Having that number of available tasks and one or more code files saved in internal memory (total memory footprint of up to 512KB in one image), the MSP Gang Programmer gives the user significant flexibility to perform custom programming procedures. If for any reason the code files and task scripts require more than 512KB of memory, then the next image memory can be taken and combined with the first one for one larger image block (1Mbyte or more). The MSP Gang Programmer has internal flash memory of 8Mbyte that can, if desired, all be used to form one image with a memory footprint of 8Mbyte.

Error messages are displayed similarly to status messages, however, programming is terminated if the error is related to all target devices. Subsequently, if the problem is resolved or the faulty target device is disabled, then the programming procedure can be restarted to complete the programming process. The result for all devices is reported in the results section (green or red icons). When the global status is reported as FAIL, see the result section for details. Similarly, the MSP Gang Programmer uses red and green LEDs to indicate the result of its operations (red indicates failure) and details are displayed on the LCD display. Below is the list of errors reported in the MSP Gang Programmer.

==== Errors from the BOOT loader. ==== ERROR # 001 - BOOT Firmware only is in the MSP-GANG! The API Firmware should be downloaded. ERROR # 002 - API Firmware CRC is not present! The API Firmware should be reloaded. ERROR # 003 - API Firmware CRC error! The API Firmware should be reloaded. ERROR # 004 - BOOT CRC error in the MSP-GANG! ==== Errors from the MSP-GANG Firmware. ==== ERROR # 010 - CRC Access key. Key corrupted. Access to programmer is blocked. ERROR # 011 - Invalid programmer's access key. Access to programmer is blocked. ERROR # 012 - Unknown interface. ERROR # 013 - Vcc is too low. ERROR # 014 - Vcc is too high. ERROR # 015 - VtIO is too low. ERROR # 016 - VtIO is too high. ERROR # 017 - Header CRC. Image header is corrupted. ERROR # 018 - Script CRC. Image script is corrupted. ERROR # 019 - Exceed script number. ERROR # 020 - Script command unknown. ERROR # 021 - MCU Fetch synch failed. ERROR # 022 - CPU JTAG synch failed. ERROR # 023 - MCU device initialization failed. ERROR # 024 - RAM firmware download failed. ERROR # 025 - Flash blank check failed. ERROR # 026 - Flash read verify failed. ERROR # 027 - Flash write failed. ERROR # 028 - Image flash write initialization failed. ERROR # 029 - Image flash lock failed. ERROR # 030 - Invalid script type/name. ERROR # 031 - Script size too big. ERROR # 032 - Used wrong MCU. ERROR # 033 - IR communication failed. ERROR # 034 - Page info number out of range. ERROR # 035 - Address too high. ERROR # 036 - Target number out of range. ERROR # 037 - Address not even. ERROR # 038 - Size not even. ERROR # 039 - DCO calibration frequency out of range. ERROR # 040 - DCO calibration failed. ERROR # 041 - Gang flash write failed. ERROR # 042 - SD Card - Read Response Error ERROR # 043 - SD Card - Boundary Address Error ERROR # 044 - SD Card - Initialization timeout ERROR # 045 - SD Card - Read timeout ERROR # 046 - SD Card - Initialization Error ERROR # 047 - SD Card - CRC7 Error ERROR # 048 - SD Card - CRC16 Error ERROR # 049 - SD Card - Write CRC Error ERROR # 050 - SD Card - Data Write Error ERROR # 051 - SD Card - Write Timeout ERROR # 052 - SD Card - MBR Sector Error ERROR # 053 - SD Card - Volume Error ERROR # 054 - SD Card - Address in File Error ERROR # 055 - SD Card - Read File Error ERROR # 056 - SD Card - File not found ERROR # 057 - Hardware Rev-0. option not supported. ERROR # 058 - Flash PSA verification failed. ERROR # 059 - Flash read (Rx) data error. ERROR # 060 - Vpp too low to secure fuse. ERROR # 061 - Secure key incorrect. ERROR # 062 - Secure device failed. ERROR # 063 - Target not open, no access. ERROR # 064 - BSL password wrong index. ERROR # 065 - BSL read (Rx) timeout. ERROR # 066 - BSL firmware download failed. ERROR # 067 - Unknown command. ERROR # 068 - Fast BSL initialization failed. ERROR # 069 - MSP-GANG current overload. Reduce amount of target devices to 5 or select 30 mA output current. ERROR # 070 - Wrong BSL passwords. Target cannot be unlocked. ==== Errors from the MSP-GANG DLL. ==== ERROR # 301 - Communication - Frame has errors ! ERROR # 302 - Unable to open COM port - already in use? ERROR # 303 - Unable to close COM port ! ERROR # 304 - Unable to modify COM port state ! ERROR # 305 - Synchronization failed. Programmer connected? ERROR # 306 - Timeout during operation - Correct COM port selected? ERROR # 307 - Wrong baud rate specified ! ERROR # 308 - Communication Port baud rate change ERROR # 309 - Communication port - diagnostic response error ERROR # 310 - Open Comm port - invalid handle value ERROR # 311 - Invalid Comm Port Setup ERROR # 312 - Open Comm Port timeout ERROR # 313 - Get Comm Port state error ERROR # 321 - Command did not complete correctly ! ERROR # 322 - Command failed or not defined or Target not accessible ! ERROR # 323 - Could not read 'default.mspgangcfg'! ERROR # 324 - File contains invalid record ! ERROR # 325 - Unexpected end of file ! ERROR # 326 - Error during file I/O ! ERROR # 327 - Selected file is of unrecognizable format ! ERROR # 328 - Unable to open file ! ERROR # 329 - Function argument(s) out of range ! ERROR # 330 - Note: Boot downloaded ERROR # 331 - WARNING: Temporary function blocked, due to used main polling ERROR # 332 - Image Memory corrupted or erased ! Load Image. ERROR # 333 - Target not accessible ! ERROR # 334 - Verification failed ! ERROR # 335 - Main Process Parameters not yet set ! Load Image. ERROR # 336 - Could not erase Image Buffer ! ERROR # 337 - Could not load Image Buffer ! ERROR # 338 - Could not load Main Process Parameters ! ERROR # 339 - Could not select Baud Rate ! ERROR # 340 - WARNING: Could not set target voltage - Short circuitry or settling time too small? ERROR # 341 - Invalid firmware command ! ERROR # 342 - Power supply voltage too low ! ERROR # 343 - WARNING: Sense voltage out of range - Check pin MSP_VCC_IN of target connector ! ERROR # 344 - Wrong target device connected ! ERROR # 345 - No target device connected ERROR # 346 - File(s) contains already specified data (code overwritten) ERROR # 347 - Selected Image number out of range ERROR # 348 - Could not open the configuration file. ERROR # 349 - Script Header size error ERROR # 350 - Image ID error. Image ignored, program terminated. ERROR # 351 - Image contents (size, no of tasks) error. Program terminated. ERROR # 352 - Image CRC error. Program terminated. ERROR # 353 - WARNING: Code overwritten. Code from the file written to already used location. ERROR # 354 - Code in the file contains invalid data. ERROR # 355 - Open File error ERROR # 356 - Extension or file name error ERROR # 357 - Wrong password for opening the image file ERROR # 358 - Wrong PC hardware fingerprint # for opening the image file ERROR # 359 - Image file ID error or file corrupted ERROR # 360 - Check Sum of the Image file error or file corrupted ERROR # 361 - Wrong header in the image file or file corrupted ERROR # 362 - Image file is not for the MSP-GANG programmer. ERROR # 363 - Image file contents error or file corrupted. ERROR # 364 - Unknown protection mode of the image file or file corrupted. ERROR # 365 - Data offset in the image file error or file corrupted. ERROR # 366 - Hex data conversion in the image file error or file corrupted. ERROR # 367 - Image file corrupted. ERROR # 368 - Image file cannot be unlocked ERROR # 369 - Customized MCUs license file open error ERROR # 370 - WARNING: Code specified for the BSL space location, but access to the BSL is locked. ERROR # 371 - Info memory page number is out of range. ERROR # 372 - COM ports scan number is too low. ERROR # 373 - Selftest data size too high. ERROR # 374 - Data size too high. ERROR # 377 - Gang mask ZERO. No target devices enabled. Nothing to do. ERROR # 378 - Address definition. ERROR # 379 - Data size is below 2. ERROR # 380 - Invalid DCO number. ERROR # 381 - Command not implemented. ERROR # 382 - Wrong Target number ERROR # 383 - Code File error. ERROR # 384 - Password File error. ERROR # 385 - Nothing to program/verify - empty code in selected memory space. ERROR # 386 - Code out of range of the selected MCU. ERROR # 387 - Invalid name index. ERROR # 388 - Warning: Part of the code ignored. Check the memory setup. ERROR # 391 - Image data size too long ERROR # 392 - Terminated by user ERROR # 393 - Code specified in the Retain Data space ERROR # 394 - Number of tasks out of range ERROR # 395 - Data blocks in all tasks out of range ERROR # 396 - WARNING: Code from file is out of range in selected MCU. ERROR # 397 - Option not supported for selected MCU. ERROR # 398 - Wrong destination. ERROR # 399 - The Address and Size of the Locking Options out of range. ERROR # 400 - Warning - empty data or string. ERROR # 401 - Invalid input parameter(s). ERROR # 402 - Selected Image is READ ONLY and cannot be reprogrammed. ERROR # 403 - Serial number location and code overlap. ERROR # 404 - Serial number size error. ERROR # 405 - No serial number found in serial number file. ERROR # 406 - Serial number address or size error. ERROR # 407 - Code located in the MPU-IPE space without selected access to MPU-IPE in Memory Options. ERROR # 408 - External Power Supply is required for selected MCU. ERROR # 999 - Invalid error number !