Keil Logo

µVISION DEBUGGER: ST-LINK USB communication error

Information in this knowledgebase article applies to:

  • MDK-ARM Version 5.11a
  • ST-LINK with firmware version V2.J21.S0


I have installed MDK 5.11a and I am trying to debug my application on my ST-Discovery board with its on-board ST-LINK. When I start a debug session or a flash download in µVision I get the following error:

ST-Link Error: USB communication error

What's the reason for this error and how can I solve it?


There is an incompatibility between ST-Link Firmware version V2.J21.S0 and the µVision ST-Link Debugger driver (ST-LINKIII-KEIL_SWO.dll) version which is part of MDK-ARM 5.11a. There are two ways to solve this problem:

  • Update the µVision ST-Link Debug driver (recommended way):
    Download the ZIP file attached to this knowledgebase article and unzip it to the folder
    [MDK-ARM install path]\ARM\ST-LINK
  • Downgrade the firmware of the ST-LINK debug adapter:
    Start the tool [MDK install path]\ARM\STLINK\ST-LinkUpgrade.exe to downgrade the ST-LINK firmware to V2.J20.S0

This issue will be fixed in MDK-ARM versions higher than 5.11a.

Note: If you are using another version of MDK, consider the following options:

  • In several cases, upgrading the ST-Link firmware is the correct approach.
  • Separately use the ST-Link Utility to attempt to program the device. If successful, this test verifies that the board, the jumper configuration, and the USB cable are OK.
  • Verify that only one application is connected to the ST-Link at a time (ex. if both µVision and the ST-Link Utility try to use the ST-Link at the same time, this can cause connection issues).
  • Try using another USB port on the PC.
  • Upgrade to the latest version of MDK. New releases contain a more recent version of the file attachment below. Improvements and fixes are added over time to stabilize debug connections.



Request the files attached to this knowledgebase article.

Last Reviewed: Thursday, September 14, 2017

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.