cancel
Showing results for 
Search instead for 
Did you mean: 

''No ST-LINK detected'' when connecting with stm32f401RE board

Kristian Nielsen
Associate II
Posted on June 21, 2017 at 13:50

I have a nucleo stm32f401RE board and it has been working fine for the most part.

Here recently, I followed a tutorial in the book ''mastering stm32'', where it said to install openocd. I had been following along

before this as well, and I had been able to connect to my board and flashing it with no problem. After attempting to get openocd to work though, this is no longer possible. Every time i try to connect to my board, I simply get the following error message:

0690X00000607QFQAY.png

I have not been able to find a solution for this anywhere, so I hope you guys can help! If there is anymore relevant information needed, just let me know.

Thank you very much.

19 REPLIES 19
Posted on June 24, 2017 at 22:43

Hello Mike,

Thank you very much for your answer!

I have tried switching the cable, and i have tried unplugging/replugging the device, as well as switching USB-ports. I also tried it on another computer, and I actually got it working there, so it must be on my pc.

I terms of what I am using to learn this, here is a link to the book where the tutorial is written: 

https://drive.google.com/file/d/0B6oHi-5KGotGMmhQS192SjF1VjA/view

  (hope this works, else the book is called 'Mastering

STM32' as mentioned in the link). The pages where the tutorial for Windows (which

is what I am using) are from p. 51 to p. 63. I obviously don't expect you to read all those pages, but as mentioned, I am pretty sure the error occurs around the installation of OpenOCD, which is on page 148 to page 150.

If there is anymore information that could help, please let me know!

Posted on June 25, 2017 at 05:48

for starters you can go back to device manager, right-click on the two devices, ST-Link Debug and ST-Link Virtual com port, and uninstall them. then download the 'LINK009'

http://www.st.com/content/st_com/en/products/embedded-software/development-tool-software/stsw-link009.html

 

and the 'LINK007'

http://www.st.com/content/st_com/en/products/embedded-software/development-tool-software/stsw-link007.html

 

if you don't already have them in your DL folder and 1st execute the 009 then the 007.and that might work. and if you really wanna be thorough, run CCleaner and clean up the registry right BEFORE you reinstall the drivers.

and THANX for the pdf i can REALLY use it 🙂

Posted on June 25, 2017 at 05:56

Hi can you tell specifically how you use TeraTerm to check parameters?

thanx

Posted on June 25, 2017 at 14:34

Hi again Mike,

I just tried to reinstall everything that relates to my board and the according drivers - and I do really mean everything. Afterwards I tried to reinstall the drivers and everything (without OpenOCD obviously :-)) and I also attempted to use CCleaner to clean up as you mentioned. None of this worked unfortunately.

If you have any other ideas, please let me know!  

Posted on June 25, 2017 at 22:44

wow that is really !♯*$ED UP! if i couldn't connect to the stlink programmer i'd be out of a job.

but there are other ways to program the board, depending on how much time you wanna take. there's an old program by microsuck  called 

http://www.softpedia.com/get/System/System-Info/USBView.shtml

  that you can use just execute it and it will show every usb device that's currently plugged in. check the idVendor:  0x0483 (STMicroelectronics) and idProduct:  0x374B to see if the thing has enumerated correctly. also run the ST-LINK Utility n check Target->Settings n see if it can see the serial ♯ of the device.
Posted on June 26, 2017 at 13:12

Hi mike,

What I am using recently is very primitive.

1/ Download and install TeraTerm on Windows.

2/ Activate UART. On Nucleo, UART2 is convenient (After program load finished, data will show up on TeraTerm).

3/ Anywhere need check the status, insert the following code as debug.

 The following is an example used for debug for FatFs SD card program.

 Cause found: I confused SPI NSS wih CS line. Conflicting definition cleared and worked instantly..

 //----------------------- For debug ----------------------------

 uint32_t timeOut=1000;

 extern UART_HandleTypeDef huart2;

 //--------------------------------------------------------------

//---------------------- For debug reach------------------------

// The following is for sending comment to TeraTerm.

// We can also send parameter by putting array 'a' or single variable '&b'.

  uint8_t cmt[]='passed point in disk_initialize()\n'; // Debug

  HAL_UART_Transmit(&huart2, cmt, sizeof(cmt), timeOut);

 //--------------------------------------------------------------
Posted on June 26, 2017 at 22:51

thanx that's a good idea 🙂

james farrant
Associate II
Posted on February 10, 2018 at 22:46

I am following the same book 'Mastering STM32' and got to the same point where I connect to a nucleo-64 STM32F446RE via openocd in the terminal emulator. 

My PC no longer detects the ST LINK on two different boards now...

This is frustrating.

Hopefully a solution is found for this soon.

james farrant
Associate II
Posted on February 10, 2018 at 22:53

I forgot to add, connecting a new board (in my case the STM32F3 discovery) had no problem detecting the ST LINK... So it looks like currently the only solution is to set aside your old nucleo board, buy a new one and skip the openocd debugging section in the Mastering STM32 book until this gets resolved. 

Regards,

James

neill lambert
Associate
Posted on June 05, 2018 at 18:47

hi kristian

i have been starting out with a stm32f401re,

i updated my board manager in the arduino ide to include the stm mcu's. this has been developed by st and arduino.

anyways, when i returned to eclipse, i could not debug the stm32. i will include the exception stack if you wish, but for now, eclipse didnt recognise the stm32. neither did stm cube programmer. dev no stlink error.

i reinstalled the stm32 driver from the st website:

https://my.st.com/content/my_st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-utilities/stsw-link009.license=1528189432129.html

 

and this seems to have resolved the problem.

does this shed any light?

neill