cancel
Showing results for 
Search instead for 
Did you mean: 

Error in Initializing ST-Link device

rajan2
Associate II
Posted on September 27, 2011 at 05:06

Hi, 

Just started playing around with my STM32 discovery board, and had a problem right away. I'm using atollic trueStudio IDE and trying to load a demo project(the one in firmware package), to my microcontroller. The thing is everytime I hit debug button It shows this in console:

Starting server with the following options: 

        Persistant Mode            : Disabled 

        LogFile Name               : debug_log.txt

        Logging Level              : 1

        Listen Port Number         : 61234

        Status Refresh Delay       : 15s

        Verbose Mode               : Disabled 

        SWD Debug                  : Enabled 

Error in Initializing ST-Link device

I spent entire day searching web, if I could find a solution but no success yet. I found this page(

http://www.atollic.com/index.php/kb/3-debugging/28-kb_st_link_connection_error

) on atollic website, have followed the steps but still no luck. So these are the things which I have already tried:

- checked USB cable

- tried running ST-LINK GDB server, same error

- checked the driver installation, and updated to latest version

- no disk letter issue, st link is using G: and it is vacant

I have followed the user manual steps exactly still unsure what's wrong with my board. Any help appreciated.

#debugging #st-link-gdbserver #driver
16 REPLIES 16
rouxel
Associate II
Posted on June 06, 2012 at 15:35

Hello,

I have the same problem and i didn't find a solution, can somebody help me ?

Florent

frankmeyer9
Associate II
Posted on June 06, 2012 at 16:08

You might have not yet installed the ST-Link USB driver.

The discovery boards have one integrated, either the old version V1 (VL_Discovery), or the new version (V2, all later boards).

Usually, a ''new hardware detected'' window pops up under Windows. Just follow it (automatic installation, no access to internet required).

This drivers can also be found here:

http://www.st.com/internet/evalboard/product/251168.jsp

(down at the page, under ''SW DRIVERS''

rouxel
Associate II
Posted on June 06, 2012 at 16:24

Thank you your response, but i don't think the driver is the problem.

 Unlike the original poster, I already ran programs on the board.While I was manipulating a DB9 connector for RS232 connection, I got a bluescreen on my computer. And since that day, the same error pop-ups everytime I try to launch a debug session :

http://image.noelshack.com/fichiers/2012/23/1338825285-cc.png

frankmeyer9
Associate II
Posted on June 06, 2012 at 16:46

Bluescreens are sometimes refered to as BSOD...

Your Windows Registry might got corrupted or partially wiped out.

I would completely remove the driver in the hardware manager, and reinstall it.

I hope you have a backup. Perhaps you are lucky, but expect more maladies.

frankmeyer9
Associate II
Posted on June 06, 2012 at 16:51

Addendum:

If you had this RS232 on a USB/RS232 adapter, you might have damaged that USB chip in your PC physically.

Often there are more than one USB host adapters in a PC. Can you try a USB port on another driver chip ?

rouxel
Associate II
Posted on June 06, 2012 at 17:05

I tried other usb port nothing new. I even try to run the same program with an other PC and an other board, but i got the same error... If it is an error related to the code, I don't understand why, when I create a new project, I get the same problem.

Posted on June 06, 2012 at 18:34

If the code programmed on the STM32 is non conducive to SWD connectivity, try pulling BOOT0 High, and restart the board so it enters system loader mode.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
frankmeyer9
Associate II
Posted on June 06, 2012 at 19:56

''Error in Initializing ST-Link device

'' points to a problem with the stlink debug adapter, which is the bridge to your application, so to speak. If the host can't find the stlink, you don't have a chance to flash/debug your application.

rouxel
Associate II
Posted on June 07, 2012 at 16:05

Thank you, I pulled BOOT0 high, it works with my coworker's board, but for me, a new error appears :

http://www.noelshack.com/2012-23-1339077525-cc2.png

If nothing get better, I'll replace the board.