728x90
반응형
맨 위로 올라가기
Guide: Connecting your debugger

 

This small guide will explain how to connect your debugger to your delvelopment board.

There are two commonly used connectors which expose only the SWD(Serial Wire Debug) interface or the Full JTAG interface.

 

- Connecting ST's Nucleo and Discovery boards.

If you are using one of ST's official Nucleo or Discovery boards, you do not have to connect an external debugger.
These board come with an on-board ST-LINK/V2 degugger. Just connect the board via USB to your PC and you are ready to go.

 

- Connecting Chinese development boards

If you are using one of the many Chinese developments boards, you most likely need to connect an external debugger to flash and debug the device on your development board as these board normally do not include a on-board ST-LINK/V2.

 

- Connecting via SWD header

The easiest way to connect your development board to your debugger is by using the 4-pin SWD header, if present.

This header is usually a male dupont header, but female headers are also used.

The header exposes a ground pin(GND), a +3.3V pin, a clock pin(SWCLK), and a data pin(SWDIO).

 

Note: There is no particular order in which these pins are arranged.

 

Warning: DO NOT CONNET THE +3.3V PIN if you are powering your board externally,

as most Chinese development boards do not have any protection on the power pins.
This may cause damage your board, debugger or PC.

 

The table below provides an overview of whichi pins to connect:

 

Pin function Debugger pin Target pin
Ground pin GND GND
+3.3V pin VCC/ VDD/ 3.3V VCC/ VDD/ 3.3V
Clock pin SWCLK / SWCK CLK/ SWCLK
Data pin SWDIO DIO/ SWDIO

 

- Debuggers.

There are a few different debuggers that can be used.

 

- Official ST-LINK/V2

The official ST-LINK/V2 is a debgger manufactured by ST Microelectronics and can be bought at any major electronics distributor.

 

- Nucleo ST-LINK/V2

The ST-LINK/V2 built into the Nucleo-64 and Nucleo-144 boards can also be used as stand-alone debugger.
To use the built-in debugger, you must remove the jumpers from cn2(Nucleo-64) or cn4(Nucleo-144).

Then you can use cn4(Nucleo-64) or cn6(Nucleo-144) to connect to your target board.

 

This debugger has a 6-pin dupont header(maie) for connecting to a SWD header on the target board.

The pinout of this connector can be found below.

 

 

- ST-LINK/V2 Clone

The cheapest alternative to both official ST options is a Chinese ST-LINK/V2 clone.

This clone offers the same connectivity when it comest to SWD. It does not expose a full JTAG interface.
Howerver, it does feature some additional power pins, both +5V and 3.3V.

 

This debugger has a 10-pin IDC Connector. The pinout of this connector can be found below.

 

728x90
반응형

+ Recent posts