Registered User mNo edit summary |
Registered User |
||
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
This article describes the ST-LINK hardware probes. | This article describes the ST-LINK hardware probes. | ||
Line 15: | Line 6: | ||
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. | 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. | ||
ST-LINK can support different debug protocols depending on ST-LINK hardware version and on its embedded firmware version: | |||
* SWIM: debug protocol for STM8 microcontrollers | * SWIM: debug protocol for STM8 microcontrollers | ||
* SWD/JTAG: debug protocol for STM32 microcontrollers and microprocessors | * SWD/JTAG: debug protocol for STM32 microcontrollers and microprocessors | ||
Line 26: | Line 17: | ||
== Hardware versions == | == Hardware versions == | ||
Several versions of ST-LINK | Several versions of ST-LINK exist: 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 | For details about the different versions, please refer to technical note<ref>https://www.st.com/resource/en/technical_note/dm00290229.pdf</ref> of ST-LINK derivatives. | ||
To | To find out the ST-LINK version that is embedded in your ST board, refer to the [[:Category:STM32 MPU boards]] page, and then select your hardware board. | ||
== Getting started == | == Getting started == | ||
=== Installing USB driver === | === Installing the USB driver === | ||
Two USB drivers are associated to ST-LINK, depending of ST-LINK version: one for the debugger itself, and one for the serial communication port from ({{highlight|''ST-LINK/V2-1''}}).<br/> | |||
The serial communication port uses standard CDC ACM USB Class, which is usually present by default on all PC operating systems. | |||
The USB driver for the debugger can differ depending of the PC operating system: | |||
* '''MS Windows®''' | * '''MS Windows®''' | ||
A driver must be installed before connecting ST-LINK to a Windows® 7, Windows 8, or Windows® 10 PC via the USB. | A driver must be installed before connecting ST-LINK to a Windows® 7, Windows® 7 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 driver is automatically installed by the toolsets supporting ST-LINK. It is also available from www.st.com <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®''' | * '''Linux®''' | ||
Users must be granted with rights for accessing | Users must be granted with rights for accessing ST-Link USB devices. Rules must then be added 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 | 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 available from www.st.com (see ''stsw-link007\AllPlatforms\StlinkRulesFilesForLinux\Readme.txt'' file). | ||
* '''Mac OS®''' | * '''Mac OS®''' | ||
No specific | No specific installation is required. | ||
=== Connecting JTAG/SWD for | === Connecting JTAG/SWD for debugging === | ||
* Embedded ST-LINK | * 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 | A JTAG/SWD link is available from the USB link provided by the ST-LINK. The USB device is mounted on the host PC and ready to be used. | ||
* Standalone ST-LINK | * Standalone ST-LINK | ||
Pins are available on the ST-LINK to connect the JTAG/SWD signals. | Pins are available on the ST-LINK to connect the JTAG/SWD signals. Refer to [[#Hardware versions|Hardware versions]] for connection details. | ||
:- '''JTAG''' | :- '''JTAG''': VCC, JTDI, JTMS, JCLK, JRCLK, JTDO, NRST and GDN signals must be connected to the JTAG/SWD connector. | ||
:- '''SWD''': | :- '''SWD''': VCC, SWCLK, SWDIO, NRST, SWO and GND signals must be connected to the JTAG/SWD connector (on some ST-LINK hardware version, a dedicated SWD port can also be available). | ||
=== Connecting UART port (from {{highlight|''ST-LINK/V2-1''}}) === | === Connecting UART port (from {{highlight|''ST-LINK/V2-1''}}) === | ||
* Embedded ST-LINK | * 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 | A UART serial port is available from the USB link provided by the ST-LINK. The USB device is mounted on the host PC and ready to be used. | ||
* Standalone ST-LINK | * Standalone ST-LINK | ||
Pins are available on the ST-LINK to connect the Rx/Tx and GND signals. | Pins are available on the ST-LINK to connect the Rx/Tx and GND signals. Refer to [[#Hardware versions|Hardware versions]] for connection details. | ||
== To go further == | == To go further == | ||
=== Updating embedded firmware === | === Updating the embedded firmware === | ||
All information given in the STSW-LINK007<ref name=stswlink007/> software package | All information are given in the STSW-LINK007<ref name=stswlink007/> software package available from www.st.com. | ||
{{Warning|The firmware update application embeds the latest | {{Warning|The firmware update application embeds the latest firmware version, so do not hesitate to get the latest version of the executable STSW-LINK007<ref name=stswlink007/> software package}} | ||
=== How to bypass embedded ST-LINK === | === How to bypass the embedded ST-LINK === | ||
To use a newest version of ST-LINK standalone probe or another debug probe, ST-LINK can be bypassed for ST boards that already embed it. | |||
* | * Deactivating the embedded ST-LINK | ||
Please refer to the board description and schematic | Please refer to the board description and schematic for how to put the embedded ST-LINK in reset mode if available. | ||
* | * Bypassing the embedded ST-LINK signals and connecting an external hardware probe | ||
Connect the relevant signals depending on the interface available on the new hardware probe. 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 == | ||
<references /> | <references /> | ||
<noinclude> | |||
{{PublicationRequestId | 14368| AnneJ| 2019-12-10}} | |||
[[Category:HW probes]] | |||
</noinclude> |
Latest revision as of 14:53, 12 December 2019
This article describes the ST-LINK hardware probes.
1. Introduction[edit source]
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.
ST-LINK can support different debug protocols depending on ST-LINK hardware version and on its embedded firmware version:
- 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 source]
Several versions of ST-LINK exist: 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 the different versions, please refer to technical note[4] of ST-LINK derivatives.
To find out the ST-LINK version that is embedded in your ST board, refer to the Category:STM32 MPU boards page, and then select your hardware board.
3. Getting started[edit source]
3.1. Installing the USB driver[edit source]
Two USB drivers are associated to ST-LINK, depending of ST-LINK version: one for the debugger itself, and one for the serial communication port from (ST-LINK/V2-1).
The serial communication port uses standard CDC ACM USB Class, which is usually present by default on all PC operating systems.
The USB driver for the debugger can differ depending of the PC operating system:
- MS Windows®
A driver must be installed before connecting ST-LINK to a Windows® 7, Windows® 7 8, or Windows® 10 PC via the USB.
The driver is automatically installed by the toolsets supporting ST-LINK. It is also available from www.st.com [5].
- Linux®
Users must be granted with rights for accessing ST-Link USB devices. Rules must then be added into /etc/udev/rules.d.
All information and files for installing the udev rules are provided in the STSW-LINK007[6] package available from www.st.com (see stsw-link007\AllPlatforms\StlinkRulesFilesForLinux\Readme.txt file).
- Mac OS®
No specific installation is required.
3.2. Connecting JTAG/SWD for debugging[edit source]
- Embedded ST-LINK
A JTAG/SWD link is available from the USB link provided by the ST-LINK. The 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. Refer to Hardware versions for connection details.
- - JTAG: VCC, JTDI, JTMS, JCLK, JRCLK, JTDO, NRST and GDN signals must be connected to the JTAG/SWD connector.
- - SWD: VCC, SWCLK, SWDIO, NRST, SWO and GND signals must be connected to the JTAG/SWD connector (on some ST-LINK hardware version, a dedicated SWD port can also be available).
3.3. Connecting UART port (from ST-LINK/V2-1)[edit source]
- Embedded ST-LINK
A UART serial port is available from the USB link provided by the ST-LINK. The 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. Refer to Hardware versions for connection details.
4. To go further[edit source]
4.1. Updating the embedded firmware[edit source]
All information are given in the STSW-LINK007[6] software package available from www.st.com.
4.2. How to bypass the embedded ST-LINK[edit source]
To use a newest version of ST-LINK standalone probe or another debug probe, ST-LINK can be bypassed for ST boards that already embed it.
- Deactivating the embedded ST-LINK
Please refer to the board description and schematic for how to put the embedded ST-LINK in reset mode if available.
- Bypassing the embedded ST-LINK signals and connecting an external hardware probe
Connect the relevant signals depending on the interface available on the new hardware probe. Please refer to Connecting JTAG/SWD for debug and Connecting UART port for standalone external ST-LINK.
5. References[edit source]
- ↑ Jump up to: 1.0 1.1 https://www.st.com/en/development-tools/st-link.html
- ↑ https://www.st.com/en/development-tools/st-link-v2.html
- ↑ https://www.st.com/en/development-tools/stlink-v3set.html
- ↑ https://www.st.com/resource/en/technical_note/dm00290229.pdf
- ↑ https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-utilities/stsw-link009.html
- ↑ Jump up to: 6.0 6.1 6.2 https://my.st.com/content/my_st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stsw-link007.html