Search code examples
stm32nucleo

STM-Link on Nucleo Board Not Enumerating


I have two nucleo boards (F4339ZI and F303K8) and neither of them show up as USB devices when I plug them into a computer via the USB port (CN1 - the USB micro port on the ST-Link, not the USB port for the board itself).

I have tried multiple host USB ports, with and without a USB hub, across two different computers, one running OS X and one running Linux. I have tried at least 6 different cables. The OSX machine is using a USB-C to USB-A converter (if that's the correct terminology). The Linux machine has USB-A ports.

In no case does the device show up using lsusb under Linux or system_profiler SPUSBDataType under OSX. Needless to say STM32CubeIDE and st-info can't see the boards. Other USB devices are functional.

The COM LED is slow blinking red which the manual (https://www.st.com/resource/en/user_manual/dm00244518-stm32-nucleo144-boards-stmicroelectronics.pdf) says means USB enumeration hasn't completed (matching what is seen from the OS level).

The boards successfully run their factory supplied blink programs when powered on. I have tried (with the F4395I) moving JP3 to VIN so the board doesn't power up which should just leave the ST-Link running - still no enumeration though.

I tried connecting to a USB charger with JP1 off (and JP3 on U5V) and the board powers up and blinky runs. The manual referenced above says:

In case the board is powered by a USB charger, there is no USB enumeration, so the green LED LD6 stays in OFF state permanently and the target STM32 is not powered.

But everything works for me - LD6 goes a steady green as it does when connected to a computer.

Given it happens with multiple computers, OSs, cables and Nucleo boards I assume the error lies with me, the common factor in all the tests. This is my first use of Nucleo boards so I may well have a mis-assumption.


Solution

  • Out of frustration and lacking anything else to try I dug up every micro USB cable I could find. One had chokes on each end and magically, using that cable, everything just works as expected.

    Can it be that I have at least 10 broken USB cables? I don't have an easy way to test them but I guess they might not have the data lines wired to save cost if manufacturers assumed people would only charge phones with them. I don't recall where they all came from...they have just accumulated in a box of USB cables.

    Perhaps the Nucleo board sensitive to some horrible interference floating around my room?

    Sorry for the noise! Broken cable was genuinely one of the things I suspected - but not 6 of them...