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

Frame Structure

The data frame format follows the TI MSP serial standard protocol (SSP) rules, extended with a preceding synchronization sequence (SS), as described in Section 3.3. The MSP Gang Programmer is considered the receiver in Table 3-1, which details the data frame for firmware commands. The redundancy of some parameters results from the adaptation of the SSP or to save boot ROM space.

The data frame format of the firmware commands is shown in Table 3-1.

  • The first eight bytes (HDR through LH) are mandatory (– represents dummy data).
  • Data bytes D1 to Dn are optional.
  • Two bytes (CKL and CKH) for checksum are mandatory
  • Acknowledge done by the MSP Gang Programmer is mandatory.

The following abbreviations are used in Table 3-1.

CMD Command identification
R Do not use this command. Used for internal communication.
T Target number (1 to 8)
L1, L2 Number of bytes in AL through Dn. The valid values of these bytes are restricted as follows: L1 = L2, L1 < 255, L1 even.
A1, A2, A3 Block start address or erase (check) address or jump address LO or HI byte. The bytes are combined to generate a 24-bit word as follows: Address = A3 × 0x10000 + A2 × 0x100 + A1
LL, LH Number of pure data bytes (maximum 250) or erase information LO or HI byte or block length of erase check (max is 0xFFFF).
D1...Dn Data bytes
CKL, CKH 16-bit checksum LO or HI byte
xx Can be any data
No character (data byte) received or transmitted
ACK The acknowledge character returned by the MSP-GANG can be either DATA_ACK = 0x90 (frame was received correctly, command was executed successfully) or DATA_NAK = 0xA0 (frame not valid (for example, wrong checksum, L, L2), command is not defined, is not allowed.
PRS DATA_IN_PROGRESS = 0xB0 – Tasks in progress. Use Get Progress Status (0xA5) command to get the status and check when task is finished.

Table 3-1 Data Frame for Firmware Commands(1)(2)

MSP-GANG Firmware Command PROMPT CMD L1 L2 A1 A2 A3 A4 LL LH D1 D2...Dn CLK CLH ACK
"Hello" 0D ACK
Boot Commands Disable 3E 2A R R R R R R R R R R CKL CKH ACK
Boot Commands Enable 3E 2B R R R R R R R R R R CKL CKH ACK
Diagnostic 3E 32 04 04 00 00 00 00 CKL CKH
Diagnostic response 80 0 1E 1E D1 D2 D3 D4 D5 D6 D7 D08...D1E CKL CKH
Set Baud Rate 3E 38 06 06 D1 00 00 00 00 00 CKL CKH ACK
Erase Firmware 3E 39 R R R R R R R R R R CKL CKH ACK
Load Firmware 3E 3A R R R R R R R R R R CKL CKH ACK
Exit Firmware Update 3E 3B R R R R R R R R R R CKL CKH ACK
Get Label 3E 40 04 04 00 00 00 00 CKL CKH
Response-Get Label 80 00 8C 8C D1 D2 D3 D4 D5 D6 D7 D8...D140 CKL CKH
Get Progress Status A5
Response----,,,,--- 80 A5 D1 D2 D3 D4 D5 D6 D7 D7 D8 D9...D48
Main Process 3E 31 04 04 00 00 00 00 CKL CKH PRS
Interactive Task 3E 46 n n D1 D2 D3 D4 D5 D6...Dn CKL CKH
Response---,,--- 80 0 n n D1 D2 D3 D4 D5 D6 D7 D8...Dn CKL CKH
Erase Image 3E 33 04 04 00 00 00 00 CKL CKH PRS
Get Info C-D 3E 41 04 04 A1 00 00 00 CKL CKH
Response Get Info 80 0 80 80 D1 D2 D3 D4 D5 D6 D7 D8...D128 CKL CKH
Write Info C-D 3E 42 84 84 A1 00 80 0 D1 D2...D128 CKL CKH ACK
Get Access Key St 3E 44 04 04 00 00 00 00 CKL CKH ACK
Load Image 3E 43 n n A1 A2 A3 00 –6 00 D1 D2...Dn-6 CKL CKH ACK
Verify Image CRC 3E 45 08 08 A1 A2 A3 A4 LL LH D1 D2 CKL CKH ACK
Get Image Header 3E 47 06 06 A1 A2 00 00 n 00 CKL CKH
Response–,,,-- 80 0 n n D1 D2 D3 D4 D5 D6...Dn CKL CKH
Read Gang Buffer 3E 49 4 4 T 0 n 0 CKL CKH
Response–,,,-- 80 0 n n D1 D2 D3 D4 D5 D6 D7 D8...Dn CKL CKH
Write Gang Buffer 3E 4A n+4 n+4 T 0 n 0 D1 D2...Dn CKL CKH ACK
Disable API Interrupts 3E 4C 4 4 R R R R CKL CKH ACK
Select Image 3E 50 4 4 A1 0 0 0 CKL CKH ACK
Display Message 3E 54 n+4 n+4 A1 A2 n 00 D1 D2...Dn CKL CKH ACK
Set IO State 3E 4E 0C 0C VL VH 08 00 D1 D2...D8 CKL CKH ACK
Set Temporary Configuration 3E 56 06 06 A1 A2 2 0 D1 D2 CKL CKH ACK
Get Gang Status 3E 58 04 04 A1 0 0 0 CKL CKH
Response —,,,--- 80 0 n n D1 D2 D3 D4 D5 D6 D7 D8...Dn CKL CKH
Remote Selftest 3E 71 n+6 n+6 A1 A2 A3 A4 n 0 D1 D2...Dn CKL CKH
Response----,,--- 80 0 n n D1 D2 D3 D4 D5 D6 D7 D8...Dn CKL CKH
All numbers are bytes in hexadecimal notation. ACK is sent by the MSP-GANG.
PROMPT = 0x3E means data frame expected.