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.

OMAP-L138: OMAP-L138 TI-RTOS USB Host MSC Example does not work

Part Number: OMAP-L138
Other Parts Discussed in Thread: DA8XX

The TI-RTOS USB Host MSC example for the OMAP-L138 does not appear to work.

No device enumeration occurs. There are two USB controllers capable of host mode on the LCDK but the example uses only one and it unclear which one it is using.

The source code documentation and the schecmaitcs are at odds with each other. The source code claims it is using USB0 with a USB-A connector.

on the LCDK the USB0 peripheral has a Mini USB-B connector and USB1 has a USB-A connector.

If I attempt to use USB1 the driver hangs on the USB_open call.

so...

1. Does this example work?

2. Which USB controller is used? (USB0 or USB1 and which is connected to which connector on the LCDK?

3. How to make the other controller work (ie USB1)?

4. How to make both controller work?

5. Ultimately I want to be able to mount file structured media on the MMCSD SD-Card, USB0 and USB1, this SHOULD be possible, but again, no examples or documentation?

6. Can I have access too all three using LINUX? Does Linux support BOTH USB controllers for host MSC mode? Without a kernel rebuild!?

7. Is there a Linux USB host MSC example - should be a very simple app showing FATFS access. 

  • Addendum,

      Where is this document:

    TI-RTOS USB  USB stack    USB Library User’s Guide (in TI Resource Explorer)

    USB Library API Guide (in TI Resource Explorer)

    (taken from page 13 of SPRUEX3U)

    This document does not exist in the CCS Resource Explorer (In fact NOTHING exists for the OMAP processors in the CCS Resource Explorer!?)

    It cannot be found on the TI web site

    It cannot be found in a Google search?

    Where is it hidden?

    Finally, is USB supported under TI-RTOS on the OMAP processors?

  • Hi,
    Which Processor SDK RTOS are you using?
    Best Regards,
    Yordan

  • Hello Glenn,

    Documentation for the USB examples in Processor SDK RTOS is located here: http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_device_drv.html#usb

    The USB examples use the OTG port (J2) on the LCDK. You will need a mini-USB to USB adapter like the one shown below (make sure the adapter says OTG.)

    The OTG port is connected to USB0, see below:  

    I just verified the USB Host MSC example works - you should see something similar to below in your UART terminal.

    RTOS USB Host MSC example!!
    
     Test in progress.
    0:>
    0:>ls
    ----A 2007/06/05 11:38   1020000B  test.txt
    D-HS- 2018/05/09 09:34         0B  System Volume Information
    ----A 2018/11/01 17:03     12636B  csl_a15_startup.c
    D---- 2018/10/31 14:46         0B  gpmc_benchmark_a15
    ----A 2018/11/08 11:02    397276B  gpmc_benchmark_a15.out
    
       3 File(s),   1429912 bytes total
       2 Dir(s),    1942144K bytes free
    0:>

    On OMAP-L138, USB0 and USB1 are different controllers. USB0 is a USB2.0 OTG controller while USB1 is a USB1.1 OHCI controller. All of our USB examples use USB0 OTG. We don't have any USB examples for USB1 OHCI and don't plan on adding or porting any to it.

    Glenn Jones said:
    The source code documentation and the schecmaitcs are at odds with each other. The source code claims it is using USB0 with a USB-A connector.

    I believe you are referring to the lines of code below.

    /* on idkAM572x, K2G USB0 is attached to USB-A connector */
    #define USB_INSTANCE            0       /* USB #0 (the USB-A host port) on the EVM */
    /* USB #1 (the USB-OTG port) on the EVM */

    This example (and all examples in Processor SDK) are written for multiple Processor platforms to make it easy to port software when upgrading/changing devices, which is why you see mentions of AM572x and K2G. The source code comments could do a better job of clarifying which platform it's referring to. I'll submit doc feedback to address this. 

    I'll need to get back to you regarding your Linux questions. 

    Regards,
    Sahin

  • Linux has support for both USB2.0 and USB1.1. You should be able to just boot up Linux on your board and connect a device to either port.

  • I have a cable coming in the next few days.

    Are there any examples of Host MSC USB in Linux (for any processor?) 

    I can find no Linux examples for the OMAP-L138, am I missing something?

    I did find a "Hello World" app, but that is not terribly useful as all software will need to talk to devices.

    As for not having a USB 1.1 driver, that is understandable, however a Linux driver exists that can be used to port to a TI-RTOS LLD, is the source for the Linux drivers available?

  • I think the following MUSB section in the Processor SDK Linux documentation will be of interest to you. It contains details on the Linux kernel's USB driver and USB stack. It mostly mentions AM33xx but is also applicable to OMAP-L138 as they have the same Mentor Graphics USB controller. 

    Regards,
    Sahin

  • Sahin,

      Thank you, this document is informative; however, I am looking for a simple Linux example (are Linux examples provided in the SDK? (I cannot fin any), and I am looking for the source code for the USB driver to possibly port to TI-RTOS.

    Thanks! ...Glenn

  • The image above illustrates the layered architecture of Linux's USB stack. As you can see, the drivers are split up into different layers. For the OMAP-L138 hardware drivers (bottom layer), refer to drivers/usb/musb/da8xx.c. For host MSC drivers (top layer), refer to drivers/usb/storage.

    If you're looking for a Linux example showing how to utilize the USB drivers, we don't have that - and that is out of the scope of this forum.

    Is there a reason you are looking to port the Linux drivers instead of using the TI-RTOS-based USB drivers provided inside Processor SDK RTOS?

    Regards,
    Sahin