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

Serialization

Serialization implemented in the MSP-GANG creates a unique serial number (SN) or MAC address and saves it in the flash, FRAM, or dedicated MAC register in the target device. The SN or MAC address is new every time a new target device is programmed. The SN or MAC number can be generated automatically (incremented from the last number) or read from an external file every time before pressing the GO button.

To enable serialization, select ENABLE Serialization in the Serialization screen (see Figure 2-17). Specify the log file name where the all programmed SN and MAC numbers are saved. The SN or MAC number can be saved in any flash or FRAM location as specified in the Start Address in Memory field (see Figure 2-17). The address must be even, and the Used size in bytes (the size of the SN or MAC number) must also be an even number of bytes. The In Memory Format section specifies if the SN or MAC number is written LSB first or MSB first.

Serialization.pngFigure 2-17 Serialization

If the In Memory Format option is HEX (MSB First), the SN is saved to flash memory starting from the specified address (0x10000) as follows:

12 34 56 78 9A BC DE EF

If the In Memory Format option is HEX (LSB First), the SN is saved to flash memory as follows:

EF DE BC 9A 78 56 34 12

In the report window and log file, the SN is always displayed in the same order as it is saved in memory starting from the lowest address to the highest. In this case, if the SN is saved in memory as MSB first, then the displayed SN in the report window, log file, and Serialization screen (see Figure 2-17) are the same.

If the SN or MAC number is generated automatically (the Defined Number option is selected), the number is generated starting with the value in the Number starting from field and incremented as specified in the Increment field. All numbers must be specified in hex format. When the target are programmed with the new numbers, the value in Number starting from is automatically updated and saved in the configuration for use in the next session. The user is responsible for tracking whether or not a particular SN or MAC number has been used. The programmer only applies the values set by the user.

When the Number from the file option is selected, up to 8 numbers (SN or MAC) must be in the user-specified file, which must have an extension of .txt. The file can contain up to 8 numbers that will be applied in the next programming session. The file must be saved and valid before the GO button is pressed. If additional targets are to be programmed, the file must be updated with the new number list. The following list is an example of the contents of the SN or MAC number file:

01 0A A3 B4 32 35 65 23 01 0A A3 B4 32 35 65 24 01 0A A3 B4 32 35 65 25 01 0A A3 B4 32 35 65 26 01 0A A3 B4 32 35 65 27 01 0A A3 B4 32 35 65 28 01 0A A3 B4 32 35 65 29 01 0A A3 B4 32 35 65 2A

The preceding example lists numbers that would be programmed to 8 target devices using a size of 8 bytes each. These hex numbers can represent integer values or ASCII text, depending on the application. In the case of ASCII, the text must be converted to hex in the file.

After a set of 8 targets is programmed, the user must update the file (the same file name) with new values. The following example lists a new set of 8 values:

01 0A A3 B4 32 35 65 2B 01 0A A3 B4 32 35 65 2C 01 0A A3 B4 32 35 65 2D 01 0A A3 B4 32 35 65 2E 01 0A A3 B4 32 35 65 2F 01 0A A3 B4 32 35 65 30 01 0A A3 B4 32 35 65 31 01 0A A3 B4 32 35 65 32

The programmer writes the numbers as provided to the specified flash or FRAM location. The provided numbers must be the same size (in bytes) as specified in the Used size in bytes option (see Figure 2-17).

The SN or MAC number can be also saved to a dedicated register, if available on the target MCU; for example, in the MSP432E4xx MCUs. In this case, select the MAC in Fixed location option. The address for the MAC number is hardcoded and displayed (read only and grayed out) for user review in the Start Address in Memory field (see Figure 2-17).

If the SN or MAC number is saved to flash or FRAM, the same address cannot be used by the program code (specified in the code file). The programmer will display a warning if it detects a conflict between address of the SN or MAC number and code. If the linker requires that the code file fill the SN or MAC number location with a dummy value, select the Remove code contents in the location where the Unique Number is defined option to overwrite this location with the correct SN or MAC number.

If location specified for the SN or MAC number is not empty (all 0xFF), the SN or MAC number is not written to the target. If the programmer detects any value other that 0xFF, the existing value is restored and the new SN or MAC number is ignored. This process keeps an existing SN or MAC number in the target if the number was already programmed. To overwrite an existing value, erase the device memory before programming.

NOTE

The MSP-GANG does not erase the existing SN or MAC number if the erase all memory option is used. The old SN or MAC number is restored after the erase, the same way that the defined retained bytes are restored.

The SN or MAC number can be erased; for example, if serialization is disabled. After erasing, the SN or MAC number location can be used as regular memory.