Skip to main content
Visitor II
May 25, 2021
Solved

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

  • May 25, 2021
  • 38 replies
  • 20972 views

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.

    This topic has been closed for replies.
    Best answer by LaurentL

    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.

    38 replies

    ST Employee
    May 26, 2021

    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.1Author
    Visitor II
    May 26, 2021

    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 

    LaurentLAnswer
    ST Employee
    May 26, 2021

    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.

    NKann.1Author
    Visitor II
    May 26, 2021

    I selected "Software Reset system"and run with JTAG

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

    NKann.1Author
    Visitor II
    May 26, 2021

    using JTAG i am getting this0693W00000APqmHQAT.jpg

    NKann.1Author
    Visitor II
    May 26, 2021

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

    NKann.1Author
    Visitor II
    May 26, 2021

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

    ans- i did it succesfully.

    ST Employee
    May 26, 2021

    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.

    NKann.1Author
    Visitor II
    May 26, 2021

    i tried with open ocd and  click on "show generator options" to select the "Software system reset".

    now i am getting this error bellow0693W00000APrRoQAL.jpg0693W00000APrNJQA1.jpg

    ST Employee
    May 26, 2021

    Can you try on an empty project to be sure that the code is ok.

    Mass erase the device before debug.

    Can you add "-d" in Openocd Options and attach the console log text to see why you have the "auto_probe failed".

    Which device did you select in the project ?

    And which device you have exactly ?

    STM32H7B0VBT6 with a Q letter at the end ? or no letter ?

    If you have the Q letter, it is a SMPS device and power supply is different from a normal device.

    So the application schematic must reflect the part number on supplies.

    Also on Cube project, select the right device.

    NKann.1Author
    Visitor II
    May 26, 2021

    with SWD and internal clock even after the message "Debugger connection lost....shutting down " i am able to get some signal on my oscilloscope.

    this code is for toggling LED.

    but i am not able to operate it with JTAG.

    0693W00000APrjYQAT.jpg