USB device enumeration fails: "device descriptor read/64, error -32"
Asked Answered
H

4

12

I'm developing a ttyACM device with ST microcontroller, and with the same code, my host could sometimes enumerate it successfully (below) but sometimes it just dump the below message. What does error -32 mean?

[FAIL TO ENUMERATE]

usb 1-2.1: new full speed USB device number 62 using ehci_hcd
usb 1-2.1: device descriptor read/64, error -32
usb 1-2.1: device descriptor read/64, error -32
usb 1-2.1: new full speed USB device number 63 using ehci_hcd
usb 1-2.1: device descriptor read/64, error -32
usb 1-2.1: device descriptor read/64, error -32
usb 1-2.1: new full speed USB device number 64 using ehci_hcd
usb 1-2.1: device not accepting address 64, error -32
usb 1-2.1: new full speed USB device number 65 using ehci_hcd
usb 1-2.1: device not accepting address 65, error -32
hub 1-2:1.0: unable to enumerate USB device on port 1

[SUCCESSFUL RESULT]

usb 1-3.1: new full speed USB device number 45 using ehci_hcd
usb 1-3.1: New USB device found, idVendor=0483, idProduct=5740
usb 1-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-3.1: Product: ChibiOS/RT Virtual COM Port
usb 1-3.1: Manufacturer: HelloWord
usb 1-3.1: SerialNumber: 262
usb 1-3.1: configuration #1 chosen from 1 choice
cdc_acm 1-3.1:1.0: This device cannot do calls on its own. It is not a modem.
cdc_acm 1-3.1:1.0: ttyACM0: USB ACM device

Thanks a lot.

Hatching answered 12/3, 2014 at 2:20 Comment(0)
H
12

AFAIK status -32 means "Broken pipe" (EPIPE). It means that there are problems with usb communication (protocol). For example usb-device doesn't answer correctly for usb-request, and sending some data that are not expected by host or sends not enough data. There may be also other reasons.

The first message tells that there are problems with "get device descriptor" and "set address" requests from host. Those are basic requests sending by host at the very beginning of enumeration process. You can't go further if those requests cannot be succesfully serviced by usb-device.

Highborn answered 12/3, 2014 at 5:19 Comment(3)
Where do you get the meaning of different error status?Sizzler
You can get it from ${KERNEL_SOURCE_DIR}/include/uapi/asm-generic/errno-base.hHighborn
I got the same error. The problem seemed to be that I was providing a 52MHz signal to the USB peripheral (in a stm32h7). It got fixed by downgrading it to 48MHz. Notice that I configured my USB as OTG_FS, not OTG_HS. For some reason, STM32CubeMX didn't allow me to select HS, so I went to FS. I didn't dig in why this happened as I was just developing a quick prototype app.Lustrum
M
2

This error can be caused by clocking the on-chip USB device at the wrong frequency. Check your clock tree configuration. The frequency should be 48MHz. If it's slightly off, it's possible that enumeration would sometimes be successful and sometimes fail. If it's way off, enumeration will always fail. Various errors are possible including the ones you listed.

Matrix answered 22/12, 2014 at 4:29 Comment(0)
D
0

I have installed the XCP-NG server in one laptop and my system was not booting either due to this error: USB 3-1 device descriptor read/64, error 32

I tried a lot of things. Even disconnecting the USB ports.

Until I recalled that I have removed the default SR repository for Xen. So I went to check the /etc/fstab file

[root@xcpserver2 ~]# cat /etc/fstab
LABEL=root-jvgtod    /         ext3     defaults,noatime   1  1
LABEL=swap-jvgtod          swap      swap   defaults   0  0
LABEL=logs-jvgtod    /var/log         ext3     defaults,noatime   0  2
/opt/xensource/packages/iso/XenCenter.iso   /var/xen/xc-install   iso9660   loop,ro   0  0

The default SR repository was trying to get the content of the last line. I tried to comment it and it worked!! :) I concluded that this error it also showing when there is a problem at the /etc/fstab file. I hope it helps!

So, my /etc/fstab file looks like this now and it solved the issue:

[root@xcpserver2 ~]# cat /etc/fstab
LABEL=root-jvgtod    /         ext3     defaults,noatime   1  1
LABEL=swap-jvgtod          swap      swap   defaults   0  0
LABEL=logs-jvgtod    /var/log         ext3     defaults,noatime   0  2
#/opt/xensource/packages/iso/XenCenter.iso   /var/xen/xc-install   iso9660   loop,ro   0  0
Dulles answered 15/5, 2019 at 12:9 Comment(0)
P
0

It could be the problem with input–output memory management unit (IOMMU)

In my case it happened when IOMMU was disabled in BIOS. So at first, try to enable IOMMU in BIOS

Then to support AMD-Vi or VT-d need to set boot option either amd_iommu=on or intel_iommu=on to prevent errors like:

xhci_hcd AMD-Vi: Event logged [IO_PAGE_FAULT domain]

Also iommu=pt or iommu=soft may be required. It can solve some issues with Nvidia or Bluetooth devices


To permanently set boot options add it to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub then run:

sudo update-grub

or

sudo grub-mkconfig -o /boot/grub/grub.cfg


If you are using USB boot device then on selected GRUB menu entry press e to edit entry before booting and add boot options at the end of linux command inside menuentry block then save using ctrl-x. It will save you from disconnecting USB during boot when installing

Pepita answered 11/3 at 13:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.