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 resume setup

Other Parts Discussed in Thread: TPS65930, OMAP3530

Hi, we're using WinCE BSP 6.14, and using the HSUSB0 port on OMAP3530,  TPS65930 as PHY.

the following is the process the BSP do when resume from suspend(sleep):

1)turn on the OTG PHY power in TPS65930

2)start the OTG controller clock on OMAP3530

3)if disconnected and A device is present, enable the interrupt and set the POWER_SOFTCONN bit in the POWER register.

4) in the ThreadRun function, we run to "if (m_pOTG->dwPwrMgmt == MODE_SYSTEM_RESUME)",  call SoftResetMUSBController, and:

                   if (m_pTransceiver->IsBDeviceConnected() ||
                        ((devCtl & DEVCTL_VBUS) == DEVCTL_VBUSVALID))
                        {
                        SessionRequest(TRUE, TRUE);
                        m_timeout = DO_USBCLK_TIMEOUT;
                        }

I think we should use "&&" instead of "||", because when when an A Device is connected,((devCtl & DEVCTL_VBUS) == DEVCTL_VBUSVALID) would be TRUE,.What will happen if we call "SessionRequest(TRUE, TRUE)" when an A Device is connected?

in our custom board, we can't connet to PC again when resume back, I guess  SessionRequest(TRUE, TRUE) driver the VBUS to 5v, so even if we unplug the cable, TPS65930 can't detect the disconnection, the VBUS is kept driving by the TPS65930, so plug the cable again, nothing changed on VBUS.

In step 4), if a B Device is present( host mode ), it goes as follows:

m_bRequestSession = TRUE;
m_dwStatus |= STATUS_DISCONN_REQUEST;
And then call SoftResetMUSBController,
but m_bRequestSession, m_dwStatus will be reset in the SoftResetMUSBController. ... finally in the timeout handler, it will suspend the controller, no session is requested.

  • If you change it to "&&" the logic would be "if A connected and B connected" and these are mutually exclusive.. it is possible that behavior you are seeing is masked in EVM (have you tried that) due to way things are connected on your board and USB phy that you are using. You can try taking out the second condition instead - seems redundant to me because when A device is connected, session bit should be set by the USB controller rather than SW.

    If your schedule permits, I would also recommend moving to the latest SW to possibly see any improvement. You have two options:

    (a) move to 6.15 baseline

    (b) move to new BSP from TI (http://software-dl.ti.com/sdoemb/sdoemb_public_sw/wince_sdk/01_00_00/index_FDS.html)

    With option (b) you will have better luck getting support and roadmap to EC7

     

    thanks

    Atul