cancel
Showing results for 
Search instead for 
Did you mean: 

ST Link Communication Error on STM32F411

Kieron Holt
Associate II
Posted on April 25, 2018 at 15:10

I have an STM32F411 on a PCB and I tried to connect it to the ST link using STM32 ST-Link Utility app but I get the error Cannot connect to target! Please select 'Connect Under Reset' mode from Target->Settings menu. If you are trying to connect to a discovery board, please select SWD mode from 

Target->Settings menu.' But there is no  'Connect Under Reset' mode in that menu (and the SWD mode is greyed out). In firmware version, it just says USB communication error. I have tried connecting with reset on, cycling reset, pressing the full chip erase button while reset is on then turning reset off. Nothing changes except now the error is just USB communication error. 

I then tried connecting it instead to a Nucleo-F411RE board and the same thing happened.

Any help would be great

thankyou

#st-link-v2 #st-link #nucleo-f411 #stm32-f4 #st-link-connector #st-linkv2 #stm-mcu
7 REPLIES 7
Kieron Holt
Associate II
Posted on April 25, 2018 at 15:32

Some extra information: When I first connect the board the settings menu works fine with the serial number ect but then it says Old ST-Link Firmware/ST link already used but the firmware update just gives me a communication error notification. 'Communication error with ST-link. Try to start it'

Kieron Holt
Associate II
Posted on April 25, 2018 at 15:39

It is at on firmware V2.J29.S7 (most up to date) also

Utility version: 4.2.0.0

ST link driver.dll: 5.0.3.0

ST-LINK_CLI.exe: 3.2.0.0

Posted on April 25, 2018 at 17:38

Suggests something else is using it, or not in an appropriate mode to update. Unplug and replug, and do update without 'Connecting' in the ST-LINK via the Utilities. ie go straight to Firmware Update, plug in board, or reset board until it sees it. Might be a lag as different driver is required in update mode.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on April 25, 2018 at 17:44

Something else? Is using the state link or the MCU? Nothing is using either and yes I can update the firmware to the latest wersver if I go straight to the firmware updater but that hasn't made a difference. The board has been reset many times it changes nothing.

Posted on April 25, 2018 at 19:31

Problems with ST-LINK, make sure you have a high quality cable.

Problems connecting with the Target, look at what your code is doing, reprogramming SWD/JTAG, low power modes, WFI, DMA, etc. If you can always connect successfully with BOOT0=High then something specifically in your code makes it difficult for debugger to wrestle control.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on April 25, 2018 at 19:48

Thank you for replying. But I am not connecting any code to it just simply trying to establish a connection to it. I am using the STM32 Cube Programmer and just plugging it in and pressing connect. Also fails on the SMT32 ST-Link Utility App. 

Posted on April 25, 2018 at 20:26

>>

USB communication error

So think about cables, hub, specific port being used. Consider trying with different cable, on different port, on different computer and determine if the error follows.

If you want to give the ST support guys something to work with, describe make/model of computer, version of windows, or any other information that might help to diagnose the situation.

Connectivity to the target is impacted by code currently running on the target, strapping BOOT0 high means ROM code will be running, considered a safe-harbour from which to connect.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..