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.

Configure USB1 interrupt in Omap L-138

Hi all,
I'm using OMAP L-138 and want to use USB1.1, I pick usb_dev_bulk to modify on it to match my application needs.
In usb_dev_bulk.c:


static void ConfigureDSPINTCIntUSB (void)
{
    IntRegister(4, USB0DeviceIntHandler);
    IntEventMap(4, SYS_INT_USB0);
    IntEnable(4);
}

If this code configures the USB2.0, what to make to on it to let it configure USB1.1 instead of USB2.0 ??
Urgent help please. Regards.
Muhammad

  • I would guess changing USB0 to USB1 might work. I would be more concerned about the application. The usb_dev_bulk example demostrates the board as USB bulk device on the OTG port. The USB1.1 port is host only.  The USB 1.1 OHCI controller and USB 2.0 OTG controller are totally different. Last I checked, StarterWare does not have any examples for the USB 1.1 OHCI controller.

  • Hi Norman,
    thanks for replying on my question.
    USB0DeviceIntHandler() is implemented in " usbdhandler.c " for USBOTG, so, changing the name won't work.
    I tried to make a modification on it to work for USB1 but I didn't find the macros for USB1 which is used to make this modification, so, like what you said, StarterWare does not have any examples for the USB 1.1 OHCI controller.
    I really appreciate your help.
    Regards.
    Muhammad

  • The USB 2.0 OTG controller uses a Mentor Graphics core. The USB 1.1 OHCI controller uses a OHCI compliant core. The register maps are totally different. There is not much point in trying to port StarterWare USB OTG code to use OHCI. What are trying to do? The OHCI cannot be used as a USB Device. It must be a USB Host.

  • Hi Norman,
    thanks for your articulating.
    I agree with you that porting StarterWare USBOTG code to use OHCI is an extraneous way.
    I'm trying to connect my OMAP L-138 experiment kit to USRP B100 via USB. Fortunately, I found a USB cable that connects my USRP to OMAP L-138 USB OTG, I think that my problem is solved finally.
    I appreciate your help.
    Thank you very much.
    Regards.
    Muhammad

  • The USRP B100 is a USB Device. You'll need your board to be a USB Host. StarterWare has some USB OTG Host examples, usb_host_*. Th examples support a specific type of device, eg MSC.

  • Hi Norman,
    Can you told me the difference between the usb_host example and the usb_bulk example ??
    " The USB mass storage device class allows an application to act as a physical storage device for use by another USB application or host PC ", so, how can I use MSC example to let me communicate with a B100 which sends data as 512Byte packets ?
    Regards.
    Muhammad

  • StarterWare has only 3 host examples, usb_host_kb, usb_host_mouse and usb_host_msc. That allows you to plug in a keyboard, mouse or drive into your EVM. Each type of device uses different types of USB endpoints and a class driver code above those endpoints. I know little about the B100. Sounds likes your B100 uses a Bulk endpoint with a minimal USB class code library called libusb. In the case, the MSC example is closest. You would have to replace all the MSC related class driver code with something that is libusb compatible. Appears that Ettus has host side code that would probably port over to the EVM.

    The usb_bulk_example application is on USB Host on a PC. It talks to the EVM that has the USB Device rols and is running usb_dev_bulk example. You might be able to use the usb_bulk_example code to replace the MSC class code in usb_host_msc. I doubt it though as the usb_bulk_example code has a lot of Windows calls in it.

  • Hi Norman,
    thanks for replying on my question.

    In the case, the MSC example is closest. You would have to replace all the MSC related class driver code with something that is libusb compatible. Appears that Ettus has host side code that would probably port over to the EVM.

    I don't understand the above 2 lines, can you clarify more?

    Thanks in advance.
    Muhammad

  • Some guesses. You are going to have to dig deep into both StarterWare and Ettus code. I think the usb_host_msc code stack consist of these files:

    examples\evmOMAPL138\usb_host_msc\usb_host_msc.c - application
    third_party\fatfs\src\ff.c - FAT file system code
    usblib\host\usbhmsc.c - USB MSC class code
    usblib\host\usbhscsi.c - USB SCSI commands
    usblib\host\usbhostenum.c - General USB Host code
    drivers\usb.c - Hardware code

    I am guessing you woud keep the bottom 2 layers and replace everything above that with USB Host code that the B100 expects to talk to. Use the usbhscsi.c as an example of how to glue the lowest StarterWare layers to the bottom of Ettus code. A google gives these for reference:

    http://files.ettus.com/uhd_docs/manual/html/
    http://code.ettus.com/redmine/ettus/projects/uhd/wiki
    http://code.ettus.com/redmine/ettus/projects/uhd/repository/revisions/master/show/host

    The above links suggest that the B100 uses a libusb USB stack. I suggest you read up on libusb. The learning curve on USB is rather steep but is unfortunately unavoidable.

  • Hi Norman,
    thanks for your valuable clarification, I'll go through this and If I face any problem, I'll contact you.
    I really appreciate your help.
    Regards.
    Muhammad