slau358q.pdf - 第114页
MSP-GANG.dll Description www.ti.com 114 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Dynamic Link Library for MSP-GANG Programmer 4.…

www.ti.com
MSP-GANG.dll Description
113
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Dynamic Link Library for MSP-GANG Programmer
// enable 1
#define CFG_LCD_CONTRAST 16
// 0x00 --0x3F
#define CFG_TMP_ICC_HI_EN 18
// disable 0
// enable 1
#define CFG_TMP_IO_INTERFACE 20
// 0 - SBW_VIA_TDOI (pin 1) and TCK/TEST (pin-7/8)
// 1 - SBW_VIA_RST (pin 11) and TCK/TEST (pin-7/8)
#define CFG_TMP_RESET 22
// disable 0
// enable 1
#define CFG_TMP_KEYBOARD_EN 24
// disable 0
// enable 1
#define CFG_TMP_VCC_SETTLE_TIME 26
// 0...200 Vcc settle time in 20 ms increment (t = 0...4000 ms)
#define CFG_TMP_CUMULATIVE_ST_EN 28
// 0 - disable
// 1 - enable ( default )
#define CFG_WRAPPER_MASK 30
// used in the DLL wrapper of the MSP-GANG430 only. Do not use it.
#define CFG_WRAPPER_EN_KEY 32
// used in the DLL wrapper of the MSP-GANG430 only. Do not use it.
#define CFG_WRAPPER_GANG_MASK 34
// used in the DLL wrapper of the MSP-GANG430 only. Do not use it.
#define CFG_TMP_BSL_1ST_PASSW 36
// #define BSL_ANY_PASSW 0
// #define BSL_PASSW_FROM_CODE_FILE 1
// #define BSL_PASSW_FROM_PASSWORD_FILE 2
// #define BSL_EMPTY_PASSW 3
#define CFG_DISABLE_TASK_MASK 38
4.2.37 MSPGANG_GetLabel
See the Get Label command (Section 3.5.2.9) for detailed LABEL information.
Syntax
LONG MSPGANG_GetLabel(BYTE *Data)
Arguments
BYTE *Data Pointer to data buffer where the label is saved
Result
LONG Error code

MSP-GANG.dll Description
www.ti.com
114
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Dynamic Link Library for MSP-GANG Programmer
4.2.38 MSPGANG_GetInfoMemory, MSPGANG_SetInfoMemory
Reads or writes 128 bytes to the internal Information memory. Information memory contains configuration
data such as LCD contrast and USB port configuration, and it is not intended to be modified by the user.
Use the GUI software to set the Information memory.
Syntax
LONG MSPGANG_GetInfoMemory(BYTE page, BYTE *data)
LONG MSPGANG_SetInfoMemory(BYTE page, BYTE *data)
Arguments
BYTE page Page info 0 or 1
BYTE *data Pointer to or from data buffer
Result
LONG Error code
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
Set of functions that return the names of all supported MCUs, including the family, group, and MCU name.
Syntax
LONG WINAPI MSPGANG_Get_qty_MCU_Type( void );
LONG WINAPI MSPGANG_Set_MCU_Type( int type );
LONG WINAPI MSPGANG_Get_MCU_TypeName( LONG index, LPTSTR name );
LONG WINAPI MSPGANG_Get_qty_MCU_Family( void );
LONG WINAPI MSPGANG_Get_MCU_FamilyName( LONG index, LPTSTR name );
LONG WINAPI MSPGANG_Get_MCU_Name( LONG group_index, LONG index, LPTSTR name );
Use these functions in the following order:
typedef struct
{
int no;
char name[24];
} MCU_FAMILY;
MCU_FAMILY MCU_family_list[30];
typedef struct
{
int index;
char name[24];
} MCU_NAME;
MCU_NAME MCU_name_list[100];
n = MSPGANG_Get_qty_MCU_Family(); //get no of MCU groups
for(k=0; k<n; k++)
{
P = MSPGANG_Get_MCU_FamilyName(k, MCU_family_list[k].name);
If(p == 0) break;
MCU_family_list[k].no = p;
}
The following names and numbers are received using the previous functions:
MCU_Family_list
{ 1, " MSP430" },

www.ti.com
MSP-GANG.dll Description
115
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Dynamic Link Library for MSP-GANG Programmer
{ 0x20, " MSP430FR" },
{ 0x10, " CC430" },
{ 0x80, " MSP432" },
MCU_Group_list
{ 1, 1, " MSP430F1xx" },
{ 20, 1, " MSP430F2xx" },
{ 22, 1, " MSP430AFE2xx" },
{ 21, 1, " MSP430G2xx" },
{ 23, 1, " MSP430i2xx" },
{ 25, 1, " MSP430Txxx" },
{ 40, 1, " MSP430F4xx" },
{ 41, 1, " MSP430FE4xx" },
{ 42, 1, " MSP430FG4xx" },
{ 43, 1, " MSP430FW4xx" },
{ 50, 1, " MSP430F5xx" },
{ 60, 1, " MSP430F6xx" },
{ 62, 1, " MSP430FG6xx" },
{ 55, 0x20, " MSP430FR2xx" },
{ 56, 0x20, " MSP430FR4xx" },
{ 57, 0x20, " MSP430FR5xx" },
{ 67, 0x20, " MSP430FR6xx" },
{ 51, 0x10, " CC-430F5xx" },
{ 61, 0x10, " CC-430F6xx" },
{ 0x84,0x80, " MSP432P4xx" },
{ 0x85,0x80, " MSP432E4xx" },
List of the MCU names in a selected group can be found as follows (in this example, a list of the MCUs
from the MSP430F5xx group (group number 50)):
for(n = 0; n< 100; n++) MCU_name_list[n].index = 0;
for(n = 0; n< 100; n++)
{
p = MSPGANG_Get_MCU_Name(50, n, MCU_name_list[n].name);
if(p == 0) break;
MCU_name_list[n].index = n;
}
4.2.40 MSPGANG_Set_MCU_Name
The MSPGANG_Set_MCU_Name allows to select desired target MCU.
Syntax
LONG MSPGANG_Set_MCU_Name(LPTSTR name);
Arguments
LPTSTR MCU_name MCU name, the same as it is listed in the GUI software
Result
LONG Error code