slau358q.pdf - 第71页

www.ti.com Detailed Description of Commands 71 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Firmware When ACK is received, then whol…

100%1 / 142
Detailed Description of Commands
www.ti.com
70
SLAU358QSeptember 2011Revised 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).
www.ti.com
Detailed Description of Commands
71
SLAU358QSeptember 2011Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Firmware
When ACK is received, then whole process is finished, and all results are available on bytes 8 to 32. See
the Get Progress Status command description for details. During the polling process, it is possible to
examine all bytes of the progress status and check the current state; for example, what targets are
connected or erased. In the comment bytes (34-50) is the current process, and the same message as is
displayed on the LCD display.
3.5.3.3 Set Temporary Configuration in MSP-GANG Command
Tx -> 3E 56 6 6 A1 0 2 0 DL DH CKL CKH
Rx -> 90 (ACK)
By default the Main Process command takes all configuration and setup from the image memory. It is
possible to overwrite some of the configuration parameters and execute the Main Process commands with
a modified configuration. The following parameters can be modified: Targets VCC, high or low current,
external VCC enable or disable, VCC settle time, communication interface (JTAG or SBW), enabled target
devices and enable process mask (for example, erase or program verify). The Set Temporary
Configuration in MSP-GANG command allows modification of these parameters.
When the Main Process command is finished, then the temporary setups are erased and the configuration
from the image memory is restored. When the modified configuration should be used in the next run, then
the temporary configuration should be transferred to MSP-GANG again before starting the Main Process
command.
The Set Temporary Configuration in MSP-GANG command transfers two data: address index (A1) and
one 16-bit data [DL (LSB byte) and DH (MSB byte)].
The following address indexes are defined:
CFG_TMP_CLEAR (2)
Data (DH, DH) is irrelevant.
Remove temporary configuration and take it from the image memory.
CFG_TMP_TASK_MASK (4)
Set the execution mask.
By default execution mask is 0xFFFF (execute all procedures).
Data (DH, DL) can be from 0x0000 up to 0xFFFF.
Currently supported bits in the execution mask:
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
For example, when the target device must be erased, then only the following data should be send (A1, D).
4, 0x0003
Full command:
Tx -> 3E 56 6 6 4 0 2 0 3 0 CKL CKH
CFG_TMP_VCC_VALUE (6)
Data VCC value in mV (range from 1800 to 3600)
Detailed Description of Commands
www.ti.com
72
SLAU358QSeptember 2011Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Firmware
CFG_TMP_POWER_VCC_EN (8)
Data 0 Target devices powered from an external power supply
Data 1 Target devices powered from MSP-GANG programmer
CFG_TMP_INTERFACE (10)
Data JTAG_FAST 0x0004
Data JTAG_MED 0x0005
Data JTAG_SLOW 0x0006
Data SBW_FAST 0x0008
Data SBW_MED 0x0009
Data SBW_SLOW 0x000A
CFG_TMP_GANG_MASK (12)
Sum of target bit masks
Target 1 0x01
Target 2 0x02
Target 3 0x04
Target 8 0x80
One target only Target 1 Data = 0x0001
All targets Data = 0x00FF
CFG_TMP_VCC_ONOFF (14)
Immediately turn VCC target on of off
Data 0x0001 ON
Data 0x0000 OFF
CFG_TMP_ICC_HI_EN (18)
High (50 mA) current from programmer enable or disable
Data 0x0001 Enable
Data 0x0000 Disable
CFG_TMP_IO_INTERFACE (20)
Set interface configuration
Data 0x0000 SBW through TDOI line
Data 0x0001 SBW through RST line
CFG_TMP_RESET (22)
Immediately reset target device
Data 0x0001 Reset target device
Data 0x0000 Release Reset line
CFG_TMP_VCC_SETTLE_TIME (26)
Data 0x0000 to 0x00C8 Settle VCC time in step 20 ms