This article describes the ST-LINK hardware probes.
The ST-LINK is an in-circuit debugger and programmer for the STM8 and STM32 microcontroller families.
ST-LINK is a USB device and has to be connected to a PC host. It can be either embedded on ST boards or provided as standalone dongle.
Depending on the version of the ST-LINK hardware and on the version of its embedded firmware, it can support different debug protocols:
- SWIM: debug protocol for STM8 microcontrollers
- SWD/JTAG: debug protocol for STM32 microcontrollers and microprocessors
and communication interfaces:
2 Hardware versions
For details about different versions , please refer to the technical note of ST-LINK derivatives.
To check for the ST-LINK version which is embedded in ST boards, you have to refer to the Getting started with ST boards page, and then select your current HW board.
3 Getting started
3.1 Installing USB driver
Depending of the ST-LINK version, two USB drivers are associated: one for the debugger itself, and one for the serial communication port from (ST-LINK/V2-1).
Serial communication port is using standard CDC ACM USB Class, which is usually present by default on all PC operating system.
About USB driver for the debugger, this could differ depending of the PC operating system:
- MS Windows®
A driver must be installed before connecting ST-LINK to a Windows® 7, Windows 8, or Windows® 10 PC via the USB.
The driver is automatically installed by the toolsets supporting ST-LINK. It is also available from the www.st.com website.
Users must be granted with rights for accessing the ST-Link USB devices. It is then necessary to add rules into /etc/udev/rules.d.
All information and files for installing the udev rules are provided in the STSW-LINK007 package in st.com (see stsw-link007\AllPlatforms\StlinkRulesFilesForLinux\Readme.txt file).
- Mac OS®
No specific install is required.
3.2 Connecting JTAG/SWD for debug
- Embedded ST-LINK
JTAG/SWD link is available from the USB link provided by the ST-LINK. USB device is mounted on the host PC, and ready to be used.
- Standalone ST-LINK
Pins are available on the ST-LINK to connect the JTAG/SWD signals. Please see Hardware versions to check for the connection details.
- - JTAG: please ensure these signals are connected to the JTAG/SWD connector: VCC, JTDI, JTMS, JCLK, JRCLK, JTDO, NRST and GDN
- - SWD: please ensure these signals are connected to the JTAG/SWD connector (on some ST-LINK hardware version, a dedicated SWD port can be available also): VCC, SWCLK, SWDIO, NRST, SWO and GND.
3.3 Connecting UART port (from ST-LINK/V2-1)
- Embedded ST-LINK
UART serial port is available from the USB link provided by the ST-LINK. USB device is mounted on the host PC, and ready to be used.
- Standalone ST-LINK
Pins are available on the ST-LINK to connect the Rx/Tx and GND signals. Please see Hardware versions to check for the connection details.
4 To go further
4.1 Updating embedded firmware
All information given in the STSW-LINK007 software package in st.com.
|The firmware update application embeds the latest FW version, so do not hesitate to get latest version of the executable STSW-LINK007 software package|
4.2 How to bypass embedded ST-LINK
For ST boards which embed a ST-LINK, it could be useful for user to bypass it, in order to use a newest version of ST-LINK standalone probe, or an other debug probe.
- Deactivate the embedded ST-LINK
Please refer to the board description and schematic to get the way to put the embedded ST-LINK in reset mode if available.
- Bypass the embedded ST-LINK signals and connect external hardware probe
Following the interface available on the new hardware probe, you have to connect the relevant signals. Please refer to Connecting JTAG/SWD for debug and Connecting UART port for standalone external ST-LINK.
Single Wire Interface Module (debug protocol for STM8 microcontrollers)
Serial Wire Debug
debug and test protocol, named from the Joint Test Action Group that developed it
Universal Asynchronous Receiver/Transmitter
Serial Peripheral Interface
Controller Area Network (robust bus mainly used for automotive applications)
spelling for older versions of STLink