0
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
创作中心
发布
  • 发文章

  • 发资料

  • 发帖

  • 提问

  • 发视频

创作活动
MSP-GANG

MSP-GANG

  • 厂商:

    BURR-BROWN(德州仪器)

  • 封装:

    -

  • 描述:

    TOOL IN-SYSTEM GANG PROGRAMMER

  • 数据手册
  • 价格&库存
MSP-GANG 数据手册
MSP Gang Programmer (MSP-GANG) User's Guide Literature Number: SLAU358Q September 2011 – Revised October 2019 Contents Preface ........................................................................................................................................ 7 1 Introduction ......................................................................................................................... 9 1.1 1.2 1.3 2 Operation .......................................................................................................................... 13 2.1 2.2 2.3 2.4 2.5 2.6 2.7 3 Programming MSP Flash Devices Using the MSP Gang Programmer ............................................. 2.1.1 Programming Using Interactive Mode .......................................................................... 2.1.2 Programming From Image ....................................................................................... 2.1.3 Programming From Script ........................................................................................ 2.1.4 Programming in Standalone Mode .............................................................................. 2.1.5 Memory Setup for GO, Erase, Program, Verify, and Read .................................................. 2.1.6 Secure Device Setup and Memory Protection ................................................................ 2.1.7 Programming MCU With IP Encapsulated Segment ......................................................... 2.1.8 Serialization ........................................................................................................ 2.1.9 Creating and Using Images ...................................................................................... 2.1.10 Programming From Image File ................................................................................. 2.1.11 Programming From SD Card ................................................................................... 2.1.12 File Extensions ................................................................................................... 2.1.13 Checksum Calculation ........................................................................................... 2.1.14 Commands Combined With the Executable File ............................................................. Data Viewers ................................................................................................................ Status Messages ........................................................................................................... Self Test ..................................................................................................................... Label ......................................................................................................................... Preferences ................................................................................................................. 2.6.1 USB ID Number ................................................................................................... 2.6.2 COM Port ........................................................................................................... 2.6.3 LCD Contrast ...................................................................................................... 2.6.4 Checksum – Gang430 Standard ................................................................................ Benchmarks ................................................................................................................. 2.7.1 Benchmarks for MSP430F5xx ................................................................................... 2.7.2 Benchmarks for MSP430FR5xx ................................................................................. 2.7.3 Benchmarks for MSP430F2xx ................................................................................... 2.7.4 Benchmarks for MSP432P401R ................................................................................ 13 14 20 24 30 33 35 37 38 40 44 45 45 46 46 47 49 53 58 59 59 59 59 59 60 60 61 61 62 Firmware ........................................................................................................................... 63 3.1 3.2 3.3 3.4 3.5 2 Software Installation ....................................................................................................... 10 Driver Installation ........................................................................................................... 11 Hardware Installation ...................................................................................................... 11 Commands .................................................................................................................. Firmware Interface Protocol............................................................................................... Synchronization Sequence ................................................................................................ Command Messages ...................................................................................................... 3.4.1 Frame Structure ................................................................................................... 3.4.2 Checksum .......................................................................................................... Detailed Description of Commands ...................................................................................... 3.5.1 General ............................................................................................................. 3.5.2 Commands Supported by the BOOT Loader .................................................................. Contents 63 64 64 64 64 66 66 66 66 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated www.ti.com 3.5.3 3.5.4 4 Commands Supported by Application Firmware .............................................................. 70 API Firmware Commands That Should Not be Used ........................................................ 73 Dynamic Link Library for MSP-GANG Programmer ................................................................. 77 4.1 4.2 Gang430.dll Wrapper Description ........................................................................................ 77 MSP-GANG.dll Description ............................................................................................... 77 4.2.1 MSPGANG_GetDataBuffers_ptr ................................................................................ 78 4.2.2 MSPGANG_SetGangBuffer, MSPGANG_GetGangBuffer ................................................... 79 4.2.3 MSPGANG_GetDevice ........................................................................................... 81 4.2.4 MSPGANG_LoadFirmware ...................................................................................... 83 4.2.5 MSPGANG_InitCom .............................................................................................. 83 4.2.6 MSPGANG_ReleaseCom ........................................................................................ 83 4.2.7 MSPGANG_GetErrorString ...................................................................................... 84 4.2.8 MSPGANG_SelectBaudrate ..................................................................................... 84 4.2.9 MSPGANG_GetDiagnostic....................................................................................... 84 4.2.10 MSPGANG_MainProcess ....................................................................................... 85 4.2.11 MSPGANG_InteractiveProcess ................................................................................ 85 4.2.12 MSPGANG_Interactive_Open_Target_Device ............................................................... 85 4.2.13 MSPGANG_Interactive_Close_Target_Device............................................................... 86 4.2.14 MSPGANG_Interactive_DefReadTargets ..................................................................... 86 4.2.15 MSPGANG_Interactive_ReadTargets ......................................................................... 87 4.2.16 MSPGANG_Interactive_ReadBytes ........................................................................... 88 4.2.17 MSPGANG_Interactive_WriteWord_to_RAM ................................................................ 88 4.2.18 MSPGANG_Interactive_WriteByte_to_RAM.................................................................. 89 4.2.19 MSPGANG_Interactive_WriteBytes_to_RAM ................................................................ 89 4.2.20 MSPGANG_Interactive_WriteBytes_to_FLASH ............................................................. 90 4.2.21 MSPGANG_Interactive_Copy_Gang_Buffer_to_RAM ...................................................... 90 4.2.22 MSPGANG_Interactive_Copy_Gang_Buffer_to_FLASH ................................................... 91 4.2.23 MSPGANG_Interactive_EraseSectors ........................................................................ 91 4.2.24 MSPGANG_Interactive_BlankCheck .......................................................................... 92 4.2.25 MSPGANG_Interactive_DCO_Test ............................................................................ 92 4.2.26 MSPGANG_SelectImage ....................................................................................... 93 4.2.27 MSPGANG_EraseImage ........................................................................................ 94 4.2.28 MSPGANG_CreateGangImage ................................................................................ 94 4.2.29 MSPGANG_LoadImageBlock .................................................................................. 95 4.2.30 MSPGANG_VerifyPSAImageBlock ............................................................................ 96 4.2.31 MSPGANG_ReadImageBlock .................................................................................. 96 4.2.32 MSPGANG_Read_Code_File ................................................................................. 100 4.2.33 MSPGANG_Save_Config, MSPGANG_Load_Config, MSPGANG_Default_Config ................... 100 4.2.34 MSPGANG_SetConfig, MSPGANG_GetConfig ............................................................ 101 4.2.35 MSPGANG_GetNameConfig, MSPGANG_SetNameConfig .............................................. 110 4.2.36 MSPGANG_SetTmpGANG_Config .......................................................................... 112 4.2.37 MSPGANG_GetLabel .......................................................................................... 113 4.2.38 MSPGANG_GetInfoMemory, MSPGANG_SetInfoMemory ............................................... 114 4.2.39 MSPGANG_Get_qty_MCU_Type, MSPGANG_Set_MCU_Type, MSPGANG_Get_MCU_TypeName, MSPGANG_Get_qty_MCU_Family, MSPGANG_Get_MCU_FamilyName, MSPGANG_Get_MCU_Name .................................... 114 4.2.40 MSPGANG_Set_MCU_Name................................................................................. 115 4.2.41 MSPGANG_HW_devices ...................................................................................... 116 4.2.42 MSPGANG_GetProgressStatus .............................................................................. 117 4.2.43 MSPGANG_GetAPIStatus..................................................................................... 119 4.2.44 MSPGANG_Set_IO_State ..................................................................................... 120 4.2.45 MSPGANG_Convert_Address ................................................................................ 122 4.2.46 MSPGANG_Memory_Header_text ........................................................................... 122 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Contents 3 www.ti.com 4.2.47 4.2.48 4.2.49 4.2.50 4.2.51 4.2.52 5 122 123 123 124 126 126 Schematics ...................................................................................................................... 127 5.1 6 MSPGANG_Interactive_ClrLockedDevice................................................................... MSPGANG_Get_Code_Info ................................................................................... MSPGANG_MakeSound....................................................................................... MSPGANG_CallBack_ProgressBar .......................................................................... MSPGANG_GetPCHardwareFingerprint .................................................................... MSPGANG_Flash_valid_addr ................................................................................ Schematics ................................................................................................................ 127 Frequently Asked Questions .............................................................................................. 134 6.1 6.2 6.3 6.4 6.5 Question: Why does device init, connect, or programming fail?.................................................... Question: Can I use single wires for connection between MSP-GANG and target device? .................... Question: How to serialize parts? ...................................................................................... Question: How to have parts run after programming? ............................................................... Question: What are possible reasons for the part to fail Verify step? ............................................. 134 135 135 135 135 Revision History ........................................................................................................................ 136 4 Contents SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated www.ti.com List of Figures 1-1. Top View of the MSP Gang Programmer ............................................................................... 10 2-1. Main MSP Gang Programmer Dialog GUI, Interactive Mode 2-2. 2-3. 2-4. 2-5. 2-6. 2-7. 2-8. 2-9. 2-10. 2-11. 2-12. 2-13. 2-14. 2-15. 2-16. 2-17. 2-18. 2-19. 2-20. 2-21. 2-22. 2-23. 2-24. 2-25. 2-26. 2-27. 5-1. 5-2. 5-3. 5-4. 5-5. 5-6. 5-7. 5-8. ........................................................ 14 Memory Options ............................................................................................................ 16 Reset Options ............................................................................................................... 17 Verification Error ............................................................................................................ 19 Flash Memory Data ........................................................................................................ 20 Main MSP Gang Programmer Dialog GUI, From Image Mode ...................................................... 21 Main MSP Gang Programmer Dialog GUI, From Image Mode and Custom Configuration Enabled ........... 23 Main MSP Gang Programmer Dialog GUI, From Script .............................................................. 25 Main MSP Gang Programmer Dialog GUI, Standalone Mode ....................................................... 30 Image Option................................................................................................................ 31 Target Enable or Disable Option ......................................................................................... 32 Memory Options, BSL Sectors Selected ................................................................................ 34 MSP430 Secure Device Options ......................................................................................... 35 MSP432 Secure Device Options ......................................................................................... 36 MSP432 Secure Device Options Details ................................................................................ 37 Memory Options Window.................................................................................................. 38 Serialization ................................................................................................................. 39 Image Name Configuration Screen ...................................................................................... 42 Image File Security Options .............................................................................................. 43 Hardware Fingerprint of Computer in Use .............................................................................. 43 Programming From Image File ........................................................................................... 44 Password for Image File................................................................................................... 45 Code File Data .............................................................................................................. 47 Comparison of Code and Flash Memory Data of the Target Microcontroller ...................................... 48 Self Test ..................................................................................................................... 54 Information About the MSP Gang Programmer ........................................................................ 58 Preferences Selection Window ........................................................................................... 59 MSP-GANG Simplified Schematic (1 of 4) ............................................................................ 127 MSP-GANG Simplified Schematic (2 of 4) ............................................................................ 128 MSP-GANG Simplified Schematic (3 of 4) ............................................................................ 129 MSP-GANG Simplified Schematic (4 of 4) ............................................................................ 130 Gang Splitter Schematic ................................................................................................. 131 BSL Connection Schematic ............................................................................................. 132 Schematic of MSP-GANG 14-20 Adapter ............................................................................. 133 Top View of MSP-GANG 14-20 Adapter (Order Separately From TI) ............................................. 133 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated List of Figures 5 www.ti.com List of Tables 2-1. Benchmark Results – MSP430F5438A, 256kB Code ................................................................. 60 2-2. Benchmark Results – MSP430F5438A, 250kB Code, Mode: From Image 2-3. 2-4. 2-5. 2-6. 2-7. 2-8. 2-9. 3-1. 5-1. 6 ........................................ 60 Benchmark Results – MSP430F5438A, 250kB Code, Mode: Interactive, Communication by USB ............ 60 Benchmark Results – MSP430FR5994, 256kB Code, Mode: From Image ........................................ 61 Benchmark Results – MSP430FR5994, 256kB Code, Mode: Interactive, Communication by USB ............ 61 Benchmark Results – MSP430F2619, 120kB Code, Mode: From Image .......................................... 61 Benchmark Results – MSP430F2619, 120kB Code, Mode: Interactive, Communication by USB .............. 61 Benchmark Results – MSP432P401R, 256kB Code, Mode: From Image .......................................... 62 Benchmark Results – MSP432P401R, 256kB Code, Mode: Interactive, Communication by USB.............. 62 Data Frame for Firmware Commands .................................................................................. 65 Gang Splitter Bill of Materials (BOM) .................................................................................. 132 List of Tables SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Preface SLAU358Q – September 2011 – Revised October 2019 Read This First If You Need Assistance If you have any feedback or questions, the Texas Instruments Product Information Center (PIC) and the TI E2E™ Forum provide support for the MSP430™ and SimpleLink™ MSP432™ microcontrollers and for the MSP-GANG. See the TI website for contact information for the PIC. Device-specific information is on the MSP website. Trademarks E2E, MSP430, SimpleLink, MSP432 are trademarks of Texas Instruments. Windows is a registered trademark of Microsoft Corporation. All other trademarks are the property of their respective owners. Related Documentation From Texas Instruments The primary sources of MSP information are the device-specific data sheets and user's guides. The most current information is on the MSP website. Information specific to the MSP-GANG is at http://www.ti.com/tool/msp-gang. SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Read This First 7 Related Documentation From Texas Instruments www.ti.com This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) this device may not cause harmful interference and (2) this device must accept any interference received, including interference that may cause undesired operation. NOTE: This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses, and can radiate radio frequency energy and, if not installed and used in accordance with the instruction manual, may cause harmful interference to radio communications. However there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures: * Reorient or relocate the receiving antenna * Increase the separation between equipment and receiver * Connect the equipment into an outlet on a circuit different from that to which receiver is connected * Consult the dealer or an experienced radio/TV technician for help. Warning: Changes or modifications not expressly approved by Texas Instruments Inc. could void the user’s authority to operate the equipment. NOTE: This equipment has been tested and found to comply with: CISPR 24:1997 +A1:2001 +A2:2002 / EN 55024:1998 +A1:2001 +A2:2003 EMC Requirements CISPR 32:2012 / EN55032:2012/AC:2013 Class A - Multimedia Equipment CISPR 22:2008-09 / EN 55022:2006 +A1:2007, Class A - Information Technology Equipment CISPR 22:2008-09 / EN 55022:2010+AC: 2011 , Class A - Information Technology Equipment IEC 61000-4-4 / EN 61000-4-4 - Electromagnetic Compatibility Requirements, Part 4: Electrical Fast Transient Requirements IEC 1000-4-2 / EN 61000-4-2 -Electromagnetic Compatibility Requirements, Part 2: Electrostatic Discharge Requirements Warning: This equipment is compliant with Class A of CISPR32. In a residential environment this equipment may cause radio interference. 8 Read This First SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Chapter 1 SLAU358Q – September 2011 – Revised October 2019 Introduction The MSP Gang Programmer for the MSP430 and MSP432 microcontrollers can program up to eight of the same MSP flash or FRAM devices at one time. The MSP Gang Programmer connects to a host PC using a standard RS-232 or USB connection and provides flexible programming options that allow the user to fully customize the process. Figure 1-1 shows a top-level view of the MSP Gang Programmer. The MSP Gang Programmer is not a gang programmer in the traditional sense, in that there are not eight sockets to program target devices. Instead, the MSP Gang Programmer connects to target devices that are mounted in the final circuit or system. The MSP Gang Programmer accesses the target devices through connectors that use JTAG, Serial-Wire Debug (SWD), Spy-Bi-Wire (SBW), or bootloader (BSL) signals. The MSP Gang Programmer includes an expansion board, called the Gang Splitter, that connects the MSP Gang Programmer to multiple target devices. Eight cables connect the Gang Splitter to eight target devices (through JTAG, SWD, SBW, or BSL connectors). For MSP432 MCUs, an adapter kit (MSPGANG-432ADPTR) can convert from 14-pin JTAG connectors to 20-pin Arm connectors. Chapter 2 describes how to use the MSP Gang Programmer to program target devices. This chapter describes the modes of operation and how to choose the method of programming. This chapter also describes the user interface that defines how to program the target device. Chapter 3 describes firmware commands that give low-level control of the programming process. The commands correspond to specific actions that the programmer can perform. The MSP Gang Programmer connects to a host computer through a RS-232 or USB port to receive the commands. Often, you must use the commands in groups or in a specific order to ensure proper behavior. Chapter 4 describes Gang430.dll, MSP-GANG.dll, and the functions that are available through them. Chapter 5 contains an I/O schematic that shows how signals from the MSP Gang Programmer go to each target device through an MSP-standard JTAG, SWD, SBW, or BSL connector. To make a traditional gang programmer, you can change the circuit to connect the signals to the target device pins directly through a socket. SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Introduction 9 Software Installation www.ti.com 5.7 in (145 mm) 5 in (127 mm) Height = 0.67 in (17 mm) 2 in (51 mm) Height = 0.95 in (24 mm) USB 3.5 in (89 mm) RS232 SD Card NOTE: Dimensions are approximate. Figure 1-1. Top View of the MSP Gang Programmer 1.1 Software Installation Use the latest software version, which can be downloaded from the MSP-GANG Production Programmer tool folder. The MSP-GANG Programmer Software runs on Windows® 32 bit or 64 bit: Windows XP, Windows 7, Windows 8, and Windows 10. To 1. 2. 3. 4. install MSP Gang Programmer software: Unzip the installation package. Run setup.exe in the root directory of the package. Follow the instructions in the installation process. When the setup program finishes, click the MSP Gang Programmer Read Me First icon to read important information about the MSP Gang Programmer. 5. The setup program also adds a program group and icons to the Windows desktop. 6. To start the MSP Gang Programmer software, click the icon. 10 Introduction SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Driver Installation www.ti.com 1.2 Driver Installation To install the required drivers: 1. Connect the MSP-GANG programmer to a PC USB port. When the Windows wizard starts, follow the instructions provided by wizard. When the wizard asks for the USB driver location, browse to the CDROM drive. Drivers are in the main CD-ROM directory location and also in the following directory: C:\Program Files\Texas Instruments\MSP-GANG\Driver 2. If the RS-232 interface is used for communication with MSP-GANG, the USB driver is not required. Run the Windows Device Manager to find for the COM port number to use with communication through RS-232. 1.3 Hardware Installation To install the MSP Gang Programmer hardware: 1. Attach the expansion board (Gang Splitter) to the 100-pin connector on the MSP Gang Programmer. The expansion board connects up to eight targets using the included 14-pin cables. The target MSP430 flash devices can be in stand-alone sockets or can be on an application PCB. The MSP Gang Programmer can connect to these devices through JTAG, SBW, or BSL signals. If the target device is an MSP432 MCU, use the adapter kit (MSP-GANG-432ADPTR) to convert from 14-pin JTAG connectors to 20-pin Arm connectors. 2. Connect the MSP Gang Programmer hardware to the computer USB port using a USB A-B cable. The USB port (5 V, 0.5 A) can supply the programmer. If the computer does not have a USB port, connect the programmer to a serial port (COM1 to COM255) using a 9-pin Sub-D connector. 3. If the MSP Gang Programmer is not connected through the USB port, or if the total current consumption of the programmed target devices exceeds 0.3 A, connect an external power supply to the programmer. NOTE: External Power Supply An external power supply must provide a voltage between 6 V and 10 V DC and must provide a minimum current of 800 mA. The center post of the power supply connector on the MSP Gang Programmer is the positive-voltage terminal. The programmer indicates the status of the power supply connection by using system LEDs and the LCD back light. NOTE: Maximum Signal Path Length: 50 cm The maximum length of a signal path between the 14-pin JTAG or SBW connector on the Gang Splitter and the target device is 50 cm. 4. The MSP Gang Programmer can supply power at a specified voltage VCC to each target device (pin 2 on each 14-pin JTAG, SBW, SWD, or BSL cable). The maximum current for each target device is programmable to 30 mA or 50 mA. If the higher current limit is selected (50 mA) and eight target devices are connected, then the total current to all devices can reach up to 400 mA. In this case, the connect an external power supply to the MSP Gang Programmer. The USB cannot supply this current, because the USB port maximum current is 0.5 A, and the MSP Gang Programmer uses 150 mA, leaving 350 mA for the target devices. SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Introduction 11 Hardware Installation www.ti.com CAUTION When an external power supply is used to power target devices, disconnect VCC from the targets to avoid power-supply conflicts that could potentially damage the MSP Gang Programmer and the target devices. When target devices are powered from an external power supply, connect the VCC from the target device to Vextin (pin 4) on the JTAG, SBW, SWD, or BSL connectors. The MSP Gang Programmer uses this voltage to detect the presence of an external power supply. Set the desired VCC level in the MSP Gang Programmer to the same voltage that powers the target device. This information is mandatory to provide correct I/O levels for the TMS, TCK, TDI, TDO, and RST signals. If the wrong VCC is provided, then the I/O levels between the programmer and target devices can be too low or too high, and communication can be unreliable. 5. The MSP Gang Programmer can be supplied from an external power supply connected to the DC connector or through a gang splitter (not populated J10 connector). Because the J10 and DC connectors are connected in parallel, make sure that only one connector provides an external power supply to the MSP Gang Programmer. 12 Introduction SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Chapter 2 SLAU358Q – September 2011 – Revised October 2019 Operation This chapter describes how to use the MSP Gang Programmer to program target devices. Various modes of operation, which allow the user to choose the most convenient method of programming, are described. In addition, this chapter describes the various windows that are used to configure the programming procedure for a specific target device. The explanations in this chapter assume that the user has properly installed the MSP Gang Programmer hardware and software as described in Chapter 1. 2.1 Programming MSP Flash Devices Using the MSP Gang Programmer The MSP Gang Programmer is capable of quickly and reliably programming MSP flash devices using an RS-232 or USB interface. There are four ways to use the programmer to achieve this task and these include: • Interactive • From Image • From Script • Stand Alone The Interactive mode is selected by default, and is the easiest to get started with, because it requires the least amount of preparation. After the user has mastered the Interactive mode it can be used to create images and script files, which can then be used with the From Image and From Script modes, respectively. Images and scripts are ready-to-go setups than can run with minimal user input. They are very useful for repetitive programming, for example in a production environment, because they ensure consistency (because of the re-use of images or scripts, we highly encourage the user to thoroughly test their images or scripts for correctness before committing them to production). The MSP Gang Programmer can also be run in Standalone mode to program target devices without a PC. To do this, first create an image to use for programming, and then save it to internal memory of the MSP Gang Programmer. Creating images is described in Section 2.1.9. The following sections describe how to use these modes of operation. SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Operation 13 Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com 2.1.1 Programming Using Interactive Mode Use the following sequence to start the MSP Gang Programmer GUI and program MSP Flash Devices using the Interactive Mode: 1. Click on the MSP Gang Programmer icon located in the program group that was specified during installation. Figure 2-1 shows the MSP Gang Programmer GUI in the Interactive Mode (see the Mode group in the top left corner). This window is used to select the target microcontroller, code file used for programming, power supply options, communication interface, and more. This window also shows the result of programming and any errors, if they occur. Figure 2-1. Main MSP Gang Programmer Dialog GUI, Interactive Mode 2. Select a target device using the MCU Family, then MCU Group, and then desired MCU Type. 3. Select the code file to be programmed into the devices using the Open Code File button or pulldown menu: File→Open Code File. The formats supported for the code file are TI (.txt) and Intel (.hex) and Motorola (.s19, .s28, .s37). Code size and checksum appear on the right side (for details on how the checksum is calculated, see Section 2.1.13). 4. Optionally add another code file to be programmed into the devices using the Append Code File button (check the box on the left to enable this option). This feature is useful for updating BSL firmware in 5xx or 6xx MCUs. The two code files are combined together to create one final code file. If a conflict is 14 Operation SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com 5. 6. 7. 8. 9. detected, a warning appears; however, if programming proceeds without changes the second code file overwrites the conflict area. Code size and checksum appear on the right side. Some MCUs (for example, the MSP430FR57xx) provide a method of disabling JTAG by programming a password to flash memory. The password should be specified as data to be programmed starting at 0xFF80 and up to 0xFFFF (where 0xFF80 must be 0xAAAA, 0xFF82 must be the size of the password in words, and 0xFF88-0xFFFF contains the password). The code file must contain password contents if you intend to lock JTAG using the password feature after programming. If the MCU is already locked using a previously programmed code file, then you must provide the password section (or entire old code file) using the Open Password File button if and only if the password section is different. Functionally, if the MCU is locked by password, the code file’s password section is first used to attempt to unlock the MCU. If that fails, then the password file’s contents are used to attempt to unlock the MCU. If both attempts fail, the MCU remains locked and JTAG access fails. Password file contents are not used to program the MCU. In the Target power group, select the desired VCC voltage and select if the target is supplied from the MSP Gang Programmer or from an external power supply. If targets are supplied by the programmer, then select the maximum current used by each target, 30 mA or 50 mA. In the Results group, select desired target devices to be programmed. After programming has concluded, a green checkmark or lights appear for successful operations for each target. In the Interface selector, choose the desired interface (JTAG, SBW, SWD, or BSL) and communication speed (fast, medium, or slow). In the Memory Options dialog (pulldown menu: Setup→Memory options ) shown in Figure 2-2, select desired memory space to be programmed. By default, the selected option is All Memory and it is correct for most programming tasks (Section 2.1.5 describes how to use the memory configuration window). SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Operation 15 Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com NOTE: The user can select which segments of memory are written to or read from. Figure 2-2. Memory Options 10. In the Reset Options dialog (pulldown menu: Setup→Device Reset ) shown in Figure 2-3, select the duration of the reset pulse and the delay after reset. By default it is 10 ms, but other options are available if required by the hardware. 16 Operation SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com NOTE: This window lets the user specify the duration of the reset pulse coming from the MSP Gang Programmer to the target device. Depending on the hardware implementation, a longer reset pulse might be required. Figure 2-3. Reset Options Following these steps creates a working setup that can program target devices using the MSP Gang Programmer. Click the Save Project As button to save this configuration settings. These settings can be loaded again later and modified, if necessary (one project holds one configuration). After saving the project, use the buttons described in the following sections to perform the desired actions. 2.1.1.1 GO Click the GO button in the Main Dialog GUI (or F9 key on the keyboard) to start programming. GO starts erase, blank check, program, verify, or blow fuse if selected. The progress and completion of the operation are displayed in the Results group. The result is shown as one of the following: Idle status Test in progress. For power on or off, DC voltage is correct. Access enabled Access denied (for example, the fuse is blown) Device action has been finished successfully Device action has been finished, but result failed NOTE: When a FRAM MCU is selected, the blank check step is skipped. During global verification, main code contents and empty values are verified. 2.1.1.2 Erase Click the Erase button in the Main Dialog GUI to erase a segment of memory (sets each byte to 0xFF). Use the Memory Options configuration screen shown in Figure 2-2 to specify which addresses should be erased (Section 2.1.5 describes in detail how to use the memory configuration window). This action succeeds after the programmer has attempted to erase the specified memory segment. Use the Blank Check function to verify that this segment has been properly erased. SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Operation 17 Programming MSP Flash Devices Using the MSP Gang Programmer 2.1.1.3 www.ti.com Blank Check Click the Blank Check button in the Main Dialog GUI to check that the contents of specified memory have been properly erased. This function is best used after erasing the same segment of memory, using the button described above. Use the same Memory Options configuration screen shown in Figure 2-2 to specify which addresses should be erased (Section 2.1.5 describes in detail how to use the memory configuration window). This function succeeds when the specified memory segments are set to 0xFF, and fails otherwise. 2.1.1.4 Program Click the Program button in the Main Dialog GUI to write the contents of a code files to flash memory on the target device. Addresses specified in the code files are used to determine where the program is written. Make sure that the regions of memory corresponding to the addresses in the code file are enabled for writing in the Memory Options configuration screen shown in Figure 2-2 (Section 2.1.5 describes in detail how to use the memory configuration window). Configuration conflicts may arise during programming. It is possible that the code the user has chosen is too big to fit in the flash memory of the target MCU, or the appropriate memory segments have not been enabled in the Memory Options configuration screen. If this is the case, a warning message appears to notify the user of insufficient memory; however, the user is still allowed to proceed. If the user proceeds despite the warning, only the portion of code that fits within the MCU's enabled flash memory is written. This function succeeds after the programmer has attempted to write code to the specified memory addresses. Use the Verify function to ensure that the code has been correctly copied to flash on the target MCU. 2.1.1.5 Verify Click the Verify button in the Main Dialog GUI to verify that the contents of the target MCU's flash memory have been properly programmed. This function is best used after programming the same segment of memory, as performed using the button described above. Make sure that the same memory segments are enabled in the Memory Options configuration window shown in Figure 2-2, as during programming described above, to ensure all programmed segments are verified (Section 2.1.5 describes in detail how to use the memory configuration window). Verification of selected flash memory is divided into two steps: (1) verify selected flash memory that only corresponds to the code file, and (2) verify selected flash memory that corresponds to the code file AND selected flash memory not included in the code file that should be empty (0xFF). Examples of selected flash memory include Main Memory, All Memory, or User defined, with the exception of Retain Data (if defined). Verified flash memory that only corresponds to the code file is displayed in the GUI using VerifyXXXX messages, where XXXX is the start address of a contiguous code segment. Verified flash memory that corresponds to the code file AND flash memory not included in the code file is displayed in the GUI using Gl.Verify-XXXX messages; where XXXX is the start address of a contiguous code and empty data segment. Each contiguous segment is verified using a checksum (CS) and pseudo-signature analysis (PSA). Verification passes if the CS and PSA match between flash memory and the code file. If configuration conflicts arose during programming that indicated that the MCU did not contain sufficient memory for the code to be programmed (either enabled segments or total memory was too small), then the Verify function verifies only the code that was programmed and ignores the code that could not fit in memory. This function succeeds if the code in flash matches the code file, and fails otherwise. If the verification fails for any reason, TI recommends using an option from the pulldown menu View→Compare Code File and Flash Data. When this option is enabled, the contents of the Flash or FRAM memory is read and compared with used code file contents. Only bytes defined in the Code File contents are compared. All other byte contents taken from the Flash or FRAM are ignored, regardless of their content. If no errors are found by this verification, even the verification itself failed, then bytes outside of the code file (not programmed) have a value other than 0xFF. Check the firmware that was downloaded to Flash or FRAM to determine if the firmware is modifying the Flash or FRAM in unused memory space after MCU reset (for example, if the Flash or FRAM is used for additional memory space like EEPROM). If the verification fails and the MCU has FRAM memory, then the following pop-up message is displayed. 18 Operation SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com NOTE: Verification failed on MCU with FRAM type memory Figure 2-4. Verification Error 2.1.1.6 Read Click the Read button in the Main Dialog GUI to read the contents of the target MCU's flash memory. Use the Memory Options configuration screen shown in Figure 2-2 to specify which addresses should be read (Section 2.1.5 describes in detail how to use the memory configuration window). Once used, data is displayed in the Flash Memory Data window as shown in Figure 2-5. This window can be selected in the View→Flash Memory Data pulldown menu. The Flash Memory Data viewer, shown in Figure 2-5, displays the code address on the left side, data in hex format in the central column, and the same data in ASCII format in the right column. The contents of the code viewer can be converted to TI (*.txt) or Intel (*.hex) file format by clicking on the "TI hex" or "INTEL" button. SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Operation 19 Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com NOTE: This window displays the code addresses on the left side, data in hex format in the center column, and the same data in ASCII format in the right column. Figure 2-5. Flash Memory Data 2.1.2 Programming From Image A programming configuration like the one created in Section 2.1.1 can be stored in the form of an image. The advantage of an image is that it contains both the configuration options necessary for programming as well as the code files that are flashed to target devices. Moreover, only images can be saved to internal MSP Gang Programmer memory and used in Standalone mode, in which the programmer can operate without being connected to a PC. Using the From Image mode allows the user to test images with full GUI support before committing them to production. When an image has been created, it can be used to greatly simplify programming by using the procedure described in Section 2.1.9. Figure 2-6 shows the main dialog GUI where the From Image option is selected for programming (top left corner). Here the user can load an image from MSP Gang Programmer internal memory. An image can be created in Interactive Mode and saved to the programmer. One of 96 different images can be selected from internal memory, or one image from each external SD-Card can be used. 20 Operation SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com NOTE: MSP Gang Programmer internal memory and SD-Card are mutually exclusive. To avoid confusion during programming, connecting an SD-Card to the MSP Gang Programmer disables its internal memory used for other images. Therefore, when an SDCard is connected to the programmer only the image on the SD-Card is usable or accessible. If the SD-Card is empty, or contains a corrupted image, then it must be disconnected before MSP Gang Programmer internal memory can be used. NOTE: This figure shows the From Image Mode (see the Mode section near the top left corner). The user can load an image from MSP Gang Programmer internal memory. Saved images contain all configuration necessary for programming and all code files. An image can be created using the Interactive Mode and saved to the programmer. One of 96 different images can be selected from internal memory, or one image from each external SD-Card can be used. Figure 2-6. Main MSP Gang Programmer Dialog GUI, From Image Mode SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Operation 21 Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com Figure 2-6 highlights several parts of the GUI. The drop-down menu in the Object in Image memory group (top right) is used to select which image is used for programming, because up to 96 different images might be available. In the same group, the Config. from Image option is enabled, meaning that all configurations options, such as which devices are enabled or power options are being taken from the image. Sometimes it is useful to use the basic files from an image, such as the MCU type and code files, but also make a few minor modifications to test a different configuration. Figure 2-7 shows the additional configuration options available when the Config. from Image button is disabled. These are high-lighted in red and include which devices are enabled for programming, target VCC and current, interface, communication, and security. However, these changes cannot be committed to the image. If the user wishes to change the current image's configuration or code files then the image needs to be recreated using the original project file and procedure described in Section 2.1.9. 22 Operation SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com NOTE: This figure shows the From Image Mode (top left corner). The Config. from Image option is disabled in this example, allowing the user to change various but not all configuration settings from the image. The configuration options that can be changed are highlighted in red. One of the options that cannot be changed, for example, is the target processor type. Figure 2-7. Main MSP Gang Programmer Dialog GUI, From Image Mode and Custom Configuration Enabled SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Operation 23 Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com 2.1.3 Programming From Script Use this option to create a script file to automate more complicated programming procedures. Scripts can create functions that open message boxes, adjust voltage, target devices, change code files, and any other sequences of reconfigurations up to a total of 1000 commands. Repeated series of instructions can be encompassed into functions for easier programming. The stack supports a call depth of up to 50 CALLs (CALL inside CALL inside CALL, and so on), which is sufficient for most nonrecursive programs. Figure 2-8 shows the main dialog GUI where the From Script option is selected for programming (top left corner). A script file is selected using the Open Script File button and it specifies all configuration options, and the code files to be used for programming. A script can be created using any text editor and saved in a simple text file. Follow these guidelines to create a script. 24 Operation SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com NOTE: This figure shows the From Script mode (see the Mode section near the top left corner). A script file is selected using the Open Script File button and it specifies all configuration options, and the code files to be used for programming. In addition, the script can call individual functions, such as Program or Verify, in the order specified by the programmer. Figure 2-8. Main MSP Gang Programmer Dialog GUI, From Script 2.1.3.1 Script Limitations • Up to a total of 1000 command lines can be used. Empty lines and comments are ignored. • The stack supports a call depth of up to 50 CALLs (CALL inside CALL inside CALL, and so on). SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Operation 25 Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com 2.1.3.2 Command Syntax • White spaces before instructions, labels, and comments are ignored. • ; – Start of a comment. All characters in the same line after the start of a comment are ignored. NOTE: A comment cannot be placed after a filename. For example, when specifying a config file to be loaded, a path to a file must be given. This filename cannot be followed by a comment. • > – Start of a label. Place the label name after the character with no spaces in between. NOTE: A line with a label cannot also contain a command or another label. For example, this would be illegal: >START VCCOFF 2.1.3.3 Instructions MESSAGE – Message declaration. Contents must be placed between quotes below a message declaration. Maximum of 50 content lines. Example: MESSAGE "Hello." "This is my script." GUIMSGBOX setting – Enable or disable pop-up message boxes in the GUI (warning and errors). Setting can be either ENABLE or DISABLE. IFGUIMSGBOXPRESS option – Apply the option when a message box created by GUI is generated. Option can be OK or CANCEL. MESSAGEBOX type – Create a pop-up message box with buttons. Contents must be placed between quotes below message declaration. Maximum of 50 content lines. Message box types are: • OK – One button: OK. • OKCANCEL – Two buttons: OK and CANCEL • YESNO – Two buttons: YES and NO • YESNOCANCEL – Three buttons: YES, NO, and CANCEL Example: MESSAGE YESNOCANCEL "You have three choices:" "Press yes, no, or cancel." GOTO label – Jump to instruction immediately following the label. SLEEP number – Pause a number of milliseconds, between 1 and 100000. F_LOADPASSWORDFILE filename – Load JTAG password file. Provide a full path and filename. F_FROMIMAGEMODE – Switch to Image mode. CALL label – Call procedure starting at the instruction immediately following the label. Stack saves return address. RETURN – Return from CALL. 26 Operation SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com IF condition operation – Test condition and if true then perform operation. The condition can be one of the following: • BUTTONOK – OK button is pressed in the message box. • BUTTONYES – YES button is pressed in the message box. • BUTTONNO – NO button is pressed in the message box. • BUTTONCANCEL – CANCEL button is pressed in the message box. • DONE – Previous process (for example, GO or Read File) finished successfully. • FAILED – Previous process (for example, GO or Read File) failed. The operation can be one of the following: • GOTO label • CALL label SLEEP number – Pause a number of milliseconds, between 1 and 100000. F_LOADCFGFILE filename – Load configuration file. Provide a full path and filename. F_LOADCODEFILE filename – Load code file. Provide a full path and filename. F_APPENDCODEFILE filename – Append code file. Provide a full path and file name. F_VCCOFF – Turn VCC OFF from programming adapter to target device. F_VCCON – Turn VCC ON from programming adapter to target device. NOTE: VCC from FPA must be enabled first using configuration file. F_VCCINMV – Set VCC in mV, between 1800 to 3600 in steps of 100 mV. F_RESET – Perform RESET function from main dialog screen. F_GO – Perform GO function from main dialog screen. F_ERASEFLASH – Perform ERASE FLASH function from main dialog screen. F_BLANKCHECK – Perform BLANK CHECK function from main dialog screen. F_WRITEFLASH – Perform WRITE FLASH function from main dialog screen. F_VERIFYFLASH – Perform VERIFY FLASH function from main dialog screen. F_BLOWFUSE – Perform BLOW FUSE function from main dialog screen. NOTE: Blows fuse regardless of enable option. If the BLOW FUSE command is used, then the security fuse is blown even if the Blow Security Fuse enable option is disabled. F_SETIMAGENUMBER number – Choose image number between 1 and 96 from MSP Gang Programmer internal memory. F_INTERACTIVEMODE – Switch to Interactive mode. NOTE: The execution result can be saved in the result file. Contents of the file can be used by the application software if required. The result can be saved in the new file or append to the existing file. Following script line commands can be used for specifying the result file: F_NEWRESULTFILENAME – Provide a full path and name of the result file. F_APPENDRESULTFILENAME – Provide a full path and name of the file where the result should be appended. F_COMMENTTOFILE – Add a comment at the beginning of the result stream. SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Operation 27 Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com F_RESULTTOFILE – Save result to the result file specified by F_NEWRESULTFILENAME or F_APPENDRESULTFILENAME. The following data is saved: Finished task mask: Cumulative target mask: Requested target mask: Connected target mask: Erased target mask: Blank Check target mask: Programmed target mask: Verified target mask: Secured target mask: error_no: VTIO in mV: Vcc Error target mask: Vcc Cumulative Err mask: JTAG Init target mask: Already Secured mask: Wrong MCU ID mask: HHHH (16 bits task mask) HH (8 bits target mask - 0x01-target-1,.. HH (8 bits target mask - 0x01-target-1,.. HH (8 bits target mask - 0x01-target-1,.. HH (8 bits target mask - 0x01-target-1,.. HH (8 bits target mask - 0x01-target-1,.. HH (8 bits target mask - 0x01-target-1,.. HH (8 bits target mask - 0x01-target-1,.. HH (8 bits target mask - 0x01-target-1,.. error number VTio in mV HH (8 bits target mask - 0x01-target-1,.. HH (8 bits target mask - 0x01-target-1,.. HH (8 bits target mask - 0x01-target-1,.. HH (8 bits target mask - 0x01-target-1,.. HH (8 bits target mask - 0x01-target-1,.. 0x80-target-8); 0x80-target-8); 0x80-target-8); 0x80-target-8); 0x80-target-8); 0x80-target-8); 0x80-target-8); 0x80-target-8); 0x80-target-8); 0x80-target-8); 0x80-target-8); 0x80-target-8); 0x80-target-8); TRACEOFF – Disable tracing. TRACEON – Enable tracing and log to the Trace-Scr.txt file in the current working directory. This option is useful for debugging. The trace file contains the sequence of all executed commands from the script file annotated with line numbers. Line numbers are counted without empty lines and without lines containing only comments. END – End of script. 28 Operation SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com The following example script executes this sequence of commands: 1. Label START is created. 2. VCC from programmer to target device is turned OFF. 3. Message box notifies the user of VCC setting and asks for permission to proceed with buttons OK and CANCEL. The program halts here until a button is pressed. 4. If CANCEL was pressed then GOTO finish label (ends the script). 5. If CANCEL was not pressed (in this case this implies that OK was pressed) then load configuration file test-A.g430cfg to the MSP Gang Programmer. Configuration file test-A.cfg should be prepared before running this script using Interactive mode. 6. Message box asks the user to proceed. The program halts until OK is pressed. 7. The MSP Gang Programmer programs the target device using the GO function. 8. Message box asks the user if the test succeeded giving a YES or NO choice. 9. If NO was pressed then GOTO START label (start of script). 10. If NO was not pressed (in this case this implies that YES was pressed) then load configuration file finalcode.g430cfg to the MSP Gang Programmer. 11. The MSP Gang Programmer programs the target device using the GO function. The new configuration changes the code file. 12. Script jumps to the beginning using GOTO START. This can be used to wait for the next target device to be connected. 13. Label finish is created. 14. Script ends. ;===================================================== ; Script file - demo program ;---------------------------------------------------->START F_VCCOFF MESSAGEBOX OKCANCEL "VCC if OFF now. Connect the test board." "When ready press the button:" " " "OK - to test the board" "CANCEL - to exit from program" IF BUTTONCANCEL GOTO finish ; use file name and FULL PATH or relative path to MSP-Gang.dll file location F_LOADCFGFILE Examples\Script\test.mspgangproj MESSAGEBOX OK "Press OK to download the test program." F_GO MESSAGEBOX YESNO "Press YES when the test finished successfully." "Press NO when the test failed." IF BUTTONNO GOTO START ; use file name and FULL PATH or relative path to MSP-Gang.dll file location F_LOADCFGFILE Examples\Script\finalcode.mspgangproj F_GO ; wait min 0.5 s before turning Vcc ON again SLEEP 500 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Operation 29 Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com F_VCCON SLEEP 10000 GOTO START >finish END ;======================================================= 2.1.4 Programming in Standalone Mode The MSP Gang Programmer supports the Standalone mode of programming target devices. In this mode, the MSP Gang Programmer can only use images for programming because they contain a complete configuration and code files necessary for the procedure. If the user has not already created an image then follow the procedure outlined in Section 2.1.9. When viewed from the GUI, Figure 2-9 shows that all GUI options are disabled and the MSP Gang Programmer hardware buttons have to be used for programming. NOTE: This figure uses the Standalone mode (see the Mode section near the top left corner). All GUI options are disabled; the MSP Gang Programmer can only be operated using physical controls on the programmer itself. Standalone mode allows the user to program a target device using an image either from internal memory (up to 96 different images), or an external SD-Card, without the use of a desktop or laptop computer. Figure 2-9. Main MSP Gang Programmer Dialog GUI, Standalone Mode After images have been download to the internal memory or after an SD card with a valid image is connected to the MSP Gang Programmer, proceed with programming in Standalone mode. Use the arrow buttons (up and down) and the enter button to select a desired image for programming. A description of the selected image is displayed on the bottom line, and it is the same description that was created in the GUI when the Save Image button was pressed (see Figure 2-10). 30 Operation SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com Figure 2-10. Image Option After the desired image has been selected, press the GO button on the MSP Gang Programmer hardware to start programming. This button operates the same way as the GO button on the GUI. Progress of the operation in Standalone mode is indicated by a flashing yellow LED and displayed on the LCD display. The result status is represented by green and red LEDs on the MSP Gang Programmer and details are displayed on the LCD display. If a green LED is ON only, then all targets have been programmed successfully. If only the red LED is displaying, that all results failed. If red and green LEDs are on, then result details should be checked on top of the LCD display. The LCD display shows target numbers 1 to 8 and marks to indicate failure or success: X for failure and V for success. When an error is reported, the bottom line repeatedly displays an error number followed by a short description with time intervals of approximately two seconds. The selected image contains all necessary configuration options and code files required for programming; however, the user can change the number of target devices being programmed using onboard buttons. On the main display of the MSP-Gang Programmer (see Figure 2-11), use the up or down arrow buttons to find the Target En/Dis option. Press the OK button to enter this menu. A sliding cursor appears below the numbers representing each device at the top of the main display. Use the arrow buttons to underline the device to enable or disable. Press OK to toggle the devices; press Esc to exit to the main menu. Press GO to use the selected image to program the selected devices. If another image is selected or the current image is selected again, the Enable and Disable options reset to what has been configured in the image. SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Operation 31 Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com Figure 2-11. Target Enable or Disable Option In addition to the these options that control programming, the contrast of the LCD display can be changed. Select the Contrast option in the main menu, and press OK. Then use the up and down arrow buttons to adjust the screen contrast. Changes to contrast reset after power down, unless the contrast setting has been set by the GUI on the host computer. 32 Operation SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com 2.1.5 Memory Setup for GO, Erase, Program, Verify, and Read The GO, Erase, Program, Verify, and Read operations shown in Figure 2-1 use addresses specified in the Memory Options dialog screen shown in Figure 2-2. The memory setup used by these operations has five main options: 1. Update only – When this option is selected, the GO operation does not erase memory contents. Instead contents of code data taken from the code file are downloaded to flash memory. This option is useful when a relatively small amount of data, such as calibration data, needs to be added to flash memory. Other address ranges should not be included in the code file, meaning that the code file should contain ONLY the data which is to be programmed to flash memory. For example, if the code file contains data as shown in TI format: @1008 25 CA 80 40 39 E3 F8 02 @2200 48 35 59 72 AC B8 q Then 8 bytes of data are written starting at location 0x1008 and 6 bytes of data starting at location 0x2200. The specified addresses should be blank before writing (contain a value of 0xFF). Before the writing operation is actually performed, the MSP Gang Programmer automatically verifies if this part of memory is blank and proceeds to program the device only if verification is successful. NOTE: Even Number of Bytes The number of bytes in all data blocks must be even. Words (two bytes) are used for writing and reading data. In case that the code file contains an odd number of bytes, the data segment is appended by a single byte containing a blank value of 0xFF. This value does not overwrite the current memory contents (because Update only is selected), but verification fails if the target device does not contain a blank value of 0xFF at that location. 2. All Memory – This is the most frequently used option during programming. All memory is erased before programming, and all contents from the code file are downloaded to the target microcontroller's flash memory. When the microcontroller contains an INFO-A segment that can be locked (for example the MSP430F2xx series contains DCO constants at locations 0x10F8 to 0x10FF), then INFO-A can be erased or left unmodified. The including locked INFO-A segment should be selected or unselected respectively. When INFO-A is not erased, none of the data is saved into INFO-A, even if this data is specified in the code file. In addition, the DCO constants in the Retain Data in Flash group should be selected if the DCO constants should be restored after erasing the INFO-A segment. 3. Main memory only – Flash information memory (segments A and B, C, D) are not modified. Contents of information memory from the code file are ignored. 4. Used by Code File – This option allows main memory segments and information memory segments to be modified when specified by the code file. Other flash memory segments are not touched. This option is useful if only some data, like calibration data, needs to be replaced. 5. User defined – This option is functionally similar to options described before, but memory segments are explicitly chosen by the user. When this option is selected, then on the right side of the memory group, in the Memory Options dialog screen, check boxes and address edit lines are enabled. The check boxes allow the user to select information memory segments to be enabled (erased, programmed, verified). Edit lines in the Main Memory group allow the user to specify the main memory address range (start and stop addresses). The start address should specify the first byte in the segment, and the stop address should specify the last byte in the segment (last byte is programmed). Because the main memory segment size is 0x200, the start address should be a multiple of 0x200; for example, 0x2200. The stop address should specify the last byte of the segment to be written. Therefore, it should be greater than the start address and point to a byte that immediately precedes a memory segment boundary; for example, 0x23FF or 0x55FF. SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Operation 33 Programming MSP Flash Devices Using the MSP Gang Programmer 2.1.5.1 www.ti.com Writing and Reading BSL Flash Sectors in the MSP430F5xx and MSP430F6xx MCUs The MSP430F5xx and MSP430F6xx microcontrollers have BSL firmware saved in flash memory sectors. By default, access to these sectors (Read or Write) is blocked, however it is possible to modify the BSL firmware if required, which allows the user to upload newer or custom defined BSL firmware. These BSL sectors are located in memory starting at 0x1000 to 0x17FF. The MSP Gang Programmer software handles modification of these BSL flash sectors using the same method as all other memory sectors. However, to avoid unintentional erasing of BSL sectors, the most commonly used memory option, All Memory , blocks access to these BSL sectors. Access to BSL sectors is unlocked only when the Used by Code File or User defined option is selected and desired selected BSL sectors are enabled, as shown in Figure 2-12. Contents of BSL sectors can be read even when the All Memory option is selected. NOTE: The user can select which segments of memory are written to or read from. The selected configuration shows how the user can configure the programmer to overwrite segments of memory used by the Bootloader (BSL). Figure 2-12. Memory Options, BSL Sectors Selected 34 Operation SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com 2.1.6 Secure Device Setup and Memory Protection The MSP430 family has an option to block access to the MCU through the JTAG and SBW interface. To select the Secure Device option, press the Secure Device Option button on the GUI or select the option from the pulldown menu under Setup→Secure Device. Figure 2-13 shows the Secure Device Options window. When the Secure Device option is selected, the device is secured at the end of the GO programming procedure if all programming steps pass successfully. Otherwise, the device is not secured. For MSP430 devices, the Secure Device process is not reversible. NOTE: Irreversible unless password option used. Can be done automatically after programming (at end of GO operation) Figure 2-13. MSP430 Secure Device Options In some MCUs, typically the FRAM family, a lower JTAG and SBW protection level is available. The JTAG and SBW can be protected by password that is saved in the MCU flash at the addresses 0xFF80 through 0xFFFF. If the password in the code file at this address is the same as the password saved inside the flash, then access to JTAG and SBW is unlocked, and flash can be reprogrammed. This is useful for updating firmware after initial programming. However, if the device is secured using the Secure Device procedure, then unlocking by using this password is no longer possible. The Secure Device mechanism provides a higher level of protection. The MSP432 family implements a different approach to memory protection. The MSP432 can provide protection for selected memory regions or to block communication. All protection options are described in the MSP432 technical reference manual and are implemented by programming the flash mailbox (see the MSP432P4xx Family Technical Reference Manual (SLAU356) for details). The MSP-GANG can program the flash mailbox according to user settings or directly from a code file. When the Secure Device Option button is selected for the MSP432 family, the Secure Device Options screen is displayed (see Figure 214). SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Operation 35 Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com NOTE: The flash mailbox can be programmed to provide memory protection of some memory, or communication can be blocked. Can be done automatically after programming (at end of GO operation) Figure 2-14. MSP432 Secure Device Options 36 Operation SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com Many types of protection options are available and can be set in the Enabled Commands screen (see Figure 2-15). NOTE: The flash mailbox can be programmed with different instructions that provide memory protection, or block communication. Figure 2-15. MSP432 Secure Device Options Details 2.1.7 Programming MCU With IP Encapsulated Segment Some FRAM MCUs have the option to protect an address range in main memory. All data from protected memory space is read as 0x3FFF regardless of actual contents. When the protected memory is not locked, then the contents can be read "as is" if the option "Including Unlocked MPU-IPE" is selected. The programmer must have the address range of protected memory to be able to service the MCU correctly. The protected memory range must be specified in the MPU-IPE Space Addresses Group in the Memory Options window (see Figure 2-16). The protected memory space can be erased and reprogrammed when the option "Including Locked or Unlocked MPU-IPE space" is selected. That option can only be selected when the All Memory option is selected. When the memory region is protected and locked using the MPUIPE features (see MCU family user guide or technical reference manual for details) then all memory is erased first before programming the MCU. The protected and locked MPU-IPE memory range can be erased and reprogrammed only when the JTAG or SBW communication is used. When BSL communication is used, the locked memory cannot be erased or reprogrammed. Through BSL, memory can only be erased and reprogrammed when the locking option is not used. SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Operation 37 Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com When a new code file is programmed with contents outside of the protected area, all memory (except protected memory) can be erased, blank checked, programmed, and verified. If the protected memory space is defined incorrectly, a blank check error will result, because 0x3FFF will be read instead of the expected 0xFFFF. Figure 2-16. Memory Options Window 2.1.8 Serialization Serialization implemented in the MSP-GANG creates a unique serial number (SN) or MAC address and saves it in the flash, FRAM, or dedicated MAC register in the target device. The SN or MAC address is new every time a new target device is programmed. The SN or MAC number can be generated automatically (incremented from the last number) or read from an external file every time before pressing the GO button. To enable serialization, select ENABLE Serialization in the Serialization screen (see Figure 2-17). Specify the log file name where the all programmed SN and MAC numbers are saved. The SN or MAC number can be saved in any flash or FRAM location as specified in the Start Address in Memory field (see Figure 2-17). The address must be even, and the Used size in bytes (the size of the SN or MAC number) must also be an even number of bytes. The In Memory Format section specifies if the SN or MAC number is written LSB first or MSB first. 38 Operation SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com Figure 2-17. Serialization If the In Memory Format option is HEX (MSB First), the SN is saved to flash memory starting from the specified address (0x10000) as follows: 12 34 56 78 9A BC DE EF If the In Memory Format option is HEX (LSB First), the SN is saved to flash memory as follows: EF DE BC 9A 78 56 34 12 In the report window and log file, the SN is always displayed in the same order as it is saved in memory starting from the lowest address to the highest. In this case, if the SN is saved in memory as MSB first, then the displayed SN in the report window, log file, and Serialization screen (see Figure 2-17) are the same. If the SN or MAC number is generated automatically (the Defined Number option is selected), the number is generated starting with the value in the Number starting from field and incremented as specified in the Increment field. All numbers must be specified in hex format. When the target are programmed with the new numbers, the value in Number starting from is automatically updated and saved in the configuration for use in the next session. The user is responsible for tracking whether or not a particular SN or MAC number has been used. The programmer only applies the values set by the user. When the Number from the file option is selected, up to 8 numbers (SN or MAC) must be in the userspecified file, which must have an extension of .txt. The file can contain up to 8 numbers that will be applied in the next programming session. The file must be saved and valid before the GO button is pressed. If additional targets are to be programmed, the file must be updated with the new number list. The following list is an example of the contents of the SN or MAC number file: 01 01 01 01 01 01 01 01 0A 0A 0A 0A 0A 0A 0A 0A A3 A3 A3 A3 A3 A3 A3 A3 B4 B4 B4 B4 B4 B4 B4 B4 32 32 32 32 32 32 32 32 35 35 35 35 35 35 35 35 65 65 65 65 65 65 65 65 23 24 25 26 27 28 29 2A SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Operation 39 Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com The preceding example lists numbers that would be programmed to 8 target devices using a size of 8 bytes each. These hex numbers can represent integer values or ASCII text, depending on the application. In the case of ASCII, the text must be converted to hex in the file. After a set of 8 targets is programmed, the user must update the file (the same file name) with new values. The following example lists a new set of 8 values: 01 01 01 01 01 01 01 01 0A 0A 0A 0A 0A 0A 0A 0A A3 A3 A3 A3 A3 A3 A3 A3 B4 B4 B4 B4 B4 B4 B4 B4 32 32 32 32 32 32 32 32 35 35 35 35 35 35 35 35 65 65 65 65 65 65 65 65 2B 2C 2D 2E 2F 30 31 32 The programmer writes the numbers as provided to the specified flash or FRAM location. The provided numbers must be the same size (in bytes) as specified in the Used size in bytes option (see Figure 2-17). The SN or MAC number can be also saved to a dedicated register, if available on the target MCU; for example, in the MSP432E4xx MCUs. In this case, select the MAC in Fixed location option. The address for the MAC number is hardcoded and displayed (read only and grayed out) for user review in the Start Address in Memory field (see Figure 2-17). If the SN or MAC number is saved to flash or FRAM, the same address cannot be used by the program code (specified in the code file). The programmer will display a warning if it detects a conflict between address of the SN or MAC number and code. If the linker requires that the code file fill the SN or MAC number location with a dummy value, select the Remove code contents in the location where the Unique Number is defined option to overwrite this location with the correct SN or MAC number. If location specified for the SN or MAC number is not empty (all 0xFF), the SN or MAC number is not written to the target. If the programmer detects any value other that 0xFF, the existing value is restored and the new SN or MAC number is ignored. This process keeps an existing SN or MAC number in the target if the number was already programmed. To overwrite an existing value, erase the device memory before programming. NOTE: The MSP-GANG does not erase the existing SN or MAC number if the erase all memory option is used. The old SN or MAC number is restored after the erase, the same way that the defined retained bytes are restored. The SN or MAC number can be erased; for example, if serialization is disabled. After erasing, the SN or MAC number location can be used as regular memory. 2.1.9 Creating and Using Images An image contains the code files and the configuration options necessary for programming of a target device. Images can be stored as a binary file (".mspgangbin") in internal MSP Gang Programmer memory (or SD card), or as an image file (".mspgangimage") on disk for redistribution. Image files intended for redistribution can be encrypted with additional security features described later in this section. Creating an image is done in Interactive Mode by following the same steps described in Section 2.1.4, followed by pressing the "Save Image File As…" or "Save to Image" buttons. The first button saves the code files and configuration options as a binary file and image file locally on disk, and the second button saves this information directly to the MSP Gang Programmer internal memory. Note that to use the MSP Gang Programmer in Standalone mode, you need to program at least one image to internal memory or read a binary file from an SD card (using the SD card connector on the MSP Gang Programmer). If you intend to modify the contents of an image at a later date, it is advisable to save the configuration options as a project. Because an image is read-only, reading a project file is the only way to recreate images easily without reentering the configuration options from scratch. After the project is loaded, a change can be made and a new image with the same name can be created to overwrite the previous one. 40 Operation SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com NOTE: Do not overwrite images unnecessarily during production The image flash memory has a specified 10000 endurance cycles. Therefore, over the lifetime of the product, each image can be reliably reprogrammed 10000 times. Reprogramming images should be done once per production setup, rather than per programming run. Reprogramming the image per programming run will quickly exhaust flash endurance cycles and result in errant behavior. In total, 96 different images can be saved internally in the MSP Gang Programmer or one image can be saved on an SD card. Each image can be selected at any time to program the target devices. The MSP Gang Programmer also allows the image to be saved in a file, either to be saved on an SD card or to be sent to a customer. In order for the image file to be usable from the SD card, copy only the binary file (".spgangbin") to the SD card and preserve the proper extension (Note that binary files are not encrypted). For redistribution to a customer, the image file can be sent and encrypted with additional security features. When a new image is saved to a file or to a MSP Gang Programmer internal memory, an image configuration screen appears (see Figure 2-18). Enter any name up to 16 characters. This name is displayed in the GUI image selector (see Figure 2-1) on the bottom line of the MSP Gang Programmer LCD screen when the corresponding image is selected. Press OK when the name is entered. Once you have created a programming setup using the steps mentioned above, it is useful to store it in the form of an image. The advantage of an image is that it contains both the configuration options necessary for programming as well as the code files that are flashed to target devices. Moreover, only images can be saved to internal MSP Gang Programmer memory and used in Standalone mode, where the programmer can operate without being connected to a PC. Before the user proceeds to making images; however, it is advisable to save the MSP Gang Programmer setup as a project first. This is recommended because images cannot be modified once created, only overwritten. Therefore, if the user wants to change an image that has already been created without recreating the whole configuration from scratch then it is necessary to load the corresponding project file. Once the project is loaded, a change can be made and a new image with the same name can be created to overwrite the old one. Images can be saved to the programmer's internal memory, or on an external SD-Card. A total of 96 different images can be saved internally, or one image can be saved on an SD-Card. Each image can be selected at any time to program the target devices. The MSP Gang Programmer also allows the image to be saved in a file, either to be saved on an SD-Card or to be sent to a customer. When the code file and configuration are ready to be saved, press the Save Image button to save to MSP Gang Programmer internal memory, or the Save Image to file button to save to a file. Whether the new image being created is saved to a file or to MSP Gang Programmer internal memory, an image configuration screen appears (see Figure 2-18). Enter any name up to 16 characters. This name is displayed in the GUI image selector (see Figure 2-1) and it is displayed on the bottom line of the MSP Gang Programmer LCD screen when the corresponding image is selected. Press OK when the name is entered. SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Operation 41 Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com NOTE: The image name is limited to 16 characters. This name is shown on the LCD display of the MSP Gang Programmer , and Image pulldown menu in the GUI. Figure 2-18. Image Name Configuration Screen NOTE: Since version 1.2.1.0, the number of images has increased from 16 (512KB each) to 96 (64KB each). Total image memory has decreased from 8MB to 6MB. For compatibility purposes with older images, the numbering scheme for the new images uses an index and subindex format (for example, 1.0, 1.1, 1.2... 1.7, 2.0, 2.1, 2.2... 12.7). The first index selects the 512KB image memory block, and the subindex selects which 64KB portion of the 512KB block is used. Old images that occupy 512KB always have the subindex as 0 (for example, old Image 1 is now Image 1.0). Newly created images can occupy one 64KB block or more (for example, a 128KB image stored in image number 2.1, will be saved to occupy blocks 2.1 and 2.2). Images 13 to 16 will be removed in future versions; however, during the transition period, they can only be read or erased (that is, they are marked as read-only in the GUI). The screen shown in Figure 2-19 allows the user configure what type of security is used to protect the image file. Three options are available; however, for all three options the contents of the code file are always encrypted and cannot be read. 42 Operation SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com NOTE: During project creation, the user can select to protect project information using various methods. Figure 2-19. Image File Security Options 1. Any PC – Configuration can be opened on any computer using MSP Gang Programmer software. It can be used for programming only. 2. Any PC – Password protected – Configuration can be opened on any computer using the MSP Gang Programmer software, but only after the desired password has been entered. 3. Selected PC – Hardware Fingerprint number – Image can be opened only on the dedicated computer with the same hardware fingerprint number as the number entered in the edited line above. Figure 2-20 shows a window with the hardware fingerprint number. An example usage scenario would involve calling an intended user to provide the hardware fingerprint number of their computer and entering it within this configuration window. This restricts opening this image to only the dedicated computer running MSP Gang Programmer software. NOTE: The fingerprint can be used to secure the project where, for example, only a computer with a matching hardware fingerprint can be used to view and edit the project. Figure 2-20. Hardware Fingerprint of Computer in Use SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Operation 43 Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com The image file can be copied to internal MSP Gang Programmer memory and used for programming target devices. Select the desired image number in the GUI and press the Load Image from File button (see Figure 2-1). This selected image is subsequently be used for programming target devices. 2.1.10 Programming From Image File An image file can be used to program target devices from a self-contained read-only file that has all the necessary configuration options and code files already included. By selecting the "From Image File" Mode you can use an image file created using the steps described in Section 2.1.9. If the image is password protected you are prompted to enter the password before you can use the image. Alternatively, if the image is restricted to be used on a specific PC you are unable to use the image unless your PC matches the hardware fingerprint (for instructions on how to use images from MSP Gang Programmer internal memory see Section 2.1.2). Figure 2-21. Programming From Image File 44 Operation SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com Figure 2-22. Password for Image File 2.1.11 Programming From SD Card The MSP Gang Programmer can program target devices with an image loaded from an external SD card. To program from an external SD card, copy a binary file (".mspgangbin") created using steps described in Section 2.1.9 to the root directory of the SD card (preserve the original extension of ".mspgangbin"). If multiple binary files are present in the root directory of the SD card, the first one found is used (the first one found is not necessarily the first one alphabetically). To ensure that the desired binary file is used, verify that only one binary file with the proper extension .mspgangbin is present in the root directory. The name of the selected file is displayed on the LCD screen of the MSP Gang Programmer. When the SD card is connected to the MSP Gang Programmer, internal memory is disabled and an image can only be read from the SD card. This mechanism has been deliberately implemented to aid in production because inserting an SD card to the MSP Gang Programmer leaves users with only one option for programming a target device and, therefore, less possibility for misconfiguration errors. 2.1.12 File Extensions MSP Gang Programmer software accepts the following file extensions: Code hex files *.txt *.s19,*.s28,*.s37 *.hex *.a43 Texas Instruments Motorola Intel Intel hex format with extensions specified by IAR Image files *.mspgangbin *.mspgangimage binary file, used for saving data in SD card image file, can be password protected for distribution Script files *.mspgangsf script file Project configuration files *.mspgangproj keep all configuration, file names, and data for used project SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Operation 45 Programming MSP Flash Devices Using the MSP Gang Programmer www.ti.com 2.1.13 Checksum Calculation The checksum (CS) that is displayed on the side of the code file name is used for internal verification. The CS is calculated as the 32-bit arithmetic sum of the 16-bit unsigned words in the code file, without considering the flash memory size or location. If any portion of the code file specifies only one byte instead of a 16-bit word, the missing byte is defined as 0xFF for the CS calculation. The following formula is used. DWORD CS; DWORD XL, XH; CS = 0; for( addr = 0; addr < ADDR_MAX; addr = addr + 2 ) { if(( valid_code[ addr ] ) || ( valid_code[ addr+1 ])) { if( valid_code[ addr ] ) XL = (DWORD) code[ addr ]; else XL = 0xFF; if( valid_code[ addr+1 ] ) XH = ((DWORD) code[ addr+1 ]) Rx -> 3E 50 4 4 A1 0 0 0 CKL CKH 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 -> Rx -> 3E 31 4 4 0 0 0 0 CKL CKH 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 InProgress data (0xB0). When the process is finished, byte 6 changes to ACK (0x90) or NACK (0xA0). 70 Firmware SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Detailed Description of Commands www.ti.com 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 -> Rx -> 3E 56 6 6 A1 0 2 0 DL DH CKL CKH 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 ERASE_TASK_BIT BLANKCHECK_TASK_BIT PROGRAM_TASK_BIT VERIFY_TASK_BIT SECURE_TASK_BIT DCO_CAL_TASK_BIT 0x0001 0x0002 0x0004 0x0008 0x0010 0x0020 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) SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Firmware 71 Detailed Description of Commands www.ti.com CFG_TMP_POWER_VCC_EN (8) Data Data 0 1 Target devices powered from an external power supply Target devices powered from MSP-GANG programmer CFG_TMP_INTERFACE (10) Data Data Data Data Data Data JTAG_FAST JTAG_MED JTAG_SLOW SBW_FAST SBW_MED SBW_SLOW 0x0004 0x0005 0x0006 0x0008 0x0009 0x000A CFG_TMP_GANG_MASK (12) Sum of target bit masks Target 1 Target 2 Target 3 ⋮ Target 8 0x01 0x02 0x04 ⋮ 0x80 One target only – Target 1 All targets Data = 0x0001 Data = 0x00FF CFG_TMP_VCC_ONOFF (14) Immediately turn VCC target on of off Data Data 0x0001 0x0000 ON OFF CFG_TMP_ICC_HI_EN (18) High (50 mA) current from programmer enable or disable Data Data 0x0001 0x0000 Enable Disable CFG_TMP_IO_INTERFACE (20) Set interface configuration Data Data 0x0000 0x0001 SBW through TDOI line SBW through RST line CFG_TMP_RESET (22) Immediately reset target device Data Data 0x0001 0x0000 Reset target device Release Reset line CFG_TMP_VCC_SETTLE_TIME (26) Data 72 Firmware 0x0000 to 0x00C8 Settle VCC time in step 20 ms SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Detailed Description of Commands www.ti.com CFG_TMP_BSL_1ST_PASSW (36) Data Data Data Data 3.5.3.4 0x00 0x01 0x02 0x03 BSL_ANY_PASSW BSL_PASSW_FROM_CODE_FILE BSL_PASSW_FROM_PASSWORD_FILE BSL_EMPTY_PASSW Get Selected Status Command Tx ->3E 58 04 04 A1 0 - - 0 0 - - CKL CKH Rx ->80 0 n n B0 B1 B2 B3 ... Bn CKL CKH The Get Selected Status command gets the selected status or results from the MSP-Gang programmer. The following numbers (A1) are available. See the description of the MSPGANG_GetAPIStatus function (Section 4.2.43) for details of the B0...Bn byte contents. GET_APP_FLAGS GET_LAST_STATUS GET_LAST_ERROR_NO 3.5.3.5 10 12 14 Read From Gang Data Buffer Command Tx -> 3E 49 4 4 T 0 - - n 0 - - CKL CKH Rx -> 80 0 n n D1 D2 D3 D4 D5 D6 D7 D8...Dn CKL CKH The MSP-GANG Programmer contains a temporary data buffer that can be used for writing data to and reading data from each target device. The buffer size is 128 bytes for each target device – Buffer[8] [128]; T = Target device number, 1 to 8 n = Number of bytes taken from the Buffer[T-1] [..] 3.5.3.6 Write to Gang Data Buffer Command Tx -> 3E 4A n+4 n+4 T 0 - - n 0 D1 D2...Dn CKL CKH Rx -> ACK Write bytes to selected target’s Buffer -> Buffer[8] [128] T = Target device number, 1 to 8 n = Number of bytes written to Buffer[T-1] [..] 3.5.4 API Firmware Commands That Should Not be Used 3.5.4.1 Interactive Process Command Tx -> 3E 46 n n D1 ... Dn CKL CKH Rx -> 80 0 k k D1 ... Dk CKL CKH NOTE: Do not use this command. This command is used by the API-DLL and GUI only. 3.5.4.2 Erase Image Command Tx -> 3E 33 4 4 0 0 0 0 CKL CKH Rx -> B0 (In Progress) NOTE: Do not use this command. This command is used by the API-DLL and GUI only. SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Firmware 73 Detailed Description of Commands 3.5.4.3 www.ti.com Read Info Memory From MSP-GANG Command Tx -> 3E 41 4 4 A1 0 0 0 CKL CKH Rx -> 80 0 80 80 D1 ... D128 CKL CKH NOTE: Do not use this command. This command is used by the API-DLL and GUI only. 3.5.4.4 Write to MSP-GANG Info Memory Command Tx -> 3E 42 84 84 A1 0 80 0 D1 ... D128 CKL CKH Rx -> ACK NOTE: Do not use this command. This command is used by the API-DLL and GUI only. 3.5.4.5 Verify Access Key Command Tx -> 3E 44 4 4 0 0 0 0 CKL CKH Rx -> ACK or NACK NOTE: Do not use this command. This command is used by the API-DLL and GUI only. 3.5.4.6 Write to Image Block Command Tx -> 3E 43 n n A1 A2 A3 0 –6 0 D1 ... Dn-6 CKL CKH Rx -> ACK or NACK The Write to Image Block command loads the data bytes into the image buffer of the MSP-GANG. Do not use this function in your application. Use MSP-GANG GUI and MSP-GANG DLL for writing data into the internal image buffer. 3.5.4.7 Verify Image Check Sum Command Tx -> 3E 45 08 08 A1 A2 A3 0 LL LH D1 D2 CKL CKH Rx -> ACK or NACK The Verify Image Check Sum command verifies the image check sum of all written image contents. Do not use this function in your application. Use MSP-GANG GUI and MSP-GANG DLL for writing and verifying data in the internal image buffer. 3.5.4.8 Read Image Header Command Tx -> 3E 47 6 6 A1 A2 0 0 n 0 CKL CKH Rx -> 80 0 n n D1 ... Dn CKL CKH NOTE: Do not use this command. This command is used by the API-DLL and GUI only. 3.5.4.9 Disable API Interrupts Command Tx -> 3E 4C 4 4 R R R R CKL CKH Rx -> ACK NOTE: Do not use this command. This command is used by the API-DLL and GUI only. 74 Firmware SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Detailed Description of Commands www.ti.com 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 – VCC level in mV ( VCC = 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 – VCC enable bits to each targets b0 to b7 – target1 to target8 D6 – ICC 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. VCC 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 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Firmware 75 Detailed Description of Commands www.ti.com Example 2 Generate a short RST pulse on all targets. VCC 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 76 Firmware SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated 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. SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Dynamic Link Library for MSP-GANG Programmer Copyright © 2011–2019, Texas Instruments Incorporated 77 MSP-GANG.dll Description www.ti.com All MSP-GANG DLL functions have the same "MSPGANG_" prefix in the function name. It is easy in the application software determine what functions are used with the MSP-GANG.dll. The following sections describe each function. Examples of using 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_MSP_DLL and C:\Program Files\Texas Instruments\MSP-GANG\Examples\Cpp_Applications_MSP_DLL These examples show how to configure the MSP-Gang Programmer to the desired target device type, select code, and subsequently program connected devices. In addition, the examples also show how to write a serial number into a custom memory location. To use these examples copy the MSG-Gang.dll into the working directory. 4.2.1 MSPGANG_GetDataBuffers_ptr MSPGANG_GetDataBuffers_ptr gives access to the internal data buffers that provide code contents, data to be programmed, and buffers of data that was read from each target device with following structure. LONG WINAPI MSPGANG_GetDataBuffers_ptr( void ** x ); #define DBUFFER_SIZE #define JTAG_PASSW_LEN #define BSL_PASSW_LEN #define ARM_BSL_PASSW_LEN #define MAX_BSL_PASSW_LEN BSL_PASSW_LEN) #define MAX_PASSW_LEN BSL_PASSW_LEN, JTAG_PASSW_LEN ) #define FLASH_END_ADDR #define FLASH_BUF_LEN #define GANG_SIZE 0x210000 0x80 0x20 //MSP430 0x100 //MSP432 0x100 //max from (ARM_BSL_PASSW_LEN, 0x100 //max from (ARM_BSL_PASSW_LEN, (DBUFFER_SIZE-1) DBUFFER_SIZE 8 typedef struct { BYTE SourceCode[DBUFFER_SIZE]; //source code from the file BYTE UsedCode[DBUFFER_SIZE]; //combined data (source code, serialization etc) BYTE GangRx[DBUFFER_SIZE][GANG_SIZE]; //data read from all targets BYTE Tmp[DBUFFER_SIZE]; //used for second file cmp BYTE Flag_ScrCode[DBUFFER_SIZE]; //0 - empty 1-Code1, 2-Code2, 4Appended Code in SourceCode[x]; #define CODE1_FLAG 1 #define CODE2_FLAG 2 #define APPEND_CODE_FLAG 4 BYTE Flag_UsedCode[DBUFFER_SIZE]; //0 - empty 1valid data in UsedCode[x]; BYTE Flag_WrEn[DBUFFER_SIZE]; //0 - none 1write/verify enable in FlashMem[x] BYTE Flag_EraseEn[DBUFFER_SIZE]; //0 - none 1erase enable in FlashMem[x] BYTE Flag_RdEn[DBUFFER_SIZE]; //0 - none 1read enable in FlashMem[x] BYTE Flag_Sp3[DBUFFER_SIZE]; //used internally BYTE JTAG_Passsword[2][JTAG_PASSW_LEN]; BYTE BSL_Passsword[2][MAX_BSL_PASSW_LEN]; BYTE Flag_JTAG_Passw[2][JTAG_PASSW_LEN]; // [0][..]password from code file; [1][..]-password from password file BYTE Flag_BSL_Passw[2][MAX_BSL_PASSW_LEN]; // [0][..]password from code file; [1][..]-password from password file } DATA_BUFFERS; 78 Dynamic Link Library for MSP-GANG Programmer SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated MSP-GANG.dll Description www.ti.com extern DATA_BUFFERS dat; Syntax LONG MSPGANG_GetDataBuffers_ptr(void ** x) In the application software, the pointer to the data buffer can be initialized as follows. DATA_BUFFERS *DBuf; void *temp; MSPGANG_GetDataBuffers_ptr((&temp)); DBuf = (DATA_BUFFERS *)temp; Example Check if the code contents is specified at the MCU location and get the code contents at that location. int get_code_content( long MCU_addr, BYTE *data ) { long baddr, MCU_addr; BYTE data, used_code; baddr = MSPGANG_Convert_Address( MCU_TO_DATABUF, MCU_addr ); if( baddr >= 0 ) { if( DBuf->Flag_ScrCode[ baddr ] ) { *data = DBuf->SourceCode[ baddr ]; return(SUCCESS): } else return(EMPTY_DATA): } return(WRONG_MCV_ADDR); } 4.2.2 MSPGANG_SetGangBuffer, MSPGANG_GetGangBuffer The MSP-GANG Programmer contains a temporary data buffer that can be used for writing and reading data to each target device. Buffer size is 128 bytes for each target device when used it for data and 16 bytes when used for serialization. Buffer[8] [128]; MSPGANG_SetGangBuffer writes data to selected Buffer. MSPGANG_GetGangBuffer reads contents from the selected buffer. Syntax LONG MSPGANG_SetGangBuffer(BYTE target, BYTE size, BYTE *data) LONG MSPGANG_GetGangBuffer(BYTE target, BYTE size, BYTE *data) Arguments #define #define #define #define GANG_DATA_BUF_SIZE SN_GANG_BUF_SIZE TARGET_MASK SN_DATA_FLAG 128 SN_DATA_MAX_SIZE 0x1F 0x40 If used for data: BYTE target BYTE size Target number (1 to 8) Size of data (1 to 128) If used for serialization: SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Dynamic Link Library for MSP-GANG Programmer Copyright © 2011–2019, Texas Instruments Incorporated 79 MSP-GANG.dll Description www.ti.com BYTE target BYTE size Target number (1 to 8) ORed with SN_DATA_FLAG (SN_DATA_FLAG | Target_Number) Size of data (1 to 16) BYTE *data Pointer to data buffer from where data is taken or to where the data should be saved Result LONG Error code Example Write unique 16 bytes of data to RAM or Flash BYTE data[16]; MSPGANG_Interactive_Open_Target_Device( "test" ); for(target=1; target 1..8 data = DBuf->GangRx[ baddr + (MCU_addr-0x10C0)][target-1]; //get data for each target from internal buffer ......... 86 Dynamic Link Library for MSP-GANG Programmer SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated MSP-GANG.dll Description www.ti.com 4.2.15 MSPGANG_Interactive_ReadTargets The target device must be opened first if not open yet (see MSPGANG_Interactive_Open_Target_Device, Section 4.2.12). MSPGANG_Interactive_ReadTargets reads the contents of the selected target devices (one to eight targets) simultaneously from the locations specified in the configuration memory (see configuration setup for details) and saves it in the internal data buffer (see DATA_BUFFERS dat; structure for details). Syntax LONG MSPGANG_Interactive_ReadTargets(BYTE mask) Arguments BYTE mask Mask of the target devices that data should be read from Result LONG Error code Example SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Dynamic Link Library for MSP-GANG Programmer Copyright © 2011–2019, Texas Instruments Incorporated 87 MSP-GANG.dll Description www.ti.com Get data from each of the 8 target devices DATA_BUFFERS *DBuf; void *temp; MSPGANG_GetDataBuffers_ptr((&temp)); DBuf = (DATA_BUFFERS *)temp; long baddr, MCU_addr; ................. //read data from all targets and save it in the internal DATA_BUFFERS MSPGANG_Interactive_DefReadTargets( 0xFF, 0, 100, 0x10C0, 0x10FF); //get the base address of data in the DATA_BUFFERS baddr = MSPGANG_Convert_Address( MCU_TO_DATABUF, 0x10C0 ); if( baddr >= 0 ) ......... //data at the MCU_addr 0x10C0 to 0x10FF), target -> 1..8 data = DBuf->GangRx[ baddr + (MCU_addr-0x10C0)][target-1]; //get data for each target from internal buffer ......... 4.2.16 MSPGANG_Interactive_ReadBytes Note: The target device must be opened first if not open yet (see MSPGANG_Interactive_Open_Target_Device, Section 4.2.12). MSPGANG_Interactive_ReadBytes reads contents from one selected target device and saves it in the desired data buffer. Syntax LONG MSPGANG_Interactive_ReadBytes(BYTE target_no, LONG addr, LONG size, BYTE *data) Arguments BYTE target_no LONG addr LONG size BYTE *data Target number (one to eight) of the desired target device Start address from read data Number of read bytes Pointer to buffer where data would be saved Result LONG Error code 4.2.17 MSPGANG_Interactive_WriteWord_to_RAM Note: The target device must be opened first if not open yet (see MSPGANG_Interactive_Open_Target_Device, Section 4.2.12). MSPGANG_Interactive_WriteWord_to_RAM writes one word (16 bits) to any RAM or I/O location. The address must be even. Syntax LONG MSPGANG_Interactive_WriteWord_to_RAM(LONG addr, LONG data) Arguments LONG addr BYTE data RAM address location Data (16 bits) Result LONG 88 Error code Dynamic Link Library for MSP-GANG Programmer SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated MSP-GANG.dll Description www.ti.com 4.2.18 MSPGANG_Interactive_WriteByte_to_RAM Note: The target device must be opened first if not open yet (see MSPGANG_Interactive_Open_Target_Device, Section 4.2.12). MSPGANG_Interactive_WriteByte_to_RAM writes one byte to any RAM or I/O location. Syntax LONG MSPGANG_Interactive_WriteByte_to_RAM(LONG addr, BYTE data) Arguments LONG addr BYTE data RAM address location Data (8 bits) Result LONG Error code 4.2.19 MSPGANG_Interactive_WriteBytes_to_RAM Note: The target device must be opened first if not open yet (see MSPGANG_Interactive_Open_Target_Device, Section 4.2.12). MSPGANG_Interactive_WriteBytes_to_RAM writes 'size' number of bytes to any RAM or I/O location. The starting address must be even. Syntax LONG MSPGANG_Interactive_WriteBytes_to_RAM(LONG addr, LONG size, BYTE * data) Arguments LONG addr LONG size BYTE * data RAM address location Number of bytes to be written Data block Result LONG Error code SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Dynamic Link Library for MSP-GANG Programmer Copyright © 2011–2019, Texas Instruments Incorporated 89 MSP-GANG.dll Description www.ti.com 4.2.20 MSPGANG_Interactive_WriteBytes_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_WriteBytes_to_FLASH writes 'size' number of bytes to any flash location. The starting address must be even. Syntax LONG MSPGANG_Interactive_WriteBytes_to_FLASH(LONG addr, LONG size, BYTE * data) Arguments LONG addr LONG size BYTE * data RAM address location Number of bytes to be written Data block Result LONG Error code 4.2.21 MSPGANG_Interactive_Copy_Gang_Buffer_to_RAM 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_RAM writes 'size' number of bytes from the internal Gang_Buffer[8][128] to RAM – simultaneously to all active target devices. Data for each target can be different. 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_RAM(LONG addr, LONG size) Arguments LONG addr LONG size RAM address location Number of bytes to be written (up to 128) Result LONG Error code Example See Section 4.2.2. 90 Dynamic Link Library for MSP-GANG Programmer SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated MSP-GANG.dll Description www.ti.com 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 LONG size FLASH address location 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 LONG EndAddr FLASH address location of the first sector to be erased. Address aligned to the sector size. Address of the last sector to be erased. The address is aligned to the sector size. Result LONG Error code SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Dynamic Link Library for MSP-GANG Programmer Copyright © 2011–2019, Texas Instruments Incorporated 91 MSP-GANG.dll Description www.ti.com 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 LONG EndAddr Blank check (if 0xFF) from StartAddr location to EndAddr location Start Address must be even, End address must be odd. 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 LONG * results 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 Pointer to long buffer size for 8 targets (LONG DCO[8]) Result LONG 92 Error code Dynamic Link Library for MSP-GANG Programmer SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated MSP-GANG.dll Description www.ti.com 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 numbering 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 New image numbering 0x80 or 0, 0x90, 0xA0, 0x81 or 1, 0x91, 0xA1, 0x82 or 2, 0x92, 0xA2, 0x83 or 3, 0x93, 0xA3, 0x84 or 4, 0x94, 0xA4, 0x85 or 5, 0x95, 0xA5, 0x86 or 6, 0x96, 0xA6, 0x87 or 7, 0x97, 0xA7, 0x88 or 8, 0x98, 0xA8, 0x89 or 9, 0x99, 0xA9, 0x8A or 10, 0x9A, 0xAA, 0x8B or 11, 0x9B, 0xAB, - used for read only if (transition time) --,,,----,,,--- In GUI 0xB0, 0xC0, 0xD0, 0xE0, 0xF0 1.0, 1.1, 1.2, 1.3,... 0xB1, 0xC1, 0xD1, 0xE1, 0xF1 2.0, 2.1, 2.2, 2.3,... 0xB2, 0xC2, 0xD2, 0xE2, 0xF2 3.0, 3.1, 3.2, 3.3,... 0xB3, 0xC3, 0xD3, 0xE3, 0xF3 4.0, 4.1, 4.2, 4.3,... 0xB4, 0xC4, 0xD4, 0xE4, 0xF4 5.0, 5.1, 5.2, 5.3,... 0xB5, 0xC5, 0xD5, 0xE5, 0xF5 6.0, 6.1, 6.2, 6.3,... 0xB6, 0xC6, 0xD6, 0xE6, 0xF6 7.0, 7.1, 7.2, 7.3,... 0xB7, 0xC7, 0xD7, 0xE7, 0xF7 8.0, 8.1, 8.2, 8.3,... 0xB8, 0xC8, 0xD8, 0xE8, 0xF8 9.0, 9.1, 9.2, 9.3,... 0xB9, 0xC9, 0xD9, 0xE9, 0xF9 10.0, 10.1, 10.2, 10.3,... 0xBA, 0xCA, 0xDA, 0xEA, 0xFA 11.0, 11.1, 11.2, 11.3,... 0xBB, 0xCB, 0xDB, 0xEB, 0xFB 12.0, 12.1, 12.2, 12.3,... the flash image is not used for internal firmware Syntax LONG MSPGANG_SelectImage(LONG lImage) Arguments LONG lImage Image number (0 to 0xFB) Result LONG Error code SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Dynamic Link Library for MSP-GANG Programmer Copyright © 2011–2019, Texas Instruments Incorporated 93 MSP-GANG.dll Description www.ti.com 4.2.27 MSPGANG_EraseImage MSPGANG_EraseImage clears (presets with 0xFF) active image memory. Use the MSPGANG_SelectImage function to select desired image memory. Syntax LONG MSPGANG_EraseImage(void) Result LONG Error code 4.2.28 MSPGANG_CreateGangImage MSPGANG_CreateGangImage creates a command script and the data to be written to target devices according to current MSP-GANG configuration. After the image data is prepared, then it can be saved in the selected image memory by calling the MSPGANG_LoadImageBlock function. Syntax LONG MSPGANG_CreateGangImage(LPTSTR name) Arguments LPTSTR name Image name; maximum of 16 characters. Image name is displayed on the LCD display. Result LONG 94 Error code Dynamic Link Library for MSP-GANG Programmer SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated MSP-GANG.dll Description www.ti.com 4.2.29 MSPGANG_LoadImageBlock MSPGANG_LoadImageBlock saves the previously prepared image contents into the selected image memory. The selected image memory is automatically erased first (MSPGANG_EraseImage is called automatically, your application code does NOT need to call it explicitly). Use the following sequence for preparing and saving an image into image memory: MSPGANG_CreateGangImage(name); MSPGANG_SelectImage(lImage); MSPGANG_EraseImage(); MSPGANG_LoadImageBlock(); MSPGANG_VerifyPSAImageBlock(); Syntax LONG MSPGANG_LoadImageBlock(void) Arguments None Result LONG Error code NOTE: Do not overwrite images unnecessarily during production The image flash memory has a specified 10000 endurance cycles. Therefore, over the lifetime of the product, each image can be reliably reprogrammed 10000 times. Reprogramming images should be done once per production setup, rather than per programming run. Reprogramming the image per programming run will quickly exhaust flash endurance cycles and result in errant behavior. //Ideally, load image once per setup. Reduce programming time and save flash endurance cycles. //Loading an image usually takes longer than full target device programming. MSPGANG_CreateGangImage(...); MSPGANG_LoadImageBlock(); ... do { ... MSPGANG_MainProcess(...); ... } while(...); //Avoid loading image inside loop if possible. //Loading image per programming cycle wastes time and quickly uses up flash endurance cycles. do { MSPGANG_CreateGangImage(...); MSPGANG_LoadImageBlock(); MSPGANG_MainProcess(...); } while(...); SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Dynamic Link Library for MSP-GANG Programmer Copyright © 2011–2019, Texas Instruments Incorporated 95 MSP-GANG.dll Description www.ti.com 4.2.30 MSPGANG_VerifyPSAImageBlock MSPGANG_VerifyPSAImageBlock verifies the checksum of all blocks used in the selected image memory. The image memory number should be selected first using MSPGANG_SelectImage function. Syntax LONG MSPGANG_VerifyPSAImageBlock(void) Arguments None Result LONG Error code 4.2.31 MSPGANG_ReadImageBlock MSPGANG_ReadImageBlock reads the header from the selected image memory. A maximum of 254 bytes can be read. Access to the remaining image memory (up to 512KB) is blocked. Syntax LONG MSPGANG_ReadImageBlock(LONG addr, LONG size, void *lpData) Arguments LONG address LONG size void *lpData Pointer to byte buffer where the result is saved Result LONG Error code Data Format union _IMAGE_HEADER { BYTE bytes[IMAGE_HEADER_SIZE]; WORD words[IMAGE_HEADER_SIZE/2]; struct { WORD own_PSA; WORD global_PSA; BYTE year; BYTE month; BYTE day; BYTE hour; BYTE min; BYTE sec; #define GLOBAL_PSA_START_OFFSET 10 // down - covered by global_PSA ---#define SHORT_ID_2BYTE_OFFSET 10 WORD shortID; #define CHUNKS_NO_2BYTE_OFFSET 12 WORD chunks; #define IMAGE_DATA_2BYTE_OFFSET 14 WORD image_data_offset; #define GLOBAL_SIZE_4BYTE_OFFSET 16 DWORD size; //global_size; 96 Dynamic Link Library for MSP-GANG Programmer SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated MSP-GANG.dll Description www.ti.com WORD ID_rev; //20 BYTE ID_name[HEADER_ID_SIZE]; //22 DWORD DLL_ver; //32 #define HEADER_COMMENT_ADDR 36 char comment[SCRIPT_TEXT_SIZE]; WORD used_tasks_mask; //52 BYTE Interface; //54 type (JTAG, SBW, BSL), speed(Fast, Med, Slow) BYTE GangMask; //55 BYTE Vcc_PowerEn; //56 BYTE Icc_HiEn; //57 WORD Vcc_mV; //58 WORD min_Vcc_mV; //60 WORD max_Vcc_mV; //62 WORD RST_time_ms; //64 WORD RST_release_ms; //66 BYTE InfoA_Erase_En; //68 BYTE BSL_Erase_En_mask; //69 BYTE SecureDev_En; //70 BYTE DCO_Flags; //71 #define DCO_RETAIN_EN 0x01 #define DCO_VALIDATION_EN 0x02 #define DCO_RECAL_EN 0x04 #define DCO_ONE_CONSTANTS 0x08 BYTE IO_cfg; //72 #define SBW_VIA_RST_BIT 0x01 BYTE MemoryOption; //73 for GUI only for displaying used memory option. No impact in firmware BYTE InterfaceSpeed; //74 for GUI only for displaying used speeds (JTAG/SBW/CJTAG/BSL). No impact in firmware BYTE VccSettleTime; //75 settle time *20ms BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE // // JTAG_unlockEn HasLockedInfoA HasAutoEraseInBSL BSL_X_type spare_flag4 spare_flag5 spare_flag6 spare_flag7 : 1; : 1; : 1; : 1; : 1; : 1; : 1; : 1; //76 ClrSegments; //77 MSP432 #define MSP432_CLR_LOCKING_INFOA_BIT 0x01 #define MSP432_CLR_LOCKING_BSL_BIT 0x02 BYTE //BYTE }prg; BSL_1st_Passw; //78 free[112-78]; struct { BYTE offset[IMAGE_HEADER_CTRL_OFFSET]; //offset 112 BYTE flags; //0x70 #define IMAGE_LOCK 0x10 //must be the same bit as in LOCK_LD_PRJ BYTE sp1; //0x71 BYTE sp2; //0x72 BYTE sp3; //0x73 BYTE sp4; //0x74 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Dynamic Link Library for MSP-GANG Programmer Copyright © 2011–2019, Texas Instruments Incorporated 97 MSP-GANG.dll Description BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE }ctrl; struct { BYTE char WORD WORD WORD WORD WORD WORD BYTE //#define //#define //#define //#define //#define www.ti.com sp5; sp6; sp7; sp8; sp9; sp10; sp11; sp12; sp13; sp14; sp15; //0x75 //0x76 //0x77 //0x78 //0x79 //0x7A //0x7B //0x7C //0x7D //0x7E //0x7F offset[IMAGE_HEADER_SIZE/2]; MCU_name[SCRIPT_MCU_NAME_SIZE]; Id[2]; //16 SubId[2]; //20 MainEraseMode; //24 minPVcc; //26 RAM_size; //28 SubIDAddr; //30 FRAM; //32 FRAM_NONE 0 FRAM_ASIC 1 FRAM_MSPXV2_57 2 FRAM_APOLLO 3 FRAM_MSPXV2_59 4 //0 // --- one byte BYTE DefaultDCO : 1; //33 BYTE ASIC : 1; BYTE MPU : 1; BYTE JTAG_Passw : 1; BYTE BSLprogrammable : 1; BYTE JTAG_Unlockable : 1; BYTE BSL_16B_passw : 1; BYTE F1_80 : 1; //spare // --- one byte BYTE TestPin; //34 BYTE CpuX; //35 98 BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE Quick_W Quick_R Quick_W_bug Quick_0x08 Quick_0x10 Quick_0x20 Quick_0x40 Quick_0x80 :1; :1; BYTE FastFlash; //37 BYTE BYTE EnhVerify; JTAG; //38 //39 BYTE BYTE SpyBiWire; Marginal; //40 //41 Dynamic Link Library for MSP-GANG Programmer //36 :1; :1; :1; :1; :1; :1; SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated MSP-GANG.dll Description www.ti.com BYTE BYTE F5xx; MCU_Group; //42 //43 WORD RAM_addr; BYTE SYS_CLK; //#define STANDARD #define Xv2_PLL #define HF_8MHz #define HF_1MHz #define HF2_8MHz #define Xv2_PLL_G60XX #define DCO_16384HZ BYTE InfoA_type; //#define STANDARD #define I2XX_1K 1 2 3 4 6 //44 //46 used for F5xx and up 0 - for compatibility //as standard before //FRAM FR57xx //Apollo //FRAM FR58xx, FR59xx 5 //i2xxx //47 0 - for compatibility 1 //i2xxx 1K - 0x1000-0x13FF BYTE FLASH_Type; //48 //#define STANDARD 0 - for compatibility #define SEGMENT_1K 1 //i2xxx 1K flash segment size #define FLASH_SEGM_2K 2 #define FLASH_SEGM_4K 4 #define FLASH_SEGM_8K 8 #define FLASH_SEGM_16K 16 #define FLASH_SEGM_32K 32 BYTE Secure_Type; //49 //#define STANDARD 0 - for compatibility #define SUC 1 //i2xxx BYTE Map; BYTE SysClkDiv2; BYTE NMI_to_addr; #define NMI_TO_ADDR_NOT_SUPPORTED BYTE FW_type; //50 //51 //52 0x80 //53 #define FAMILY_XMS432P401 21 //XSP432P401 Rev-B not supported #define FAMILY_MSP432P401 22 #define FAMILY_MSP432P4111 23 #define FAMILY_MSP432 21 BYTE MCU_Type; //54 #define MSP430F 0x01 //or can be 0 #define CC_RF_BIT_ID 0x10 #define MSP_FR_BIT_ID 0x20 #define MSP432_BIT_ID 0x80 BYTE free_1; //55 BYTE free_2; //56 BYTE free_3; //57 WORD Id2[2]; //58 BYTE free_4; //62 // BYTE }device; }; obsolete - free[128-48]; SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Dynamic Link Library for MSP-GANG Programmer Copyright © 2011–2019, Texas Instruments Incorporated 99 MSP-GANG.dll Description www.ti.com 4.2.32 MSPGANG_Read_Code_File MSPGANG_Read_Code_File reads or appends a code file or reads a password file and saves it in its internal buffer. By default, the file is treated as the main code file as long as the setup has not redirected the file to 'Append code' or 'Password code' using the MSPGANG_SetConfig function. MSPGANG_SetConfig(CFG_OPEN_FILE_TYPE, CODE_FILE_INDEX) MSPGANG_SetConfig(CFG_OPEN_FILE_TYPE, APPEND_FILE_INDEX) MSPGANG_SetConfig(CFG_OPEN_FILE_TYPE, PASSW_FILE_INDEX) When the MSPGANG_Read_Code_File is executed, the flag set by MSPGANG_SetConfig(CFG_OPEN_FILE_TYPE, CODE_FILE_INDEX) is set to the default value of Read Code File. Syntax LONG MSPGANG_Read_Code_File(LPTSTR FullPath) Arguments LPTSTR FullPath Path to the code file (*.hex,*.txt or *.s19, *.s28, *.s37) Result LONG Error code 4.2.33 MSPGANG_Save_Config, MSPGANG_Load_Config, MSPGANG_Default_Config The current configuration file can be saved using the MSPGANG_Save_Config function and recalled when required using the MSPGANG_Load_Config function. The current configuration can be erased and the default configuration loaded by calling the MSPGANG_Default_Config function. When the new configuration is loaded, some of the parameters can be modified item-by-item using MSPGANG_SetConfig and can be read from the configuration item-by-item using MSPGANG_GetConfig. The MSP-GANG configuration can also be created using the MSP-GANG GUI software (MSP-GANG-exe) by setting desired programmer setup, verifying if all works, then saving the configuration using the "Save Setup as..." option. The setup used in the GUI can be restored in the DLL when the above mentioned configuration file is downloaded using MSPGANG_Load_Config function. Syntax LONG MSPGANG_Save_Config(LPTSTR filename) LONG MSPGANG_Load_Config(LPTSTR filename) LONG MSPGANG_Default_Config(void) Arguments LPTSTR filename Path to the configuration file Result LONG 100 Error code Dynamic Link Library for MSP-GANG Programmer SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated MSP-GANG.dll Description www.ti.com 4.2.34 MSPGANG_SetConfig, MSPGANG_GetConfig Syntax LONG MSPGANG_SetConfig(LONG index, LONG data) Arguments LONG index LONG data Configuration index. See list below. Configuration data Result LONG Error code Syntax LONG MSPGANG_GetConfig(LONG index) Arguments LONG index Configuration index. See list below. Result LONG data Configuration data List of Indexes #define FROMIMAGE_BIT #define CFG_INTERFACE 0 #define INTERFACE_NONE 0 #define INTERFACE_JTAG 4 #define INTERFACE_SBW #define INTERFACE_BSL #define INTERFACE_TYPE_MAX_INDEX #define #define #define 0x1000 8 0xC CFG_JTAG_SPEED 1 #define INTERFACE_FAST 0 #define INTERFACE_MED 1 #define INTERFACE_SLOW 2 #define INTERFACE_SPEED_MAX_INDEX CFG_SBW_SPEED // INTERFACE_FAST // INTERFACE_MED // INTERFACE_SLOW 2 CFG_BSL_SPEED // INTERFACE_FAST // INTERFACE_MED // INTERFACE_SLOW 3 INTERFACE_BSL INTERFACE_SLOW 0 1 2 0 1 2 #define CFG_IO_INTERFACE 4 #define SBW_VIA_TDOI_BIT 0x00 #define SBW_VIA_RST_BIT 0x01 // 0 - SBW_VIA_TDOI (pin 1) and TCK/TEST (pin-7/8) // 1 - SBW_VIA_RST (pin 11) and TCK/TEST (pin-7/8) #define CFG_POWERTARGETEN 6 #define EXTERNAL_POWER_WHOLE_RANGE SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback 0 // external power supply - Dynamic Link Library for MSP-GANG Programmer Copyright © 2011–2019, Texas Instruments Incorporated 101 MSP-GANG.dll Description www.ti.com whole range from Vccmin to Vccmax #define POWER_SUPPLIED_BY_MSPGANG MSP-GANG #define EXTERNAL_POWER_IN_RANGE verified range - selected Vcc +/- 0.3V #define CFG_VCCINDEX // Vcc in mV #define CFG_ICC_HI_EN // disable // enable #define #define 1 2 // targets supplied by // external power supply - 7 1800 - 3600 0 CFG_BLOWFUSE // disable // enable 1 8 (up to 30mA from MSP-GANG to each targets) (up to 50mA from MSP-GANG to each targets) 9 0 1 CFG_TARGET_EN_INDEX 10 // Targets GANG enable mask - 0x00 ...0xFF. Enable all targets - > 0xFF #define #define #define #define #define #define #define #define #define #define #define #define #define 102 TARGET_1_MASK TARGET_2_MASK TARGET_3_MASK TARGET_4_MASK TARGET_5_MASK TARGET_6_MASK TARGET_7_MASK TARGET_8_MASK 0x01 0x02 0x04 0x08 0x10 0x20 0x40 0x80 CFG_FLASHERASEMODE 11 #define ERASE_NONE_MEM_INDEX 0 #define ERASE_ALL_MEM_INDEX 1 #define ERASE_PRG_ONLY_MEM_INDEX 2 #define ERASE_INFILE_MEM_INDEX 3 #define ERASE_DEF_CM_INDEX 4 #define ERASE_MAX_INDEX ERASE_DEF_CM_INDEX CFG_ERASEINFOA // disable // enable CFG_ERASEINFOB // disable // enable CFG_ERASEINFOC // disable // enable CFG_ERASEINFOD // disable // enable 12 1 13 0 1 14 0 1 15 0 1 #define CFG_MASSERASE_AND_INFOA_EN // disable 0 // enable 1 #define CFG_ERASESTARTADDR 17 // FLASH/FRAM start erase address Dynamic Link Library for MSP-GANG Programmer \ 0 16 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated MSP-GANG.dll Description www.ti.com #define CFG_ERASESTOPADDR 18 // FLASH/FRAM end erase address #define CFG_FLASHREADMODE 19 #define READ_ALL_MEM_INDEX #define READ_PRGMEM_ONLY_INDEX #define READ_INFOMEM_ONLY_INDEX #define READ_DEF_MEM_INDEX #define READ_MEM_MAX_INDEX #define #define #define #define CFG_READINFOA // disable // enable CFG_READINFOB // disable // enable CFG_READINFOC // disable // enable CFG_READINFOD // disable // enable 0 1 2 3 READ_DEF_MEM_INDEX 20 0 1 21 0 1 22 0 1 23 0 1 #define CFG_FINALACTION_MODE 24 #define APPLICATION_NO_RESET 0 #define APPLICATION_TOGGLE_RESET 1 #define APPLICATION_TOGGLE_VCC 2 #define APPLICATION_JTAG_RESET 3 #define APPLICATION_RESET_MAX_INDEX APPLICATION_JTAG_RESET #define CFG_BEEPMODE 25 // sum of following bits #define BEEP_PCSPK_EN_BIT 1 //Beep via PC Speaker enable #define #define #define BEEP_OK_EN_BIT BEEP_SOUND_EN_BIT CFG_DEFERASEMAINEN // disable // enable //Beep when OK enable //Sound enable 26 0 1 #define CFG_CUSTOMRESETPULSETIME // time in ms 1.....2000 #define CFG_CUSTOMRESETIDLETIME // time in ms 1.....2000 #define CFG_BSL_ENH_ENABLE // disable // enable #define 2 4 27 28 29 0 1 CFG_BSL_ENH_INDEX 30 //for future usage #define BSL_ENH_DISABLE 0 #define BSL_ENH_NONE 1 #define BSL_ENH_ERASE 2 #define BSL_ENH_MAX_INDEX 2 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Dynamic Link Library for MSP-GANG Programmer Copyright © 2011–2019, Texas Instruments Incorporated 103 MSP-GANG.dll Description #define CFG_RETAIN_CAL_DATA_INDEX // disable 0 // enable 1 #define CFG_FINALACTIONRUNTIME // 0 - infinite, // 1...120 time in seconds #define CFG_FINALACTIONVCCOFFTIME 33 // Vcc-OFF (then again ON) time after programming when the // APPLICATION_TOGGLE_VCC option is selected. #define CFG_DCO_CONST_2XX_VERIFY_EN // disable 0 // enable 1 #define CFG_DCOCAL_2XX_EN // disable // enable 31 32 35 36 0 1 #define CFG_BSL_FLASH_WR_EN 37 // mask for 4 BSL segments - disable->0, enable->1 // bit 0 -> 0x01 BSL segment 1 // bit 1 -> 0x02 BSL segment 2 // bit 2 -> 0x04 BSL segment 3 // bit 3 -> 0x08 BSL segment 4 #define CFG_BSL_FLASH_RD_EN 38 // mask for 4 BSL segments - disable->0, enable->1 // bit 0 -> 0x01 BSL segment 1 // bit 1 -> 0x02 BSL segment 2 // bit 2 -> 0x04 BSL segment 3 // bit 3 -> 0x08 BSL segment 4 #define CFG_READMAINMEMEN // disable // enable 39 0 1 #define CFG_READDEFSTARTADDR // Memory READ start address #define CFG_READDEFSTOPADDR // Memory READ end address #define CFG_COMPORT_NO 42 // Communication COM Port number - 0..255 #define CFG_UART_SPEED // Baud Rate index #define UART_9600 #define UART_19200 #define UART_38400 #define UART_57600 #define UART_115200 #define 104 www.ti.com 40 41 43 CFG_OPEN_FILE_TYPE 44 #define CODE_FILE_INDEX #define APPEND_FILE_INDEX #define PASSW_FILE_INDEX Dynamic Link Library for MSP-GANG Programmer 0 1 2 3 4 0 1 2 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated MSP-GANG.dll Description www.ti.com #define #define #define SECONDCODE_FILE_INDEX CODE2_FILE_INDEX 4 CFG_USE_SCRIPT_FILE // disable // enable 45 0 1 #define CFG_IMAGE_NO //image number - 0...9 #define CFG_RESETTIME 47 #define RESET_10MS_INDEX #define RESET_100MS_INDEX #define RESET_200MS_INDEX #define RESET_500MS_INDEX #define RESET_CUSTOM_INDEX #define RESET_MAX_INDEX #define #define 3 46 0 1 2 3 4 RESET_CUSTOM_INDEX CFG_PROJECT_SOURCE 48 #define INTERACTIVE_MODE 0 #define FROM_IMAGE_MEMORY_MODE #define STANDALONE_MODE #define FROM_IMAGE_FILE_MODE #define PROJECT_SOURCE_MAX_INDEX CFG_COPY_CFG_FROM_MEMORY_EN // Direct (eg. Interactive) // From Image memory 1 2 3 FROM_IMAGE_FILE_MODE 49 0 1 #define CFG_RUNNING_SCRIPT_MODE 50 #define RUNNING_SCRIPT_NONE 0 #define RUNNING_SCRIPT_ONLINE 1 #define RUNNING_SCRIPT_OFFLINE 2 #define CFG_VCC_SETTLE_TIME 51 // Vss settle time in step 20 ms. Range 0...200 ( time 0...4000 ms) #define CFG_JTAG_UNLOCK_EN // disable // enable #define #define 52 0 1 CFG_CODE2_FILE_EN 53 // disable 0 // enable 1 CFG_BSL_FIRST_PASSWORD 54 #define BSL_ANY_PASSW 0 #define BSL_PASSW_FROM_CODE_FILE 1 #define BSL_PASSW_FROM_PASSWORD_FILE #define BSL_EMPTY_PASSW 3 2 #define CFG_DEFINED_RETAIN_DATA_EN 55 // disable 0 // enable 1 #define CFG_DEFINED_RETAIN_START_ADDR 56 //address must be even #define CFG_DEFINED_RETAIN_END_ADDR 57 //address must be odd #define DEFINED_RETAIN_DATA_MAX_SIZE 0x40 // END_ADDR - START_ADDR + 1 0, enable->1 // bit 0 -> 0x01 section 1 // bit 1 -> 0x02 section 2 // bit 2 -> 0x04 section 3 // bit 3 -> 0x08 section 4 #define CFG_RDDEF_EXCLUDE_SECTIONS 61 // mask for 4 Read_Defined excluded sections disable->0, enable->1 // bit 0 -> 0x01 section 1 // bit 1 -> 0x02 section 2 // bit 2 -> 0x04 section 3 // bit 3 -> 0x08 section 4 #define #define #define #define #define #define #define #define CFG_WRDEF_EXCLUDE_S1_START_ADDR CFG_WRDEF_EXCLUDE_S1_END_ADDR CFG_WRDEF_EXCLUDE_S2_START_ADDR CFG_WRDEF_EXCLUDE_S2_END_ADDR CFG_WRDEF_EXCLUDE_S3_START_ADDR CFG_WRDEF_EXCLUDE_S3_END_ADDR CFG_WRDEF_EXCLUDE_S4_START_ADDR CFG_WRDEF_EXCLUDE_S4_END_ADDR #define #define #define #define #define #define #define #define CFG_RDDEF_EXCLUDE_S1_START_ADDR CFG_RDDEF_EXCLUDE_S1_END_ADDR CFG_RDDEF_EXCLUDE_S2_START_ADDR CFG_RDDEF_EXCLUDE_S2_END_ADDR CFG_RDDEF_EXCLUDE_S3_START_ADDR CFG_RDDEF_EXCLUDE_S3_END_ADDR CFG_RDDEF_EXCLUDE_S4_START_ADDR CFG_RDDEF_EXCLUDE_S4_END_ADDR #define CFG_RD_TLV_EN 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 #define CFG_SERIALIZATION_EN 80 // disable 0 // enable 1 #define CFG_SN_ADDRESS_IN_MEMORY 81 //address must be even #define CFG_SN_DATA_SIZE_IN_BYTES 82 //Size must be even 2...16 #define SN_DATA_MAX_SIZE 16 #define CFG_SN_REMOVE_CODE_FROM_SN_LOCATION // disable 0 // enable 1 #define CFG_SN_SOURCE 84 #define SN_SOURCE_DEFINED 0 #define SN_SOURCE_FROM_FILE 1 // 0 - defined // 1 - from file 106 Dynamic Link Library for MSP-GANG Programmer 83 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated MSP-GANG.dll Description www.ti.com #define #define #define #define #define #define #define #define #define #define #define #define #define CFG_SN_FORMAT_IN_MEMORY #define SN_FORMAT_LSB_FIRST #define SN_FORMAT_MSB_FIRST CFG_SN_DATA_INCREMENT CFG_INIT_SN_DATA_0 //Bits 0-31 of the SN init data CFG_INIT_SN_DATA_1 //Bits 32-63 of the SN init data CFG_INIT_SN_DATA_2 //Bits 64-91 of the SN init data CFG_INIT_SN_DATA_3 //Bits 92-127 of the SN init data CFG_SN_DESTINATION #define NUMBER_TO_FLASH #define NUMBER_TO_MAC_REG CFG_MPU_IPE_WR_LOCKED // disable 0 // enable 1 CFG_MPU_IPE_WR_UNLOCKED // disable 0 // enable 1 CFG_MPU_IPE_RD_UNLOCKED // disable 0 // enable 1 CFG_MPU_IPE_START_ADDR CFG_MPU_IPE_END_ADDR CFG_ADDITIONAL_COMPORT_NO // 0 - disable (default) // 1-255 added COM port number 1-255 85 0 1 86 87 (CFG_INIT_SN_DATA_0+1) (CFG_INIT_SN_DATA_0+2) (CFG_INIT_SN_DATA_0+3) 91 0 1 92 93 94 95 96 200 // MSP432P protection configuration #define CFG_MSP432_MB_CMD 300 #define CFG_MSP432_MB_JTAG_SWD_LOCK_SECEN 301 #define CFG_MSP432_MB_JTAG_SWD_LOCK_AES_INIT_VECT0 302 #define CFG_MSP432_MB_JTAG_SWD_LOCK_AES_INIT_VECT1 303 #define CFG_MSP432_MB_JTAG_SWD_LOCK_AES_INIT_VECT2 304 #define CFG_MSP432_MB_JTAG_SWD_LOCK_AES_INIT_VECT3 305 #define CFG_MSP432_MB_JTAG_SWD_LOCK_AES_SECKEYS0 306 #define CFG_MSP432_MB_JTAG_SWD_LOCK_AES_SECKEYS1 307 #define CFG_MSP432_MB_JTAG_SWD_LOCK_AES_SECKEYS2 308 #define CFG_MSP432_MB_JTAG_SWD_LOCK_AES_SECKEYS3 309 #define CFG_MSP432_MB_JTAG_SWD_LOCK_AES_SECKEYS4 310 #define CFG_MSP432_MB_JTAG_SWD_LOCK_AES_SECKEYS5 311 #define CFG_MSP432_MB_JTAG_SWD_LOCK_AES_SECKEYS6 312 #define CFG_MSP432_MB_JTAG_SWD_LOCK_AES_SECKEYS7 313 #define CFG_MSP432_MB_JTAG_SWD_LOCK_UNENC_PWD0 314 #define CFG_MSP432_MB_JTAG_SWD_LOCK_UNENC_PWD1 315 #define CFG_MSP432_MB_JTAG_SWD_LOCK_UNENC_PWD2 316 #define CFG_MSP432_MB_JTAG_SWD_LOCK_UNENC_PWD3 317 #define CFG_MSP432_MB_SEC_ZONE0_SECEN 318 #define CFG_MSP432_MB_SEC_ZONE0_START_ADDR 319 #define CFG_MSP432_MB_SEC_ZONE0_LENGTH 320 #define CFG_MSP432_MB_SEC_ZONE0_AESINIT_VECT0 321 #define CFG_MSP432_MB_SEC_ZONE0_AESINIT_VECT1 322 #define CFG_MSP432_MB_SEC_ZONE0_AESINIT_VECT2 323 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Dynamic Link Library for MSP-GANG Programmer Copyright © 2011–2019, Texas Instruments Incorporated 107 MSP-GANG.dll Description #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define 108 www.ti.com CFG_MSP432_MB_SEC_ZONE0_AESINIT_VECT3 CFG_MSP432_MB_SEC_ZONE0_SECKEYS0 CFG_MSP432_MB_SEC_ZONE0_SECKEYS1 CFG_MSP432_MB_SEC_ZONE0_SECKEYS2 CFG_MSP432_MB_SEC_ZONE0_SECKEYS3 CFG_MSP432_MB_SEC_ZONE0_SECKEYS4 CFG_MSP432_MB_SEC_ZONE0_SECKEYS5 CFG_MSP432_MB_SEC_ZONE0_SECKEYS6 CFG_MSP432_MB_SEC_ZONE0_SECKEYS7 CFG_MSP432_MB_SEC_ZONE0_UNENC_PWD0 CFG_MSP432_MB_SEC_ZONE0_UNENC_PWD1 CFG_MSP432_MB_SEC_ZONE0_UNENC_PWD2 CFG_MSP432_MB_SEC_ZONE0_UNENC_PWD3 CFG_MSP432_MB_SEC_ZONE0_ENCUPDATE_EN CFG_MSP432_MB_SEC_ZONE0_DATA_EN CFG_MSP432_MB_SEC_ZONE1_SECEN CFG_MSP432_MB_SEC_ZONE1_START_ADDR CFG_MSP432_MB_SEC_ZONE1_LENGTH CFG_MSP432_MB_SEC_ZONE1_AESINIT_VECT0 CFG_MSP432_MB_SEC_ZONE1_AESINIT_VECT1 CFG_MSP432_MB_SEC_ZONE1_AESINIT_VECT2 CFG_MSP432_MB_SEC_ZONE1_AESINIT_VECT3 CFG_MSP432_MB_SEC_ZONE1_SECKEYS0 CFG_MSP432_MB_SEC_ZONE1_SECKEYS1 CFG_MSP432_MB_SEC_ZONE1_SECKEYS2 CFG_MSP432_MB_SEC_ZONE1_SECKEYS3 CFG_MSP432_MB_SEC_ZONE1_SECKEYS4 CFG_MSP432_MB_SEC_ZONE1_SECKEYS5 CFG_MSP432_MB_SEC_ZONE1_SECKEYS6 CFG_MSP432_MB_SEC_ZONE1_SECKEYS7 CFG_MSP432_MB_SEC_ZONE1_UNENC_PWD0 CFG_MSP432_MB_SEC_ZONE1_UNENC_PWD1 CFG_MSP432_MB_SEC_ZONE1_UNENC_PWD2 CFG_MSP432_MB_SEC_ZONE1_UNENC_PWD3 CFG_MSP432_MB_SEC_ZONE1_ENCUPDATE_EN CFG_MSP432_MB_SEC_ZONE1_DATA_EN CFG_MSP432_MB_SEC_ZONE2_SECEN CFG_MSP432_MB_SEC_ZONE2_START_ADDR CFG_MSP432_MB_SEC_ZONE2_LENGTH CFG_MSP432_MB_SEC_ZONE2_AESINIT_VECT0 CFG_MSP432_MB_SEC_ZONE2_AESINIT_VECT1 CFG_MSP432_MB_SEC_ZONE2_AESINIT_VECT2 CFG_MSP432_MB_SEC_ZONE2_AESINIT_VECT3 CFG_MSP432_MB_SEC_ZONE2_SECKEYS0 CFG_MSP432_MB_SEC_ZONE2_SECKEYS1 CFG_MSP432_MB_SEC_ZONE2_SECKEYS2 CFG_MSP432_MB_SEC_ZONE2_SECKEYS3 CFG_MSP432_MB_SEC_ZONE2_SECKEYS4 CFG_MSP432_MB_SEC_ZONE2_SECKEYS5 CFG_MSP432_MB_SEC_ZONE2_SECKEYS6 CFG_MSP432_MB_SEC_ZONE2_SECKEYS7 CFG_MSP432_MB_SEC_ZONE2_UNENC_PWD0 CFG_MSP432_MB_SEC_ZONE2_UNENC_PWD1 CFG_MSP432_MB_SEC_ZONE2_UNENC_PWD2 CFG_MSP432_MB_SEC_ZONE2_UNENC_PWD3 CFG_MSP432_MB_SEC_ZONE2_ENCUPDATE_EN CFG_MSP432_MB_SEC_ZONE2_DATA_EN CFG_MSP432_MB_SEC_ZONE3_SECEN CFG_MSP432_MB_SEC_ZONE3_START_ADDR CFG_MSP432_MB_SEC_ZONE3_LENGTH Dynamic Link Library for MSP-GANG Programmer 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated MSP-GANG.dll Description www.ti.com #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define CFG_MSP432_MB_SEC_ZONE3_AESINIT_VECT0 384 CFG_MSP432_MB_SEC_ZONE3_AESINIT_VECT1 385 CFG_MSP432_MB_SEC_ZONE3_AESINIT_VECT2 386 CFG_MSP432_MB_SEC_ZONE3_AESINIT_VECT3 387 CFG_MSP432_MB_SEC_ZONE3_SECKEYS0 388 CFG_MSP432_MB_SEC_ZONE3_SECKEYS1 389 CFG_MSP432_MB_SEC_ZONE3_SECKEYS2 390 CFG_MSP432_MB_SEC_ZONE3_SECKEYS3 391 CFG_MSP432_MB_SEC_ZONE3_SECKEYS4 392 CFG_MSP432_MB_SEC_ZONE3_SECKEYS5 393 CFG_MSP432_MB_SEC_ZONE3_SECKEYS6 394 CFG_MSP432_MB_SEC_ZONE3_SECKEYS7 395 CFG_MSP432_MB_SEC_ZONE3_UNENC_PWD0 396 CFG_MSP432_MB_SEC_ZONE3_UNENC_PWD1 397 CFG_MSP432_MB_SEC_ZONE3_UNENC_PWD2 398 CFG_MSP432_MB_SEC_ZONE3_UNENC_PWD3 399 CFG_MSP432_MB_SEC_ZONE3_ENCUPDATE_EN 400 CFG_MSP432_MB_SEC_ZONE3_DATA_EN 401 CFG_MSP432_MB_BSL_EABLE 402 CFG_MSP432_MB_BSL_START_ADDR 403 CFG_MSP432_MB_BSL_HARD_INV_PARAMS 404 CFG_MSP432_MB_JTAG_SWD_LOCK_ENCPAYLOADADDR 405 CFG_MSP432_MB_JTAG_SWD_LOCK_ENCPAYLOADLEN 406 CFG_MSP432_MB_JTAG_SWD_LOCK_DST_ADDR 407 CFG_MSP432_MB_SEC_ZONE0_PAYLOADADDR 408 CFG_MSP432_MB_SEC_ZONE0_PAYLOADLEN 409 CFG_MSP432_MB_SEC_ZONE1_PAYLOADADDR 410 CFG_MSP432_MB_SEC_ZONE1_PAYLOADLEN 411 CFG_MSP432_MB_SEC_ZONE2_PAYLOADADDR 412 CFG_MSP432_MB_SEC_ZONE2_PAYLOADLEN 413 CFG_MSP432_MB_SEC_ZONE3_PAYLOADADDR 414 CFG_MSP432_MB_SEC_ZONE3_PAYLOADLEN 415 CFG_MSP432_MB_FACTORY_RESET_ENABLE 416 CFG_MSP432_MB_FACTORY_RESET_PWDEN 417 CFG_MSP432_MB_FACTORY_RESET_PWD0 418 CFG_MSP432_MB_FACTORY_RESET_PWD1 419 CFG_MSP432_MB_FACTORY_RESET_PWD2 420 CFG_MSP432_MB_FACTORY_RESET_PWD3 421 CFG_MSP432_MB_FACTORY_RESET_PASSWORD0 422 CFG_MSP432_MB_FACTORY_RESET_PASSWORD1 423 CFG_MSP432_MB_FACTORY_RESET_PASSWORD2 424 CFG_MSP432_MB_FACTORY_RESET_PASSWORD3 425 // MSP432E protection configuration #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define CFG_MSP432E_FMPREADEN0_DATA CFG_MSP432E_FMPREADEN1_DATA CFG_MSP432E_FMPREADEN2_DATA CFG_MSP432E_FMPREADEN3_DATA CFG_MSP432E_FMPREADEN4_DATA CFG_MSP432E_FMPREADEN5_DATA CFG_MSP432E_FMPREADEN6_DATA CFG_MSP432E_FMPREADEN7_DATA CFG_MSP432E_FMPREADEN8_DATA CFG_MSP432E_FMPREADEN9_DATA CFG_MSP432E_FMPREADEN10_DATA CFG_MSP432E_FMPREADEN11_DATA CFG_MSP432E_FMPREADEN12_DATA CFG_MSP432E_FMPREADEN13_DATA CFG_MSP432E_FMPREADEN14_DATA SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 Dynamic Link Library for MSP-GANG Programmer Copyright © 2011–2019, Texas Instruments Incorporated 109 MSP-GANG.dll Description #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define www.ti.com CFG_MSP432E_FMPREADEN15_DATA CFG_MSP432E_FMPPRGEN0_DATA CFG_MSP432E_FMPPRGEN1_DATA CFG_MSP432E_FMPPRGEN2_DATA CFG_MSP432E_FMPPRGEN3_DATA CFG_MSP432E_FMPPRGEN4_DATA CFG_MSP432E_FMPPRGEN5_DATA CFG_MSP432E_FMPPRGEN6_DATA CFG_MSP432E_FMPPRGEN7_DATA CFG_MSP432E_FMPPRGEN8_DATA CFG_MSP432E_FMPPRGEN9_DATA CFG_MSP432E_FMPPRGEN10_DATA CFG_MSP432E_FMPPRGEN11_DATA CFG_MSP432E_FMPPRGEN12_DATA CFG_MSP432E_FMPPRGEN13_DATA CFG_MSP432E_FMPPRGEN14_DATA CFG_MSP432E_FMPPRGEN15_DATA CFG_MSP432E_USER_REG0 CFG_MSP432E_USER_REG1 CFG_MSP432E_USER_REG2 CFG_MSP432E_USER_REG3 CFG_MSP432E_USERDEBUGDATA CFG_MSP432E_FP_REG_WREN CFG_MSP432E_USER_REG_WREN CFG_MSP432E_DBG_REG_WREN CFG_MSP432E_PROTECTION_SOURCE 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 4.2.35 MSPGANG_GetNameConfig, MSPGANG_SetNameConfig Set or get file names for code file, script file, password file, or warning sounds. Syntax LPTSTR MSPGANG_GetNameConfig(LONG index) Arguments LONG index See list of indexes below Result LPTSTR File name Syntax LONG MSPGANG_SetNameConfig(LONG index, LPTSTR name) Arguments LONG index LPTSTR file_name See list of indexes below Result LONG #define #define #define #define #define 110 Error code CODEFILE_INDEX SCRIPTFILE_INDEX PASSWORDFILE_INDEX SOUNDERRFILE_INDEX SOUNDOKFILE_INDEX Dynamic Link Library for MSP-GANG Programmer 0 1 2 3 4 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated MSP-GANG.dll Description www.ti.com #define #define #define SOUNDWARNINGFILE_INDEX CODE_2_FILE_INDEX IMAGE_FILE_INDEX SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback 5 6 7 Dynamic Link Library for MSP-GANG Programmer Copyright © 2011–2019, Texas Instruments Incorporated 111 MSP-GANG.dll Description www.ti.com 4.2.36 MSPGANG_SetTmpGANG_Config See the Set temporary configuration command (Section 3.5.3.3) for details. Syntax LONG MSPGANG_SetTmpGANG_Config(LONG no, LONG data) Arguments LONG no LONG data Index list of indexes below Result LONG Error code //----- TMP_CFG_INDEX and data -------#define CFG_TMP_CLEAR 2 //data - none 112 #define CFG_TMP_TASK_MASK 4 //--- task mask bits ---- - for all tasks - set 0xFFFF #define CONNECT_TASK_BIT 0x0001 #define ERASE_TASK_BIT 0x0002 #define BLANKCHECK_TASK_BIT 0x0004 #define PROGRAM_TASK_BIT 0x0008 #define VERIFY_TASK_BIT 0x0010 #define SECURE_TASK_BIT 0x0020 #define DCO_CAL_TASK_BIT 0x0040 //spare 0x0080 to 0x4000 #define RST_AND_START_FW_BIT 0x8000 #define CFG_TMP_VCC_VALUE 6 // Vcc in mV - 1800 ...3600 #define CFG_TMP_POWER_VCC_EN // disable // enable 8 0 1 #define CFG_TMP_INTERFACE 10 // (INTERFACE_JTAG | INTERFACE_FAST) // (INTERFACE_JTAG | INTERFACE_MED) // (INTERFACE_JTAG | INTERFACE_SLOW) // (INTERFACE_SBW | INTERFACE_FAST) // (INTERFACE_SBW | INTERFACE_MED) // (INTERFACE_SBW | INTERFACE_SLOW) #define CFG_TMP_GANG_MASK 12 // Targets GANG enable mask - 0x00 ...0xFF. Enable all targets -> 0xFF // TARGET_1_MASK 0x01 // TARGET_2_MASK 0x02 // TARGET_3_MASK 0x04 // TARGET_4_MASK 0x08 // TARGET_5_MASK 0x10 // TARGET_6_MASK 0x20 // TARGET_7_MASK 0x40 // TARGET_8_MASK 0x80 #define CFG_TMP_VCC_ONOFF // disable 14 0 Dynamic Link Library for MSP-GANG Programmer SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated MSP-GANG.dll Description www.ti.com // enable 1 #define CFG_LCD_CONTRAST // 0x00 --0x3F 16 #define CFG_TMP_ICC_HI_EN // disable // enable 18 0 1 #define CFG_TMP_IO_INTERFACE 20 // 0 - SBW_VIA_TDOI // 1 - SBW_VIA_RST #define (pin 1) and TCK/TEST (pin-7/8) (pin 11) and TCK/TEST (pin-7/8) CFG_TMP_RESET // disable // enable 1 #define CFG_TMP_KEYBOARD_EN // disable // enable 24 0 1 #define CFG_TMP_VCC_SETTLE_TIME 26 // 0...200 Vcc settle time in 20 ms increment (t = 0...4000 ms) #define CFG_TMP_CUMULATIVE_ST_EN 28 // 0 - disable // 1 - enable ( default ) CFG_WRAPPER_MASK 30 // used in the DLL wrapper of the MSP-GANG430 only. Do not use it. CFG_WRAPPER_EN_KEY 32 // used in the DLL wrapper of the MSP-GANG430 only. Do not use it. CFG_WRAPPER_GANG_MASK 34 // used in the DLL wrapper of the MSP-GANG430 only. Do not use it. CFG_TMP_BSL_1ST_PASSW 36 // #define BSL_ANY_PASSW 0 // #define BSL_PASSW_FROM_CODE_FILE 1 // #define BSL_PASSW_FROM_PASSWORD_FILE 2 // #define BSL_EMPTY_PASSW 3 #define #define #define #define #define 22 0 CFG_DISABLE_TASK_MASK 38 4.2.37 MSPGANG_GetLabel See the Get Label command (Section 3.5.2.9) for detailed LABEL information. Syntax LONG MSPGANG_GetLabel(BYTE *Data) Arguments BYTE *Data Pointer to data buffer where the label is saved Result LONG Error code SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Dynamic Link Library for MSP-GANG Programmer Copyright © 2011–2019, Texas Instruments Incorporated 113 MSP-GANG.dll Description www.ti.com 4.2.38 MSPGANG_GetInfoMemory, MSPGANG_SetInfoMemory Reads or writes 128 bytes to the internal Information memory. Information memory contains configuration data such as LCD contrast and USB port configuration, and it is not intended to be modified by the user. Use the GUI software to set the Information memory. Syntax LONG MSPGANG_GetInfoMemory(BYTE page, BYTE *data) LONG MSPGANG_SetInfoMemory(BYTE page, BYTE *data) Arguments BYTE page BYTE *data Page info 0 or 1 Pointer to or from data buffer Result LONG Error code 4.2.39 MSPGANG_Get_qty_MCU_Type, MSPGANG_Set_MCU_Type, MSPGANG_Get_MCU_TypeName, MSPGANG_Get_qty_MCU_Family, MSPGANG_Get_MCU_FamilyName, MSPGANG_Get_MCU_Name Set of functions that return the names of all supported MCUs, including the family, group, and MCU name. Syntax LONG LONG LONG LONG LONG LONG WINAPI WINAPI WINAPI WINAPI WINAPI WINAPI MSPGANG_Get_qty_MCU_Type( void ); MSPGANG_Set_MCU_Type( int type ); MSPGANG_Get_MCU_TypeName( LONG index, LPTSTR name ); MSPGANG_Get_qty_MCU_Family( void ); MSPGANG_Get_MCU_FamilyName( LONG index, LPTSTR name ); MSPGANG_Get_MCU_Name( LONG group_index, LONG index, LPTSTR name ); Use these functions in the following order: typedef struct { int no; char name[24]; } MCU_FAMILY; MCU_FAMILY MCU_family_list[30]; typedef struct { int index; char name[24]; } MCU_NAME; MCU_NAME MCU_name_list[100]; n = MSPGANG_Get_qty_MCU_Family(); //get no of MCU groups for(k=0; k // "Flash - Sectors 8 - 15 (0x08000 to 0x0FFFF)" 4.2.47 MSPGANG_Interactive_ClrLockedDevice Unlocks the MSP432 MCU, if it is locked. The whole main memory flash is erased. The information memory or BSL sectors can be erased if selected in configuration. Syntax LONG WINAPI MSPGANG_Interactive_ClrLockedDevice( void ); 122 Dynamic Link Library for MSP-GANG Programmer SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated MSP-GANG.dll Description www.ti.com 4.2.48 MSPGANG_Get_Code_Info Gets the checksum or code size of the selected code. Syntax LONG WINAPI MSPGANG_Get_Code_Info( LONG type ); Arguments LONG type CODE_SIZE_INFO 1 CODE_CHECK_SUM 2 CODE2_SIZE_INFO 3 CODE2_CHECK_SUM 4 APPEND_CODE_SIZE_INFO 5 APPEND_CODE_CHECK_SUM 6 WHOLE_CODE_SIZE_INFO 7 WHOLE_CODE_CHECK_SUM 8 CS_PER_GANG430STD 9 Result LONG Checksum or code size of the selected code. 4.2.49 MSPGANG_MakeSound The MSPGANG_MakeSound make beep or sounds. Syntax void WINAPI MSPGANG_MakeSound( LONG type ); Arguments LONG type BEEP_OK 1 BEEP_ERR 2 BEEP_PRG_ERR 3 BEEP_WARNING 4 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Dynamic Link Library for MSP-GANG Programmer Copyright © 2011–2019, Texas Instruments Incorporated 123 MSP-GANG.dll Description www.ti.com 4.2.50 MSPGANG_CallBack_ProgressBar The MSPGANG_CallBack_ProgressBar function returns the current status during process execution. The function should be called from an interrupt or separate thread if the main function is executed. Syntax LONG WINAPI MSPGANG_CallBack_ProgressBar( void ** text, void ** history, BYTE *G_status, BYTE *DLL_status ); Result LONG If the result is negative, then the contents of the MSPGANG_CallBack_ProgressBar have not been updated. If the result is positive, then data has been updated. Example #define SCRIPT_TEXT_SIZE 16 union GANG_PROGRESS_STATUS { BYTE bytes[PROGRESS_STATUS_SIZE+4]; struct { BYTE header; BYTE ctr; WORD task_ctr; //byte offset - 0 WORD chunk_ctr; //byte offset - 2 BYTE run; //byte offset - 4 BYTE ack; //byte offset - 5 WORD Finished_tasks_mask; //byte offset - 6,7 //--- 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 BYTE cumulative; //byte offset - 8 //target masks // TARGET_1_MASK 0x01 // TARGET_2_MASK 0x02 // TARGET_3_MASK 0x04 // TARGET_4_MASK 0x08 // TARGET_5_MASK 0x10 // TARGET_6_MASK 0x20 // TARGET_7_MASK 0x40 // TARGET_8_MASK 0x80 BYTE Rq_gang_mask; //byte offset - 9 BYTE Connected_gang_mask; //byte offset - 10 BYTE Erased_gang_mask; //byte offset - 11 BYTE BlankCheck_gang_mask; //byte offset - 12 BYTE Programmed_gang_mask; //byte offset - 13 BYTE Verified_gang_mask; //byte offset - 14 BYTE Secured_gang_mask; //byte offset - 15 BYTE spare[6]; //byte offset BYTE error_no; //byte offset BYTE VTIO_32mV; //byte offset BYTE VccSt_LOW; //byte offset BYTE VccSt_HI; //byte offset // VccSt_LOW, VccSt_HI provide 2 bits to each target. // Bit A for each target and bit B for each target. // Bits B A 124 Dynamic Link Library for MSP-GANG Programmer 16..21 22 23 24 25 SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated MSP-GANG.dll Description www.ti.com // 0 0 Vcc below 0.7V // 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.8V BYTE VccErr; //byte offset - 26 //current Vcc below min BYTE VccErr_Cumulative; //byte offset - 27 //Cumulative (during programminf) Vcc below min BYTE JTAG_init_err_mask; //byte offset - 28 BYTE JTAG_Fuse_already_blown_mask; //byte offset - 29 BYTE Wrong_MCU_ID_mask; //byte offset - 30 BYTE Progress_bar; //byte offset - 31 // 0...100% char comment[SCRIPT_TEXT_SIZE]; //byte offset - 32..47 }st; }; union DLL_STATUS { BYTE bytes[DLL_STATUS_SIZE+4]; struct { BYTE new_data; BYTE COM_status; //reserved for future }st; }; void *text, *history; GANG_PROGRESS_STATUS Gang_Status; DLL_STATUS DLL_Status; int pos; pos = MSPGANG_CallBack_ProgressBar( &text, &history, Gang_Status.bytes+2, DLL_Status.bytes ); if( pos >= 0 ) { ProgressBar->SetPos( pos ); ... } SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Dynamic Link Library for MSP-GANG Programmer Copyright © 2011–2019, Texas Instruments Incorporated 125 MSP-GANG.dll Description www.ti.com 4.2.51 MSPGANG_GetPCHardwareFingerprint Reads the hardware fingerprint from the current PC. The function is used for projects that are protected with a password or a hardware fingerprint number. Syntax DWORD WINAPI MSPGANG_GetPCHardwareFingerprint( void ); Result DWORD Eight digit hardware fingerprint number taken from current PC 4.2.52 MSPGANG_Flash_valid_addr Determines if the selected address space can be used for flash, FRAM, or OTP programming. Syntax LONG WINAPI MSPGANG_Flash_valid_addr(LONG dest, LONG start_addr, LONG size ); Arguments LONG dest LONG start_addr LONG size Spare – not used Memory region start address Number of bytes of memory region to be validated Result LONG 126 ERR_NONE (0) if address is programmable Error code otherwise Dynamic Link Library for MSP-GANG Programmer SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Chapter 5 SLAU358Q – September 2011 – Revised October 2019 Schematics 5.1 Schematics MSP-GANG-simlified.sch-1 - Sun Jan 15 14:25:06 2012 Figure 5-1. MSP-GANG Simplified Schematic (1 of 4) SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Schematics 127 Schematics www.ti.com MSP-GANG-simlified.sch-2 - Sun Jan 15 14:25:06 2012 Figure 5-2. MSP-GANG Simplified Schematic (2 of 4) 128 Schematics SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Schematics www.ti.com MSP-GANG-simlified.sch-3 - Sun Jan 15 14:25:06 2012 Figure 5-3. MSP-GANG Simplified Schematic (3 of 4) SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Schematics 129 Schematics www.ti.com MSP-GANG-simlified.sch-4 - Sun Jan 15 14:25:07 2012 Figure 5-4. MSP-GANG Simplified Schematic (4 of 4) 130 Schematics SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Schematics www.ti.com Figure 5-5. Gang Splitter Schematic SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Schematics 131 Schematics www.ti.com Table 5-1. Gang Splitter Bill of Materials (BOM) Item Name Drawing and Part Number Quantity Description 1 BLANK PC BOARD MSP-GANG-SP rev-2 1 Blank PC Board THROUGH HOLE COMPONENTS 1 Connector SBH11-PBPC-D07-ST-BK 1 14-pins Header Connector (Sullins) 2 Connector SBH11-PBPC-D07-ST-BK 1 14-pins Header Connector (Sullins) 3 Connector SBH11-PBPC-D07-ST-BK 1 14-pins Header Connector (Sullins) 4 Connector SBH11-PBPC-D07-ST-BK 1 14-pins Header Connector (Sullins) 5 Connector SBH11-PBPC-D07-ST-BK 1 14-pins Header Connector (Sullins) 6 Connector SBH11-PBPC-D07-ST-BK 1 14-pins Header Connector (Sullins) 7 Connector SBH11-PBPC-D07-ST-BK 1 14-pins Header Connector (Sullins) 8 Connector SBH11-PBPC-D07-ST-BK 1 14-pins Header Connector (Sullins) 1 100p-Receptacle Right Angle Connector (JAE Electronics) 3 Bumpon, cylindrical 0.312 x 0.215, black J9 Connector TX24-100R-LT-H1E J10 Connector do not populate Bumpers SJ61A6 2-pins terminal block Figure 5-6. BSL Connection Schematic Detailed description of the BSL connection can be found in MSP430 Programming With the Bootloader (BSL) (SLAU319). It is important to note that the MSP-GANG Programmer's Fast-BSL has much higher communication speed than standard BSL, 200 kbps compared to 9.6 kbps. Consequently, ensure that the hardware does not have additional delay on the BSL RX and TX lines beyond 0.5 µs (a clock pulse duration of 2 µs must be transmitted by the BSL RX and TX lines without degradation). Any additional filters or suppressors on the BSL RX and TX lines can degrade communication. 132 Schematics SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Schematics www.ti.com Figure 5-7. Schematic of MSP-GANG 14-20 Adapter NOTE: Adapter should be plugged in on the 14-pin JTAG cable. The 20-pin end is connected to the MSP432 JTAG connector on the target board. Figure 5-8. Top View of MSP-GANG 14-20 Adapter (Order Separately From TI) SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Schematics 133 Chapter 6 SLAU358Q – September 2011 – Revised October 2019 Frequently Asked Questions 6.1 Question: Why does device init, connect, or programming fail? Answer: Frequently the cause is a bad connection between the MSP-GANG Programmer and the target device. A 14-wire ribbon cable is provided for JTAG/SBW or BSL connection between MSP-GANG and target device. The ribbon cable has an impedance of approximately 100 Ω and has DC lines in the ribbon cable to provide good isolation between signal wires (TDI, TCK, TMS, TDO). Each signal wire is separated by a DC wire to minimize crosstalk between the signal wires. The following pinout used in the MSP-GANG on each JTAG connector: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 - TDO (Signal wire) Vcc / Vcc sense (DC wire) TDI (Signal wire) Vcc sense (DC wire) TMS (Signal wire) n/c (DC wire) TCK (Signal wire) TEST (DC wire in JTAG) GND (DC wire) n/c (DC wire) RESET (DC wire in JTAG) BSL-Tx (Signal wire) n/c (DC wire) BSL-Rx (Signal wire) The provided 14-pin connector might not be ideal for some customers who want to minimize the number of wires and pinout order. When using a custom cable, make sure to address the issue of crosstalk between signal cables. Unfortunately, in many cases the custom cable does not provide good isolation between signal wires. As an example of a bad connection, the following uses an 8-wire ribbon cable for JTAG communication: 1 2 3 4 5 6 7 8 - Vcc / Vcc sense (DC wire) TDO (Signal wire) TDI (Signal wire) TMS (Signal wire) TCK (Signal wire) TEST (DC wire in JTAG) GND (DC wire) RESET (DC wire in JTAG) On this connection, the TMS signal is coupled with the TCK and TDI lines and can generate additional TCK pulses on the TCK wire (rise time on TMS line can be seen on the TCK line also and can be detected by the MSP MCU as an additional unexpected TCK pulse). 134 Frequently Asked Questions SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated www.ti.com 6.2 Question: Can I use single wires for connection between MSP-GANG and target device? Question: Can I use single wires for connection between MSP-GANG and target device? Answer: Single wires are a poor type of connection and provide very bad quality. Single wires work like inductors connected between the MSP-GANG and target device, generating ripples on the target device side. If a ribbon cable cannot be used, then a twisted-pairs connection should be used instead. One wire on each twisted pair should be connected to a signal connection (for example, TDI or TCK), and the second wire connected to DC (GND or VCC) from both sides of the connection (one on the MSP-GANG side and the other on the target device side). For example, the following arrangement is acceptable: 1 1 2 2 3 3 4 4 - TDO (Signal wire) - first twisted pair Vcc / Vcc sense (DC wire) TDI (Signal wire) - second twisted pair Vcc sense (DC wire) TMS (Signal wire) - third twisted pair RESET (DC wire) TCK (Signal wire) - fourth twisted pair GND (DC wire) If additional protecting components (such as a capacitor or suppressors) are used on the target device PCB, check the JTAG signal shape on the MSP MCU. The JTAG communication speed should be decreased (set to medium or slow) if required. Make sure that any ripple on the JTAG lines is smaller than 20% of the peak-to-peak signal level. If connection cables are longer than 40 cm, then the ripple can be reduced by inserting 33-Ω resistors in series with TCK, TMS, and TDO in the middle of the connection wires. Do not provide series resistors in TEST and TDI lines if the device will be secured (blown the security fuse) for MSP families 1xx, 2xx, and 4xx. For blowing the security fuse in these devices, the programmer provides Vpp 6.5 V at 100 mA on the TEST or TDI lines to MSP MCU. An additional resistor inserted in these lines can reduce the maximum current provided to the MCU and the security fuse will not be blown. 6.3 Question: How to serialize parts? Answer: The MSP-GANG GUI does not provide serialization; however, the provided MSP-GANG.dll allows to program unique data (for example, calibration or serialization) to each target device. An example to implement serialization using MSP-GANG.dll is available in this directory: C:\Program Files (x86)\Texas Instruments\MSP-GANG\Examples\CPP_Applications_MSP_DLL 6.4 Question: How to have parts run after programming? Answer: By default in the MSP-GANG Programmer, the RESET line is forced to low level, which prevents the target device running after being programmed. But that option can be modified using the pulldown menu: • Setup > Finish Action and selecting one of the options: • Hardware reset (RST line) and start the application program • OFF/ON the VCC and start the application program Application Program Run time is programmable from 1 to 120 seconds or infinite time. 6.5 Question: What are possible reasons for the part to fail Verify step? Answer: If the part was programmed and verified in the GO step, and after the second time the Verify step failed, then in most cases the firmware is modifying flash contents when running for the first time. Usually the Info memory is modified in that case. Ask your software team if the firmware downloaded to the MCU is modifying the flash after the first run. If that is the case, then the firmware should be modified to contain only unmodified contents in the code file. To compare the code file contents and flash data (if modified), use this option from the pulldown menu: • View > Compare Code File and Flash Data SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Frequently Asked Questions 135 Revision History www.ti.com Revision History NOTE: Page numbers for previous revisions may differ from page numbers in the current version. Changes from February 23, 2019 to October 8, 2019 ..................................................................................................... Page • • • 136 Removed CISPR 24: 2010 / EN 55024:2010 and added CISPR 32:2012 / EN55032:2012/AC:2013 and related warning in the CE section of FCC and CE Compliance ........................................................................................... 8 Rev M - section 3.2.1 changed RSS-210 or RSS-247 ............................................................................ 137 Rev O - Added WARNING in section 2.3 ........................................................................................... 137 Revision History SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated STANDARD TERMS FOR EVALUATION MODULES 1. Delivery: TI delivers TI evaluation boards, kits, or modules, including any accompanying demonstration software, components, and/or documentation which may be provided together or separately (collectively, an “EVM” or “EVMs”) to the User (“User”) in accordance with the terms set forth herein. User's acceptance of the EVM is expressly subject to the following terms. 1.1 EVMs are intended solely for product or software developers for use in a research and development setting to facilitate feasibility evaluation, experimentation, or scientific analysis of TI semiconductors products. EVMs have no direct function and are not finished products. EVMs shall not be directly or indirectly assembled as a part or subassembly in any finished product. For clarification, any software or software tools provided with the EVM (“Software”) shall not be subject to the terms and conditions set forth herein but rather shall be subject to the applicable terms that accompany such Software 1.2 EVMs are not intended for consumer or household use. EVMs may not be sold, sublicensed, leased, rented, loaned, assigned, or otherwise distributed for commercial purposes by Users, in whole or in part, or used in any finished product or production system. 2 Limited Warranty and Related Remedies/Disclaimers: 2.1 These terms do not apply to Software. The warranty, if any, for Software is covered in the applicable Software License Agreement. 2.2 TI warrants that the TI EVM will conform to TI's published specifications for ninety (90) days after the date TI delivers such EVM to User. Notwithstanding the foregoing, TI shall not be liable for a nonconforming EVM if (a) the nonconformity was caused by neglect, misuse or mistreatment by an entity other than TI, including improper installation or testing, or for any EVMs that have been altered or modified in any way by an entity other than TI, (b) the nonconformity resulted from User's design, specifications or instructions for such EVMs or improper system design, or (c) User has not paid on time. Testing and other quality control techniques are used to the extent TI deems necessary. TI does not test all parameters of each EVM. User's claims against TI under this Section 2 are void if User fails to notify TI of any apparent defects in the EVMs within ten (10) business days after delivery, or of any hidden defects with ten (10) business days after the defect has been detected. 2.3 TI's sole liability shall be at its option to repair or replace EVMs that fail to conform to the warranty set forth above, or credit User's account for such EVM. TI's liability under this warranty shall be limited to EVMs that are returned during the warranty period to the address designated by TI and that are determined by TI not to conform to such warranty. If TI elects to repair or replace such EVM, TI shall have a reasonable time to repair such EVM or provide replacements. Repaired EVMs shall be warranted for the remainder of the original warranty period. Replaced EVMs shall be warranted for a new full ninety (90) day warranty period. WARNING Evaluation Kits are intended solely for use by technically qualified, professional electronics experts who are familiar with the dangers and application risks associated with handling electrical mechanical components, systems, and subsystems. User shall operate the Evaluation Kit within TI’s recommended guidelines and any applicable legal or environmental requirements as well as reasonable and customary safeguards. Failure to set up and/or operate the Evaluation Kit within TI’s recommended guidelines may result in personal injury or death or property damage. Proper set up entails following TI’s instructions for electrical ratings of interface circuits such as input, output and electrical loads. NOTE: EXPOSURE TO ELECTROSTATIC DISCHARGE (ESD) MAY CAUSE DEGREDATION OR FAILURE OF THE EVALUATION KIT; TI RECOMMENDS STORAGE OF THE EVALUATION KIT IN A PROTECTIVE ESD BAG. Revision History 3 www.ti.com Regulatory Notices: 3.1 United States 3.1.1 Notice applicable to EVMs not FCC-Approved: FCC NOTICE: This kit is designed to allow product developers to evaluate electronic components, circuitry, or software associated with the kit to determine whether to incorporate such items in a finished product and software developers to write software applications for use with the end product. This kit is not a finished product and when assembled may not be resold or otherwise marketed unless all required FCC equipment authorizations are first obtained. Operation is subject to the condition that this product not cause harmful interference to licensed radio stations and that this product accept harmful interference. Unless the assembled kit is designed to operate under part 15, part 18 or part 95 of this chapter, the operator of the kit must operate under the authority of an FCC license holder or must secure an experimental authorization under part 5 of this chapter. 3.1.2 For EVMs annotated as FCC – FEDERAL COMMUNICATIONS COMMISSION Part 15 Compliant: CAUTION This device complies with part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) This device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation. Changes or modifications not expressly approved by the party responsible for compliance could void the user's authority to operate the equipment. FCC Interference Statement for Class A EVM devices NOTE: This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference when the equipment is operated in a commercial environment. This equipment generates, uses, and can radiate radio frequency energy and, if not installed and used in accordance with the instruction manual, may cause harmful interference to radio communications. Operation of this equipment in a residential area is likely to cause harmful interference in which case the user will be required to correct the interference at his own expense. FCC Interference Statement for Class B EVM devices NOTE: This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures: • • • • Reorient or relocate the receiving antenna. Increase the separation between the equipment and receiver. Connect the equipment into an outlet on a circuit different from that to which the receiver is connected. Consult the dealer or an experienced radio/TV technician for help. 3.2 Canada 3.2.1 For EVMs issued with an Industry Canada Certificate of Conformance to RSS-210 or RSS-247 Concerning EVMs Including Radio Transmitters: This device complies with Industry Canada license-exempt RSSs. Operation is subject to the following two conditions: (1) this device may not cause interference, and (2) this device must accept any interference, including interference that may cause undesired operation of the device. Concernant les EVMs avec appareils radio: Le présent appareil est conforme aux CNR d'Industrie Canada applicables aux appareils radio exempts de licence. L'exploitation est autorisée aux deux conditions suivantes: (1) l'appareil ne doit pas produire de brouillage, et (2) l'utilisateur de l'appareil doit accepter tout brouillage radioélectrique subi, même si le brouillage est susceptible d'en compromettre le fonctionnement. Concerning EVMs Including Detachable Antennas: Under Industry Canada regulations, this radio transmitter may only operate using an antenna of a type and maximum (or lesser) gain approved for the transmitter by Industry Canada. To reduce potential radio interference to other users, the antenna type and its gain should be so chosen that the equivalent isotropically radiated power (e.i.r.p.) is not more than that necessary for successful communication. This radio transmitter has been approved by Industry Canada to operate with the antenna types listed in the user guide with the maximum permissible gain and required antenna impedance for each antenna type indicated. Antenna types not included in this list, having a gain greater than the maximum gain indicated for that type, are strictly prohibited for use with this device. 138 Revision History SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Revision History www.ti.com Concernant les EVMs avec antennes détachables Conformément à la réglementation d'Industrie Canada, le présent émetteur radio peut fonctionner avec une antenne d'un type et d'un gain maximal (ou inférieur) approuvé pour l'émetteur par Industrie Canada. Dans le but de réduire les risques de brouillage radioélectrique à l'intention des autres utilisateurs, il faut choisir le type d'antenne et son gain de sorte que la puissance isotrope rayonnée équivalente (p.i.r.e.) ne dépasse pas l'intensité nécessaire à l'établissement d'une communication satisfaisante. Le présent émetteur radio a été approuvé par Industrie Canada pour fonctionner avec les types d'antenne énumérés dans le manuel d’usage et ayant un gain admissible maximal et l'impédance requise pour chaque type d'antenne. Les types d'antenne non inclus dans cette liste, ou dont le gain est supérieur au gain maximal indiqué, sont strictement interdits pour l'exploitation de l'émetteur 3.3 Japan 3.3.1 Notice for EVMs delivered in Japan: Please see http://www.tij.co.jp/lsds/ti_ja/general/eStore/notice_01.page 日本国内に 輸入される評価用キット、ボードについては、次のところをご覧ください。 http://www.tij.co.jp/lsds/ti_ja/general/eStore/notice_01.page 3.3.2 Notice for Users of EVMs Considered “Radio Frequency Products” in Japan: EVMs entering Japan may not be certified by TI as conforming to Technical Regulations of Radio Law of Japan. If User uses EVMs in Japan, not certified to Technical Regulations of Radio Law of Japan, User is required to follow the instructions set forth by Radio Law of Japan, which includes, but is not limited to, the instructions below with respect to EVMs (which for the avoidance of doubt are stated strictly for convenience and should be verified by User): 1. 2. 3. Use EVMs in a shielded room or any other test facility as defined in the notification #173 issued by Ministry of Internal Affairs and Communications on March 28, 2006, based on Sub-section 1.1 of Article 6 of the Ministry’s Rule for Enforcement of Radio Law of Japan, Use EVMs only after User obtains the license of Test Radio Station as provided in Radio Law of Japan with respect to EVMs, or Use of EVMs only after User obtains the Technical Regulations Conformity Certification as provided in Radio Law of Japan with respect to EVMs. Also, do not transfer EVMs, unless User gives the same notice above to the transferee. Please note that if User does not follow the instructions above, User will be subject to penalties of Radio Law of Japan. 【無線電波を送信する製品の開発キットをお使いになる際の注意事項】 開発キットの中には技術基準適合証明を受けて いないものがあります。 技術適合証明を受けていないもののご使用に際しては、電波法遵守のため、以下のいずれかの 措置を取っていただく必要がありますのでご注意ください。 1. 2. 3. 電波法施行規則第6条第1項第1号に基づく平成18年3月28日総務省告示第173号で定められた電波暗室等の試験設備でご使用 いただく。 実験局の免許を取得後ご使用いただく。 技術基準適合証明を取得後ご使用いただく。 なお、本製品は、上記の「ご使用にあたっての注意」を譲渡先、移転先に通知しない限り、譲渡、移転できないものとします。 上記を遵守頂けない場合は、電波法の罰則が適用される可能性があることをご留意ください。 日本テキサス・イ ンスツルメンツ株式会社 東京都新宿区西新宿6丁目24番1号 西新宿三井ビル 3.3.3 Notice for EVMs for Power Line Communication: Please see http://www.tij.co.jp/lsds/ti_ja/general/eStore/notice_02.page 電力線搬送波通信についての開発キットをお使いになる際の注意事項については、次のところをご覧ください。http:/ /www.tij.co.jp/lsds/ti_ja/general/eStore/notice_02.page 3.4 European Union 3.4.1 For EVMs subject to EU Directive 2014/30/EU (Electromagnetic Compatibility Directive): This is a class A product intended for use in environments other than domestic environments that are connected to a low-voltage power-supply network that supplies buildings used for domestic purposes. In a domestic environment this product may cause radio interference in which case the user may be required to take adequate measures. SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Revision History 139 Revision History 4 www.ti.com EVM Use Restrictions and Warnings: 4.1 EVMS ARE NOT FOR USE IN FUNCTIONAL SAFETY AND/OR SAFETY CRITICAL EVALUATIONS, INCLUDING BUT NOT LIMITED TO EVALUATIONS OF LIFE SUPPORT APPLICATIONS. 4.2 User must read and apply the user guide and other available documentation provided by TI regarding the EVM prior to handling or using the EVM, including without limitation any warning or restriction notices. The notices contain important safety information related to, for example, temperatures and voltages. 4.3 Safety-Related Warnings and Restrictions: 4.3.1 User shall operate the EVM within TI’s recommended specifications and environmental considerations stated in the user guide, other available documentation provided by TI, and any other applicable requirements and employ reasonable and customary safeguards. Exceeding the specified performance ratings and specifications (including but not limited to input and output voltage, current, power, and environmental ranges) for the EVM may cause personal injury or death, or property damage. If there are questions concerning performance ratings and specifications, User should contact a TI field representative prior to connecting interface electronics including input power and intended loads. Any loads applied outside of the specified output range may also result in unintended and/or inaccurate operation and/or possible permanent damage to the EVM and/or interface electronics. Please consult the EVM user guide prior to connecting any load to the EVM output. If there is uncertainty as to the load specification, please contact a TI field representative. During normal operation, even with the inputs and outputs kept within the specified allowable ranges, some circuit components may have elevated case temperatures. These components include but are not limited to linear regulators, switching transistors, pass transistors, current sense resistors, and heat sinks, which can be identified using the information in the associated documentation. When working with the EVM, please be aware that the EVM may become very warm. 4.3.2 EVMs are intended solely for use by technically qualified, professional electronics experts who are familiar with the dangers and application risks associated with handling electrical mechanical components, systems, and subsystems. User assumes all responsibility and liability for proper and safe handling and use of the EVM by User or its employees, affiliates, contractors or designees. User assumes all responsibility and liability to ensure that any interfaces (electronic and/or mechanical) between the EVM and any human body are designed with suitable isolation and means to safely limit accessible leakage currents to minimize the risk of electrical shock hazard. User assumes all responsibility and liability for any improper or unsafe handling or use of the EVM by User or its employees, affiliates, contractors or designees. 4.4 User assumes all responsibility and liability to determine whether the EVM is subject to any applicable international, federal, state, or local laws and regulations related to User’s handling and use of the EVM and, if applicable, User assumes all responsibility and liability for compliance in all respects with such laws and regulations. User assumes all responsibility and liability for proper disposal and recycling of the EVM consistent with all applicable international, federal, state, and local requirements. 5. Accuracy of Information: To the extent TI provides information on the availability and function of EVMs, TI attempts to be as accurate as possible. However, TI does not warrant the accuracy of EVM descriptions, EVM availability or other information on its websites as accurate, complete, reliable, current, or error-free. 6. Disclaimers: 6.1 EXCEPT AS SET FORTH ABOVE, EVMS AND ANY MATERIALS PROVIDED WITH THE EVM (INCLUDING, BUT NOT LIMITED TO, REFERENCE DESIGNS AND THE DESIGN OF THE EVM ITSELF) ARE PROVIDED "AS IS" AND "WITH ALL FAULTS." TI DISCLAIMS ALL OTHER WARRANTIES, EXPRESS OR IMPLIED, REGARDING SUCH ITEMS, INCLUDING BUT NOT LIMITED TO ANY EPIDEMIC FAILURE WARRANTY OR IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT OF ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADE SECRETS OR OTHER INTELLECTUAL PROPERTY RIGHTS. 6.2 EXCEPT FOR THE LIMITED RIGHT TO USE THE EVM SET FORTH HEREIN, NOTHING IN THESE TERMS SHALL BE CONSTRUED AS GRANTING OR CONFERRING ANY RIGHTS BY LICENSE, PATENT, OR ANY OTHER INDUSTRIAL OR INTELLECTUAL PROPERTY RIGHT OF TI, ITS SUPPLIERS/LICENSORS OR ANY OTHER THIRD PARTY, TO USE THE EVM IN ANY FINISHED END-USER OR READY-TO-USE FINAL PRODUCT, OR FOR ANY INVENTION, DISCOVERY OR IMPROVEMENT, REGARDLESS OF WHEN MADE, CONCEIVED OR ACQUIRED. 7. 140 USER'S INDEMNITY OBLIGATIONS AND REPRESENTATIONS. USER WILL DEFEND, INDEMNIFY AND HOLD TI, ITS LICENSORS AND THEIR REPRESENTATIVES HARMLESS FROM AND AGAINST ANY AND ALL CLAIMS, DAMAGES, LOSSES, EXPENSES, COSTS AND LIABILITIES (COLLECTIVELY, "CLAIMS") ARISING OUT OF OR IN CONNECTION WITH ANY HANDLING OR USE OF THE EVM THAT IS NOT IN ACCORDANCE WITH THESE TERMS. THIS OBLIGATION SHALL APPLY WHETHER CLAIMS ARISE UNDER STATUTE, REGULATION, OR THE LAW OF TORT, CONTRACT OR ANY OTHER LEGAL THEORY, AND EVEN IF THE EVM FAILS TO PERFORM AS DESCRIBED OR EXPECTED. Revision History SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Revision History www.ti.com 8. Limitations on Damages and Liability: 8.1 General Limitations. IN NO EVENT SHALL TI BE LIABLE FOR ANY SPECIAL, COLLATERAL, INDIRECT, PUNITIVE, INCIDENTAL, CONSEQUENTIAL, OR EXEMPLARY DAMAGES IN CONNECTION WITH OR ARISING OUT OF THESE TERMS OR THE USE OF THE EVMS , REGARDLESS OF WHETHER TI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. EXCLUDED DAMAGES INCLUDE, BUT ARE NOT LIMITED TO, COST OF REMOVAL OR REINSTALLATION, ANCILLARY COSTS TO THE PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, RETESTING, OUTSIDE COMPUTER TIME, LABOR COSTS, LOSS OF GOODWILL, LOSS OF PROFITS, LOSS OF SAVINGS, LOSS OF USE, LOSS OF DATA, OR BUSINESS INTERRUPTION. NO CLAIM, SUIT OR ACTION SHALL BE BROUGHT AGAINST TI MORE THAN TWELVE (12) MONTHS AFTER THE EVENT THAT GAVE RISE TO THE CAUSE OF ACTION HAS OCCURRED. 8.2 Specific Limitations. IN NO EVENT SHALL TI'S AGGREGATE LIABILITY FROM ANY USE OF AN EVM PROVIDED HEREUNDER, INCLUDING FROM ANY WARRANTY, INDEMITY OR OTHER OBLIGATION ARISING OUT OF OR IN CONNECTION WITH THESE TERMS, , EXCEED THE TOTAL AMOUNT PAID TO TI BY USER FOR THE PARTICULAR EVM(S) AT ISSUE DURING THE PRIOR TWELVE (12) MONTHS WITH RESPECT TO WHICH LOSSES OR DAMAGES ARE CLAIMED. THE EXISTENCE OF MORE THAN ONE CLAIM SHALL NOT ENLARGE OR EXTEND THIS LIMIT. 9. Return Policy. Except as otherwise provided, TI does not offer any refunds, returns, or exchanges. Furthermore, no return of EVM(s) will be accepted if the package has been opened and no return of the EVM(s) will be accepted if they are damaged or otherwise not in a resalable condition. If User feels it has been incorrectly charged for the EVM(s) it ordered or that delivery violates the applicable order, User should contact TI. All refunds will be made in full within thirty (30) working days from the return of the components(s), excluding any postage or packaging costs. 10. Governing Law: These terms and conditions shall be governed by and interpreted in accordance with the laws of the State of Texas, without reference to conflict-of-laws principles. User agrees that non-exclusive jurisdiction for any dispute arising out of or relating to these terms and conditions lies within courts located in the State of Texas and consents to venue in Dallas County, Texas. Notwithstanding the foregoing, any judgment may be enforced in any United States or foreign court, and TI may seek injunctive relief in any United States or foreign court. SLAU358Q – September 2011 – Revised October 2019 Submit Documentation Feedback Copyright © 2011–2019, Texas Instruments Incorporated Revision History 141 IMPORTANT NOTICE AND DISCLAIMER TI PROVIDES TECHNICAL AND RELIABILITY DATA (INCLUDING DATA SHEETS), DESIGN RESOURCES (INCLUDING REFERENCE DESIGNS), APPLICATION OR OTHER DESIGN ADVICE, WEB TOOLS, SAFETY INFORMATION, AND OTHER RESOURCES “AS IS” AND WITH ALL FAULTS, AND DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS. These resources are intended for skilled developers designing with TI products. You are solely responsible for (1) selecting the appropriate TI products for your application, (2) designing, validating and testing your application, and (3) ensuring your application meets applicable standards, and any other safety, security, regulatory or other requirements. These resources are subject to change without notice. TI grants you permission to use these resources only for development of an application that uses the TI products described in the resource. Other reproduction and display of these resources is prohibited. No license is granted to any other TI intellectual property right or to any third party intellectual property right. TI disclaims responsibility for, and you will fully indemnify TI and its representatives against, any claims, damages, costs, losses, and liabilities arising out of your use of these resources. TI’s products are provided subject to TI’s Terms of Sale or other applicable terms available either on ti.com or provided in conjunction with such TI products. TI’s provision of these resources does not expand or otherwise alter TI’s applicable warranties or warranty disclaimers for TI products. TI objects to and rejects any additional or different terms you may have proposed. IMPORTANT NOTICE Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265 Copyright © 2022, Texas Instruments Incorporated
MSP-GANG 价格&库存

很抱歉,暂时无法提供与“MSP-GANG”相匹配的价格&库存,您可以联系我们找货

免费人工找货