cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a Nucleo Board visible via USB?

cqexbesd
Associate II

I want to flash my Nucleo Board from STM32CubeIDE. When I click debug in the IDE it fails with:

ST-Link enumeration failed
 
Error in initializing ST-LINK device.
Reason: ST-LINK DLL error.

st-info --probe says

Found 0 stlink programmers

When I enumerate the USB devices connected to my computer I don't see the board.

I have the board connected via the USB port on the ST-LINK part of the board. The board powers up fine and runs the pre-loaded blink code. The ST-LINK LED is flashing red.

I have tried 2 Nucleo boards (F4339ZI and F303K8). I have tried 4 USB cables. I have tried with and without a USB hub and multiple ports. I have tried with 2 computers and 2 OSs (OS X and Linux).

Am I right in thinking the ST-LINK should show up as a USB device without me needing to do anything else? Presumably nothing else will work till I can solve this problem.

This is my first use of these boards so user error is highly likely. Any docs I could find seemed to gloss over this step.

1 ACCEPTED SOLUTION

Accepted Solutions
cqexbesd
Associate II

After much frustration I collected every micro USB cable I could find and tried a few more. I found one with chokes on each end and voila! All is working.

It was (approx) the 11th cable I tried. I don't know if the chokes were important (I'm partially underground here so I wouldn't have expected much RFI) or just I had 10 (!) dodgy cables...Either way I now have something working.

View solution in original post

3 REPLIES 3
cqexbesd
Associate II

I have tried a few more experiments. Looking at the user manual (https://www.st.com/resource/en/user_manual/dm00244518-stm32-nucleo144-boards-stmicroelectronics.pdf) it says JP1 can be set to on to only ask for 100mA from the USB port. Tried it but nothing changed.

I tried connecting to a USB charger with JP1 off and behaviour remains the same (i.e. LD4 (COM) is slow blinking red, LD6 (PWR) is steady green. and the blinky code works fine). According to the note at the bottom of 6.4.1 (page 21) that should not happen:

> 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.

I know all users assume the board is faulty and are almost always wrong but I'm starting to think it might be possible...

Shorting JP1 whilst using the charger makes no difference. I've also tried a few more cables and a different USB hub and providing external power to the USB hub.

What else can I try?

TDK
Guru

Blinking red means USB is not enumerating.

On windows, it should just connect. Not sure what might be happening on OSX and Linux.

If you feel a post has answered your question, please click "Accept as Solution".
cqexbesd
Associate II

After much frustration I collected every micro USB cable I could find and tried a few more. I found one with chokes on each end and voila! All is working.

It was (approx) the 11th cable I tried. I don't know if the chokes were important (I'm partially underground here so I wouldn't have expected much RFI) or just I had 10 (!) dodgy cables...Either way I now have something working.