ST-LINK/V2 In-Circuit Debugger/Programmer for STM8 and STM32

User Manual

Introduction

The ST-LINK/V2 is an in-circuit debugger/programmer for the STM8 and STM32 microcontroller families. The single wire interface module (SWIM) and JTAG/serial wire debugging (SWD) interfaces facilitate communication with any STM8 or STM32 microcontroller located on an application board.

In addition to providing the same functionalities as the ST-LINK/V2, the ST-LINK/V2-ISOL features digital isolation between the PC and the target application board. It also withstands voltages of up to 1000 VRMS.

The USB full-speed interface allows communication with a PC and:

Figure 1. ST-LINK/V2 and ST-LINK/V2-ISOL

Features

Ordering Information

To order the ST-LINK/V2 refer to Table 1:

Table 1. List of the order codes
Order code ST-LINK description
ST-LINK/V2 In-circuit debugger/programmer
ST-LINK/V2-ISOL In-circuit debugger/programmer with digital isolation

Product Contents

The cables delivered within the product are shown in Figure 2: ST-LINK/V2 product contents and Figure 3: ST-LINK/V2-ISOL product contents. They include (from left to right in Figure 2 and Figure 3):

Figure 2. ST-LINK/V2 product contents
Figure 3. ST-LINK/V2-ISOL product contents

Hardware Configuration

The ST-LINK/V2 is designed around the STM32F103C8 device, which incorporates the high-performance ARM® Cortex®-M3 core. It is available in a TQFP48 package.

As shown in Figure 4, the ST-LINK/V2 provides two connectors:

The ST-LINK/V2-ISOL provides one connector for the STM8 SWIM, STM32 JTAG/SWD and SWV interfaces.

Figure 4. Connectors of the ST-LINK/V2 (on the left) and ST-LINK/V2-ISOL (on the right)

4.1 Connection with STM8 applications

For STM8 developments, the ST-LINK/V2 can be connected to the target board by two different cables, depending on the connector available on the application board.

These cables are:

4.1.1 Standard ERNI connection with SWIM flat ribbon

Figure 5 shows how to connect the ST-LINK/V2 if a standard ERNI 4-pin SWIM connector is present on the application board.

Figure 5. ERNI connection

Figure 6 shows that pin 16 is missing on the ST-LINK/V2-ISOL target connector. This missing pin is used as a safety key on the cable connector, to guarantee connection of the SWIM cable in the correct position on the target connector even pins, used for both SWIM and JTAG cables.

Figure 6. Key detail on connectors

4.1.2 Low-cost SWIM connection

Figure 7 shows how to connect the ST-LINK/V2 if a 4-pin, 2.54 mm, low-cost SWIM connector is present on the application board.

Figure 7. Low-cost connection

See Figure 12: SWIM ST-LINK/V2 low-cost cable.

4.1.3 SWIM signals and connections

Table 2 summarizes the signal names, functions, and target connection signals using the wire cable with a 4-pin connector.

Table 2. SWIM flat ribbon connections for ST-LINK/V2
Pin no. Name Function Target connection
1 VDD Target VCC(1) MCU VCC
2 DATA SWIM MCU SWIM pin
3 GND GROUND GND
4 RESET RESET MCU RESET pin

(1) The power supply from the application board is connected to the ST-LINK/V2 debugging and programming board to ensure signal compatibility between both boards.

Figure 8. Target SWIM connector

Table 3 summarizes the signal names, functions, and target connection signals using the separate-wires cable.

As the SWIM separate-wires cable has independent connectors for all pins on one side, it is possible to connect the ST-LINK/V2-ISOL to an application board without a standard SWIM connector. On this flat ribbon, all signals are referenced by a specific color and a label to ease the connection on target.

Table 3. SWIM low-cost cable connections for ST-LINK/V2-ISOL
Color Cable pin name Function Target connection
Red TVCC Target VCC(1) MCU VCC
Green UART-RX Unused Reserved (2) (not connected on the target board)
Blue UART-TX
Yellow BOOTO
Orange SWIM SWIM MCU SWIM pin
Black GND GROUND GND
White SWIM-RST RESET MCU RESET pin

(1) The power supply from the application board is connected to the ST-LINK/V2 debugging and programming board to ensure signal compatibility between both boards.

(2) BOOTO, UART-TX and UART-RX are reserved for future developments.

4.2 Connection with STM32 applications

For STM32 developments, the ST-LINK/V2 needs to be connected to the application using the standard 20-pin JTAG flat ribbon provided.

Table 4 summarizes the signals names, functions, and target connection signals of the standard 20-pin JTAG flat ribbon.

Table 4. JTAG/SWD cable connections
Pin no. ST-LINK/V2 connector (CN3) ST-LINK/V2 function (JTAG) Target connection (JTAG) Target connection (SWD)
1 VAPP Target VCC MCU VDD(1) MCU VDD(1)
2
3 TRST JTAG TRST JNTRST GND(2)
4 GND GND GND(3) GND(3)
5 TDI JTAG TDO JTDI GND(2)
6 GND GND GND(3) GND(3)
7 TMS_SWDIO JTAG TMS, SW IO JTMS SWDIO
8 GND GND GND(3) GND(3)
9 TCK_SWCLK JTAG TCK, SW CLK JTCK SWCLK
10 GND GND GND(3) GND(3)
11 NC Not connected Not connected Not connected
12 GND GND GND(3) GND(3)
13 TDO_SWO JTAG TDI, SWO JTDO TRACESWO(4)
14 GND GND GND(3) GND(3)
15 NRST NRST NRST NRST
16 GND GND GND(3) GND(3)
17 NC Not connected Not connected Not connected
18 GND GND GND(3) GND(3)
19 VDD VDD (3.3V)(5) Not connected Not connected
20 GND GND GND(3) GND(3)

(1) The power supply from the application board is connected to the ST-LINK/V2 debugging and programming board to ensure signal compatibility between both boards.

(2) Connect to GND for noise reduction on the ribbon.

(3) At least one of this pin must be connected to the ground for correct behavior (connecting all of them is recommended).

(4) Optional: for Serial Wire Viewer (SWV) trace.

(5) Available on ST-LINK/V2 only and not connected on ST-LINK/V2/OPTO.

Figure 9 shows how to connect the ST-LINK/V2 to a target using the JTAG cable.

Figure 9. JTAG and SWD connection

The reference of the connector needed on the target application board is: 2x10C header wrapping 2x40C H3/9.5 (pitch 2.54) - HED20 SCOTT PHSD80.

Figure 10. JTAG debugging flat ribbon layout

Note: For low cost applications or when the standard 20-pins-2.54mm-pitch-connector footprint is too big, it is possible to implement the Tag-Connect solution to save cost and space on the application board. The Tag-Connect adapter and cable provide a simple reliable means of connecting ST-LINK/V2 or ST-LINK/V2-ISOL to the PCB without requiring a mating component on application PCB. For more details on this solution and application-PCB-footprint information, visit www.tag-connect.com.

The references of components compatible with JTAG and SWD interfaces are:

4.3 ST-LINK/V2 status LEDs

The LED labeled 'COM' on top of the ST-LINK/V2 shows the ST-LINK/V2 status (whatever the connection type).

When the:

Software Configuration

5.1 ST-LINK/V2 firmware upgrade

The ST-LINK/V2 embeds a firmware upgrade mechanism for in-situ upgrade through the USB port. As the firmware might evolve during the whole life of the ST-LINK/V2 product (new functionality, bug fixes, support for new microcontroller families ...), it is recommended to visit www.st.com/stlinkv2 periodically in order to stay up-to-date with the latest firmware version.

5.2 STM8 application development

Refer to ST toolset Pack24 with Patch 1 or more recent, which includes ST Visual Develop (STVD) and ST Visual Programmer (STVP).

5.3 STM32 application development and Flash programming

Third-party toolchains, Atollic® TrueSTUDIO, IAR™ EWARM, Keil® MDK-ARM™, and TASKING VX-toolset support ST-LINK/V2 according to the versions given in Table 5 or in the most recent version available.

Table 5. How third-party toolchains support ST-LINK/V2
Third party Toolchain Version
Atollic® TrueSTUDIO 2.1
IAR™ EWARM 6.20
Keil® MDK-ARM™ 4.20
TASKING VX-toolset for ARM® Cortex®-M 4.0.1

The ST-LINK/V2 requires a dedicated USB driver. If the toolset installed it automatically, the file stlink_winusb.inf is installed in <WINDIR>/inf (where <WINDIR> is typically C:/Windows).

If the toolset setup did not install it automatically, the driver can be found on www.st.com:

  1. Connect to www.st.com.
  2. In the search tab, part number field, look for ST-LINK/V2.
  3. Click on the Generic Part Number column hyperlink to ST-LINK/V2.
  4. In the Design support tab, SW drivers section, click on the icon to download st-link_v2_usbdriver.zip.
  5. Unzip and run ST-Link_V2_USBdriver.exe.

For more information on third-party tools, visit the following websites:

Schematics

Figure 11. SWIM ST-LINK/V2 standard ERNI cable

Note: connector located on the edge of the board

1. Legend for pin descriptions: VDD = Target voltage sense DATA = SWIM DATA line between target and debug tool GND = Ground voltage RESET = Target system reset

Figure 12. SWIM ST-LINK/V2 low-cost cable

1. Legend for pin descriptions: VDD = Target voltage sense DATA = SWIM DATA line between target and debug tool GND = Ground voltage RESET = Target system reset

Revision History

Table 6. Document revision history
Date Revision Changes
22-Apr-2011 1 Initial release.
03-Jun-2011 2 Table 2: SWIM flat ribbon connections for ST-LINK/V2: added footnote 1 to the function "Target VCC".
Table 4: JTAG/SWD cable connections: added footnote to the function "Target VCC".
Table 5: How third-party toolchains support ST-LINK/V2: updated the "Versions" of IAR and Keil.
19-Aug-2011 3 Added USB driver details to Section 5.3.
11-May-2012 4 Added SWD and SWV to JTAG connection features. Modified Table 4: JTAG/SWD cable connections.
13-Sep-2012 5 Added ST-LINK/V2-ISOL order code.
Updated Section 4.1: STM8 application development on page 15
Added Note 5. in Table 4.
Added Note "For low cost applications...” before Section 3.3: ST-LINK/V2 status LEDs on page 14
18-Oct-2012 6 Added Section 5.1: ST-LINK/V2 firmware upgrade on page 15.
25-Mar-2016 7 Updated Vrms value in Introduction and in Features.

PDF preview unavailable. Download the PDF instead.

ATS-11C-129-C2-R0 C2 v2.1.0.1 build 007 - c2 rendition config : Techlit Active Acrobat Distiller 9.0.0 (Windows)

Related Documents

Preview ST-LINK/V2 In-Circuit Debugger/Programmer User Manual
User manual for STMicroelectronics' ST-LINK/V2 and ST-LINK/V2-ISOL in-circuit debuggers/programmers, detailing features, hardware and software configuration, connection methods for STM8 and STM32 microcontrollers, and status indicators.
Preview ST-LINK/V2 & ST-LINK/V2-ISOL User Manual: Debugging STM8 and STM32 Microcontrollers
Comprehensive user manual for STMicroelectronics' ST-LINK/V2 and ST-LINK/V2-ISOL in-circuit debuggers and programmers, detailing features, hardware configuration, software integration, and usage for STM8 and STM32 microcontrollers.
Preview ST-LINK/V2 In-Circuit Debugger/Programmer User Manual
User manual for the ST-LINK/V2 and ST-LINK/V2-ISOL in-circuit debugger/programmers from STMicroelectronics. Covers features, hardware and software configuration, connection methods for STM8 and STM32 microcontrollers, schematics, and revision history.
Preview ST-LINK/V2 In-Circuit Debugger/Programmer User Manual
User manual for STMicroelectronics' ST-LINK/V2 and ST-LINK/V2-ISOL in-circuit debuggers/programmers. This document details features, hardware configuration, software setup, connection methods for STM8 and STM32 microcontrollers, and status LED indicators.
Preview ST-LINK V2 Debugger Programmer for STM8 STM32 Microcontrollers
An overview of the ST-LINK V2, a USB debugger and programmer from STMicroelectronics, detailing its pinout, supported microcontrollers (STM8, STM32), and physical specifications.
Preview STLINK-V3SET Debugger/Programmer User Manual for STM8 and STM32
The STLINK-V3SET is a stand-alone modular debugging and programming probe from STMicroelectronics, designed for STM8 and STM32 microcontrollers. It supports SWIM, JTAG, SWD, Virtual COM port, and various bridge interfaces for comprehensive development.
Preview STLINK-V3SET Debugger/Programmer User Manual by STMicroelectronics
Explore the STLINK-V3SET, a versatile debugger and programmer from STMicroelectronics, designed for STM8 and STM32 microcontrollers. This user manual details its features, modular extensions, and connectivity options for embedded development.
Preview STM32F0DISCOVERY User Manual - STMicroelectronics
User manual for the STM32F0DISCOVERY development kit, featuring the STM32F051R8T6 microcontroller, ST-LINK/V2 debugger, and prototyping capabilities. Covers hardware, layout, connections, and quick start.