USB OTG disconnect the USB Host device might slow problem.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

USB OTG disconnect the USB Host device might slow problem.

ソリューションへジャンプ
1,264件の閲覧回数
takashitakahash
Contributor III

Dear community.

Our customer has question below.

When using   OTG port of  USB Function in i.MX6DL , there is a problem that the cutoff measure when disconnect USB Host device  is slow.
When the source cord was confirmed, it was the following cord.
It's defined as 155ms-200ms on Spec in USB OTG defined by usb.org, but their system is 500ms setting.


I think there is no problem even in the 155ms according to the Spec. Or it will become a problem because it is set to 500ms in the relationship of the electrical characteristics of i.MX6.


[Source cord]
/* B-Idle to A-Disconnect */
#define TA_BIDL_ADIS         (500)        /* TA_BIDL_ADIS: section 5.2.1
                                         * 155ms ~ 200 ms (but not enough)
                                         */

ラベル(1)
0 件の賞賛
1 解決策
804件の閲覧回数
CarlosCasillas
NXP Employee
NXP Employee

Hi Takashi,

 

I have internally escalated your request and below you can find the summarized reply:

 

The B_IDLE to A_DISCONNECT is an OTG specification and applies only to OTG role change. Is that what you are trying to do? i.e. role change without disconnecting the cable?

 

 The problem is likely that there is some capacitance on the VBUS signal that keeps its charge too long and thus it takes a long time before the disconnection is detected.

 

There is a resistor in the PHY that can be enabled to discharge VBUS. This resistor can be enabled with the VD bit (bit 0) in the USB_OTGSC register. Software can enable this bit after the controller reported SUSPEND. If VBUS is at 5V it will draw some 8 mA. If the cable is disconnected, the VBUS voltage will drop quickly (depending on the Vbus cap) and if the cable is not disconnected, VBUS will remain at its level. Therefore, the resistor should be disabled when a disconnection is detected or after a timeout when the cable is not disconnected.

Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
805件の閲覧回数
CarlosCasillas
NXP Employee
NXP Employee

Hi Takashi,

 

I have internally escalated your request and below you can find the summarized reply:

 

The B_IDLE to A_DISCONNECT is an OTG specification and applies only to OTG role change. Is that what you are trying to do? i.e. role change without disconnecting the cable?

 

 The problem is likely that there is some capacitance on the VBUS signal that keeps its charge too long and thus it takes a long time before the disconnection is detected.

 

There is a resistor in the PHY that can be enabled to discharge VBUS. This resistor can be enabled with the VD bit (bit 0) in the USB_OTGSC register. Software can enable this bit after the controller reported SUSPEND. If VBUS is at 5V it will draw some 8 mA. If the cable is disconnected, the VBUS voltage will drop quickly (depending on the Vbus cap) and if the cable is not disconnected, VBUS will remain at its level. Therefore, the resistor should be disabled when a disconnection is detected or after a timeout when the cable is not disconnected.

Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
804件の閲覧回数
takashitakahash
Contributor III

Dear Carlos.

Thank you for your kindly answer.

I was able to understand the mechanism of USB OTG cut off time by your description.

There are described in the following link to check the i.MX6 BSP "imx_3.10.53_1.1.0_ga" of NXP, Inc., it had been implemented in 160ms in the source code of the BSP.

Customers will probably be used in the latency of 160m

http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/usb/chipidea/otg_fsm.h?h=im...

Line 40:
/ * B-Idle to A-Disconnect * /
#define TA_BIDL_ADIS (160) / * TA_BIDL_ADIS: section 5.2.1
    * 155ms ~ 200 ms
       * /

Thank you,

Best Regards.

T.Takahashi.

0 件の賞賛