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

www.ti.com
MSP-GANG.dll Description
101
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Dynamic Link Library for MSP-GANG Programmer
4.2.34 MSPGANG_SetConfig, MSPGANG_GetConfig
Syntax
LONG MSPGANG_SetConfig(LONG index, LONG data)
Arguments
LONG index Configuration index. See list below.
LONG data Configuration data
Result
LONG Error code
Syntax
LONG MSPGANG_GetConfig(LONG index)
Arguments
LONG index Configuration index. See list below.
Result
LONG data Configuration data
List of Indexes
#define FROMIMAGE_BIT 0x1000
#define CFG_INTERFACE 0
#define INTERFACE_NONE 0
#define INTERFACE_JTAG 4
#define INTERFACE_SBW 8
#define INTERFACE_BSL 0xC
#define INTERFACE_TYPE_MAX_INDEX INTERFACE_BSL
#define CFG_JTAG_SPEED 1
#define INTERFACE_FAST 0
#define INTERFACE_MED 1
#define INTERFACE_SLOW 2
#define INTERFACE_SPEED_MAX_INDEX INTERFACE_SLOW
#define CFG_SBW_SPEED 2
// INTERFACE_FAST 0
// INTERFACE_MED 1
// INTERFACE_SLOW 2
#define CFG_BSL_SPEED 3
// INTERFACE_FAST 0
// INTERFACE_MED 1
// INTERFACE_SLOW 2
#define CFG_IO_INTERFACE 4
#define SBW_VIA_TDOI_BIT 0x00
#define SBW_VIA_RST_BIT 0x01
// 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_POWERTARGETEN 6
#define EXTERNAL_POWER_WHOLE_RANGE 0 // external power supply -

MSP-GANG.dll Description
www.ti.com
102
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Dynamic Link Library for MSP-GANG Programmer
whole range from Vccmin to Vccmax
#define POWER_SUPPLIED_BY_MSPGANG 1 // targets supplied by
MSP-GANG
#define EXTERNAL_POWER_IN_RANGE 2 // external power supply -
verified range - selected Vcc +/- 0.3V
#define CFG_VCCINDEX 7
// Vcc in mV 1800 - 3600
#define CFG_ICC_HI_EN 8
// disable 0 (up to 30mA from MSP-GANG to each targets)
// enable 1 (up to 50mA from MSP-GANG to each targets)
#define CFG_BLOWFUSE 9
// disable 0
// enable 1
#define CFG_TARGET_EN_INDEX 10
// Targets GANG enable mask - 0x00 ...0xFF. Enable all targets -
> 0xFF
#define TARGET_1_MASK 0x01
#define TARGET_2_MASK 0x02
#define TARGET_3_MASK 0x04
#define TARGET_4_MASK 0x08
#define TARGET_5_MASK 0x10
#define TARGET_6_MASK 0x20
#define TARGET_7_MASK 0x40
#define TARGET_8_MASK 0x80
#define CFG_FLASHERASEMODE 11
#define ERASE_NONE_MEM_INDEX 0
#define ERASE_ALL_MEM_INDEX 1
#define ERASE_PRG_ONLY_MEM_INDEX 2
#define ERASE_INFILE_MEM_INDEX 3
#define ERASE_DEF_CM_INDEX 4
#define ERASE_MAX_INDEX ERASE_DEF_CM_INDEX
#define CFG_ERASEINFOA 12 \
// disable 0
// enable 1
#define CFG_ERASEINFOB 13
// disable 0
// enable 1
#define CFG_ERASEINFOC 14
// disable 0
// enable 1
#define CFG_ERASEINFOD 15
// disable 0
// enable 1
#define CFG_MASSERASE_AND_INFOA_EN 16
// disable 0
// enable 1
#define CFG_ERASESTARTADDR 17
// FLASH/FRAM start erase address

www.ti.com
MSP-GANG.dll Description
103
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Dynamic Link Library for MSP-GANG Programmer
#define CFG_ERASESTOPADDR 18
// FLASH/FRAM end erase address
#define CFG_FLASHREADMODE 19
#define READ_ALL_MEM_INDEX 0
#define READ_PRGMEM_ONLY_INDEX 1
#define READ_INFOMEM_ONLY_INDEX 2
#define READ_DEF_MEM_INDEX 3
#define READ_MEM_MAX_INDEX READ_DEF_MEM_INDEX
#define CFG_READINFOA 20
// disable 0
// enable 1
#define CFG_READINFOB 21
// disable 0
// enable 1
#define CFG_READINFOC 22
// disable 0
// enable 1
#define CFG_READINFOD 23
// disable 0
// enable 1
#define CFG_FINALACTION_MODE 24
#define APPLICATION_NO_RESET 0
#define APPLICATION_TOGGLE_RESET 1
#define APPLICATION_TOGGLE_VCC 2
#define APPLICATION_JTAG_RESET 3
#define APPLICATION_RESET_MAX_INDEX APPLICATION_JTAG_RESET
#define CFG_BEEPMODE 25
// sum of following bits
#define BEEP_PCSPK_EN_BIT 1 //Beep via PC Speaker
enable
#define BEEP_OK_EN_BIT 2 //Beep when OK enable
#define BEEP_SOUND_EN_BIT 4 //Sound enable
#define CFG_DEFERASEMAINEN 26
// disable 0
// enable 1
#define CFG_CUSTOMRESETPULSETIME 27
// time in ms 1.....2000
#define CFG_CUSTOMRESETIDLETIME 28
// time in ms 1.....2000
#define CFG_BSL_ENH_ENABLE 29
// disable 0
// enable 1
#define CFG_BSL_ENH_INDEX 30
//for future usage
#define BSL_ENH_DISABLE 0
#define BSL_ENH_NONE 1
#define BSL_ENH_ERASE 2
#define BSL_ENH_MAX_INDEX 2