St link usb communication error

I have a custom PCB (based heavily on the Nucleo board) using the STM32F767II. I am using Atollic TrueStudio on Windows 10 and programming it through the ST-LINK on the Nucleo board (header CN6). I have set all the jumpers and connected my PCB to the Nucleo.

I was testing some minor firmware changes and re-programming the board three or four times successfully before I suddenly just got the error "USB communication error". I have double-checked that my wiring is the same as on the previous successful times. I get this error in Atollic TrueStudio and when I try to connect to the board from ST-LINK Utility.

To my knowledge I followed the same procedure for programming the board on all my attempts, so I am confused as to why it suddenly fails now. Are there debug settings or configurations in Atollic TrueStudio that could prevent me from being able to reprogram a chip? Is it possible to recover the chip?

I am also powering my board separately from the programming interface, so would it matter if I connect the Nucleo to the board before I power the board? Could I damage it by doing that?

Information in this knowledgebase article applies to:

  • MDK-ARM Version 5
  • ST-LINK with firmware

QUESTION

Using a ST-Link with MDK, when starting a debug session or a flash downloading, µVision issues the following error:

What’s the reason for this error and how do you troubleshoot it?

ANSWER

If you are using a recent version of MDK.

download, install, and open the ST-Link Utility. Configure it and program the device.

If unsuccessful, this test shows that either the board, the jumper configuration, the windows drivers, the board firmware or the USB interface has an issue.

CHECK THE WINDOWS DEVICE MANAGER

Windows device manager should show under the Universal Serial Bus devices section a STM32 STLINK.

There is a low level issue if, this entry is missing, there is a "caution" symbol on the USB icon, or there is an entry under the Universal Serial Bus controllers section labeled USB Composite device with a "caution" icon.

Читайте также:  Ora 00907 отсутствует правая скобка

CHECK THE USB SETTINGS

  • 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. If using a Hub, try connecting directly to the PC.
  • Try using another USB cable.
  • Make sure that the Microsoft Windows Device Manager recognizes the ST-Link. If it is having issues, check the power settings as described in their help article Error: “USB Device not recognized” when you try to access a USB external hard drive.

CHECK THE ST-LINK DRIVERS AND FIRMWARE

  • Upgrade to the latest version of MDK. New releases contain a more recent version of the ST-Link drivers. Improvements and fixes are added over time to stabilize debug connections.
  • In other cases, upgrading the ST-Link firmware is the correct approach. On some ST-Link versions, multiple drivers are loaded, from the debug unit itself, when the ST-Link is first connected to a PC. Try the latest firmware and drivers from ST’s website, instead.
  • Uninstall and reinstall the ST Link driver on the PC, using Windows Device Manager. See the steps in the article µVision DEBUGGER: ST-Link Does Not Connect to STM32F4 Discovery Board

CHECK THE BOARD SETTINGS

  • If this is a board provided by STMicroelectronics, check the Boot jumpers on the board to make sure you are booting to the correct memory. Pull the BOOT (sometimes labeled BOOT0) pin high by jumpering it to the VDD pin, and restart the board. At reset, since BOOT is pulled high with 3V the device boots up in a different memory location. Perform a flash full chip flash erase.
  • If there is also the error message "Internal command error" a previous program running on the board is locking up.

In the Keil IDE, under Project-> Options for Target -> on the "Debug" tab, on the top right of the dialog, next the "USE: ST-Link Debugger, click the "Settings" button — the "Cortex-M Target Driver Setup" dialog appears. Try using "connect under reset", close the dialogs and then perform a flash erase.

Читайте также:  Win32 evo gen susp что это такое

FOR SYSTEMS RUNNING OLDER VERSIONS OF MDK

These are items that have already been fixed in modern versions of MDK.

If there is also the error message "Internal DLL Error" follow the steps in µVision DEBUGGER: Internal DLL Error Debugging with ST-Link Driver.

For MDK 5.11a or older.

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

  1. 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]ARMST-LINK
  2. Downgrade the firmware of the ST-LINK debug adapter:
    Start the tool [MDK install path]ARMSTLINKST-LinkUpgrade.exe to downgrade the ST-LINK firmware to V2.J20.S0
  • MDK V4.62a and older.
    If there is also the error message "Internal Command Error" follow the steps in µVision DEBUGGER: ST-Link Does Not Connect to STM32F4 Discovery Board.
  • For MDK 4.14 or older.
    If there is also the error message "memory verification error" follow the steps in µVision DEBUGGER: DEBUGGING WITH ST-LINK THROUGH A USB HUB.
  • MORE INFORMATION

    SEE ALSO

    • Microsoft help article Error: “USB Device not recognized” when you try to access a USB external hard drive.
    • µVision DEBUGGER: Not a genuine ST Device
    • Refer to µVision DEBUGGER: STM32F3-Discovery: Modifying the Board for SWO Trace

    ATTACHED FILES

    Request the files attached to this knowledgebase article.

    FORUM THREADS

    The following Discussion Forum threads may provide information related to this topic.

    All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.

    1 year, 6 months ago.

    st link usb communication error

    I am using the swd pins(cn6) of the nucleo f767zi . I am using the st link v2 dongle for programming the board ,I have download the drivers of the dongle from the link on the mbed platform . In device manager under the usb it is showing the st link but in the port section it is not showing that it is connected to com ports. In st link utility platform it is showing the that st link usb communication error and target not connected I also tried connecting the NRST pin from swd connector to gnd to remove it from its gpio function but the full chip errase is not taking place .

    Читайте также:  Noise filter что это

    1 Answer

    Wim Huiskamp
    1 year, 6 months ago.

    Not sure I understand what you are trying to do. Are you using an external ST-Link dongle/programmer instead of the nucleo onboard ST-Link programmer? In case you want to use an external programmer and connect it to CN6 make sure that the onboard ST-Link is disabled (remove the 2 jumpers next to CN6). Also note that the F767 com port to the host PC is not connected through CN6. External ST-Link dongles may not support that virtual com port over USB feature at all and if they do, you need separate wiring between the F767 and the dongle and you also need to disable the nucleo onboard ST-Link com port connection by changing some solderbridges.

    can u tell me how to remove solder joint sb111

    It is not clear to me what you are trying to do. Please explain and/or show a schematic setup. External programmers should best be connected to CN11 (SWCLK CN11 pin 15, SWDIO CN11 pin 13 and NRST CN11 pin 14, also connect GND and probably 3V3 target voltage). You must have seen the manual for the F767 nucleo. That should give you details on the function and location of all solder joints and the pins on the headers. Figure 5 in the manual shows where SB111 is (bottom side of the ST-Link part, near the cut line area).

    Rate this post

    Добавить комментарий

    Ваш адрес email не будет опубликован. Обязательные поля помечены *