cancel
Showing results for 
Search instead for 
Did you mean: 

ST-link stop working after configuring ST32H7 as USB Device

GioBytem
Associate

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.

4 REPLIES 4
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.

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