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.

TI-RTOS - Where are the USB examples?

Other Parts Discussed in Thread: SYSBIOS, MSP430F5529, OMAPL138

Hello,

I'm desperate for USB examples on SysBIOS / TI-RTOS. However, I can't seem to find any.

On the TI-RTOS (SysBios) user's guide they refer you to the TI-RTOS user's guide, and on the TI-RTOS user's guide they say to "See the USB examples for reference modules". But where are the examples??

I've looked everywhere but couldn't find anything. When using the Resource Explorer on CCS6, I only see example1, example2, nothing that says USB (or anything, what kind of name is example #number anyway??) - And I can't find a examples reference guide.

Also, on the other examples in the user's guide they refer you to the getting started guide, but there is not getting started guide for C6000 (which is what we use).

TI - This is really really frustrating. I've spent hours looking for info, and I haven't found anything yet.

Could someone please point me to the USB examples location?



Thanks

Nitay

  • What version of TI-RTOS are you using?

    TI-RTOS for C2000 (Concerto M3 side), TI-RTOS for MSP43x (MSP430F5529) and TI-RTOS for TivaC have USB examples in the TI resource explorer.

    We don't have USB examples for the C6000 in TI-RTOS. For the C6000, I think you may be able to get more help on the C6000 Multicore DSP forum. I will have this post moved to their forum where you can get more help.

  • Hello,

    We're using OMAP L138 - Which has a C6000 and a ARM9. So I need the RTOS just for one of them.

    If you can, please move this post to the ARM9 forum.

    In any case - How can you see the examples names and not their number?

    Thanks
    Nitay

  • Hi Nitay
    Unfortunately at this point there are no TI RTOS USB driver available for ARM or DSP for OMAPL138/C6748 family. When the devices were announced a few years back, there was a solution provided by one of our 3P Jungo.
    From TI side, the best best of USB software , if you don't want to work with Linux USB drivers would be to take a look at the USB starterware offerings for these devices
    processors.wiki.ti.com/.../StarterWare_USB
    processors.wiki.ti.com/.../StarterWare_01.20.01.01_User_Guide

    There maybe some effort required to make this work with TI RTOS, but from a software standpoint, I hope these will help some.

    Regards
    Mukul
  • That is very unfortunate. Could you point me to the Jungo solution?
    Also, could you recommend on a similar platform with USB examples? I could maybe rely on those when developing our application

    I've asked a question in the starterware forum about the this issue - If you could give me a nudge in the right direction that would be great.
    e2e.ti.com/.../429252

  • Posts on using TI's discontinued BIOSUSB package by Jungo. It was for DSP/BIOS only.
    e2e.ti.com/.../283082
    e2e.ti.com/.../280753
    e2e.ti.com/.../93931
    e2e.ti.com/.../56303
    e2e.ti.com/.../213601

    Jungo's product. No mention of TI-RTOS/SYSBIOS support. People seem to back off from this solution after learning the price.
    www.jungo.com/.../usb-device-stack

    Posts on attempts to port StarterWare USB to SYS/BIOS. Nobody has reported success. Or kept it to themselves it they did.
    e2e.ti.com/.../329193
    e2e.ti.com/.../181519
    e2e.ti.com/.../295565
    e2e.ti.com/.../165665
    e2e.ti.com/.../208344
    e2e.ti.com/.../334984
    e2e.ti.com/.../143557
    e2e.ti.com/.../352393
    At very least hooking up the interrupt handler and replacing delay and clock calls with SYSBIOS equivalents.
  • Hi Nitay
    Norman who is a very strong community contributor for this family of forums has beat me to put this more candidly.
    I do agree that our story on TI RTOS drivers for USB on ARM9 and C674x for this family of device is weak. It is a known deficiency. Some folks have moved to OMAPL138 (if they were on C6748) and embraced the Linux USB offering on ARM9 and some others have actually able to manage this purely with starterware.
    I do think some folks have been successful in making starterware and sysbios co-exist.

    Regards
    Mukul
  • Well - I found the problem! I was flushing the buffers right after the SET_CONFIGURATION request (in the ControlHandler callback). That's what failed the process.
    I haven't found out why though (yet).

    Tips for future googlers:
    - Try not to send anything / flush the buffers right after the connection has been done (SET CONFIGURATION = 1).
    - When you post a question - Post your code. Otherwise errors like the one discussed here will never be noticed by the community.

    I'll be happy to share my code for reference. Where should I do so?

    Thanks for all the help!
    Nitay

  • I have finally managed to get Starterware USB to work with Sys/Bios. Here are the steps I took (This is for the Beaglebone Black AM335X)

    1. Had to create Hardware interrupts
    Hwi_Params hwiParams;
    Hwi_Params_init(&hwiParams);
    hwiParams.maskSetting = Hwi_MaskingOption_NONE;
    hwiParams.arg = (UArg)0;
    hwiParams.enableInt = TRUE;
    hwiParams.eventId = SYS_INT_USB0;
    hwiParams.priority = 0x10;
    hwiParams.type = Hwi_Type_IRQ;
    Hwi_Handle hHwi = Hwi_create(SYS_INT_USB0, (Hwi_FuncPtr)USB0DeviceIntHandler, &hwiParams, NULL);
    if(hHwi == NULL) return 1; //get out if failed to create hardware interrupt

    2. Had to configure the MMU to allow access to register locations:
    Added the following lines to the .cfg file
    Cache.enableCache = true;
    Mmu.enableMMU = true;

    Then, I had to do MMU cache configuration in code, using the .cfg file approach didn't work for me. You have to get the osdrv_mmu.c and .h files from the industrial sdk in order to configure the mmu in code using the SDKMMUInit function.

    uint32_t mmuInitResult = 0;

    /* Define the base addresses in which the peripherals reside. */
    /* and Configure the corresponding MMU page descriptors */
    SYS_MMU_ENTRY applMmuEntries[] = {
    {(void*)0x48300000,0}, //PWM - Non bufferable| Non Cacheable
    {(void*)0x47400000,0}, //USBSS,USB0, USB1, USB0_PHY, USB1_PHY - Non bufferable| Non Cacheable
    {(void*)0x48200000,0}, //AINTC - Non bufferable| Non Cacheable
    {(void*)0x48100000,0}, //GPIO2, GPIO3, UART3, UART4, UART5, I2C2, McSPI1 - Non bufferable| Non Cacheable
    {(void*)0x48000000,0}, //GPIO1, UART1, UART2, I2C1, McSPI0, McASP0 CFG, McASP1 CFG -Non bufferable| Non Cacheable
    {(void*)0x44E00000,0}, //Clock Module, GPIO0, UART0, I2C0, - Non bufferable| Non Cacheable
    {(void*)0x46000000,0}, //MCASP_0 - Non bufferable| Non Cacheable
    {(void*)0x46400000,0}, //MCASP_1_DATA - Non bufferable| Non Cacheable
    {(void*)0x49000000,0}, //SOC_EDMA30CC - Non bufferable| Non Cacheable
    {(void*)0x4A100000,0}, //WDT - Non bufferable| Non Cacheable
    {(void*)0x50000000,0}, //GPMC - Non bufferable| Non Cacheable
    {(void*)0xFFFFFFFF,0xFFFFFFFF}
    };

    mmuInitResult = SDKMMUInit(applMmuEntries);


    3. I actually brought all the Starterware USB library files locally into my application so I could remove the delay calls and I ended up modifying the USB libraries extensively to get Host Hub support working and add my own layers to the HID driver. You might be able to get the Starterware delay calls working with SysBios, but instead I just made sure all my USB initialization code was done after a thread is started so that I could replace any starterware delay calls with Task_Sleep.

    4. Finally, in order to get the _ti.bin application to work with the Starterware bootloader, I used the solution from this thread. Added the following lines to the .cfg file
    Program.sectMap[".init { boot*(.text) }"] = new Program.SectionSpec();
    Program.sectMap[".init { boot*(.text) }"].loadAddress = 0x80000000;

    e2e.ti.com/.../356334
  • Thanks Chad for your update and thanks for sharing the solution.