Skip to main content
CTapp.1
Senior III
May 10, 2026
Solved

NUCLEO-G431 does not communicate on M5 Mac with a direct USB-C port connection

  • May 10, 2026
  • 6 replies
  • 266 views

CubeProgrammer 2.22.0 under MacOS 26.4.1 is not able to connect to my NUCLEO-G431, with the log window showing:

ST-LINK error (DEV_CONNECT_ERR)

Strange thing is this only happens when I have a direct cable connection between the USB-C port on the Mac and the ST-LINK V3 USB on the board - it works as expected if I connect via a USB-C hub.

VS Code is also not able to connect to the board to run a debug session without the hub, so I suspect this is an ST-LINK USB driver issue on the Mac.

Best answer by Kouthair

Hello there @CTapp.1 ,

This behavior appears to match the known issue reported in this FAQ: Possible communication failure between STLINK-V3 and some recent computers. The FAQ might help explain the root cause of this behavior and how to mitigate it, including one of the workarounds which you have already found.

Kind regards,
Kouthair

6 replies

Pavel A.
Super User
May 10, 2026

 it works as expected if I connect via a USB-C hub.

Is the hub powered?

 

CTapp.1
CTapp.1Author
Senior III
May 11, 2026

Whilst it does support PD, it does not need to be connected to external power for things to work (one wire to Mac, on to the board).

All posts are made in a personal capacityMISRA C++ ChairMISRA C WG MemberDirector The MISRA Consortium Limited (TMCL)
Associate III
May 11, 2026
It also works abnormally on my Mac Studio (M4 Max) with STM32WBA65I-DK1
Pavel A.
Super User
May 11, 2026

These devices work well with many Windows, Linux and Intel Mac hosts. The drivers are very thin - no dedicated kernel modules. So it looks unlikely that ST could "fix" anything in their drivers. Using a hub is a good workaround.

Of course, people that are motivated and have a type-C analyzer can debug and find the real cause of the connection failures.

 

CTapp.1
CTapp.1Author
Senior III
May 11, 2026

I'm using the latest MacBook Pro M5, so it will soon be "one of the many" ;)

If there is a potential issue here that can't be fixed, it would be useful if that could be documented somewhere - it took me a couple of hours to find the workaround, and the diagnostic messages that were given didn't give any clues.

CubeProgrammer also appeared to connect to the probe at times (though in a non-functional way - just the serial number and target voltage shown), and even allowed the "firmware update" for the ST-LINK to be activated - though that failed with something like "bad firmware checksum". Sounds like USB packet loss, but that's just a guess.

All posts are made in a personal capacityMISRA C++ ChairMISRA C WG MemberDirector The MISRA Consortium Limited (TMCL)
KouthairAnswer
ST Employee
May 11, 2026

Hello there @CTapp.1 ,

This behavior appears to match the known issue reported in this FAQ: Possible communication failure between STLINK-V3 and some recent computers. The FAQ might help explain the root cause of this behavior and how to mitigate it, including one of the workarounds which you have already found.

Kind regards,
Kouthair

In order 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.
Andrew Neil
Super User
May 11, 2026

@CTapp.1 wrote:

it works as expected if I connect via a USB-C hub.


Checking with/without a hub is, indeed, one of the recommended steps in dealing with ST-Link comms issues:

https://community.st.com/t5/stm32-mcus/how-to-solve-debugger-connection-issues/ta-p/49693#:~:text=If%20connecting%20via%20a%20hub%2C%20try%20without%20it%3B%20if%20connecting%20without%20a%20hub%2C%20try%20with%20one

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Pavel A.
Super User
May 11, 2026

Type-C connectors on these thin laptops are too overloaded: they carry USB and Thunderbolt video and smart power functions, maybe also something Apple proprietary. Hubs help to untangle this complexity. Without a good analyzer it's hard to tell more. Better treat this as Somebody Else's problem.