cancel
Showing results for 
Search instead for 
Did you mean: 

ST-Link (standalone and built in), with latest MacOS, has an issue.

Posted on December 02, 2015 at 00:41

There is a problem, introduced when Apple brought out the latest MacOS 10.11 (El Capitan), with the ST-Link modules and Apple's revised USB stack.

If you load code or debug, you get one use then the ST-Link appears to lock up, then the ST-Link must be disconnected and reconnected, then you get one more use. Repeat until you are ready to scream.

This is a point of discussion in the openOCD forums as well as libUSB forums. Nobody can put their fingers on what the issue is exactly, everybody keeps saying that it is not their fault, but there is one thing that keeps coming up.

The serial numbers in the ST-Link modules, whether standalone, or built onto Discovery or Nucleo boards, are numbers like: 

I�o?I�UU&H%�

instead of the more normal: 

CC2D630GKJDGFKL0 or 42

Nobody knows if the problem is ST's use of unprintables in the serial numbers, but if that can be fixed we can rule it out and move forward. If I can get some help from ST, I'd be glad to bootload some firmware into my ST-Link to get over this and help out a whole bunch of people.

Please ST, you're our only hope.

#st-link-mac
6 REPLIES 6
S C
ST Employee
Posted on December 02, 2015 at 11:53

Hello,

The issue of serial number wrong format resides in the old version of ST-Link boot firmware. It has been fixed on recent boards (Nucleo, recent discovery and evaluation boards based on ST-LINK/V2-1). It is also fixed in the ''upgradable'' firmware part, but unfortunately the boot firmware can't. It still has to be proved that this is the root cause of the issue. According to me, if the issue appears also on Nucleo boards, that would be the proof that it comes from something else.

About the other topic on OpenOCD/libusb, my feeling is that the data toggle bit (in the USB frame) is not respected by someone after a clearFeature(Endpoint stall) that seems to be newly called in the MacOS 10.11 environment. The ST-Link firmware is expected to clear it whatever its previous value. Consequently there might be 2 consecutive frames with the same toggle bit (0), which might also generate issues on the host side. This has to be investigated (at USB level) who is behaving wrong. I will work on that.
Posted on December 02, 2015 at 18:17

SC,

I grabbed the latest firmware for the ST-Link/V2 and updated my box to V2J24S4, which is a little weird when you have to keep disconnecting it to read the version etc..

I believe that you suggested that the serial number would not change, it didn't, it is still 

Iÿo?I†UU&H%‡

No difference in the action either.

I tried with my Nucleo-F411RE board, which has the firmware with the correctly formatted serial numbers, and it has the same issue. So your assertion that the serial numbers are not involved seems correct.

But thanks for looking into this. I was trying to identify a channel at Apple to bring into this conversation, but they are as impenetrable as their cousins a couple of states north.

Andrei (from The Great White North)
S C
ST Employee
Posted on December 10, 2015 at 11:26

Hello,

An issue was identified on the ST-Link firmware side: it clears the toggle bit on a ClearFeature(ENDPOINT_STALL) only if the endpoint is stalled. If the host issues the command while the endpoint is not stalled (which is the case with MacOS-10.11), the toggle bit is not cleared, explaining afterwards the loss of USB communication synchro, if, in case of bad luck (50%), the toggle value before ClearFeature was DATA0.

This will be fixed in the next firmware version (V2J25M14) which will be published on ST website after validation is completed (STSW-LINK007 on Nucleo pages for instance). This should take several days more from now on.

Sorry for the bad consequences on MacOS-10.11.
Posted on December 11, 2015 at 00:16

You are my hero.

I've been fighting this for around 8-9 weeks. I, stupidly, updated my computers to MacOS 10.11 just before starting to teach a course, which ended up having 30% of the students using Macs, and we have all been wearing out our connectors ever since.

I'll check the Nucleo site in a few days then.

Thanks again.

Andrei (and all of the other Mac users)

S C
ST Employee
Posted on December 18, 2015 at 11:39

Hello,

I'd like to notify that the fix is now available from STSW-LINK007 webpage:

http://www.st.com/web/en/catalog/tools/PF260217

Be aware that release notes are still not up to date but will follow

Best regards

Posted on December 19, 2015 at 05:30

It appears to work well.

I have updated my STLink/V2 and my STM32F401C-DISCO board and they both work and do not hang up anymore.

Thank you for your prompt work.

Andrei from The Great White North