This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM625: about usb

Part Number: AM625

Tool/software:

hi

I recently discovered that there are optimizations for USB in version 10.0, and I would like to ask if there are any optimizations for SDK 8.6. Because when I was debugging USB 2.0, I found that there were frequent communication issues with USB 3.0 on Windows. Windows will display the message (CMPROCB_FAILED-POSTSART).

LCPD-29873   AM62x: host does not detect USB  gadget

  • Hi Hao,

    I am unable to find any information of CMPROCB_FAILED-POSTSART on the internet.

    Because when I was debugging USB 2.0, I found that there were frequent communication issues with USB 3.0 on Windows.

    Please provide details of your AM625 USB use case. What SDK version do you use? What USB gadget is loaded on AM625? Is the USB issue happened during enumeration or post enumeration?

  • Sorry about the question about rndis. I am using AM62-sk, sdk8.6 and 10 all have this problem. It feels like there is a problem with the dwc3 layer, because the 0x80000004 that rndis should send is received by the rndis_msg_parser function, causing an error. When testing the windows computer, USB2.0 does not This problem will occur when plugging in USB 3.0, but there will be no problem when plugging in USB 3.0 through the hub.

    computer log

    usb_log.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    =========================== USB Port4 ===========================
    Connection Status : 0x02 (Device failed enumeration)
    Port Chain : 2-4
    Properties : 0x01
    IsUserConnectable : yes
    PortIsDebugCapable : no
    PortHasMultiCompanions : no
    PortConnectorIsTypeC : no
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    usb_hub_log.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    =========================== USB Port3 ===========================
    Connection Status : 0x01 (Device is connected)
    Port Chain : 2-3-3
    ========================== Summary =========================
    Vendor ID : 0x0525 (PLX Technology, Inc.)
    Product ID : 0xA4A2
    USB Version : 2.01
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Hao,

    Do you mean when attach the AM62x USB port to the PC USB2.0 port, the issue doesn't happen; but if attach to the PC USB3.0 port, it happens?

    I don't have a Windows PC to test with, but the kernel message basically means the USB drivers on AM62x doesn't understand the received RNDIS message.

    Can you first please try to disable "RNDIS support" in the Ethernet Gadget in kernel menuconfig to see if the issue still happens?

  • hi bin

     Although it is a problem related to rndis, I really appreciate your help.

    Do you mean when attach the AM62x USB port to the PC USB2.0 port, the issue doesn't happen; but if attach to the PC USB3.0 port, it happens?

    Yes, this phenomenon only occurs when the USB is directly connected to a computer with USB3.0 or higher.

    I don't have a Windows PC to test with, but the kernel message basically means the USB drivers on AM62x doesn't understand the received RNDIS message.

    I checked the rndis.c driver file and found that the driver does not have this definition when parsing the switch. According to the rndis, this 0x800000004 message should be sent from Linux to PC, and should not appear on the Linux side. I confused about why the message that rndis should send appears in the rndis receive. Is there a problem with the dwc3 layer?When the problem in the picture occurs, check that the USB status is in a suspended state

    Can you first please try to disable "RNDIS support" in the Ethernet Gadget in kernel menuconfig to see if the issue still happens?

    I will give it a try, I found the issue through rndis, I don't know if there's any way to test the enumeration problem USB2.0 and USB3.0 without going through rndis.

  • Hi Hao,

    I confused about why the message that rndis should send appears in the rndis receive. Is there a problem with the dwc3 layer?When the problem in the picture occurs, check that the USB status is in a suspended state

    It seems the message 0x80000004 is in the received USB data. the function rndis_msg_parser() is a USB transfer completion call, which is called to check the received USB package.

    I will give it a try, I found the issue through rndis, I don't know if there's any way to test the enumeration problem USB2.0 and USB3.0 without going through rndis.

    Yes please test with the rndis function removed in the gadget driver to see if the issue still happens.

  • hi bin

    I used g_serial to test and did not find this issue with the USB 3.0 interface. When using the RNDIS of g_ether, this only occurs when directly connecting to USB 3.0 devices.

  • Hi Hao,

    Thanks for the update.

    Which USB gadget function will you use in your project?

    Can you first please try to disable "RNDIS support" in the Ethernet Gadget in kernel menuconfig to see if the issue still happens?

    If you would use g_ether, have you followed this instruction to recompile g_ether driver with RNDIS support removed to see if the issue still happens?

  • hi bin

    I tried disabling rndis and found Ethernet Gadget devices on the PC side. Do I need to write drivers similar to rndis on the PC side to recognize Ethernet Gadgets.
    The first picture shows an occasional phenomenon that occurs during startup, but it returns to normal after a few restarts.

  • Hi Hao,

    Thanks for the test. It appears Windows doesn't recognize g_ether without RNDIS gadget functions.

    Please run another test - in kernel menuconfig where you disabled "RNDIS support", can you please enable the next option "Ethernet Emulation Model (EEM) support" to see Windows can enumerate g_ether?

    If this test fails too, can you please use g_ncm instead of g_ether on AM62x? According to the discussion linked below, it seems Windows 11 is better supporting NCM.

    https://www.reddit.com/r/embedded/comments/aeqxbl/which_usbethernet_standard_should_i_implement/

  • hi bin
    Thank you very much for your help. After testing, the function can be achieved using modprobe g.ncm. Thank you very much for your support. The lower version of Win10 does not have an NCM driver, and it has been handed over to a colleague to try and solve. 

    I occasionally encounter the problem shown in the figure when mounting, and there will be no error after power failure and restart.

  • Hi Hao,

    After testing, the function can be achieved using modprobe g.ncm.

    Glad to hear g_ncm works well with Windows.

    I occasionally encounter the problem shown in the figure when mounting, and there will be no error after power failure and restart.

    Can you please test with SDK10.0 kernel to see if this problem still happens? I see the dwc3 drivers has many changes since SDK8.6 kernel.

  • I see the dwc3 drivers has many changes since SDK8.6 kernel.

    Are there any patches that can implement these changes besides upgrading the SDK. Because the project has determined SDK 8.6, upgrading to 10 may require modifying the cross compiler.