• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » Android » Android forum » USB OTG couldn't work in "both host & peripheral " mode
Share
Android
  • Forum
Options
  • Subscribe via RSS

USB OTG couldn't work in "both host & peripheral " mode

USB OTG couldn't work in "both host & peripheral " mode

This question is not answered
Baker Huang
Posted by Baker Huang
on Mar 18 2012 22:30 PM
Intellectual360 points

Hi All ,

    I'm developing the project on DM3730 + TPS65920 ,using Android 2.3.1 , kernel 2.6.32 .I get stuck when debug USB OTG .

    In Driver Configuration ,

    select "Both host and peripheral" , it is ok when the pad works as device .But when it works as host ,it can detect the usb device first time ,plug the usb device out ,and plug in again ,the usb device could not be detected .

  But it works ok when select  "USB Host"  or  "USB Peripheral"  in Driver Configuration .

  Detail Configuration is as follow :

 Device Drivers  --->
        USB support --->
                 (*)TWL4030 USB Transceiver Driver 
                 --*--NOP USB Transceiver Driver
                  Driver mode(Both host and peripheral:   USB OTG (On The Go) Device) --->
                              (X) Both host and peripheral: USB OTG ( On The Go ) Device .
                  
USB Gadget Support --->
                           
USB Peripheral Controller (Inventra HDRC USB Peripheral (TI , ADI ,.....))---->
                                     (X) Inventral HDRC USB Peripheral (TI ,ADI ,....)
                        
(*)USB Gadget Drivers (Android Gadget) ---->
                                     (X) Android Gadget 

There are two  interrupt :

One is applied in twl4030-usb.c  (twl4030_usb_irq) ,which is used to detect the usb link  ,

the other  is applied in musb_core.c (generic_interrupt ) ,which is used to set vbus .

From the log ,it will trigger twl4030_usb_irq ,and then  trigger generic_interrupt when it works ok .

When the pad use as host ,it  can trigger twl4030_usb_irq ,but could not trigger generic_intterrupt .

static irqreturn_t generic_interrupt(int irq, void *__hci)
{
 unsigned long flags;
 irqreturn_t retval = IRQ_NONE;
 struct musb *musb = __hci;

 spin_lock_irqsave(&musb->lock, flags);

 musb->int_usb = musb_readb(musb->mregs, MUSB_INTRUSB);
 musb->int_tx = musb_readw(musb->mregs, MUSB_INTRTX);
 musb->int_rx = musb_readw(musb->mregs, MUSB_INTRRX);

 if (musb->int_usb || musb->int_tx || musb->int_rx)
  retval = musb_interrupt(musb);

 spin_unlock_irqrestore(&musb->lock, flags);

 return retval;
}

 


                


                 
  

dm3730 tps65920 usb otg
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Baker Huang
    Posted by Baker Huang
    on Mar 19 2012 03:00 AM
    Intellectual360 points

    I want to know more about register MUSB_INTRUSB (0x480AB00A) on DM3730 ,but find nothing about it in the Datasheet .

     

    Does anyone have the same problem ? Thank you .

     

           Best regards .

           Baker Huang

    dm3730 tps65920 usb otg
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Baker Huang
    Posted by Baker Huang
    on Mar 28 2012 00:07 AM
    Intellectual360 points

    The problem has been solved .

    dm3730 otg
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Vishveshwar Bhat
    Posted by Vishveshwar Bhat
    on Mar 28 2012 01:45 AM
    Genius9540 points

    Could you tell how the problem was solved. This could be useful for other users too.

    Thanks.

    ---------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    ---------------------------------------------------------------------------------------------------------

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use