Difference between revisions of "ST-LINK"

[quality revision] [pending revision]
m (Replaced content with "<noinclude> {{ArticleMainWriter | Jean-PhilippeR}} {{ArticleApprovedVersion | Jean-ChristopheT | Nobody | No previous approved version | Automatic approval (article under...")
(Tag: Replaced)
m
 
Under construction.png Coming soon

This article describes the ST-LINK hardware probes.

1 Introduction[edit]

The ST-LINK[1] 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:

  • UART
  • I2C
  • SPI
  • CAN
  • GPIO

2 Hardware versions[edit]

Several versions of ST-LINK exists: ST-LINK/V1[1], ST-LINK/V2[2], ST-LINK/V2-A, ST-LINK/V2-B, ST-LINK/V2-1 and STLINK-V3SET[3].

For details about different versions , please refer to the technical note[4] 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[edit]

3.1 Installing USB driver[edit]

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[5].

  • Linux®

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[6] 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[edit]

  • 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)[edit]

  • 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[edit]

4.1 Updating embedded firmware[edit]

All information given in the STSW-LINK007[6] software package in st.com.

Warning.png The firmware update application embeds the latest FW version, so do not hesitate to get latest version of the executable STSW-LINK007[6] software package

4.2 How to bypass embedded ST-LINK[edit]

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.

5 References[edit]



<noinclude>

{{ArticleMainWriter | Jean-PhilippeR}}
{{ArticleApprovedVersion | Jean-ChristopheT | Nobody | No previous approved version | Automatic approval (article under construction) | 19Feb’19This article describes the ST-LINK hardware probes.

== Introduction ==
The '''ST-LINK'''<ref name=stlink>https://www.st.com/en/development-tools/st-link.html</ref> 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:
* UART
* I2C
* SPI
* CAN
* GPIO

== Hardware versions ==
Several versions of ST-LINK exists: ST-LINK/V1<ref name=stlink/>, ST-LINK/V2<ref>https://www.st.com/en/development-tools/st-link-v2.html</ref>, ST-LINK/V2-A, ST-LINK/V2-B, ST-LINK/V2-1 and STLINK-V3SET<ref>https://www.st.com/en/development-tools/stlink-v3set.html</ref>.

For details about different versions , please refer to the technical note<ref>https://www.st.com/resource/en/technical_note/dm00290229.pdf</ref> 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.

== Getting started ==
=== 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 ({{highlight|''ST-LINK/V2-1''}}).<br/>

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&reg;'''

A driver must be installed before connecting ST-LINK to a Windows&reg; 7, Windows 8, or Windows&reg; 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<ref>https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-utilities/stsw-link009.html</ref>.

* '''Linux&reg;'''
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'''<ref name=stswlink007>https://my.st.com/content/my_st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stsw-link007.html</ref> package in st.com (see ''stsw-link007\AllPlatforms\StlinkRulesFilesForLinux\Readme.txt'' file).

* '''Mac OS&reg;'''
No specific install is required.

=== 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|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.

=== Connecting UART port (from {{highlight|''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|Hardware versions]] to check for the connection details.

== To go further ==

=== Updating embedded firmware ===
All information given in the STSW-LINK007<ref name=stswlink007/> software package in st.com.
{{Warning|The firmware update application embeds the latest FW version, so do not hesitate to get latest version of the executable STSW-LINK007<ref name=stswlink007/> software package}}

=== 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|Connecting JTAG/SWD for debug]] and [[#Connecting UART port (from ST-LINK/V2-1)|Connecting UART port]] for standalone external ST-LINK.

== References ==<references />

<noinclude>

{{PublicationRequestId | Auto}}
[[Category:HW probes]]</noinclude>

{{UnderConstruction}}
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  +
This article describes the ST-LINK hardware probes.
  +
  +
== Introduction ==
  +
The '''ST-LINK'''<ref name=stlink>https://www.st.com/en/development-tools/st-link.html</ref> 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:
  +
* UART
  +
* I2C
  +
* SPI
  +
* CAN
  +
* GPIO
  +
  +
== Hardware versions ==
  +
Several versions of ST-LINK exists: ST-LINK/V1<ref name=stlink/>, ST-LINK/V2<ref>https://www.st.com/en/development-tools/st-link-v2.html</ref>, ST-LINK/V2-A, ST-LINK/V2-B, ST-LINK/V2-1 and STLINK-V3SET<ref>https://www.st.com/en/development-tools/stlink-v3set.html</ref>.
  +
  +
For details about different versions , please refer to the technical note<ref>https://www.st.com/resource/en/technical_note/dm00290229.pdf</ref> 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.
  +
  +
== Getting started ==
  +
=== 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 ({{highlight|''ST-LINK/V2-1''}}).<br/>
  +
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&reg;'''
  +
  +
A driver must be installed before connecting ST-LINK to a Windows&reg; 7, Windows 8, or Windows&reg; 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<ref>https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-utilities/stsw-link009.html</ref>.
  +
  +
* '''Linux&reg;'''
  +
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'''<ref name=stswlink007>https://my.st.com/content/my_st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stsw-link007.html</ref> package in st.com (see ''stsw-link007\AllPlatforms\StlinkRulesFilesForLinux\Readme.txt'' file).
  +
  +
* '''Mac OS&reg;'''
  +
No specific install is required.
  +
  +
=== 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|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.
  +
  +
=== Connecting UART port (from {{highlight|''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|Hardware versions]] to check for the connection details.
  +
  +
== To go further ==
  +
  +
=== Updating embedded firmware ===
  +
All information given in the STSW-LINK007<ref name=stswlink007/> software package in st.com.
  +
{{Warning|The firmware update application embeds the latest FW version, so do not hesitate to get latest version of the executable STSW-LINK007<ref name=stswlink007/> software package}}
  +
  +
=== 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|Connecting JTAG/SWD for debug]] and [[#Connecting UART port (from ST-LINK/V2-1)|Connecting UART port]] for standalone external ST-LINK.
  +
  +
== References ==
  +
<references />
  +
 
<noinclude>
 
<noinclude>
{{ArticleMainWriter | Jean-PhilippeR}}
+
{{PublicationRequestId | Auto}}
{{ArticleApprovedVersion | Jean-ChristopheT | Nobody | No previous approved version | Automatic approval (article under construction) | 19Feb’19}}
 
 
[[Category:HW probes]]
 
[[Category:HW probes]]
 
</noinclude>
 
</noinclude>
{{UnderConstruction}}
 

Attachments

Discussions