2038 views|0 replies

6555

Posts

0

Resources
The OP
 

Introduction to MSP430 development tools (JTAG SBW BS) [Copy link]

In the process of MCU project development, there are always two devices closely linked together, one is the emulator and the other is the programmer. The emulator, as the name implies, imitates the functions of the microcontroller; the programmer is to write the program into the microcontroller. At present, the company's MSP430 development tools mainly include emulators, programmers, various learning boards, transfer boards, adapters, etc. This article will mainly introduce the characteristics of these MSP430 tools. 1: Emulator, programmer IAR and JTAG cannot be connected, what's the matter? This is a question asked by customers. It is also very common in forums, and FAEs also ask it. Let's start with this question. Whether it is emulation or burning programs, MSP430 can generally be carried out through: JTAG, SBW, BSL interfaces. 1. JTAG uses boundary scan technology. There is a logical interface inside the 430 for JTAG use. There are several registers connected to the internal data address bus of the 430, so all resources of the 430 can be accessed, including full-address FLASH, RAM and various registers. It can be used for emulation and programming of the 430. The main connection lines are TMS, TCK, TDI, and TDO. The 430 also needs two other lines RST and TEST to start the JTAG command sequence. 2. SBW is SPY-BI-WIRE, which can be referred to as two-wire JTAG. It mainly includes SBWTCK (connected to the 7-pin TCK of the JTAG interface) and SBWTDIO (connected to the 1-pin TDO/TDI of the JTAG interface). This interface is mainly used for 2 series microcontrollers with less than 28 pins, because the JTAG of microcontrollers with less than 28 pins is generally multiplexed with the IO port. In order to leave more IO resources for users, the SBW interface is introduced. SBW can access all the internal resources of 430 just like JTAG. Note: At present, there is also an SBW interface in the MSP430F5XX series, and the principle is the same as that of the 2 series SBW. 3. BSL is a piece of code that TI pre-fixes into the MCU before the 430 leaves the factory. The code cannot be read or written by the user. It is somewhat similar to the bootloader of DSP, but it is obviously different from the bootloader. BSL can only be used to access the FLASH inside the MCU, and cannot access other resources, so it can only be used as a programmer interface. BSL communicates with the programmer through the UART protocol. The programmer can send different communication commands to perform different operations on the MCU's memory. This method can be called the BSL interface. The startup of the BSL code is somewhat special. Generally, when the 430 is reset and started, the PC pointer points to the FFFE reset vector, but a special startup method can be used to make the MCU point to the program fixed inside the BSL when it starts. This special startup method is generally generated by a slightly complex startup logic of the RST pin and the TEST (or TCK) pin. After BSL is started, the MCU can be read and written through the pre-defined UART protocol commands. 4. General MCUs have code encryption functions. How does 430 achieve this? External code reading and writing to 430 can only be done through the above three methods. As long as these three methods are blocked, won’t the 430 program be safe? Therefore, the fuse bit is introduced. The fuse bit only exists in the JTAG and SBW interface logic. When the fuse is burned (physical damage and irreversible), JTAG and SBW access will be prohibited, and only BSL can access it. Access to the MCU through BSL requires a 32-byte password, which is the interrupt vector table of the user code. Now some domestic decryption manufacturers advertise that they can decrypt 430. The principle is to connect the fuse bit through the slicing and stripping method, and then read the target code through the JTAG or SBW interface. There is no report of cracking BSL. The models of emulators generally support JTAG and SBW interfaces. According to the connection method with the host, they are divided into UIF (USB interface, supporting JTAG and SBW), PIF (parallel port, only supporting JTAG), EZ430 (only supporting SBW mode, currently not supporting F5XX series). The programmer models include GANG430 (RS232 serial interface, serial port, 1 to 8, supporting JTAG and SBW, but not supporting BSL), PRGS430-IIIA multi-function programmer (supporting JTAG, SBW, BSL). These programmers can do offline burning and support burning fuses, that is, burning the target board without the computer. Among them, the PRGS programmer also supports serial number burning. There are also special BSL programmers that only support BSL interfaces and do not support fuse burning. Since the emulator can access all the internal resources of 430, it can of course be used as a programmer. In addition to using IAR to burn source code, it can also be programmed through professional software, such as MSPFET, FET-PRO430, etc. TI provides API operation functions in JTAG, SBW, and BSL, which can be used to design our programmers and emulators. At present, the technology of emulators is more complicated, and IAR software is responsible for upgrading. The programmer has been programmed with a monitor code before leaving the factory. This code can be used to achieve online upgrades. Both the GANG430 programmer and the PRGS programmer have this function.

This post is from Microcontroller MCU
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list