Skip to main content
KMill
Senior
July 27, 2026
Solved

STLink porgrammer up and down like a sabbath lift

  • July 27, 2026
  • 4 replies
  • 75 views

I’m using VSC with the STM32 extensions.

When running debug sessions at leat 50% of the time I get this error message:


Error in initializing ST-LINK device.
Reason: USB communication error. Please reconnect the ST-LINK USB cable and try again.
cube has exited with code 3

 

I have a good quality USB lead and I’m running on macOS on a Mac Mini M2

Best answer by Cartu38 OpenDev

@KMill 

100% failure would probably help more 😅.

Half-kidding, but let's give us a chance to help you! Could you at least share more about the device (board) you're connecting to?

Also, could you please copy and paste the debug console trace when it fails?

(Tip: Two extra directives can be added to your launch.json file to get more details if needed.)

 

4 replies

Cartu38 OpenDev
Cartu38 OpenDevBest answer
Graduate II
July 27, 2026

@KMill 

100% failure would probably help more 😅.

Half-kidding, but let's give us a chance to help you! Could you at least share more about the device (board) you're connecting to?

Also, could you please copy and paste the debug console trace when it fails?

(Tip: Two extra directives can be added to your launch.json file to get more details if needed.)

 

Pavel A.
July 28, 2026

> I have a good quality USB lead

Sure? How do you know? 

KMill
KMillAuthor
Senior
July 28, 2026

Well, 

It wasn’t the lead of the programmer.

It was my USB Hub. It died this morning completely.

Strangely, yesterday only the STLink was playing up - the mouse and USB Microscope were both fine, but this morning every port was dead.

New hub and everything is working well today.

Pavel A.
July 28, 2026

Thank you for the idea, btw.  Nobody has invented a sabbath USB hub yet, it’s interesting how such thing can be used, and for which commandment  ;)