**** Advance Notice ****

This site will be closed on 31 December 2015,

Important Information for users of NXP LPCXpresso

This site is for users of Code Red branded products.

NXP LPCXpresso users should visit the LPCXpresso FAQ's for up-to-date information relevant to that product.

Differences between revisions 9 and 10
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
== SWD / JTAG Connectors and Pinout == = SWD / JTAG Connectors and Pinout =
Line 14: Line 14:
Usually, MCUs do not include pull-up or pull-down resistors on JTAG/SWD pins. Resistors should be added externally onto the board. However, do not add resistors when the MCU includes them already.
Line 26: Line 26:

== 20-pin 0.1" JTAG/SWD Connector Pinout ==
 * RTCK, DBGSEL
   * Some NXP LPC2000 devices have special pins that enable the JTAG interface. For example, on the NXP LPC2129 the signal RTCK must be driven low during RESET to enable the JTAG interface. You may want to add jumpers to your hardware to accomplish this.
Line 30: Line 30:
== Connector Pinouts ==

ARM has defined two debug connector pinouts that are in common use with Code Red's tools, a 20 pin connector and a 10 pin connector...

=== 20-pin 0.1" JTAG/SWD Connector Pinout ===
Line 36: Line 41:
The 10 pin Cortex debug connector
== 10-pin 0.05" JTAG/SWD Connector Pinout ==
=== 10-pin 0.05" JTAG/SWD Connector Pinout ===
Line 40: Line 44:
=== Part number for the 10-pin 0.05" pitch connectors for target PCB ===
Suitable connectors include :
Line 46: Line 49:
The 10-pin Samtec FTSH-105-01 connector has the dimensions: 0.25" x 0.188" (6.35mm x 4.78mm).

== 10 to 20 pin convertor ==

Code Red's Red Probe+ is supplied with a 20-way cable. An optional adapter is available to allow connection to a 10-pin header.

hash acl All:read

SWD / JTAG Connectors and Pinout

JTAG was the traditional mechanism for debug connections for ARM parts, but with the Cortex-M family, ARM introduced the Serial Wire Debug (SWD) Interface. SWD is designed to reduce the pin count required for debug from the 5 used by JTAG (including GND) down to 3. In addition, one of the pins freed up by this can be used for Single Wire Viewing (SWV), which is a low cost tracing technology (which is used by the "Red State" functionality within Red Suite).

The SWD/SWV pins are overlaid on top of the JTAG pins as follows:

JTAG Mode

SWV Mode

Signal

Notes

TCK

SWCLK

Clock into the core

Use 10K or 100K Ohm pull-down resistor to GND

TDI

-

JTAG Test Data Input

Use 10K or 100K Ohm pull-up resistor to VCC

TDO

SWV

JTAG Test Data Output / SWV trace data output

TMS

SWDIO

JTAG Test Mode Select / SWD data in/out

Use 10K or 100K Ohm pull-up resistor to VCC

GND

GND

-

-

Usually, MCUs do not include pull-up or pull-down resistors on JTAG/SWD pins. Resistors should be added externally onto the board. However, do not add resistors when the MCU includes them already.

Other signals to note

  • RESET
    • Connect this pin to the (active low) reset input of the target MCU
    • We would strongly recommend also including RESET in addition to SWDIO, CLK and GND. For debugging some MCUs, such as NXP LPC11xx, RESET is essential.
  • ISP
    • Most NXP MCU's have an ISP pin which (when pulled low) can be used to cause the MCU to enter a bootloader on reset.
    • For example on LPC17xx this is P2.10 and on LPC11xx and LPC13xx it is P0.1.
    • Always ensure that you have a a 10K or 100K Ohm pull up resistor on the ISP pin, otherwise you are unlikely to be able to make a successful debug connection.
  • RTCK, DBGSEL
    • Some NXP LPC2000 devices have special pins that enable the JTAG interface. For example, on the NXP LPC2129 the signal RTCK must be driven low during RESET to enable the JTAG interface. You may want to add jumpers to your hardware to accomplish this.

Connector Pinouts

ARM has defined two debug connector pinouts that are in common use with Code Red's tools, a 20 pin connector and a 10 pin connector...

20-pin 0.1" JTAG/SWD Connector Pinout

20pin.png

  • This connector was originally defined for connection to ARM7/9 parts over JTAG, but is still sometimes found in Cortex-M systems (for connections over JTAG or SWD).
  • Note that RTCLK (Return clock) is only used on older ARM cores (ARM7TDMI and ARM9 family) before the debug was properly decoupled from the core clock domain.
  • Dimensions of the ARM JTAG connector are 1.29" x 0.722" (33mm x 18.5mm).

10-pin 0.05" JTAG/SWD Connector Pinout

10pin.png

Suitable connectors include :

  • Harwin: M50-3500542
  • Mouser: 855-M50-3500542
  • Samtec shrouded header: FTSH-105-01-F-D-K

The 10-pin Samtec FTSH-105-01 connector has the dimensions: 0.25" x 0.188" (6.35mm x 4.78mm).

10 to 20 pin convertor

Code Red's Red Probe+ is supplied with a 20-way cable. An optional adapter is available to allow connection to a 10-pin header.

Detecting that debug probe is connected

Use pin 9.

Switching between JTAG and SWD modes of debug

Some Cortex-M based MCUs support both SWD and JTAG, others support only SWD (such as NXP LPC11xx and LPC13xx). Where both are supported, there are special sequences defined to switch from JTAG mode (default) and SWD mode that can sent to the core through just the SWD pins.

Normally where both modes are supported, Red Suite will default to using SWD mode. However this can be modified by editing the launch configuration for a project.

Other stuff

Red Probe+ attempts to adjust logic levels based on the voltage it sees on Vtref referenced to whatever GND it has to work with. That's why you need a good GND, shared with your target hardware. The voltage at Vtref is coming from your hardware.


Note that some MCUs (such as NXP LPC13xx) only support debugging via SWD.

Cortex-M0 also implements the Serial Wire Debug interface, but not JTAG. It also does not provide support for the SWV low cost tracing technology.

  • Red Trace (Serial Wire Viewing) requires the SWV pin

HardwareDebugConnections (last edited 2013-10-22 13:38:23 by CrSupportAb)