slau358q.pdf - 第68页

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 T…

100%1 / 142
www.ti.com
Detailed Description of Commands
67
SLAU358QSeptember 2011Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Firmware
3.5.2.2 Boot Commands Disable
Tx -> 3E 2A ... ... ... 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.3 Boot Commands Enable
Tx -> 3E 2B ... ... ... 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.4 Get Diagnostic Command
The Get Diagnostic command retrieves the result of the preceding gang programming command.
Tx -> 3E 32 04 04 00 00 00 00 CKL CKH
Rx -> 80 00 1E 1E D1 D2 ... D30 CKL CKH
Data bytes D1 to D30 hold the parameters, as follows:
D1-D6: Reserved
D7-D8: Boot revision number: D7 (MSByte), D8 (LSByte)
D9-D10: Hardware version number: D9 (MSByte), D10 (LSByte).
D11 to D12: Firmware version number: D11 (MSByte), D12 (LSByte).
D13 to D20: Character string representing the boot name "G430BOOT"
D21: Comma (,)
D22 to D30: Zero-terminated application firmware name "MSP-GANG"
When the application is modified or is not present, then bits D11-D12 and D22-D30 are modified and can
be used for detection if the application firmware is present, and if present, what type and version of the
application firmware is downloaded.
3.5.2.5 Select Baud Rate Command
Tx -> 3E 38 06 06 BR 00 00 00 00 00 CKL CKH
Rx -> 0x90 (ACK)
The Select Baud Rate command sets the rate of the serial communications. The default is 9600 baud.
Baud rate index 0 to 4, representing the baud rate.
BR 0 = 9600 baud (default)
BR 1 = 19200 baud
BR 2 = 38400 baud
BR 3 = 57600 baud
BR 4 = 115200 baud
The Select Baud Rate command takes effect (that is, changes the baud rate) immediately.
3.5.2.6 Erase Firmware Command
Tx -> 3E 39 ... ... ... 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.
Detailed Description of Commands
www.ti.com
68
SLAU358QSeptember 2011Revised 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
SLAU358QSeptember 2011Revised 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