cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-F767ZI USB Host repeatedly connects then disconnects

PeppersONLY
Associate III

Hello all,

I've come here for a issue I failed to debug. My setup is as follows: I have a NUCLEO-F767Z development board and im debugging/programming it through the onboard STLINKV2 with SWO enabled. I am simply just trying to get a USB device to enumerate. I have configured the USB_FS host to the drive VBUS through pin PG6 where the USB power switcher is on the nucleo. My clock configuration is shown in the attached image. When plugging in a USB mouse (that works on my PC) through a USB A Female to USB Micro Male adapter, the SWV console prints forever: 

USB Device Connected
USB Device Reset Completed
ERROR: Control error: Device not responding
USB Device Connected
USB Device disconnected
USB Device Connected
USB Device disconnected
USB Device Connected
USB Device disconnected
USB Device Connected
USB Device disconnected
USB Device Connected
USB Device disconnected
USB Device Connected
USB Device disconnected
USB Device Connected
USB Device disconnected
USB Device Connected
USB Device disconnected

I thought this may be a power issue but measuring the input voltage on the mouse USB pins, it goes up to about 4.8-4.9V right when plugged in so I don't see a issue. The only odd thing that happens is when I plug the mouse into my computer, its cycling LED lights or whatever you wanna call it turn on but not when plugged into my board. (This could just be because they only work when the mouse is enumerated)

I don't really know how to go about debugging this any further or if anyone else has any ideas? Thanks!

 

PeppersONLY_0-1768535582342.png

 

4 REPLIES 4
AScha.3
Super User

Hi,

1. what you enabled the host to do ?  HID? MSC ? ...

AScha3_1-1768548778987.png

+ check from rm -> usb , the USB host module can do lo speed HID at all.

2. with SWO running, you could set the usb "debug messages" to 3 , maximum, to see all:

AScha3_0-1768548612184.png

3. try other mouse, keyboards to see: its a problem from your/host side or the device has a problem.

4. try usb host -> MSC , check : it can enumerate an usb-memory-stick ; to see: your connections working fine - or not.

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

1. I tried enabling the host for both “HID” and “Host supporting all classes” both with the same issue

2. The output I attached was with debug level 3 (wish it gave some more info)

3. I tried with a different mouse, usb memory stick, and a printer all not working.

 

I don’t think it’s a class issue because classes are only initialized after device enumeration which is not happening even? Could it be something with hardware?

FBL
ST Employee

Hi @PeppersONLY 

Based on the user manual, it is recommended to power Nucleo-144 board by an external power supply when using host function. The red LED LD7 lights up if overcurrent occurs when +5 V is enabled on VBUS in USB host
mode.

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.




Best regards,
FBL

I tried plugging the NUCLEO into my PC for programming and debugging and then powering the USB device separately with just the data lines connected and it still has the same issue. I even measured and this time the voltage is at 4.98V.