slau358q.pdf - 第92页

MSP-GANG.dll Description www.ti.com 92 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Dynamic Link Library for MSP-GANG Programmer 4.2…

100%1 / 142
www.ti.com
MSP-GANG.dll Description
91
SLAU358QSeptember 2011Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Dynamic Link Library for MSP-GANG Programmer
4.2.22 MSPGANG_Interactive_Copy_Gang_Buffer_to_FLASH
Note: The target device must be opened first if not open yet (see
MSPGANG_Interactive_Open_Target_Device, Section 4.2.12).
MSPGANG_Interactive_Copy_Gang_Buffer_to_FLASH writes 'size' number of bytes from the internal
Gang_Buffer[8][128] to FLASH, simultaneously to all active target devices. Data for each target can be
different (for example, calibration data or serial numbers). Contents from Gang_Buffer[0][n] are written to
target 1, contents from Gang_Buffer[1][n] are written to target 2, and contents from Gang_Buffer[7][n] are
written to target 8.
Data in the Gang_Buffer should be prepared and send to MSP-GANG first. See
MSPGANG_GetGangBuffer and MSPGANG_SetGangBuffer functions for details.
Syntax
LONG MSPGANG_Interactive_Copy_GANG_Buffer_to_FLASH(LONG addr, LONG size)
Arguments
LONG addr FLASH address location
LONG size Number of bytes to be written
Result
LONG Error code
Example
See Section 4.2.2.
4.2.23 MSPGANG_Interactive_EraseSectors
Note: The target device must be opened first if not open yet (see
MSPGANG_Interactive_Open_Target_Device, Section 4.2.12).
MSPGANG_Interactive_EraseSectors erases flash sectors starting from the sector with address location
StartAddr and ending with the sector with EndAddr location.
Syntax
LONG MSPGANG_Interactive_EraseSectors(LONG StartAddr, LONG EndAddr)
Arguments
LONG StartAddr FLASH address location of the first sector to be erased. Address aligned to the sector size.
LONG EndAddr Address of the last sector to be erased. The address is aligned to the sector size.
Result
LONG Error code
MSP-GANG.dll Description
www.ti.com
92
SLAU358QSeptember 2011Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Dynamic Link Library for MSP-GANG Programmer
4.2.24 MSPGANG_Interactive_BlankCheck
Note: The target device must be opened first if not open yet (see
MSPGANG_Interactive_Open_Target_Device, Section 4.2.12).
MSPGANG_Interactive_BlankCheck verifies all flash contents starting from StartAddr and ending with
EndAddr are 0xFF.
Syntax
LONG MSPGANG_Interactive_BlankCheck(LONG StartAddr, LONG EndAddr)
Arguments
LONG StartAddr Blank check (if 0xFF) from StartAddr location to EndAddr location Start Address must be even, End
address must be odd.
LONG EndAddr
Result
LONG 0 = blank
!0 = error (not blank or error)
4.2.25 MSPGANG_Interactive_DCO_Test
Note: The target device must be opened first if not open yet (see
MSPGANG_Interactive_Open_Target_Device, Section 4.2.12).
MSPGANG_Interactive_DCO_Test takes data from INFO memory location 0x10F8 to 0x10FF, writing one
selected word to DCO registers and checking the DCO frequency in real time for up to eight targets
simultaneously. Test results in kHz are saved in the *result_in_kHz buffer.
Syntax
LONG MSPGANG_Interactive_DCO_Test(BYTE DCO_no, LONG *result_in_kHz);
Arguments
BYTE DCO no DCO number data taken from the Info memory.
0 = data for DCO taken from 0x10FE
1 = data for DCO taken from 0x10FC
2 = data for DCO taken from 0x10FA
3 = data for DCO taken from 0x10F8
LONG * results Pointer to long buffer size for 8 targets (LONG DCO[8])
Result
LONG Error code
www.ti.com
MSP-GANG.dll Description
93
SLAU358QSeptember 2011Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Dynamic Link Library for MSP-GANG Programmer
4.2.26 MSPGANG_SelectImage
MSPGANG_SelectImage sets the active image to work with. MSP-GANG supports up to 96 images
images. Image numbers (image size 64 kB each) are compatible with the old image numbering (0-15) that
are 512 kB each. New image numbering style:
b7=1 - new numbering: force the new standard; for example, set b7=1 when subimage number = 0
b6-b4 - subimage number
b3-b0 - image number (0-15 = image 1-16)
Examples:
b7 b6-b4 b3-b0
1 2 4 (image 5.2) (new numbering - when erased: one sector, 64kB)
0 0 4 (image 5) (old numbering - when erased: eight sectors, 512kB)
0 2 4 (image 5.2) (even without b7=1, new numbering; when erased, one sector, 64kB)
Old image New image numbering In GUI
numbering
0 0x80 or 0, 0x90, 0xA0, 0xB0, 0xC0, 0xD0, 0xE0, 0xF0 1.0, 1.1, 1.2, 1.3,...
1 0x81 or 1, 0x91, 0xA1, 0xB1, 0xC1, 0xD1, 0xE1, 0xF1 2.0, 2.1, 2.2, 2.3,...
2 0x82 or 2, 0x92, 0xA2, 0xB2, 0xC2, 0xD2, 0xE2, 0xF2 3.0, 3.1, 3.2, 3.3,...
3 0x83 or 3, 0x93, 0xA3, 0xB3, 0xC3, 0xD3, 0xE3, 0xF3 4.0, 4.1, 4.2, 4.3,...
4 0x84 or 4, 0x94, 0xA4, 0xB4, 0xC4, 0xD4, 0xE4, 0xF4 5.0, 5.1, 5.2, 5.3,...
5 0x85 or 5, 0x95, 0xA5, 0xB5, 0xC5, 0xD5, 0xE5, 0xF5 6.0, 6.1, 6.2, 6.3,...
6 0x86 or 6, 0x96, 0xA6, 0xB6, 0xC6, 0xD6, 0xE6, 0xF6 7.0, 7.1, 7.2, 7.3,...
7 0x87 or 7, 0x97, 0xA7, 0xB7, 0xC7, 0xD7, 0xE7, 0xF7 8.0, 8.1, 8.2, 8.3,...
8 0x88 or 8, 0x98, 0xA8, 0xB8, 0xC8, 0xD8, 0xE8, 0xF8 9.0, 9.1, 9.2, 9.3,...
9 0x89 or 9, 0x99, 0xA9, 0xB9, 0xC9, 0xD9, 0xE9, 0xF9 10.0, 10.1, 10.2, 10.3,...
10 0x8A or 10, 0x9A, 0xAA, 0xBA, 0xCA, 0xDA, 0xEA, 0xFA 11.0, 11.1, 11.2, 11.3,...
11 0x8B or 11, 0x9B, 0xAB, 0xBB, 0xCB, 0xDB, 0xEB, 0xFB 12.0, 12.1, 12.2, 12.3,...
12 - used for read only if the flash image is not used for internal firmware
13 (transition time)
14 --,,,---
15 --,,,---
Syntax
LONG MSPGANG_SelectImage(LONG lImage)
Arguments
LONG lImage Image number (0 to 0xFB)
Result
LONG Error code