slau358q.pdf - 第76页

Detailed Description of Commands www.ti.com 76 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Firmware Example 2 Generate a short RST …

100%1 / 142
www.ti.com
Detailed Description of Commands
75
SLAU358QSeptember 2011Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Firmware
3.5.4.10 Display Message on LCD Display Command
Tx -> 3E 54 n+4 n+4 A1 A2 n 0 D1 ... Dn CKL CKH
Rx -> ACK
NOTE: Do not use this command. This command is used by the API-DLL and GUI only.
3.5.4.11 Set IO State Command
Tx -> 3E 4E 0C 0C VL VH 08 00 D1 D2 D3 D4 D5 D6 D7 D8 CKL CKH
Rx -> ACK
Modify static levels on the I/O pins (JTAG lines).
Vcc V
CC
level in mV ( V
CC
= VH × 256 + VL)
D1 Open destination buffer for output and transferred data for each target
0 = none
1 = TDI (target1 to target8)
2 = TDOI (target1 to target8)
3 = TMS (target1 to target8)
4 = RST (target1 to target8)
5 = BSL-RX (target1 to target8)
D2 data transferred to the buffer above
b0 to b7 target1 to target8
D3 output enable bits: 0 = high impedance, 1 = output
b2 (0x04) common RST the same state for all eight targets (Note: if the RST buffer above is
selected, then this state is ignored)
b3 (0x08) common TEST the same state for all eight targets
b4 (0x10) common TCK the same state for all eight targets
b5 (0x20) common TMS the same state for all eight targets (Note: if the TMS buffer above is
selected, then this state is ignored)
D4 output level on all targets: 0 = LOW, 1 = HIGH
b2 (0x04) common RST the same level for all eight targets (Note: if the RST buffer above is
selected, then this state is ignored)
b3 (0x08) common TEST the same level for all eight targets
b4 (0x10) common TCK the same level for all eight targets
b5 (0x20) common TMS the same level for all eight targets (Note: if the TMS buffer above is
selected, then this state is ignored)
D5 V
CC
enable bits to each targets
b0 to b7 target1 to target8
D6 I
CC
HI enable: 0 = disable, 1 = enable
D7 spare
D8 spare
Example 1
Generate a short RST pulse on target 1 only and force RST level LOW on targets 2 to 5 and RST level
HIGH on targets 6 and 7. V
CC
on targets 1 to 7 is 3.3 V ( 0x0CE4) and on target 8 is 0 V (disabled).
Tx -> 3E 4E 0C 0C E4 0C 08 00 04 60 00 00 7F 00 00 00 CKL CKH
then
Tx -> 3E 4E 0C 0C E4 0C 08 00 04 61 00 00 7F 00 00 00 CKL CKH
Detailed Description of Commands
www.ti.com
76
SLAU358QSeptember 2011Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Firmware
Example 2
Generate a short RST pulse on all targets. V
CC
on targets 1 to 7 is 3.3 V ( 0x0CE4) and on target 8 is 0 V
(disabled).
Tx -> 3E 4E 0C 0C E4 0C 08 00 00 00 04 00 7F 00 00 00 CKL CKH
then
Tx -> 3E 4E 0C 0C E4 0C 08 00 00 00 04 04 7F 00 00 00 CKL CKH
77
SLAU358QSeptember 2011Revised October 2019
Submit Documentation Feedback
Copyright © 2011–2019, Texas Instruments Incorporated
Dynamic Link Library for MSP-GANG Programmer
Chapter 4
SLAU358Q September 2011 Revised October 2019
Dynamic Link Library for MSP-GANG Programmer
4.1 Gang430.dll Wrapper Description
The Gang430.dll wrapper allows application software prepared for the old MSP430 Gang programmer to
control the new MSP-GANG programmer through the MSP-GANG.dll. Because the newer MSP-GANG
programmer has different functionality and features than the old MSP430 Gang Programmer, not all
features provided in the old programmer are supported in the same way by the MSP-GANG programmer.
The Gang430.dll wrapper allows an easy transition to the new programmer when using an old application,
but TI recommends using MSP-GANG.dll for remote control of the MSP-GANG programmer to have
access to all features provided by the programmer.
When Gang430.dll is used, the following files must be located in the same directory where the application
software is located:
Gang430.dll DLL wrapper with the same name as the previous Gang430.dll
Gang430.ini Initialization file for compatibility with the old structure
MSP-GANG.dll New DLL that has access to MSP-GANG Programmer
Examples of using the GANG430.dll as a wrapper around the new MSP-Gang.dll are provided and can be
found in these locations (if the default installation directory was used):
C:\Program Files\Texas Instruments\MSP-GANG\Examples\C_Applications_Wrapper
and
C:\Program Files\Texas Instruments\MSP-GANG\Examples\Cpp_Applications_Wrapper
To use these examples, also copy the MSG-Gang.dll into the working directory.
Limitation
The MSP-GANG works in interactive mode. The image is not saved in the memory; however, the save
image option must be used as it is in the old Gang430.dll. An image is saved inside the DLL only (very
fast) and used when the Start command is executed. If USB communication is used, then programming is
fast. RS-232 communication is, of course, slower than USB, but it is still faster than the previous MSP430
Gang Programmer.
See the MSP430 Gang Programmer (MSP-GANG430) User's Guide (SLAU101) for list of commands used
in Gang430.dll.
4.2 MSP-GANG.dll Description
MSP-GANG.dll is a Dynamic Link Library (DLL) that provides functions for controlling the MSP-GANG
Programmer. The MSP-GANG.dll controls the Gang Programmer through the RS-232 or USB (VCP)
interface. The MSP-GANG.dll greatly simplifies the control of the MSP-GANG Programmer, because the
user is isolated from the complexities of the communication through the USB or RS-232 interface protocol.
Together with the MSP-GANG.dll are provided two more files that should be used during the compilation
process.
MSP-GANG.h: This file is the header file for the MSP-GANG.dll, and provides the function prototypes,
typedefs, #defines, and data structures for the functions of the MSP-GANG.dll. This file is normally
located in the same directory as the application source file and should be included by the application
source files. This file is used during compile time.
MSP-GANG.lib: This file is the library file for the MSP-GANG.dll and is required to access the DLL
functions. This file is normally located in the same directory as the application source file and should
be added to the Linker Object, Library Modules list of the application. This file is used during link time.