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.

C6A8168 USB



Hi

My Image set USB host mode ,but the pin USB0_DRVVBUS output low 。I try to supply 5V for USB interface,but the USB not work still。

Best Regards

Tong

 

 

  • Hi,

    I am not a Liunx guy and can not say much about what the Image does. There is a Linux forum if you want to go through that route. However, I can tell you what is expected from USB operation perspective.

    The mode that the USB is operating depends upon the state of the USB ID pin. On the 8168 device it is controlled by s/w. Make sure the iddig field is programmed with the right value. After proper initialization and you set the SESSION bit, the controller will assume the role of a Host and will drive the USBDRVVBUS high to enable the external power supply to source 5V power.

    While doing this you will be getting a USBDRVVBUS interrupt (if enabled) because it changed state.

    That said, check the content of POWER and DEVCTL register and let us know. Also consult the TRM to identify the right register (I think it is USBx_MODE) and field to configure the state of the USB ID pin.

    Best regards, Zegeye

  • Hi,

    I checked the IDDIG value. USB0_MODE register is 0x0; DEVCTL register is 0x80.

    My CPU serial number is X8168X3894BCYG (18ADEZC).If ROMCODE change will effect USB?

    Best regards,

    Tong

  • Hi,

    OK. Please try the followings.

    Set bit 7 of USB0_MODE register and then after set DEVCTL[bit0=SESSION].

    DEVCTL[bit7-bDevice] = 1/0 => Device/Host role assumption only when DEVCTL{SESSION] is set to 1.

    Let me know the outcome after performing this.

    Best regards, Zegeye

  • Hi,

    I try to do,It's OK. Pin DRVVBUS output high. But  bit 7 of USB0_MODE register is reserved. The CPU Version change ? Access USB device,kernel print:

    root@MyPBX:~#cat /proc/driver/musb_hdrc.0

    Status: HDRC, Mode=Host (Power=e0, DevCtl=19)

    OTG state: a_wait_bcon; inactive

    Options: ?dma?, host, debug=0 [eps=16]

    Root port status: 00000100

    CPPI: txcr=0 txsrc=0 txena=0; rxcr=0 rxsrc=280de80 rxena=0 

    root@MyPBX:~# usb 1-1: new high speed USB device using musb-hdrc and address 6

    usb 1-1: device descriptor read/all, error -71

    usb 1-1: new high speed USB device using musb-hdrc and address 7

    usb 1-1: device descriptor read/all, error -71

    usb 1-1: new high speed USB device using musb-hdrc and address 8

    usb 1-1: device descriptor read/8, error -71

    usb 1-1: device descriptor read/8, error -71

    usb 1-1: new high speed USB device using musb-hdrc and address 9

    usb 1-1: device descriptor read/8, error -71

    usb 1-1: device descriptor read/8, error -71

    hub 1-0:1.0: unable to enumerate USB device on port 1

     

    root@MyPBX:~# cat /proc/driver/musb_hdrc.0

    Status: HDRC, Mode=Host (Power=f0, DevCtl=5d)

    OTG state: a_host; active

    Options: ?dma?, host, debug=0 [eps=16]

    Root port status: 00000501

    CPPI: txcr=0 txsrc=0 txena=0; rxcr=0 rxsrc=280de80 rxena=0

     

    Best regards

    Tong

     

     

  • Hi,

    I know bit 7 is reserved on PG1.x devices. On PG2.x devices it is not. I have inspected the User's Guide and it is missing that information so bit 7 needs to be set.

    I am troubled with the DEVCTL register content. DEVCTL[bit7] = 1 when DEVCTL[bit0] is 1 implies that the controller is assuming a role of a Device and not Host. Please make sure that the content of the MODE register is Zero other than bit 7.

    I will move your question to Linux Forum.

    Best regards, Zegeye

  • Hi,

    I consulted TI FAE.He asked question at Linux Forum.http://e2e.ti.com/support/embedded/f/354/p/136619/491338.aspx#491338.

    Now Problem has been solved.

    Thanks Zegeye!

    Best regards,

    Tong