slau358q.pdf - 第113页
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 //…

MSP-GANG.dll Description
www.ti.com
112
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Dynamic Link Library for MSP-GANG Programmer
4.2.36 MSPGANG_SetTmpGANG_Config
See the Set temporary configuration command (Section 3.5.3.3) for details.
Syntax
LONG MSPGANG_SetTmpGANG_Config(LONG no, LONG data)
Arguments
LONG no Index list of indexes below
LONG data
Result
LONG Error code
//----- TMP_CFG_INDEX and data --------
#define CFG_TMP_CLEAR 2
//data - none
#define CFG_TMP_TASK_MASK 4
//--- task mask bits ---- - for all tasks - set 0xFFFF
#define CONNECT_TASK_BIT 0x0001
#define ERASE_TASK_BIT 0x0002
#define BLANKCHECK_TASK_BIT 0x0004
#define PROGRAM_TASK_BIT 0x0008
#define VERIFY_TASK_BIT 0x0010
#define SECURE_TASK_BIT 0x0020
#define DCO_CAL_TASK_BIT 0x0040
//spare 0x0080 to 0x4000
#define RST_AND_START_FW_BIT 0x8000
#define CFG_TMP_VCC_VALUE 6
// Vcc in mV - 1800 ...3600
#define CFG_TMP_POWER_VCC_EN 8
// disable 0
// enable 1
#define CFG_TMP_INTERFACE 10
// (INTERFACE_JTAG | INTERFACE_FAST)
// (INTERFACE_JTAG | INTERFACE_MED)
// (INTERFACE_JTAG | INTERFACE_SLOW)
// (INTERFACE_SBW | INTERFACE_FAST)
// (INTERFACE_SBW | INTERFACE_MED)
// (INTERFACE_SBW | INTERFACE_SLOW)
#define CFG_TMP_GANG_MASK 12
// Targets GANG enable mask - 0x00 ...0xFF. Enable all targets -> 0xFF
// TARGET_1_MASK 0x01
// TARGET_2_MASK 0x02
// TARGET_3_MASK 0x04
// TARGET_4_MASK 0x08
// TARGET_5_MASK 0x10
// TARGET_6_MASK 0x20
// TARGET_7_MASK 0x40
// TARGET_8_MASK 0x80
#define CFG_TMP_VCC_ONOFF 14
// disable 0

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" },