Trenz Electronic GmbH Support Forum

Trenz Electronic Products => UltraScale => Topic started by: jkaoe on February 24, 2021, 03:10:07 PM

Title: XHCI Dies When Connecting CDC-ACM Device
Post by: jkaoe on February 24, 2021, 03:10:07 PM
XHCI Dies When Connecting CDC-ACM Device

Hello,

I am seeking assistance with a CDC-ACM / XHCI error. I am using TE0820-03 with a TE0706-03 carrier board.

When connecting a CDC-ACM device, I receive the following output:

root@trenz2019:~# [  115.685629] usb 1-1: new full-speed USB device number 3 using xhci-hcd
[  115.838354] usb 1-1: New USB device found, idVendor=15a2, idProduct=a50f, bcdDevice= 0.00
[  115.846527] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  115.853660] usb 1-1: Product: USB-UART
[  115.857402] usb 1-1: Manufacturer: Freescale
[  115.861665] usb 1-1: SerialNumber: TEST_1.0
[  115.874756] cdc_acm 1-1:1.0: ttyACM0: USB ACM device

root@trenz2019:~# [  126.225619] xhci-hcd xhci-hcd.0.auto: xHCI host not responding to stop endpoint command.
[  126.249831] xhci-hcd xhci-hcd.0.auto: xHCI host controller not responding, assume dead
[  126.257745] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up
[  126.263633] usb 1-1: USB disconnect, device number 3


After this, USB is disabled (no USB detection occurs for any device).

I have tried connecting a mouse, multiple mass storage devices, and hubs. This is the only device that kills USB.

When connecting this same device to Windows 10 and Ubuntu 18.04.4 LTS, there are no issues. On Windows, a COM port is created and communication works. On Ubuntu, the "ttyACM0" device is created and communication works.

If the CDC-ACM driver is not included in the Petalinux kernel, the device does not get disconnected after 10 seconds, but no "ttyACM0" is created.

I have tried the following hardware configs, in each case adding the CDC-ACM driver to Kernel Configuration:
2018.3
   - Custom hdf with configuration from Section 9 of 2018.3 TE0820 Test Board document
   - Prebuilt hdf with prebuilt Petalinux image
   - Prebuilt hdf with configuration from Section 9 of 2018.3 TE0820 Test Board document
2019.2
   - Prebuilt xsa with configuration from Section 9 of 2019.2 TE0820 Test Board document, found here: https://wiki.trenz-electronic.de/display/PD/TE0820+Test+Board

One additional item of note is the device will sometimes hold power to the board through USB with the power supply off. Output still appears through PuTTY.

Any help is appreciated. Thank you.
Title: Re: XHCI Dies When Connecting CDC-ACM Device
Post by: JH on February 24, 2021, 03:19:48 PM
Hi,
did you test also with prebuilt Boot.bin and image.ub of the 19.2 design?
Simple copy files on SD and boot from SD.
br
John
Title: Re: XHCI Dies When Connecting CDC-ACM Device
Post by: jkaoe on February 24, 2021, 04:19:11 PM
Thank you for the reply.

Without kernel modifications, I receive the following output from prebuilt 2019.2:


root@petalinux:~# [   28.376779] usb 1-1: new full-speed USB device number 2 using xhci-hcd
[   28.529542] usb 1-1: New USB device found, idVendor=15a2, idProduct=a50f
[   28.536239] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   28.543371] usb 1-1: Product: USB-UART
[   28.547116] usb 1-1: Manufacturer: Freescale
[   28.551376] usb 1-1: SerialNumber: TEST_1.0


I left the device connected for 10 minutes. No signs of disconnection. Also no tty created.
Title: Re: XHCI Dies When Connecting CDC-ACM Device
Post by: JH on February 26, 2021, 07:09:37 AM
Hi,
did you add our device tree modification to your project?
https://wiki.trenz-electronic.de/display/PD/TE0820+Test+Board#TE0820TestBoard-SoftwareDesign-PetaLinux

For your USB-UART device usage itself you must also check for drivers or write your own one if there no drivers exists fro ARM architecture.
br
John
Title: Re: XHCI Dies When Connecting CDC-ACM Device
Post by: jkaoe on February 26, 2021, 03:27:24 PM
Yes, the device tree modification was added in all attempts with customized configurations.

As for the drivers, I was attempting to use the CDC-ACM Driver through kernel configuration. I tried CDC-ACM because that is the driver used for the device on Ubuntu and Windows. I did not see a Freescale specific CDC-ACM driver and wasn't sure I needed one since both Windows and Ubuntu had no issues with the device. The USB XHCI and cdc-acm code is vastly different between Petalinux and Linux. Like you say, I may need to either modify the USB code or write a driver for this device. Thought I would check here before going down that path.

Thank you!
Title: Re: XHCI Dies When Connecting CDC-ACM Device
Post by: JH on February 28, 2021, 08:34:45 AM
Hi,
did you checked:
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841624/Zynq-7000+AP+SoC+USB+CDC+Device+Class+Design+Example+Techtip

at first generate test_board design without any changes, if when this work like our prebuilt binaries, start to add modifications from the link above. --> i would also recommend to clear petalinux project from time to time (petalinux-build -x mrproper), so it reload all sources, sometimes it didn't recognised all changes.

br
John