sipeed / RV-Debugger-BL702

RV-Debugger-BL702 Project, an opensource debugger implement
173 stars 63 forks source link

USB enumeration issues #8

Open chiplet opened 2 years ago

chiplet commented 2 years ago

I'm experiencing USB enumeration issues on the Tang Nano 1K, 4K, and 9K boards. It seems that they use the same chip and presumably also the same firmware as this project so I'm reporting it here. Correct me if I'm wrong.

The problem is that when I try to connect the programmer to my computer over a USB hub, it fails to enumerate.

[29332.909014] usb 7-1.2: new full-speed USB device number 8 using xhci_hcd
[29338.196264] usb 7-1.2: device descriptor read/64, error -71
[29343.532540] usb 7-1.2: device descriptor read/64, error -71
[29343.722499] usb 7-1.2: new full-speed USB device number 9 using xhci_hcd
[29348.862626] usb 7-1.2: device descriptor read/64, error -71
[29354.196037] usb 7-1.2: device descriptor read/64, error -71
[29354.302915] usb 7-1-port2: attempt power cycle
[29354.916045] usb 7-1.2: new full-speed USB device number 10 using xhci_hcd
[29360.086242] xhci_hcd 0000:0a:00.3: Timeout while waiting for setup device command
[29365.419676] xhci_hcd 0000:0a:00.3: Timeout while waiting for setup device command
[29365.626240] usb 7-1.2: device not accepting address 10, error -62
[29365.709582] usb 7-1.2: new full-speed USB device number 11 using xhci_hcd
[29365.709791] usb 7-1.2: Device not responding to setup address.
[29365.916323] usb 7-1.2: Device not responding to setup address.
[29366.123016] usb 7-1.2: device not accepting address 11, error -71
[29366.123294] usb 7-1-port2: unable to enumerate USB device

This also happens on the front-panel USB hubs if there are other USB devices connected to the adjacent ports. However, if I unplug all other devices from the front panel it successfully enumerates again.

Enumeration works fine when directly connecting to USB ports in the motherboard.

I haven't experienced any enumeration issues with my other USB devices on these hubs so it seems like the issue related to the BL702 implementation.

securez commented 2 months ago

Hi, the last time I checked it, seems to be related with the USB bMaxPower configuration, seems to be set at 90mA, It's a bit low for power up Tang Nano 4K I thing. I can test if the change solves the problem, but seems to me that this repository is stalled for a long time. If he project is dead I don't want to waste my time if nobody is reviewing the PR and resolving the issues.