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.

AM335x OTG port

Other Parts Discussed in Thread: AM3354

Hi,

i m using a custom board based on AM3354. i m trying to use the USB0 as an OTG dual role: peripheral and host;

i m trying to use the AM335X EVM 15x15 Baseboard configuration.

i have problems trying to connecting the board to a host PC : the PC can't recognize the board as a peripheral.

trying board to be host by connecting an usb device to the port but it can't be detected by the board.

when i force the id pin to be grounded via 10k pull down resistor then the board recognize the usb device. but in this case , i m loosing the peripheral mode.

how should i connect the ID pin for dual role mode ? even it left floating i have no response: no host test no device test passed !!

how the usb otg controller switch between peripheral and host mode ?

thanks a lot

  • Mokh AFM said:
    i have problems trying to connecting the board to a host PC : the PC can't recognize the board as a peripheral.

    Please provide the log of command 'cat /proc/driver/musb_hdrc.0'.

    You have to ensure you have a USB gadget driver loaded or built in.

    Mokh AFM said:
    trying board to be host by connecting an usb device to the port but it can't be detected by the board.

    Please ensure you use a 'micro-A' cable, which has the ID pin grounded, plugging into the micro-AB receptacle on the EVM. the 'micro-A' cable has ID pin float, with which the OTG will not work in host mode.

    Mokh AFM said:
    when i force the id pin to be grounded via 10k pull down resistor then the board recognize the usb device. but in this case , i m loosing the peripheral mode.

    That seems telling you did not use a 'micro-A' cable in host mode. To be safe, you should use <10Ohm resistor to ground the ID pin. The behavoir of grounding ID pin with 10K is undefined.

    Mokh AFM said:

    how should i connect the ID pin for dual role mode ? even it left floating i have no response: no host test no device test passed !!

    how the usb otg controller switch between peripheral and host mode ?

    As that on the evm, connected the ID pin to the micro-AB receptacle and let the cable to decide the mode.

  • Bin Liu said:
    the 'micro-A' cable has ID pin float, with which the OTG will not work in host mode.

    Sorry, I meant 'micro-B' cable.

  • thanks Bin for your reply,

    when trying to simulate the microA with ID pin grounded, i got :

    root~# cat /proc/driver/musb_hdrc.0
    Status: MHDRC, Mode=Host (Power=e0, DevCtl=19)
    OTG state: a_wait_vrise; active
    Options: pio, otg (peripheral+host), [eps=16]
    Peripheral address: 00
    Root port status: 00000100
    Gadget driver: android_usb

    then, when connecting the device i got : 

    [ 1809.062713] usb 2-1: new high-speed USB device number 14 using musb-hd
    rc
    [ 1809.182708] usb 2-1: device descriptor read/64, error -71
    [ 1809.412719] usb 2-1: device descriptor read/64, error -71
    [ 1809.642730] usb 2-1: new high-speed USB device number 15 using musb-hdrc
    [ 1809.762725] usb 2-1: device descriptor read/64, error -71
    [ 1809.992706] usb 2-1: device descriptor read/64, error -71
    [ 1810.222686] usb 2-1: new high-speed USB device number 16 using musb-hdrc
    [ 1810.642700] usb 2-1: device not accepting address 16, error -71
    [ 1810.762725] usb 2-1: new high-speed USB device number 17 using musb-hdrc
    [ 1811.182678] usb 2-1: device not accepting address 17, error -71
    [ 1811.188964] hub 2-0:1.0: unable to enumerate USB device on port 1

  • Have you tried plugging in different USB devices and they all have the same issue? Did you ground the ID pin with less than 10OHm resistor?

    To debug this USB issue, I recommend not use Android, but Linux. Can you please download the latest Linux SDK (6.0) prebuilt package to see if the issue still happens?

    http://downloads.ti.com/sitara_linux/esd/AM335xSDK/latest/exports/am335x-evm-sdk-bin-06.00.00.00.tar.gz

    If the issue still happens, I suspect it is h/w signal integrity issue. Please share your USB portion of the Schematics.

    And if you connect a USB mouse, does it enumerate successfully?