cancel
Showing results for 
Search instead for 
Did you mean: 

No ST-LINK detected! Please connect ST-LINK and restart the debug session. Please help me. I am user.

NKann.1
Associate III

I am using STM32CubeIDE for my project . when i want to run the code i am getting this pop up.i am not able to solve this issue.

45 REPLIES 45
NKann.1
Associate III

problem was the USB cable.

Now it is resolved.

Now new error is coming0693W00000APpebQAD.jpg.

LaurentL
ST Employee

Ok, then this time it's maybe a fault in wiring or on your custom appli board.

Why can't you try in SWD mode ?

All the pins that are needed to do JTAG are ok for SWD.

Check all the VDD (VCAP if any) and the Analog supplies and Gnd.

Did you connect the STLink reset pin to NRST pin of device ?

Check with STM32CubeProgrammer if you can detect the Mcu.

Don't let the STM32CubeProgrammer connected if you want to retry debug with STM32CubeIDe.

What is your mcu device VDD value ?

STLink V3 Set has not the level shifters so if your appli board is not powered at 3.3V, it might be an issue.

Do you power the appli board with an external supply ?

I don't think the STLink V3 can supply your board.

Can you share the stlink connections ?

mattias norlander
ST Employee

Which MCU?

Is it possible that the PWR regulator has been configured incorrectly so that the MCU is not powered. That would lead to "Target unknown MCU target"

Try to measure some GPIO output pin that you now should produce a signal when your app is running without debugger. Does it produce the expected signal or is the MCU not powered at all?

NKann.1
Associate III

Q) Why can't you try in SWD mode ?

ans- yes ,its working, but after running it showing connection lost

Q) Did you connect the STLink reset pin to NRST pin of device ?

ans- i think no, i have attached schematic(screenshot as well as pdf)

Q)What is your mcu device VDD value ?

ans- 3.3 V

Q) Do you power the appli board with an external supply ?

ans- yes

Q) Can you share the stlink connections ?

ans -yes

0693W00000APqATQA1.jpg0693W00000APqDgQAL.jpg0693W00000APq7hQAD.jpg 

LaurentL
ST Employee

OK, you didn't connect the Reset pin.

If you can add the connection, it's better.

Then, without reset coming from STLink, you should avoid "Connect under reset" mode in debugger tab in debug config.

Like you did on STM32CubeProgrammer, use "Software Reset system".

Try to mass erase the device with STM32CubeProgrammer before debug.

I selected "Software Reset system"and run with JTAG

it showing "connection lost" before running.0693W00000APqhvQAD.jpg0693W00000APqhlQAD.jpg0693W00000APqfMQAT.jpg

NKann.1
Associate III

using JTAG i am getting this0693W00000APqmHQAT.jpg

NKann.1
Associate III

is 22 ohm resistor(in JTAG connector in schematic) causing any problem?

NKann.1
Associate III

Q) Try to mass erase the device with STM32CubeProgrammer before debug.

ans- i did it succesfully.

LaurentL
ST Employee

I don't think the 22 ohm is a problem.

But you can lower the STLink freq (instead of "auto", choose 8 MHz or lower).

Can you try with Openocd.

In the debugger tab, choose Openocd debug server.

Then, click on "show generator options" to select the "Software system reset".

Maybe try also an empty project. Not a Cube project.