slau358q.pdf - 第3页
www.ti.com 3 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Contents 3.5.3 Commands Supported by Application Firmware ................…

2
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Contents
Contents
Preface ........................................................................................................................................ 7
1 Introduction......................................................................................................................... 9
1.1 Software Installation ....................................................................................................... 10
1.2 Driver Installation ........................................................................................................... 11
1.3 Hardware Installation ...................................................................................................... 11
2 Operation .......................................................................................................................... 13
2.1 Programming MSP Flash Devices Using the MSP Gang Programmer ............................................. 13
2.1.1 Programming Using Interactive Mode .......................................................................... 14
2.1.2 Programming From Image ....................................................................................... 20
2.1.3 Programming From Script........................................................................................ 24
2.1.4 Programming in Standalone Mode.............................................................................. 30
2.1.5 Memory Setup for GO, Erase, Program, Verify, and Read .................................................. 33
2.1.6 Secure Device Setup and Memory Protection ................................................................ 35
2.1.7 Programming MCU With IP Encapsulated Segment ......................................................... 37
2.1.8 Serialization ........................................................................................................ 38
2.1.9 Creating and Using Images ...................................................................................... 40
2.1.10 Programming From Image File ................................................................................. 44
2.1.11 Programming From SD Card ................................................................................... 45
2.1.12 File Extensions ................................................................................................... 45
2.1.13 Checksum Calculation........................................................................................... 46
2.1.14 Commands Combined With the Executable File............................................................. 46
2.2 Data Viewers................................................................................................................ 47
2.3 Status Messages ........................................................................................................... 49
2.4 Self Test ..................................................................................................................... 53
2.5 Label ......................................................................................................................... 58
2.6 Preferences ................................................................................................................. 59
2.6.1 USB ID Number ................................................................................................... 59
2.6.2 COM Port........................................................................................................... 59
2.6.3 LCD Contrast ...................................................................................................... 59
2.6.4 Checksum – Gang430 Standard ................................................................................ 59
2.7 Benchmarks................................................................................................................. 60
2.7.1 Benchmarks for MSP430F5xx................................................................................... 60
2.7.2 Benchmarks for MSP430FR5xx ................................................................................. 61
2.7.3 Benchmarks for MSP430F2xx................................................................................... 61
2.7.4 Benchmarks for MSP432P401R ................................................................................ 62
3 Firmware ........................................................................................................................... 63
3.1 Commands .................................................................................................................. 63
3.2 Firmware Interface Protocol............................................................................................... 64
3.3 Synchronization Sequence................................................................................................ 64
3.4 Command Messages ...................................................................................................... 64
3.4.1 Frame Structure ................................................................................................... 64
3.4.2 Checksum .......................................................................................................... 66
3.5 Detailed Description of Commands ...................................................................................... 66
3.5.1 General ............................................................................................................. 66
3.5.2 Commands Supported by the BOOT Loader .................................................................. 66

www.ti.com
3
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Contents
3.5.3 Commands Supported by Application Firmware .............................................................. 70
3.5.4 API Firmware Commands That Should Not be Used ........................................................ 73
4 Dynamic Link Library for MSP-GANG Programmer................................................................. 77
4.1 Gang430.dll Wrapper Description........................................................................................ 77
4.2 MSP-GANG.dll Description ............................................................................................... 77
4.2.1 MSPGANG_GetDataBuffers_ptr ................................................................................ 78
4.2.2 MSPGANG_SetGangBuffer, MSPGANG_GetGangBuffer................................................... 79
4.2.3 MSPGANG_GetDevice ........................................................................................... 81
4.2.4 MSPGANG_LoadFirmware ...................................................................................... 83
4.2.5 MSPGANG_InitCom .............................................................................................. 83
4.2.6 MSPGANG_ReleaseCom ........................................................................................ 83
4.2.7 MSPGANG_GetErrorString ...................................................................................... 84
4.2.8 MSPGANG_SelectBaudrate ..................................................................................... 84
4.2.9 MSPGANG_GetDiagnostic....................................................................................... 84
4.2.10 MSPGANG_MainProcess ....................................................................................... 85
4.2.11 MSPGANG_InteractiveProcess ................................................................................ 85
4.2.12 MSPGANG_Interactive_Open_Target_Device ............................................................... 85
4.2.13 MSPGANG_Interactive_Close_Target_Device............................................................... 86
4.2.14 MSPGANG_Interactive_DefReadTargets..................................................................... 86
4.2.15 MSPGANG_Interactive_ReadTargets ......................................................................... 87
4.2.16 MSPGANG_Interactive_ReadBytes ........................................................................... 88
4.2.17 MSPGANG_Interactive_WriteWord_to_RAM ................................................................ 88
4.2.18 MSPGANG_Interactive_WriteByte_to_RAM.................................................................. 89
4.2.19 MSPGANG_Interactive_WriteBytes_to_RAM ................................................................ 89
4.2.20 MSPGANG_Interactive_WriteBytes_to_FLASH ............................................................. 90
4.2.21 MSPGANG_Interactive_Copy_Gang_Buffer_to_RAM ...................................................... 90
4.2.22 MSPGANG_Interactive_Copy_Gang_Buffer_to_FLASH ................................................... 91
4.2.23 MSPGANG_Interactive_EraseSectors ........................................................................ 91
4.2.24 MSPGANG_Interactive_BlankCheck .......................................................................... 92
4.2.25 MSPGANG_Interactive_DCO_Test............................................................................ 92
4.2.26 MSPGANG_SelectImage ....................................................................................... 93
4.2.27 MSPGANG_EraseImage ........................................................................................ 94
4.2.28 MSPGANG_CreateGangImage ................................................................................ 94
4.2.29 MSPGANG_LoadImageBlock .................................................................................. 95
4.2.30 MSPGANG_VerifyPSAImageBlock ............................................................................ 96
4.2.31 MSPGANG_ReadImageBlock .................................................................................. 96
4.2.32 MSPGANG_Read_Code_File................................................................................. 100
4.2.33 MSPGANG_Save_Config, MSPGANG_Load_Config, MSPGANG_Default_Config................... 100
4.2.34 MSPGANG_SetConfig, MSPGANG_GetConfig ............................................................ 101
4.2.35 MSPGANG_GetNameConfig, MSPGANG_SetNameConfig.............................................. 110
4.2.36 MSPGANG_SetTmpGANG_Config .......................................................................... 112
4.2.37 MSPGANG_GetLabel .......................................................................................... 113
4.2.38 MSPGANG_GetInfoMemory, MSPGANG_SetInfoMemory ............................................... 114
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.................................... 114
4.2.40 MSPGANG_Set_MCU_Name................................................................................. 115
4.2.41 MSPGANG_HW_devices...................................................................................... 116
4.2.42 MSPGANG_GetProgressStatus .............................................................................. 117
4.2.43 MSPGANG_GetAPIStatus..................................................................................... 119
4.2.44 MSPGANG_Set_IO_State..................................................................................... 120
4.2.45 MSPGANG_Convert_Address ................................................................................ 122
4.2.46 MSPGANG_Memory_Header_text ........................................................................... 122

www.ti.com
4
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Contents
4.2.47 MSPGANG_Interactive_ClrLockedDevice................................................................... 122
4.2.48 MSPGANG_Get_Code_Info................................................................................... 123
4.2.49 MSPGANG_MakeSound....................................................................................... 123
4.2.50 MSPGANG_CallBack_ProgressBar.......................................................................... 124
4.2.51 MSPGANG_GetPCHardwareFingerprint .................................................................... 126
4.2.52 MSPGANG_Flash_valid_addr ................................................................................ 126
5 Schematics ...................................................................................................................... 127
5.1 Schematics ................................................................................................................ 127
6 Frequently Asked Questions .............................................................................................. 134
6.1 Question: Why does device init, connect, or programming fail?.................................................... 134
6.2 Question: Can I use single wires for connection between MSP-GANG and target device? .................... 135
6.3 Question: How to serialize parts? ...................................................................................... 135
6.4 Question: How to have parts run after programming? ............................................................... 135
6.5 Question: What are possible reasons for the part to fail Verify step? ............................................. 135
Revision History ........................................................................................................................ 136