Tell me more ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

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?

share|improve this question

1 Answer

up vote 10 down vote accepted

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.

share|improve this answer
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? – Joel B Apr 5 '12 at 13:59
1  
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 – jsolarski Apr 5 '12 at 14:05
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. – AngryEE Apr 5 '12 at 14:07
1  
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." – jsolarski Apr 5 '12 at 15:27
1  
As for the launch pad it is a fully capable SBW programmer – jsolarski Apr 5 '12 at 15:29
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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