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.

when to set/clear the SESSION bit of the OTG Device Control Register (DEVCTL)?

Other Parts Discussed in Thread: OMAP3530

In the OMAP3530 TRM, it says that:

"When operating as an 'A' device, you must set or clear this bit start or end a session. When operating as a 'B' device, this bit is set/cleared by the USB controller when a session starts/ends.You must also set this bit to initiate the Session Request Protocol. When the USB controller is in Suspend mode, you may clear the bit to perform a software disconnect. A special software routine is required to perform SRP. Details will be made available in a later document version."

When operating as a 'B' device, and we want to put the USB controller in suspend mode, should we clear this bit to perform a software disconnect? the SOFTCONN bit in the POWER register seems have the same functionality, what are the differences between them?

  • Normally the USB host puts the bus into suspend mode, not the USB device.  I do not know of any standard protocol for the USB device to request suspend mode.

     

    There maybe a way for the USB software driver to send a request to the host asking it to put the bus into suspend mode, but you would need to research the driver capabilities to determine if this is possible.

     

    Note: The Session bit can be cleared to perform a software disconnect if the USB controller is in suspend mode, but this bit should not be cleared while the USB controller is not suspended because it will result in undefined behavior.

     

    Clearing the SOFTCONN bit will put the ULPI phy into non-driving mode (OPMODE[1:0] set to 01b) and D+ and D- are tri-stated.  This will cause a disconnect from the USB bus.

     

    Regards,

    Paul