Differences between JTAG, SBW, and BSL interfaces of MSP430 programmer emulator
[Copy link]
For MSP430, simulation and programming can generally be done through the JTAG, SBW, and BSL interfaces. JTAG and SBW interfaces can be used for simulation, but BSL interfaces cannot be used for simulation. The programmer supports all three interfaces. So it cannot be said that JTAG only supports simulation and not programming. This is a conceptual error. JTAG is just an interface protocol.
The following is a brief description of the differences between the three interfaces:
1. JTAG is a boundary scan technology. There is a logic interface inside the 430 for JTAG use. There are several registers inside that are connected to the internal data address bus of the 430, so JTAG can be used to access all resources inside the 430, including the read and write operations of FLASH. Therefore, it can be used for emulation and programming of MSP430. The main connection lines are TMS, TCK, TDI, TDO, RST, and TEST.
2. SBW is SPY-BI-WIRE, which can be referred to as two-wire JTAG. It mainly uses SBWTCK (connected to the 7-pin TCK of the JTAG emulator) and SBWTDIO (connected to the 1-pin TDO/TDI of the JTAG emulator). This interface is mainly used for 2-series 430 microcontrollers with less than 28 pins, because the JTAG interface of the 2-series microcontrollers with less than 28 pins is generally multiplexed with the IO port. In order to reserve more IO ports for users, the SBW interface was introduced. The SBW interface can also be used for emulators and programmers.
3. BSL is a piece of code that TI pre-fixes into the MCU when the MSP430 leaves the factory. 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 connects and communicates with the programmer through the UART protocol. The programmer can send different communication commands to perform different operations on the MCU's memory. The startup of BSL 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. The startup method is generally generated by a slightly more complex startup logic between the RST pin and the TEST (or TCK) pin. After BSL is started, the MCU can be accessed.
4. Generally, MCUs have code encryption function. How does 430 achieve it? External code reading and writing of 430 can only be done through the above three methods, so fuses are introduced. Fuse bits only exist in JTAG and SBW interface logic. There is no fuse inside BSL. When the fuse is blown (physical damage and irreversible), access to JTAG and SBW will be prohibited, and only BSL can access it. Access to MCU through BSL requires a 32-byte password, which is the interrupt vector table of user code. Therefore, there is no report of decryption of 430's encryption system so far.
Emulator models generally include UIF (USB interface, supports JTAG, SBW), PIF (parallel port, only supports JTAG), EZ430 (USB interface, only supports SBW mode); professional programmers include GANG430 (serial port, one to 8, supports JTAG, SBW, does not support BSL); multi-function programmer (JTAG, SBW, BSL). These programmers can do offline burning, that is, burning the target board without a computer. You can also use the emulator with professional software to make a programmer, such software includes MSPFET, FET-PRO430, etc.
|