0

I recently bought a generic Black Pill (STM32F411CEU6) and a ST Link V2 (clone) from Amazon.

I tried using the STM32CubeIDE to upload a simple Blink sketch onto my board with the Pill’s ground, sck, dio, 3.3v connected to the Link’s ground, swck, swdio, 3.3v respectively, but keep getting the same error:

libusb: warning [darwin_transfer_status] transfer error: timed out
Target USB comms error
Error in initializing ST-LINK device.
Reason: USB communication error.
Please reconnect the ST-LINK USB cable and try again.

When I accidentally removed the metal cover of the stlink, I noticed that the chip inside wasn’t a real STM32, but a Geehy APM32 chip, a fake.

I was wondering wether there was any way to use this clone stlink as a normal programmer/debugger. My questions are:

Is my upload error unrelated to my clone chip? If so, any ideas what it could be?

If it is because of the fake chip, is there any simple way for me to use this? Is there some downloadable macOS driver for clone stlinks I just haven’t found?

I'm also aware that there is a the inbuilt-but-limited DFU USB bootloader on the Black Pill. Could that be used to upload the STLink firmware onto my fake STlink?

If it is because of the clone stlink and the clone is unusable and needs to be replaced, then should I buy a st link from somewhere else and hope it is genuine, or should I buy a STM32F103 Blue Pill and load that with STLink firmware to use it as a programmer?

Also, where could I even find this st link firmware?

Thanks in advance for any help!

EDIT: I got frustrated and ordered a STLINK V3Minie from Digikey, and got a full refund without return on the fake. Thanks for all your replies!

AashvikT
  • 164
  • 9

3 Answers3

1

Sounds like the error is directly related to the clone chip. I think your problem is pretty similar to this thread which has more info on what the problem exactly is. https://community.st.com/t5/boards-and-hardware-tools-mcus/recently-i-bought-st-link-with-apm32f103c8t6-chip-can-you/td-p/92012

That thread suggests using the ST-Link utility instead of STCube (download here https://www.st.com/en/development-tools/stsw-link004.html). If that prompts you to update device firmware, then take it & it might work with STCube after. If not, hope that the ST-Link can at least flash your blinky program.

On a higher level, the real problem is the cheap knockoff stuff that pops up on Amazon -- it costs more than you realize in time and effort to deal with.

GandhiGandhi
  • 1,029
  • 6
  • 10
1

I don't say your setup can't be made working somehow, but the safest bet is to buy a Nucleo-64 - perhaps a 'F4xx one - and you receive a board with genuine parts which is quite likely to work out of the box with ST-provided tools. You can then also use its on-board ST-Link to program other STM32 devices.

ST does not publish the ST-Link firmware (bootloader). There may be some floating around the internet; but then you are at the same position of using unsupported firmware on unsupported hardware.

You may want to start from a solid point rather than tackle multiple unknowns.

JW

wek
  • 137
  • 3
  • 1
    You have simply shown me what I already knew. About the firmware, I remember coming across some "pirated" stm32 firmware but was not sure where exactly its source was. Thank you, however, for typing this up-- it made me more sure about buying a board with an inbuilt stlink. – AashvikT Sep 01 '23 at 16:31
0

I would suggest buying a genuine ST-Link mini. It is cheap and good.

enter image description here

Those clones have also another problem as they do not control the NRST line and it is not possible to connect under reset. Basically those ST-Link clones from China are rubbish. Ask for a refund.

0___________
  • 60,014
  • 4
  • 34
  • 74