cancel
Showing results for 
Search instead for 
Did you mean: 

Error in initializing ST-LINK device.

dbgarasiya
Senior II

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

1 ACCEPTED SOLUTION

Accepted Solutions
dbgarasiya
Senior II

Thanks for replying, both of you

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

Thanks again

View solution in original post

3 REPLIES 3
SShin.18
Associate II

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.

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.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
dbgarasiya
Senior II

Thanks for replying, both of you

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

Thanks again