Skip to main content
Visitor II
August 26, 2019
Solved

Error in initializing ST-LINK device.

  • August 26, 2019
  • 3 replies
  • 1365 views

I am getting error in initializing ST-Link device like below

Error in initializing ST-LINK device.

Reason: (255) Unknown. Please check power and cabling to target.

Error in initializing ST-LINK device.

Reason: (255) Unknown. Please check power and cabling to target.

when I trying to connect under reset which could be solved problem

It downloads codes successfully but when i run program it gives me below error

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Error! Failed to read target status 

Debugger connection lost.

Shutting down...

Please help me to solve out this problem

Best Regards

Dipak Garasiya

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

    Thanks for replying, both of you

    I have solved out this problem from suggetions of both of you

    Thanks again

    3 replies

    Visitor II
    August 26, 2019

    I faced same problem in last month when I was working on STM32L4R5 controller. The checkpoints for this kind of problem as follows

    1. check hardware connections of debug pins, if there is any short in these pins then debugger voltage drops abruptly when accessing other GPIO pin and above error is displayed on screen.
    2. check power to core, slight fluctuations in core voltage may result with this kind of error.

    In my case, problem 1 was the reason behind this error which is removed by simply removing short circuit between debugger pin and GPIO pin used for toggling status.

    Graduate II
    August 26, 2019

    Custom hardware? What STM32 part, specifically?

    Reprogramming or disabling pins associated with JTAG/SWD connectivity?

    Try with main() just having a while(1) loop and NOTHING else. Enable other code one line at a time until problem occurs.

    dbgarasiyaAuthorAnswer
    Visitor II
    August 27, 2019

    Thanks for replying, both of you

    I have solved out this problem from suggetions of both of you

    Thanks again