slau358q.pdf - 第69页
www.ti.com Detailed Description of Commands 69 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Firmware then all messages on the PC can…

Detailed Description of Commands
www.ti.com
68
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Firmware
3.5.2.7 Load Firmware Command
Tx -> 3E 3A ... ... ... CKL CKH
Rx -> 0x90 (ACK)
Do not use this command. This command is used during firmware or information memory update. Use the
MSP-GANG executable GUI software for updating firmware or information memory update if required.
3.5.2.8 Exit from Firmware Update Command
Tx -> 3E 3B ... ... ... CKL CKH
Rx -> 0x90 (ACK)
Do not use this command. This command is used during firmware or information memory update. Use the
MSP-GANG executable GUI software for updating firmware or information memory update if required.
3.5.2.9 Get Label Command
The Get Label command retrieves all hardware and software information.
Tx -> 3E 40 04 04 00 00 00 00 CKL CKH
Rx -> 80 00 8C 8C D1 D2 ... D140 CKL CKH
Data bytes D1 to D140 hold the parameters, as follows:
D1, D2: BOOT software ID ("B430" )
D3-D6: BOOT software version ( 01 00 01 00 )
D7, D8: API software ID ("A430" )
D9-D12: API software version ( 01 00 01 09 )
D13, D14: Boot revision number: D7 (MSByte), D8 (LSByte)
D15, D16: Hardware version number: D9 (MSByte), D10 (LSByte).
D17, D18: Firmware version number: D11 (MSByte), D12 (LSByte).
D19-D26: Character string representing the boot name "G430BOOT"
D27: Comma ','
D28-D36: Zero-terminated application firmware name "MSP-GANG"
D37-D44: MCU's Silicon Unique Number
D45-D76: Zero-terminated string of the Programmer description.
D77-D108: Access keys
D109-D116: Programmers serial number YYMMnnnn
D117-D120: MFG ID "ELP "
D121-D124: Hardware ID "G430"
D125-D126: Hardware revision 0x0101 (rev 1.01)
D127-D140: Spare
3.5.2.10 Get Progress Status
The Get Progress Status command is a low-level command and can be used at any time, even if the
MSP-GANG is busy with other tasks. It replies to the command without interrupting the currently serviced
process. Some commands that have the long execution time requires use the Get Progress Status
command for monitoring the current state. For example, the Main Process command that can be executed
a few seconds or more, responding with character "In Progress 0xB0" as fast as the command has been
received and accepted. The communication link has been released and ready to use the Get Progress
Status command. Now the current status and progress data can be monitored by polling the Get Progress
Status command. Contents of the progress status contains current task number, chunk number, and
information about what tasks have been already finished (erase, blank check, program, verify and more).
Additionally, the comment displayed on the LCD display is also available in the progress status message.
This makes it possible to mirror the progress status on a PC screen and for the status on the PC screen to
appear the same as it is in the MSP-GANG LCD display. The internal firmware the progress status buffer
is always updated when the new task or new chunk is executed. In cases where the LCD is updated
frequently, it might not be possible for the PC screen to exactly mirror it. If polling is done more frequently,

www.ti.com
Detailed Description of Commands
69
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Firmware
then all messages on the PC can be updated almost in real time. Polling can be fast, but it is not
recommended to send the Get Progress Status command within the 20-ms interval. The MSP-GANG has
an internal 8-level FIFO buffer for progress status (8 internal buffers of 50 bytes each). This allows
messages to be retrieved even if status has been changed a few times in the interval of 20 ms, as long as
the next task is bigger and the status is not updated within the next 100 ms.
One of the bytes (byte 6) in the progress status contains information as to whether the process is still in
progress or if it is finished. If the process is finished, then the programmer is ready to get the next
command. If the process is in progress, then only the Get Progress Status command can be used. Do not
send any other commands. The next command can also be accepted, but the new command bytes would
be collected in the RX buffer until the MSP-GANG is ready to service it. When the first valid byte of the
new command has been received (byte prompt '>' 0x3E ), then the receiver cannot get the Get Progress
Status command, because the 0xA5 byte, instead of the Get Progress Status command, is treated as a
data byte in the data frame.
When the Get Progress Status command is detected (single 0xA5 byte if it is not the frame data contents)
then the current status (50 bytes) is transmitted from the MSP-GANG with following data:
byte 0 0x80
byte 1 0xA5
bytes 2-3 (WORD) Task counter
bytes 4-5 (WORD) Chunk counter
byte 6 Status – In Progress, ACK or NACK
byte 7 Ack or nack
bytes 8-9 (WORD) Finished tasks mask
byte 10 Cumulative gang mask
byte 11 Request gang mask
byte 12 Connected gang mask
byte 13 Erased gang mask
byte 14 Blank check gang mask
byte 15 Programmed gang mask
byte 16 Verified gang mask
byte 17 Secured gang mask
bytes 18-23 Spare
byte 24 Error number
byte 25 Internal VTIO (VTIO = data × 32 mV)
byte 26 VCC gang status mask – A
byte 27 VCC gang status mask – B
byte 28 VCC error mask
byte 29 VCC cumulative error mask
byte 30 JTAG init err mask
byte 31 JTAG Fuse already blown mask
byte 32 Wrong MCU ID mask
byte 33 Progress bar (0 – 100%)
bytes 34-50 Comment text (comment currently displayed on the LCD display)
Where, bytes 8-9 are task mask bits:
CONNECT_TASK_BIT 0x0001
ERASE_TASK_BIT 0x0002
BLANKCHECK_TASK_BIT 0x0004
PROGRAM_TASK_BIT 0x0008
VERIFY_TASK_BIT 0x0010
SECURE_TASK_BIT 0x0020
DCO_CAL_TASK_BIT 0x0040
spare 0x0080 to 0x4000
RST_AND_START_FW_BIT 0x8000

Detailed Description of Commands
www.ti.com
70
SLAU358Q–September 2011–Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Firmware
All byte masks (bytes 10 to 17 and 26 to 32) are related to each target device:
Bits: B A
0 0 VCC below 0.7 V
0 1 VCC below VCC min ( 0.7 V < VCC < VCC min)
1 0 VCC over VCC min (OK status)
1 1 VCC over 3.8 V
Target 1 mask 0x01
Target 2 mask 0x02
⋮ ⋮
Target 8 mask 0x80
For example, result 0x83 in connected gang mask (byte 12) means that targets 1, 2, and 8 have been
detected and communication with targets successfully established.
Bytes 26 and 27 (VCC status) provide two bits to each target. Bit A for each target and bit B for each
target.
3.5.3 Commands Supported by Application Firmware
Commands supported by the application firmware give access to target device. All features provided by
the MSP-GANG programmer and available in the MSP-GANG GUI and MSP-GANG DLL are accessible
by these functions. Some of the commands that allows control of the MSP-GANG programmer are
described in the following sections; however, commands that provide data transfer and script information
between MSP-GANG and MSP-GANG DLL are not described here. Users should use the GUI software
package (MSP-GANG executable and MSP-GANG DLL) for preparing data for programming, save it in the
internal memory or SD card, verify if that works, and then use the commands described in the following
sections to control the programming process through the RS-232 or USB interface. If it is possible, then its
is recommended to use the MSP-GANG DLL and control the MSP-GANG programmer using the DLL
rather than directly through the RS-232 or USB interface using the low-level communication protocol. The
MSP-GANG DLL allows full control of the MSP-GANG programmer.
3.5.3.1 Select Image Command
Tx -> 3E 50 4 4 A1 0 0 0 CKL CKH
Rx -> 90 (ACK)
The Select Image command sets a number for the current image. After this command, all operations that
the MSP-GANG performs use this image. The MSP-GANG supports 96 images, 0 through 15. The default
image after power on is 0.
A1: holds a number of the image to set (0x00 to 0x0F).
NOTE: When the SD card is inserted to SD slot, then the SD card is selected as the default image,
and the Select Image command has no effect.
3.5.3.2 Main Process Command
Tx -> 3E 31 4 4 0 0 0 0 CKL CKH
Rx -> B0 (In Progress)
The Main Process command begins the gang programming cycle, using the operations defined in the SD
or internal image memory. The result of the command execution can be determined using the Get
Progress Status command described in Section 3.5.2. It should be noted that the Main Progress
commands responds as soon as the command is accepted with byte In Progress (0xB0). When the byte In
Progress is received, then the Get Progress Status command should be used with a polling technique for
monitoring the progress status. As long as the main process is not finished, byte 6 gives a response of In-
Progress data (0xB0). When the process is finished, byte 6 changes to ACK (0x90) or NACK (0xA0).