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

www.ti.com
MSP-GANG.dll Description
81
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Dynamic Link Library for MSP-GANG Programmer
4.2.3 MSPGANG_GetDevice
Reads all specific parameters of a device type from the internal MSP-GANG .DLL table and returns data
related to the selected device.
Syntax
LONG WINAPI MSPGANG_GetDevice(LPTSTR lpszDeviceName, void **lpData)
Arguments
LPTSTR lpszDeviceName MCU name. The device name; for example, 'MSP430F5438A' for desired MCU or (blank) for
currently selected MCU
void *lpData Pointer to internal structure
Result
LONG Error code
Data Format
typedef struct
{
long Group;
long IsFRAM;
long RAM_size;
long no_of_info_segm;
long info_segm_size;
long info_start_addr;
long info_end_addr;
long info_A_locked;
long MainMem_start_addr;
long MainMem_end_addr;
long no_of_BSL_segm;
long BSL_segm_size;
long BSL_start_addr;
long BSL_end_addr;
long Vcc_prg_min;
long Vcc_run_min;
long BSL_passw_size;
long family_index;
long has_JTAG_password;
long has_unlockable_JTAG;
long has_SBW;
long has_4wire_JTAG;
long has_BSL;
long no_of_DCO_constants;
long RAM_start_addr;
long MCU_ID;
long Clk_Type;
long uses_SUC;
long MCU_Type;
long MCU_Type_index;
long ARM_FW_Type;
long MAC_RegAddr;
long MPU_Type;
long spare[11];
} DEVICE_INFO;
In the application software, the pointer to the device info structure can be initialized as follows.
DEVICE_INFO *Device;
void *temp;
MSPGANG_GetDevice(" ", &temp);

www.ti.com
MSP-GANG.dll Description
83
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Dynamic Link Library for MSP-GANG Programmer
4.2.4 MSPGANG_LoadFirmware
Load firmware from MSP-GANG.dll to MSP-GANG Programmer,
NOTE: Do not use this command. This command is used by the API-DLL and GUI only.
Syntax
LONG MSPGANG_LoadFirmware(void)
4.2.5 MSPGANG_InitCom
MSPGANG_InitCom opens a communications port, sets the baud rate and checks if the MSP-GANG
Programmer is present.
Syntax
LONG MSPGANG_InitCom(LPTSTR lpszPort, LONG lBaud)
Arguments
char * lpszComPort Name of the port
LONG lBaudRate Baud rate
Result
LONG Error code
4.2.6 MSPGANG_ReleaseCom
Release communications port
Syntax
LONG MSPGANG_ReleaseCom(void)
Arguments
None
Result
LONG Error code
