9
\$\begingroup\$

I'm working on an MSP430 design and I'm very intrigued by the Spy-Bi-Wire two-wire programming interface. From what I read it is very similar in terms of functionality to JTAG and even looks better in some cases (less wires of course, but also speed, etc).

Is there anything that JTAG is capable of that I would be missing out on by using Spy-Bi-Wire (debugging, breakpoints, flash programming) and not including the standard 4-pin JTAG on my PCB?

\$\endgroup\$
12
\$\begingroup\$

Spy-Bi-Wire is JTAG - the physical layer is just different. JTAG is a set of commands over a serial interface. The main problem is the chip you're debugging. The chip you're debugging has to have the support for the fancy features - not just your JTAG. And indeed, in TI's own documentation for the JTAG interface on MSP430 it spells out how its chips don't fully implement all JTAG commands (section 3.2, pg 67):

Only the BYPASS instruction is supported. There is no support for SAMPLE, PRELOAD, or EXTEST instructions.

Here's the fun part: since Spy-Bi-Wire is just serial communication, all of the actual cool features have to be implemented on the MSP430. For instance, the number of hardware breakpoints you have? Determined by the processor, not the JTAG you're using. Most MSP430's have two, some have eight.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ How could I not be able to fix a bricked chip if I can program the flash via Spy-Bi-Wire? Does Spy-Bi-wire not allow flash programming? \$\endgroup\$ – Joel B Apr 5 '12 at 13:59
  • 1
    \$\begingroup\$ SBW can forcibly erase the flash on bricked chips. It can write your program or change a value at a specific address in flash too \$\endgroup\$ – jsolarski Apr 5 '12 at 14:05
  • \$\begingroup\$ That's good to know - I thought it required higher voltages and was only able to forcibly wipe the chip if the chip was assisting. I think perhaps that functionality might not be in all SBW devices? I'm wondering mainly about the implementation on the MSP430 Launchpad. \$\endgroup\$ – AngryEE Apr 5 '12 at 14:07
  • 1
    \$\begingroup\$ I honestly don't know about the chips with both SBW and JTAG but I think it is one of the functions of SBW. If you look at the TI document you posted, it states "1.2.1.3 2-Wire Spy-Bi-Wire (SBW) JTAG Interface The core JTAG logic integrated into devices that support 2-wire mode is identical to 4-wire-only devices. The fundamental difference is that 2-wire devices implement additional logic that is used to convert the 2- wire communication into the standard 4-wire communication internally. In this way, the existing JTAG emulation methodology of the MSP430 can be fully utilized." \$\endgroup\$ – jsolarski Apr 5 '12 at 15:27
  • 1
    \$\begingroup\$ As for the launch pad it is a fully capable SBW programmer \$\endgroup\$ – jsolarski Apr 5 '12 at 15:29
2
\$\begingroup\$

I develop custom MSP430 solution that run on Teradyne ICT

My opinion, SbW is certainly not faster. It takes 3 clock cycles to accomplish 1 bit by JTAG. Then, somebody had a really bad idea to have the RESET line carry the data. Then the the RESET usually has at least 1nF capacitance, which makes it even slower to charge and discharge.

The SbW is fine for very tiny flash, like the Value Series MSP430G, having only a few K of flash to program. But for the MSP430F5XX and 6XX, you better provide connectivity to the entire JTAG set and dedicate those pins for programming, otherwise you will regret using the SbW.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.