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.

USB OTG : my session never ends!

Other Parts Discussed in Thread: TPS65930, SYSCONFIG, TPS65950, OMAP3530

hi all~ I'm using 3530 with 65930 and WinCE BSP 6.14.01.01.

when 3530 operation as DEVICE, it will not detect the disconnection, that is, DISCON interrupt shuold be triggered. I think the DISCON interrupt is generated when the "VBus < VB_Sess_END", so I check the voltage on the VBUS pad of 65930, even the voltage is 0.005V(I have VRUSB_3V1 VDD switch to VBUS), the DEVCTL still read 0x99 (Above Session End, below AValid).  why?

 

  • Based on your comments I assume the TPS65930 is connected to the HSUSB0 port.  Can you please confirm this?  If so, are you using this USB port in host mode or peripheral mode?

    I am confused by your comment "I have VRUSB_3V1 VDD switch to VBUS".  Can you provide a description of your VBUS circuit?  If this port is operating as USB host your design should be sourcing 5V to VBUS.  If this port is operating as USB peripheral the USB host will be sourcing 5V to VBUS.

    It sounds like you measured the VBUS signal to be 0.005v while reading a 0x99 value from the DEVCTL register.  The TPS65930 data sheet indicates the minimum B-device session end threshold is 0.2v so you should read "00" from DEVCTL [4:3] if the voltage on VBUS is 0.005v.  How are you reading the DEVCTL register?

     

    Regards,

    Paul

     

  • Thanks paul.

    Based on your comments I assume the TPS65930 is connected to the HSUSB0 port.  Can you please confirm this?  If so, are you using this USB port in host mode or peripheral mode?

    Yes,  TPS65930 is connected to the HSUSB0 port on our board.  We want to use it in peripheral mode, the ID pin of TPS65930 is floating ( Is this enough to make it in peripheral mode?)

    I am confused by your comment "I have VRUSB_3V1 VDD switch to VBUS".  Can you provide a description of your VBUS circuit?  If this port is operating as USB host your design should be sourcing 5V to VBUS.  If this port is operating as USB peripheral the USB host will be sourcing 5V to VBUS.

    Well, the VRUSB_3V1 VDD is one power source of the USB PHY in TPS65930. I have set the SW2VBUS bit of VUSB_DEDICATED1 register in TPS65930, so I have VRUSB_3V1 VDD switch to VBUS. In our board we have TPS65930's VBUS pad connected to the USB connector.

     

    It sounds like you measured the VBUS signal to be 0.005v while reading a 0x99 value from the DEVCTL register.  The TPS65930 data sheet indicates the minimum B-device session end threshold is 0.2v so you should read "00" from DEVCTL [4:3] if the voltage on VBUS is 0.005v.  How are you reading the DEVCTL register?

     I add an IOCTL code to the otg driver, so I can open the driver and call this IOCTL. What I do in the IOCTL is: first, call StartUSBClock(TRUE) to start the clock, and then read the DEVCTL register.

    I also add some DEBUGMSG in the driver in different places:

    before initiate TPS65930,

    Power = 0x20
    DevCtl = 0x88

     

    after initiate TPS65930,

    >Power = 0x20
    >DevCtl = 0x98

     

     

    and after PostInit()

     

     >>Power = 0x20
    >>DevCtl = 0x98

    after connected to PC:
    POWER=0x70.
    DEVCTL=0x99.

    after disconnected from PC:

    POWER=0x60.
    DEVCTL=0x99.

    Below is part of the serial debug message:

     

    T2PowerBus_t::SetT2USBXvcrActive fActive=1.
    USBOTG.DLL DLL_PROCESS_ATTACH
    UpdateDevicePower+UpdateDevicePower-

    Power = 0x20
    DevCtl = 0x88

    HSUSBOTGTransceiver: CARKIT_Reg(0x0), IFC_CTRL_Reg(0x18)
    HSUSBOTGTransceiver: TWL_USB_INT_EN_RISE(0x0), TWL_USB_INT_EN_FALL(0x0)
    HSUSBOTGTransceiver: CARKIT_Reg(0x0), IFC_CTRL_Reg(0x18)
    HSUSBOTGTransceiver: TWL_USB_INT_EN_RISE(0x1f), TWL_USB_INT_EN_FALL(0x1f)
    HSUSBOTGTransceiver:Configure success

    >Power = 0x20
    >DevCtl = 0x98

    OMAPMHSUsbClientDeviceFolder(OTG, Drivers\BuiltIn\MUSBOTG\Hcd, 0x0, 0, 1, 0 ...
    OMAPMHSUsbClientDeviceFolder(OTG, Drivers\BuiltIn\MUSBOTG\UsbFn, 0x0, 0, 2, 0
    ...

    OMAPMHSUSBOTG::PostInit(): Start.
     USBOTG::ActivateChild load device driver at order 0
     USBOTG::ActivateChild load device driver at order 100
    UfnClientLib!UfnCheckPID: WARNING -- using MS reference platform VID/PID
    0x045e/0x00ce (not allowed in shipping platforms)

    OTGUSBClock(1) called
    UpdateDevicePower+OTGUSBClock(0) called
    +StopUSBClock
    OTG SysConfig = 0x5
    ***###StopUSBClock:  EnableWakeupInterrupt(TRUE)
    -StopUSBClock
    UpdateDevicePower++StopUSBClock
    OTG SysConfig = 0x5
    ***###StopUSBClock:  EnableWakeupInterrupt(TRUE)
    -StopUSBClock
    UpdateDevicePower+IsSE0 called with line state = 0x1
    +StopUSBClock
    OTG SysConfig = 0x5
    ***###StopUSBClock:  EnableWakeupInterrupt(TRUE)
    -StopUSBClock
    DeviceFolder::LoadDevice(Drivers\BuiltIn\MUSBOTG\UsbFn) last 88 Ticks USBOTG::
    ActivateChild load device driver at order 101

    DeviceFolder::LoadDevice(Drivers\BuiltIn\MUSBOTG\Hcd) last 25
    TicksUpdateDevicePower++StopUSBClock

    OTG SysConfig = 0x5
    ***###StopUSBClock:  EnableWakeupInterrupt(TRUE)
    -StopUSBClock
    UpdateDevicePower++StopUSBClock
    OTG SysConfig = 0x5
    ***###StopUSBClock:  EnableWakeupInterrupt(TRUE)
    -StopUSBClock
    UpdateDevicePower+IsSE0 called with line state = 0x1
    +StopUSBClock
    OTG SysConfig = 0x5
    ***###StopUSBClock:  EnableWakeupInterrupt(TRUE)
    -StopUSBClock

    >>Power = 0x20
    >>DevCtl = 0x98

    UpdateDevicePower+T2PowerBus_t::SetT2USBXvcrActive fActive=0.
    OMAPMHSUSBOTG::ThreadRun

    UpdateDevicePower+T2PowerBus_t::SetT2USBXvcrActive fActive=1.
    UpdateDevicePower-+StopUSBClock
    OTG SysConfig = 0x5
    ***###StopUSBClock:  EnableWakeupInterrupt(TRUE)
    -StopUSBClock
    UpdateDevicePower+IsSE0 called with line state = 0x1
    +StopUSBClock
    OTG SysConfig = 0x5
    ***###StopUSBClock:  EnableWakeupInterrupt(TRUE)
    -StopUSBClock
    UpdateDevicePower+ResetEndPoints
    m_OTGRegCfg.startupTimeout=5000.

    ThreadRun: wait 1000ms timeout.
    StopUSBClock with operateMode=0, m_dwStatus=0x0
    ResetEndPoints
    ThreadRun: wait 3015ms timeout.
    SuspendTransceiver when timeout.
    +StopUSBClock
    OTG SysConfig = 0x5
    ***###StopUSBClock:  EnableWakeupInterrupt(TRUE)
    -StopUSBClock
    UpdateDevicePower+T2PowerBus_t::SetT2USBXvcrActive fActive=0.
    UpdateDevicePower-

     

  • I have forwarded your post to someone that supports the TPS65950 and ask him to review your problem.  This issue seems to be related to TPS65950 configuration or functionallity becasue the OMAP3530 is just doing a register read across ULPI.  I hope he has some suggestions that could explain this issue.

     

    Regards,

    Paul