cancel
Showing results for 
Search instead for 
Did you mean: 

ST-LINK error (DEV_CONNECT_ERR)

LQC_
Associate III

LQC__0-1747875827586.png

你好,你是否解决了这个问题?

1 ACCEPTED SOLUTION

Accepted Solutions
llcc
Associate III

I have now resolved this issue. After encountering the error, I followed the method described in the link below. After the build succeeded, I set both Boot1 and Boot2 to the left position, switched the Type-C connection from the ST-LINK_V3EC port to the USB1 port, and connected the jumper to 5V-USB_SNK. Then, I powered on the board, and it worked successfully.https://community.st.com/t5/edge-ai/stm32n6570-dk-model-zoo-delpoyment-error/m-p/784139#M4163 

llcc_0-1747921980841.jpeg

 

View solution in original post

5 REPLIES 5
LQC_
Associate III

LQC__0-1747819265629.png

Hello
When executing the script to prepare for burning, an error occurred. The message prompted that my boot position might be wrong, but my Boot0 0 (left), Boot1 1 (right), is this correct? I tried many times but it still didn't work. I thought it was insufficient power supply at first, but I used 5V-USB_SNK and a 5V power adapter for power supply, and it still didn't work. Can you give me an answer?

[Board programming failed: "ST-LINK error (DEV_CONNECT_ERR)"]

llcc
Associate III

llcc_0-1747836326152.png

Hello,I encountered the same problem as you.

Hello @LQC_ , @llcc ,

 

I moved your messages to a new thread as it was unrelated with the other error.

First, please make sure to use a USBC to USB C cable.

 

I did some research and here is what I found:

 

First Possible solution: 

debugging - ST-LINK error on STM32CubeProgrammer: Problem occurred while trying to connect - Stack Overflow

I know this is an old question, but I had a similar problem, and I wasted 2 hrs solving it on Linux...

There are 2 potential causes for this:

  • Problem with a physical connection
  • Missing udev rule

Udev rule

What I found is that STM32CubeProgrammer is not adding the udev rules necessary for the controller...

From this post: https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer#Preparing_the_USB_serial_link_for_flashing

#Install libusb 
sudo apt-get install libusb-1.0-0  #For debian distributions

#Get udev rules from the STMCube
cd <your STM32CubeProgrammer install directory>/Drivers/rules
sudo cp *.* /etc/udev/rules.d/

#reload udev rules
sudo udevadm control --reload-rules

This worked for me on STM32CubeProgrammer 2.8.0 under Ubuntu 20.04, I hope it helps someone.

 

 

Second Possible Solution:

STM32 & ST-LINK - Cannot connect to MCU after successful programming - Electrical Engineering Stack Exchange

I managed to solve that problem. If anybody encounters similar problem, here's what I've done:

I used ST-Link v2 and ST-Link Utility. In setting, I set "Connect under reset" and SWD interface (I'm not sure about frequency).
Then I press the reset button on my board and clicked "Target" -> "Erase chip" and just after clicking I released the button - It erased the chip so I can now reprogram my MCU.

Anyway, if you need to use SWD pins as output, then add some delay at the beginning of the program or use some jumper to disable/enable setting these pins as outputs.

 

 

Community solution in related threads:

Solved: Can't connect to the MCU via STLinkV2 [ST-LINK err... - STMicroelectronics Community

Solved: Error connecting with ST-LINK in Linux - STMicroelectronics Community

 

 

Let me know if any of this helped you.

 

Have a good day,

Julian


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
llcc
Associate III

I have now resolved this issue. After encountering the error, I followed the method described in the link below. After the build succeeded, I set both Boot1 and Boot2 to the left position, switched the Type-C connection from the ST-LINK_V3EC port to the USB1 port, and connected the jumper to 5V-USB_SNK. Then, I powered on the board, and it worked successfully.https://community.st.com/t5/edge-ai/stm32n6570-dk-model-zoo-delpoyment-error/m-p/784139#M4163 

llcc_0-1747921980841.jpeg

 

Thanks for the update

Julian


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.