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

MSP-GANG.dll Description
www.ti.com
98
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Dynamic Link Library for MSP-GANG Programmer
BYTE sp5; //0x75
BYTE sp6; //0x76
BYTE sp7; //0x77
BYTE sp8; //0x78
BYTE sp9; //0x79
BYTE sp10; //0x7A
BYTE sp11; //0x7B
BYTE sp12; //0x7C
BYTE sp13; //0x7D
BYTE sp14; //0x7E
BYTE sp15; //0x7F
}ctrl;
struct
{
BYTE offset[IMAGE_HEADER_SIZE/2];
char MCU_name[SCRIPT_MCU_NAME_SIZE]; //0
WORD Id[2]; //16
WORD SubId[2]; //20
WORD MainEraseMode; //24
WORD minPVcc; //26
WORD RAM_size; //28
WORD SubIDAddr; //30
BYTE FRAM; //32
//#define FRAM_NONE 0
//#define FRAM_ASIC 1
//#define FRAM_MSPXV2_57 2
//#define FRAM_APOLLO 3
//#define FRAM_MSPXV2_59 4
// --- one byte
BYTE DefaultDCO : 1; //33
BYTE ASIC : 1;
BYTE MPU : 1;
BYTE JTAG_Passw : 1;
BYTE BSLprogrammable : 1;
BYTE JTAG_Unlockable : 1;
BYTE BSL_16B_passw : 1;
BYTE F1_80 : 1; //spare
// --- one byte
BYTE TestPin; //34
BYTE CpuX; //35
BYTE Quick_W :1; //36
BYTE Quick_R :1;
BYTE Quick_W_bug :1;
BYTE Quick_0x08 :1;
BYTE Quick_0x10 :1;
BYTE Quick_0x20 :1;
BYTE Quick_0x40 :1;
BYTE Quick_0x80 :1;
BYTE FastFlash; //37
BYTE EnhVerify; //38
BYTE JTAG; //39
BYTE SpyBiWire; //40
BYTE Marginal; //41

www.ti.com
MSP-GANG.dll Description
99
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Dynamic Link Library for MSP-GANG Programmer
BYTE F5xx; //42
BYTE MCU_Group; //43
WORD RAM_addr; //44
BYTE SYS_CLK; //46 used for F5xx and up
//#define STANDARD 0 - for compatibility
#define Xv2_PLL 1 //as standard before
#define HF_8MHz 2 //FRAM FR57xx
#define HF_1MHz 3 //Apollo
#define HF2_8MHz 4 //FRAM FR58xx, FR59xx
#define Xv2_PLL_G60XX 5
#define DCO_16384HZ 6 //i2xxx
BYTE InfoA_type; //47
//#define STANDARD 0 - for compatibility
#define I2XX_1K 1 //i2xxx 1K - 0x1000-0x13FF
BYTE FLASH_Type; //48
//#define STANDARD 0 - for compatibility
#define SEGMENT_1K 1 //i2xxx 1K flash segment size
#define FLASH_SEGM_2K 2
#define FLASH_SEGM_4K 4
#define FLASH_SEGM_8K 8
#define FLASH_SEGM_16K 16
#define FLASH_SEGM_32K 32
BYTE Secure_Type; //49
//#define STANDARD 0 - for compatibility
#define SUC 1 //i2xxx
BYTE Map; //50
BYTE SysClkDiv2; //51
BYTE NMI_to_addr; //52
#define NMI_TO_ADDR_NOT_SUPPORTED 0x80
BYTE FW_type; //53
#define FAMILY_XMS432P401 21 //XSP432P401 Rev-B obsolete -
not supported
#define FAMILY_MSP432P401 22
#define FAMILY_MSP432P4111 23
#define FAMILY_MSP432 21
BYTE MCU_Type; //54
#define MSP430F 0x01 //or can be 0
#define CC_RF_BIT_ID 0x10
#define MSP_FR_BIT_ID 0x20
#define MSP432_BIT_ID 0x80
BYTE free_1; //55
BYTE free_2; //56
BYTE free_3; //57
WORD Id2[2]; //58
BYTE free_4; //62
// BYTE free[128-48];
}device;
};

MSP-GANG.dll Description
www.ti.com
100
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Dynamic Link Library for MSP-GANG Programmer
4.2.32 MSPGANG_Read_Code_File
MSPGANG_Read_Code_File reads or appends a code file or reads a password file and saves it in its
internal buffer. By default, the file is treated as the main code file as long as the setup has not redirected
the file to 'Append code' or 'Password code' using the MSPGANG_SetConfig function.
MSPGANG_SetConfig(CFG_OPEN_FILE_TYPE, CODE_FILE_INDEX)
MSPGANG_SetConfig(CFG_OPEN_FILE_TYPE, APPEND_FILE_INDEX)
MSPGANG_SetConfig(CFG_OPEN_FILE_TYPE, PASSW_FILE_INDEX)
When the MSPGANG_Read_Code_File is executed, the flag set by
MSPGANG_SetConfig(CFG_OPEN_FILE_TYPE, CODE_FILE_INDEX) is set to the default value of Read
Code File.
Syntax
LONG MSPGANG_Read_Code_File(LPTSTR FullPath)
Arguments
LPTSTR FullPath Path to the code file (*.hex,*.txt or *.s19, *.s28, *.s37)
Result
LONG Error code
4.2.33 MSPGANG_Save_Config, MSPGANG_Load_Config, MSPGANG_Default_Config
The current configuration file can be saved using the MSPGANG_Save_Config function and recalled when
required using the MSPGANG_Load_Config function. The current configuration can be erased and the
default configuration loaded by calling the MSPGANG_Default_Config function. When the new
configuration is loaded, some of the parameters can be modified item-by-item using
MSPGANG_SetConfig and can be read from the configuration item-by-item using MSPGANG_GetConfig.
The MSP-GANG configuration can also be created using the MSP-GANG GUI software (MSP-GANG-exe)
by setting desired programmer setup, verifying if all works, then saving the configuration using the "Save
Setup as..." option. The setup used in the GUI can be restored in the DLL when the above mentioned
configuration file is downloaded using MSPGANG_Load_Config function.
Syntax
LONG MSPGANG_Save_Config(LPTSTR filename)
LONG MSPGANG_Load_Config(LPTSTR filename)
LONG MSPGANG_Default_Config(void)
Arguments
LPTSTR filename Path to the configuration file
Result
LONG Error code