Skip to main content
Visitor II
May 6, 2025
Solved

No device found on target. After some succesfull uploads

  • May 6, 2025
  • 1 reply
  • 615 views

Hi,

I am working with a custom board with the STM32L431CCU6 mcu. The bord consist of the mcu and 2 i2c units and one SPI.

assjo_1-1746535632587.png

The board also has pin headers for BOOT0, SWDIO and SWCLK.

assjo_2-1746537392875.png

Sory for paint...

 

I am using the CubeIDE and a ST-LINK V2for programming the board and have successfully programed Blink on it. This was not problem free however since my coputer sometimes did not recognised the ST-LINK and sometimes failed to upload. Unfortuanatli I do not remember those errors in details.

After succesfully uploading a program for i2c communication I could not program the board any more. The error i receive from the IDE is:

STMicroelectronics ST-LINK GDB server. Version 7.9.0
Copyright (c) 2024, STMicroelectronics. All rights reserved.

Starting server with the following options:
 Persistent Mode : Disabled
 Logging Level : 1
 Listen Port Number : 61234
 Status Refresh Delay : 15s
 Verbose Mode : Disabled
 SWD Debug : Enabled
 InitWhile : Enabled

Target no device found

Error in initializing ST-LINK device.
Reason: No device found on target.

 

After a while of plugging the link in and out and trying to press boot and desperatly trying whatever I could, I tried a second board. This was a new board with a new ship but same problem. I tried using the ST-LINK of a NUCLEO board, same problem. Different computer, same problem. Cube programmer, same problem(? different errormessage: Error: Unable to get core ID,  Error: No STM32 target found!) I am all out of ideas and no other post seems to solve my problem. Any ideas?

 

 

    This topic has been closed for replies.
    Best answer by Andrew Neil

    First, is it a genuine ST-Link?

    https://community.st.com/t5/stm32-mcus/how-to-recognize-a-genuine-st-link-v2-versus-a-cloned-one/ta-p/49471 

     

    Note that breadboards are notoriously prone to unreliable connections - which can certainly mess-up your debugger connection.

    Rather than route NRST via a breadboard, let the ST-Link control it and use connect under hardware reset.

     


    @assjo wrote:

    my coputer sometimes did not recognised the ST-LINK 


    You mean the ST-Link didn't even appear in Device Manager (or equivalent).

    That suggests a USB connection problem between the computer & the ST-Link.

     

    On resolving debugger connection issues:

    https://community.st.com/t5/stm32-mcus/how-to-solve-connection-errors-when-connecting-and-programming/tac-p/786977

    https://community.st.com/t5/stm32-mcus/how-to-solve-debugger-connection-issues/ta-p/49693

     

    1 reply

    Super User
    May 6, 2025

    First, is it a genuine ST-Link?

    https://community.st.com/t5/stm32-mcus/how-to-recognize-a-genuine-st-link-v2-versus-a-cloned-one/ta-p/49471 

     

    Note that breadboards are notoriously prone to unreliable connections - which can certainly mess-up your debugger connection.

    Rather than route NRST via a breadboard, let the ST-Link control it and use connect under hardware reset.

     


    @assjo wrote:

    my coputer sometimes did not recognised the ST-LINK 


    You mean the ST-Link didn't even appear in Device Manager (or equivalent).

    That suggests a USB connection problem between the computer & the ST-Link.

     

    On resolving debugger connection issues:

    https://community.st.com/t5/stm32-mcus/how-to-solve-connection-errors-when-connecting-and-programming/tac-p/786977

    https://community.st.com/t5/stm32-mcus/how-to-solve-debugger-connection-issues/ta-p/49693

     

    assjoAuthor
    Visitor II
    May 6, 2025

    Thanks! This was the solution!

    Firstly I connected the NRST directly to the ST-LINK, but then a new error occured. Unable to erase memory. Someone recomended changing all the cables incase any was broken or damaged and since then programming has worked without any problem.

    (The ST-Link did appere in the device manager but the IDE could not see it or someting like that.)