This document is a work in progress. It explains how to fit the internal on-chip debug (OCD) port on a Linkstation, Kuro-Box or Kuro-Box/HG to a PC interface.

This document is a work in progress. It explains how to fit the internal on-chip debug (OCD) port on a Linkstation, Kuro-Box or Kuro-Box/HG to a PC interface.

−

Cable required: http://www.olimex.com/dev/images/msp430-jtag.jpg

+

== Overview ==

−

=== OCD connector ===

+

You will need to [[Disassemble|open the case]] and solder a 2x8 [http://microcontrollershop.com/product_info.php?cPath=301_306&products_id=2115 pin header] to the board.

−

The internal OCD port uses an electrical standard known as JTAG/COP. The signals have to be buffered to protect the hardware from damage and we use a JTAG wiggler to do this.

+

You also need to [[Building a JTAG Interface|build]] or [[#Buy one|buy]] a JTAG interface cable.

−

+

−

Those with some electrical experience could build their own circuit, but most will opt for ordering one.

+

−

=== Schematics and Software to build your own ===

+

== Adding the JTAG Port ==

−

http://hri.sourceforge.net/tools/

+

−

+

−

=== Buy one ===

+

−

'''Commercial'''

+

−

The [http://www.macraigor.com/wiggler.htm Macraigor Wiggler] seems to be the cheapest at $150.

+

−

+

−

'''Hobby'''

+

−

Could the 20-pin [http://www.olimex.com/dev/arm-jtag.html Olimex ARM-JTAG] be modified to work with Kuro-Box? $20.

+

===Locate the pads===

===Locate the pads===

−

The pads are labelled CN5 and can be seen just above the serial level converter (where the yellow, orange, and red wires start to split) in [http://www.kurobox.com/downloads/Hardware/IMG_1392.jpg this photo]

+

The pads are labeled CN5 and can be seen just above the serial level converter (where the yellow, orange, and red wires start to split) in [http://downloads.buffalo.nas-central.org/KB_PPC/docs/IMG_1392.jpg this photo]

===Connector Pin-outs===

===Connector Pin-outs===

−

In order to use this port, you should add the 10K series VIO resistor R67 and a 4-way 1K resistor pack at RA11. It may be possible to use some functionality without these components.

+

In order to use this port, you should bridge R67.

−

+

−

If you know which set of pin-outs that LinkStation/Kuro-Box uses, please update this page with the details.

+

−

+

−

According to [http://www.genbako.com/jtag/ Baulab] the following pins are identified

The same page also contains the [http://www.genbako.com/jtag/kuro-jtagcable.png schematics], some pictures of the assembled jtag cable and software needed. This cable can be used without adding the additional components.

−

According to http://www.abatron.ch/Files/ManAccessCOP-2000C.pdf and http://www.freescale.com/files/soft_dev_tools/doc/user_guide/CWH-UTP-UG.pdf the following pins are used for a PPC COP/JTAG interface:

+

According to http://www.abatron.ch/Files/ManAccessCOP-2000C.pdf and http://www.freescale.com/files/soft_dev_tools/doc/user_guide/CWH-UTP-UG.pdf

+

the following pins are used for a PPC COP/JTAG interface:

+

<ref>This also agrees with the recommended JTAG implementation as documented in [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPC8241 Freescale MPC8241 Info],

+

which is the CPU used for the Linkstation HG. See pages 45-46.

+

Note that there is no guarantee that Buffalo followed this recommendation, but it appears that they did.</ref>

{|

{|

|- bgcolor=#CCCCCC

|- bgcolor=#CCCCCC

|TDO

|TDO

|1

|1

−

|

+

|&rarr;

|2

|2

|QACK

|QACK

Line 94:

Line 34:

|TDI

|TDI

|3

|3

−

|

+

|&rarr;

|4

|4

|TRST (Neg)

|TRST (Neg)

Line 100:

Line 40:

|HALTED

|HALTED

|5

|5

−

|

+

|&rarr;

|6

|6

|Vcc Target

|Vcc Target

Line 106:

Line 46:

|TCK

|TCK

|7

|7

−

|

+

|&rarr;

|8

|8

|CKSI

|CKSI

Line 112:

Line 52:

|TMS

|TMS

|9

|9

−

|

+

|&rarr;

|10

|10

|??

|??

Line 118:

Line 58:

|SRST (Neg)

|SRST (Neg)

|11

|11

−

|

+

|&rarr;

|12

|12

|Gnd (??)

|Gnd (??)

Line 124:

Line 64:

|HRST (Neg)

|HRST (Neg)

|13

|13

−

|

+

|&rarr;

|14

|14

|NC (key)

|NC (key)

Line 130:

Line 70:

|CKSO

|CKSO

|15

|15

−

|

+

|&rarr;

|16

|16

|Gnd

|Gnd

Line 155:

Line 95:

12 GROUND System Ground

12 GROUND System Ground

13 HRESET Hard-Reset

13 HRESET Hard-Reset

−

14 <reseved>

+

14 <reseved> (key, which means this pin is often removed)

15 CKSO Not Connected on the 8421

15 CKSO Not Connected on the 8421

16 GROUND System Ground

16 GROUND System Ground

+

+

== On-Chip Debug (OCD) connector ==

+

+

Technically, JTAG refers only to the 5 pins with JTAG in the description above ([http://en.wikipedia.org/wiki/JTAG wikipedia]).

+

There is a [http://www.olimex.com/dev/images/msp430-jtag.gif 14-pin] JTAG interface, commonly referred to as the '''TI standard'''.

+

There is also a [http://www.olimex.com/dev/images/arm-jtag-layout.gif 20-pin] JTAG interface, commonly referred to as the '''ARM standard'''.

+

For connecting to your PC, there are two common options: parallel port and USB.

+

Some software packages do not support USB cables.

+

<ref>Most of the USB implementations appear to use a version of the [http://www.ftdichip.com/Products/FT2232C.htm FT2232 chip from FTDI], so they should all be somewhat compatible.</ref>

+

+

The OCD port on the Linkstation uses an electrical standard known as JTAG/COP.

+

The 16-pin COP header for Freescale devices is slightly different from the TI/ARM standards.

+

Although this is signal-level compatible with the TI/ARM standards, unfortunately the pins are in a different order on the Linkstation.

+

Therefore, you will need to build your own cable, or use some wires to manually connect the proper pins.

+

The signals have to be buffered to protect the hardware from damage and we use a JTAG adapter (such as the Wiggler&#153;) to do this.

+

Those with some electronics experience could build their own circuit, but there are also several inexpensive vendors.

<ref>There are more expensive options. I didn't include any options which are more expensive than the Linkstation. Please also pay attention to the included software, (make sure the software supports your target board) </ref>

Pin Name Description
1 TDO JTAG Test Data Out
2 QACK Not Needed
3 TDI JTAG Test Data In
4 TRST JTAG Test Reset
5 HALTED Not Needed
6 Vcc Target 1.8 – 5.0V:
This is the target reference voltage. It indicates that the target has power and it is also used
to create the logic-level reference for the input comparators. It also controls the output logic
levels to the target. It is normally fed from Vdd I/O on the target board.
3.0 – 5.0V:
This input is used to detect if the target is powered up. If there is a current
limiting resistor between this pin and the target Vdd, it should be 100 Ohm or less.
7 TCK JTAG Test Clock
8 CKSI Not Connected ??
9 TMS JTAG Test Mode Select
10 <reseved>
11 SRESET Soft-Reset
12 GROUND System Ground
13 HRESET Hard-Reset
14 <reseved> (key, which means this pin is often removed)
15 CKSO Not Connected on the 8421
16 GROUND System Ground

On-Chip Debug (OCD) connector

Technically, JTAG refers only to the 5 pins with JTAG in the description above (wikipedia).
There is a 14-pin JTAG interface, commonly referred to as the TI standard.
There is also a 20-pin JTAG interface, commonly referred to as the ARM standard.
For connecting to your PC, there are two common options: parallel port and USB.
Some software packages do not support USB cables.
[2]

The OCD port on the Linkstation uses an electrical standard known as JTAG/COP.
The 16-pin COP header for Freescale devices is slightly different from the TI/ARM standards.
Although this is signal-level compatible with the TI/ARM standards, unfortunately the pins are in a different order on the Linkstation.
Therefore, you will need to build your own cable, or use some wires to manually connect the proper pins.
The signals have to be buffered to protect the hardware from damage and we use a JTAG adapter (such as the Wiggler) to do this.
Those with some electronics experience could build their own circuit, but there are also several inexpensive vendors.

A quick search on ebay will find many buffered JTAG cables for less than $20.

Notes

↑This also agrees with the recommended JTAG implementation as documented in Freescale MPC8241 Info,
which is the CPU used for the Linkstation HG. See pages 45-46.
Note that there is no guarantee that Buffalo followed this recommendation, but it appears that they did.

↑Most of the USB implementations appear to use a version of the FT2232 chip from FTDI, so they should all be somewhat compatible.

↑There are more expensive options. I didn't include any options which are more expensive than the Linkstation. Please also pay attention to the included software, (make sure the software supports your target board)