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.

AM35XX: using USBOTG as USB host only

Other Parts Discussed in Thread: AM3517

Dear Community,

I would like to know if anybody has experience in using the AM35xx (Sitara) USB OTG driver provided with WinCE SDK (I'm using v.01.01.00 Patch 01) in host-mode only. I have a custom AM35xx based board which does not support OTG but only has host interface on this USB port.

Is there an easy way to configure the "standard" driver to start in host only mode? or do I have to write my own USB driver?

 

Best Regards and thank in advance,

Andrea

  • Andrea,

    There are  two USB ports on LogicPD eXperimenter board.  One is OTG port and other one is EHCI port, which is used as host only mode.

    OTG port can be used as host mode or function driver, it is automatically determined by the cable plugged in.

    Not sure what do you by "stardard" driver. EHCI driver uses CE6 common EHCD driver.

    As for your custom AM35xx based board, not sure what has been changed, I can not provide much help there.

    Things to look at are: USB PHY changes, GPIO changes etc.

    Thanks,

    Tao

     

  • I'm talking about the OTG port, with integrated PHY, so there's nothing about PHY changes or GPIO changes

     

    In our design we use it at "host-only" port, IOW without OTG support. We tight USB0_ID to GND which should force the OTG device in host mode.

    I've seen that WinCE successfully recognize the USB device if it's attached before the driver loads, otherwise it tries to load the "USB device" part of the driver and something goes wrong..

    IIUC it's wrong to detect "USB device" mode when USB0_ID is forced to GND.

    At the moment I'm trying to understand why inside CAM35xOTG::UpdateInput() function (C:\WINCE600\PLATFORM\COMMON\SRC\SOC\COMMON_TI_V1\AM3517\USB\USBOTG\usbotgpdd.cpp) after a while it sets m_UsbOtgInput.bit.id to 1, which is not correct in our design.

    Any clue is welcome

     

    Best Regards,

    Andrea

  • Hello,

    we use the OTG port also in host mode - we've wired a SMSC9514 chip to it with one extra LAN and four extra USB ports (HUB).

    The LAN chip is recognized and work, also together with a keyboard and mouse on the HUB. But when we plug-in a memory stick it will be recognized and works, but the LAN runs into problems and only if the memory stick is removed and the LAN cable re-plugged (new initializing of the driver), it will work again.

    Its also a little bit strange, that with KITL and kernel debugger enabled, the USB devices won't be recognized - only when they are plugged in one after another, when the system is up and ready.

    As a side note: We had also problems with Linux, but when we switch of the DMA support there (for OTG), everything is working.

    We've decided to wire the SMSC chip to one of the host ports - even if there are known problems with EHCI (TI errata sheet).

    Only informations, but perhaps it will help you ...

     

  • Deal All,

    after debugging for a while the OTG machine state, I've found that I have to do two major things to let the host-only mode work:

    • set the start state to USBOTG_a_idle instead of USBOTG_b_idle and set id inside input bits to zero
    • set device connection timeout (TA_WAIT_BCON) to INFINITE (0xFFFFFFFF) into the registry

    In this way now usb function driver is never called, because USBOTG machine state always stay in USBOTG_b_xxx states

     

    Thanks to anyone how answer to this topic, I leave the above comment in case someone else needs it

     

    Best Regards,

    Andrea