Olimex Support Forum

Microcontrollers => MSP430 => Topic started by: kenyee on February 07, 2013, 07:33:51 pm

Title: Olimex MSP430-JTAG-ISO-MK2 SBW Pins don't match TI FET-UIF debugger
Post by: kenyee on February 07, 2013, 07:33:51 pm
I'm trying to attach it to a SpyBiWire (SBW) device and it doesn't seem to be in SBW mode (it'd be realllly useful if the LCD display on it displayed whether it was in SBW or JTAG mode).
When I told CCS to connect to it the first time, it upgraded the firmware on it, but that didn't help either...replugged the Olimex device to be sure.

The exact CCS error message is "Error connecting to target: could not find device (or device not supported)".
I dug and found this that indicates some new firmware but I did the update already:
  https://www.olimex.com/forum/index.php?topic=61.0
The JTAG-ISO display also indicates "MCU Unknown".

BTW, anyone know how accurate the current measurement on the JTAG-ISO is?  At one point, it said 108uA and then after the replug, it says 89uA, 102uA, etc after I tell it to run in CCS.  If I don't tell it to run, it says "pwr ext" and 0uA, so it's halfway talking to CCS (CCS gets it to send power to the board).

p.s., in case anyone wants to try to run it w/ the MSP430 Launchpad, this is what you do:
- on the MSP430 Launchpad, unplug the RST/TEST/VCC jumpers to disconnect the Launchpad's jumpers
- use male/female jumper wires to jumper the 14-pin cables pins to the launchpad headers as follows:
1 - RST
2 - VCC to board
8 - TEST
9 - GND

Lub: help, please? :D
Title: Re: Olimex MSP430-JTAG-ISO-MK2 "error connecting to target" in Code Composer Studio?
Post by: LubOlimex on February 12, 2013, 09:32:39 am
Hey Ken,

Which MSP430 Launchpad exactly you use? What microcontroller it has?

It might a good idea to check the pinout of the debugger (I suspect you already have): https://www.olimex.com/Products/MSP430/_resources/msp430-jtag.gif (https://www.olimex.com/Products/MSP430/_resources/msp430-jtag.gif). And of course compare your Launchpad JTAG connection with the connection on some of our MSP430 boards. For instance, check the JTAG part of MSP430-P2274: https://www.olimex.com/Products/MSP430/Proto/MSP430-P2274/resources/MSP430-P2274-schematic.pdf (https://www.olimex.com/Products/MSP430/Proto/MSP430-P2274/resources/MSP430-P2274-schematic.pdf)

Best regards,
Lub/OLIMEX
Title: Re: Olimex MSP430-JTAG-ISO-MK2 "error connecting to target" in Code Composer Studio?
Post by: kenyee on February 12, 2013, 04:50:18 pm
I'm using TI's MSP430G2 Launchpad (http://www.ti.com/tool/msp-exp430g2) w/ the G2553 and G2152 20-pin chips.  They both work fine w/ the built-in SBW debugger of the MSP430 Launchpad, but I bought the JTAG-ISO-MK2 to be able to read the power used and also to burn the security fuse, neither which can be done by the on-board SBW debugger.

I think I might see a problem if you guys implemented SWBTDIO as this schematic's JTAG connector says:
  https://www.olimex.com/Products/MSP430/Proto/MSP430-P2274/resources/MSP430-P2274-schematic.pdf

It looks like you put SBWTDIO on pin 11 of the JTAG-ISO-MK2?

It should be on pin-1 of the JTAG debugger according to these:
  http://processors.wiki.ti.com/index.php/JTAG_%28MSP430%29
  http://www.tag-connect.com/Materials/SPY-BI-TAG%20Datasheet.pdf

Hmm...it's actually pretty confusing.  On that TI wiki page, !RST should be on Pin 11 if you look at the 4 wire diagram:
  http://processors.wiki.ti.com/images/e/e9/JTAG_4_wire_pinout.JPG
However SBWTDIO, aka 2-wire mode, is definitely on pin 1 if you look at the 2 pin diagram:
  http://processors.wiki.ti.com/images/3/30/MSP430_JTAG_2_Wire_pinout_5xx_6xx.PNG
But your schematic is definitely wrong since it puts SBWTDIO on Pin 11.

So assuming I hooked this up correctly (confirmed with the schematics at http://www.ti.com/lit/zip/slac437), I still think the JTAG-ISO-MK2 might have that bug mentioned in the link to the JTAG-TINY driver that someone reported...i.e., it defaults to 4 wire mode and doesn't go into 2 wire SBW mode...
Title: Re: Olimex MSP430-JTAG-ISO-MK2 "error connecting to target" in Code Composer Studio?
Post by: LubOlimex on February 14, 2013, 02:18:43 pm
Hey kenyee,

Texas decided that it would be more visible for the users to switch between JTAG and SBW mode using a jumper (J1/J2) on their target boards. Let's just say there is no need to switch hardware jumpers when you can do the JTAG/SBW switch on software level... You tell me which is better if you have both SBW and JTAG interfaces on your target device? Still there is a reason I linked exactly that board P2274 - so you can see the difference in layout. In our newer MSP430 boards we have a jumper allowing them to work with the TI FET-UIF, for instance check the "Debug Interface" part of this schematic: https://www.olimex.com/Products/Duino/MSP430/OLIMEXINO-5510/resources/OLIMEXINO-5510_Rev_B_sch.pdf (https://www.olimex.com/Products/Duino/MSP430/OLIMEXINO-5510/resources/OLIMEXINO-5510_Rev_B_sch.pdf).


This layout difference is clearly shown in the hardware section of ISO-MK2 web page, e.g.: https://www.olimex.com/Products/MSP430/_resources/msp430-jtag.gif (https://www.olimex.com/Products/MSP430/_resources/msp430-jtag.gif).

Now you have the option to connect according to the ISO-MK2 layout and do your job, or be stubborn and follow the TI layout and not do your job.

By the way it is normal consumption of micro amps to vary - processor uses different resources at different time.

Regards,
Lub/OLIMEX
Title: Re: Olimex MSP430-JTAG-ISO-MK2 "error connecting to target" in Code Composer Studio?
Post by: kenyee on February 14, 2013, 05:37:13 pm
Quote from: LubOlimex on February 14, 2013, 02:18:43 pmIn our newer MSP430 boards we have a jumper allowing them to work with the TI FET-UIF, for instance check the "Debug Interface" part of this schematic: https://www.olimex.com/Products/Duino/MSP430/OLIMEXINO-5510/resources/OLIMEXINO-5510_Rev_B_sch.pdf (https://www.olimex.com/Products/Duino/MSP430/OLIMEXINO-5510/resources/OLIMEXINO-5510_Rev_B_sch.pdf).


Ahhh...that indeed clarifies it.  You guys are using a non-standard pinout.  It looks like on your board, you're doing a JTAG debugger compatibility jumpers.  You put the SBWTDIO/!RST signal on Pin 11 (this is Pin 1 on the FET-UIF).  I moved my jumper wires and confirmed that this does work.  By moving this one pin, I can debug the MSP430 Launchpad using the JTAG-ISO and the JTAG-ISO also displays the correct MCU on the LCD display :-)

However, IMHO, you should move that pin back to Pin1 and add an LCD UI function to select it if you want to be backwards compatible w/ what it currently does.  The problem with your current JTAG pinout is I have prototypes on the way from the board fab using the TAG-CONNECT SBW foot print because I didn't have enough board space to fit a full size JTAG connector footprint:
  http://www.tag-connect.com/SPY-BI-TAG
  http://www.tag-connect.com/TC2030-IDC-NL
Because your JTAG-ISO uses a different pinout than the FET-UIF, this cable will not be compatible.
So IMHO, that's a valid use case for putting it on the matching pin to the FET-UIF...

If you don't move it, your product documentation page should at least mention that
1) it is not compatible w/ the FET-UIF pinout in SBW mode, so cables like TAG-Connect's TC2030 won't work
2) the SBWTDIO signal is on Pin 11 instead of Pin 1
3) the TEST signal is on Pin 8 instead of Pin 7 (which is TCK in normal JTAG mode but TEST in SBW mode according to http://processors.wiki.ti.com/images/3/30/MSP430_JTAG_2_Wire_pinout_5xx_6xx.PNG) though this doesn't matter (the tag-connect TC2050 JTAG pinout doesn't even hook up pin 7: http://www.tag-connect.com/Materials/TC2050-IDC-430-NL%20Datasheet.pdf)

p.s., w/ the pin hooked up correctly, I get a consistent 80uA on the JTAG-ISO so no variation jump to 100-110uA :-)