There is a USB error(-71) when run the board(Reference xCORE ARRAY MICROPHONE) on ubuntu

If you have a simple question and just want an answer.
Post Reply
shanghaiwangyong
Member++
Posts: 17
Joined: Mon Nov 13, 2017 9:53 am

There is a USB error(-71) when run the board(Reference xCORE ARRAY MICROPHONE) on ubuntu

Post by shanghaiwangyong »

Hello,

Build app_usb_aud_mic_array, and flash app_usb_aud_mic_array_2i8o2.xe to our board(Reference xCORE ARRAY MICROPHONE), and then connect to Ubuntu, reporting abnormal information:


[ 1303.858851] usb 4-6.2: USB disconnect, device number 3
[ 1304.090413] usb 4-6.2: new SuperSpeed USB device number 4 using xhci_hcd
[ 1304.116392] usb 4-6.2: New USB device found, idVendor=0bda, idProduct=0411
[ 1304.116400] usb 4-6.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1304.116405] usb 4-6.2: Product: 4-Port USB 3.0 Hub
[ 1304.116409] usb 4-6.2: Manufacturer: Generic
[ 1304.121522] hub 4-6.2:1.0: USB hub found
[ 1304.122274] hub 4-6.2:1.0: 4 ports detected
[ 1304.125904] usb 3-10.2: USB disconnect, device number 3
[ 1304.125912] usb 3-10.2.4: USB disconnect, device number 4
[ 1304.390719] usb 3-10.2: new high-speed USB device number 5 using xhci_hcd
[ 1304.417648] usb 3-10.2: New USB device found, idVendor=0bda, idProduct=5411
[ 1304.417651] usb 3-10.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1304.417653] usb 3-10.2: Product: 4-Port USB 2.0 Hub
[ 1304.417654] usb 3-10.2: Manufacturer: Generic
[ 1304.418154] hub 3-10.2:1.0: USB hub found
[ 1304.418702] hub 3-10.2:1.0: 4 ports detected
[ 1304.691195] usb 3-10.2.2: new high-speed USB device number 6 using xhci_hcd
[ 1304.707771] usb 3-10.2.2: New USB device found, idVendor=20b1, idProduct=0008
[ 1304.707774] usb 3-10.2.2: New USB device strings: Mfr=1, Product=3, SerialNumber=0
[ 1304.707776] usb 3-10.2.2: Product: XMOS Microphone Array UAC2.0
[ 1304.707777] usb 3-10.2.2: Manufacturer: XMOS
[ 1304.795359] usb 3-10.2.4: new full-speed USB device number 7 using xhci_hcd
[ 1304.814272] usb 3-10.2.4: New USB device found, idVendor=046d, idProduct=c534
[ 1304.814275] usb 3-10.2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1304.814276] usb 3-10.2.4: Product: USB Receiver
[ 1304.814278] usb 3-10.2.4: Manufacturer: Logitech
[ 1304.816378] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10.2/3-10.2.4/3-10.2.4:1.0/input/input14
[ 1304.816537] hid-generic 0003:046D:C534.0003: input,hidraw0: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-0000:00:14.0-10.2.4/input0
[ 1304.818814] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10.2/3-10.2.4/3-10.2.4:1.1/input/input15
[ 1304.819044] hid-generic 0003:046D:C534.0004: input,hiddev0,hidraw1: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-0000:00:14.0-10.2.4/input1

sns@sns:~$ sudo dmesg -c
[ 1309.843808] parse_audio_format_rates_v2(): unable to find clock source (clock -71)
[ 1309.844702] parse_audio_format_rates_v2(): unable to find clock source (clock -71)
[ 1309.845992] cannot get ctl value: req = 0x83, wValue = 0x201, wIndex = 0xa00, type = 4
[ 1309.845995] 10:0: cannot get min/max values for control 2 (id 10)
[ 1309.846231] cannot get ctl value: req = 0x83, wValue = 0x200, wIndex = 0xa00, type = 4
[ 1309.846233] 10:0: cannot get min/max values for control 2 (id 10)
[ 1309.846792] cannot get ctl value: req = 0x83, wValue = 0x201, wIndex = 0xb00, type = 4
[ 1309.846793] 11:0: cannot get min/max values for control 2 (id 11)
[ 1309.847032] cannot get ctl value: req = 0x83, wValue = 0x200, wIndex = 0xb00, type = 4
[ 1309.847033] 11:0: cannot get min/max values for control 2 (id 11)
[ 1309.847388] usbcore: registered new interface driver snd-usb-audio
[ 1309.866577] 6:1:1: usb_set_interface failed (-71)
[ 1309.867111] 6:1:1: usb_set_interface failed (-71)
[ 1309.867674] 6:1:1: usb_set_interface failed (-71)
[ 1309.868293] 6:1:1: usb_set_interface failed (-71)
[ 1309.868912] 6:1:1: usb_set_interface failed (-71)
[ 1309.869542] 6:1:1: usb_set_interface failed (-71)
[ 1309.870070] 6:1:1: usb_set_interface failed (-71)
[ 1309.870604] 6:1:1: usb_set_interface failed (-71)
[ 1309.871181] 6:1:1: usb_set_interface failed (-71)
[ 1309.871800] 6:1:1: usb_set_interface failed (-71)
[ 1309.872502] 6:1:1: usb_set_interface failed (-71)
[ 1309.873059] 6:1:1: usb_set_interface failed (-71)
[ 1309.873629] 6:1:1: usb_set_interface failed (-71)
[ 1309.874231] 6:1:1: usb_set_interface failed (-71)
[ 1309.874861] 6:1:1: usb_set_interface failed (-71)
[ 1309.875607] 6:1:1: usb_set_interface failed (-71)
[ 1309.876227] 6:1:1: usb_set_interface failed (-71)
[ 1309.876875] 6:1:1: usb_set_interface failed (-71)
[ 1309.877533] 6:1:1: usb_set_interface failed (-71)
[ 1309.878155] 6:1:1: usb_set_interface failed (-71)
[ 1309.887025] 6:1:1: usb_set_interface failed (-71)
[ 1309.887634] 6:1:1: usb_set_interface failed (-71)
[ 1309.888302] 6:1:1: usb_set_interface failed (-71)


Because our design does not have Ethernet and DAC output, so I do not know how to modify, please help me.

The attachment is our design.
Image

Image


hamtam
Active Member
Posts: 34
Joined: Wed Jun 28, 2017 7:37 am

Post by hamtam »

This normally is due to a Signal problem. Check your PCB Design. Possible sources of error can be:
  • USB Bus on your board has not an impedance of 90 Ohms
  • Your Power Supply is not blocked properly with capacitors
  • you routed something directly under your USB bus (steep impedance changes)
  • do you have a GND plane (without any routings)
  • your lines length differ more than 4mm
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

hamtam's SI considerations are certainly worth looking into.

A USB analyser is worth using too to see details of the responses.

Also, instead of flashing (when you lose all visibility) why not try xgdb (or debug in GUI) and then try stopping the debugger to see where the code is when the issue occurs and report back.

This may be helpful https://www.xmos.com/download/private/U ... 90A%29.pdf
shanghaiwangyong
Member++
Posts: 17
Joined: Mon Nov 13, 2017 9:53 am

Post by shanghaiwangyong »

We designed the board to remove the DAC, Eth and button, I in the AudioHwConfig () method dropped the call DAC related code, can be normal recording, but the data obtained are all silent data, I use the recording command "arecord -Dplughw:1,0 -r 44100 -c 7 -f S24_LE test-xmos441.pcm" on ubuntu, where is the need to modify?
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

where is the need to modify?
Difficult to say without some visibility of the code in the Xmos chip. My guess is that if it's an issue when changing interface, the DAC setup code is still trying to do something (maybe access non-existant I2C?). Check audio_hw.xc

But I strongly recommend you use the debugger otherwise you will find maing firmware changes heavy work.
shanghaiwangyong
Member++
Posts: 17
Joined: Mon Nov 13, 2017 9:53 am

Post by shanghaiwangyong »

Hi,

I've opened the debug, but I can't figure out where the error is. The recorded sound is a noise(When I annotate the DAC initialization section), please help to analyze it. See attachment.


Image


Image

Image

Image

Image

Image

Image
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

How many layers in your pcb? Is the pcb layout impedance controlled for usb designs? Post your pcb layout and SCHEMATIC details for the usb connection to the xmos area for all to review. The schematics will be also helpful.
shanghaiwangyong
Member++
Posts: 17
Joined: Mon Nov 13, 2017 9:53 am

Post by shanghaiwangyong »

Our PCB design is six layers, impedance is 90ohm, with ID.See attachment.
Image
Post Reply