cancel
Showing results for 
Search instead for 
Did you mean: 

ST-link stop working after configuring Nucleo-G0B1RE as USB Device

GioBytem
Associate II

Hello everyone,

I'm trying to debug firmware on a custom ST32H750XBH6 board. Once I configured the MCU on StmCubeMX to act as a USB_OTG_HS after flashing the firmware the ST-link stopped working and it gave me the error message:
Target no device found:
Error in initializing ST-LINK device.

Reason: No device found on target.

 

It is strange because the same thing happened with a NUCLEO-G0B1RE. After configuring the board as USB_OTG_FS and flashing the firmware, the st-link embedded on the board stopped working. I'm sorry if this was a well-discussed topic, but I couldn't find an answer in the community, I'm an early developer.

Thank you in advance.

9 REPLIES 9
Pavel A.
Evangelist III

Have you compiled the firmware yourself from sources or received the firmware binaries from somebody else?

Is there chance that you flashed a wrong firmware, or made for a different board?

 

 

 I flashed another firmware on the custom board, but on the Nucleo board, I initialized the Nucleo myself only activating the USB_OTG_HS peripheral to make the Nucleo a USB Device. After flashing the Nucleo once successfully, I can not flash it again.

But is it even possible to successfully flash firmware that is not compatible with the MCU on the board? 

Thanks btw.

Hi @GioBytem 

Flashing firmware that is not compatible with the MCU on the board can work with the similar internal flash and cortex M but can lead to various issues, including the inability to reprogram the device. So, you must be careful while checking the clock settings, power supply (LDO, SMPS) boot address, etc..

Did you set all free pins as analog? maybe you freed RCC oscillator pins or SWDIO and SWCLK you, so you lost access to debug?

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!

Of course it is possible to flash wrong firmware with ST-Link. In extremely unfortunate case, one can even flash wrong option bytes.

No, okay. I figured out what the problem was on the custom board. My SWD connector was wrong, and it's working fine now that I've changed it.

The problem with the NUCLEO remains, after flashing the Nucleo to act as USB_Device the USB cable that you usually use to debug with the embedded st-link is now the channel for USB communication. The board is detected as a VCM but the st-link finds nothing when I try to debug, I tried to directly connect another st-link v2 to the SWDIO and SWCLK pins on the board but the CubeProgrammer says that the st-link doesn't find the right target voltage even if the board is connected and powered through USB cable. 
Checking the board, the E5V is powered, but 5V and 3.3V are not on the Arduino connectors. 

Then can the MCU be reset with the bootloader? 


@GioBytem wrote:

The problem with the NUCLEO remains, after flashing the Nucleo to act as USB_Device the USB cable that you usually use to debug with the embedded st-link is now the channel for USB communication. 


Is it?

Surely, there should be separate USB connectors for the ST-Link and the Target's "user" USB ?

AndrewNeil_1-1732706349319.png

 

 

nucleog0b1re.jpgI see only one connector Type micro-B, which is also labeled as "USB_STLINK". So I guessed it was used for both and that it cannot handle communication for st-link and USB at the same time... am I wrong? 


@GioBytem wrote:

I see only one connector Type micro-B, which is also labeled as "USB_STLINK". ? 


 I don't have one of these boards to check, so only working from what's on the Product Page:

https://www.st.com/en/evaluation-tools/nucleo-g0b1re.html

I did notice that the picture there only shows one USB, yet the description does mention two, as shown previously.

The User Manual makes no mention of any user USB connection.

The Schematics show no USB connection to the Target microcontroller.

So it looks like an error on the Product Page - @STTwo-32 ?

 


@GioBytem wrote:

So I guessed it was used for both and that it cannot handle communication for st-link and USB at the same time... am I wrong? 


There's no Hub on the board, so it can't do both.

It will be just the ST-Link connection.