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.

StarterWare USB Hub Support?

Other Parts Discussed in Thread: OMAPL138

The last time this question was raised was a year ago so any update?

I was able to port usbhhub.c from tiva-c usblib  to StarterWare usblib and Beaglebone Black now enumerates the hub itself and detects when devices are connected and disconnected from it. But in order to enumerate those devices, I now need to port the tiva-c usbhostenum.c which is a lot more work that I'd like to avoid.

  • Ray,

    Unfortunately, we don't have Starterware USB hub support, and don't have this in the development pipeline for the near future.

    Lali
  • I removed all StarterWare usblib references from my Beaglebone Black CCS project then added the minimum number of files from TivaWare usblib (rev 2.1.1.71) to support a hub, hid, mouse and keyboard. It now works with a mouse and keyboard connected to a hub!

    Surprisingly, the TivaWare files work with the StarterWare /drivers/usb.c file. The only exception is the USBHostHubAddrSet function needs to be updated with the TivaWare additions. Even though the TivaWare version of usbhostenum.c is similar to the StarterWare version, it still required many changes (I may post it later). Changes to other TivaWare usblib files were minor.  These involved editing/deleting the #include statements at the top of the .c files and replacing INT_USB0_TM4C123 and INT_USB0_TM4C129 in usbhhub.c with the value determined by usbhostenum.c.

    I haven’t tried MSC host with a hub. MSC is much more complex than HID (additional endpoints, uses DMA) and will require additional effort to translate the TivaWare implemetation. It’s taken 4 days to get to this point and since MSC isn’t needed by my application, it’s hard to justify spending more time on this … but I am curious.

  • Hi Ray,

    I am facing the same problem - lack of USB hub support in StarterWare for OmapL138. I tried to reproduced what you did, but was stuck with too..... many compiler errors. Could you somehow share your port with me?

    Thanks,

    Peter

  • 8640.usb_host_hub.7z

    The attached CCS6 StarterWare project supports a USB hub with attached keyboard, mouse and mass storage device and has been tested with BeagleBone Black. This project does not reference or include any files in StarterWare usblib. Read the comment at the top of usb_host_hub.c. It describes a required change to the StarterWare “drivers/usb.c” file.

    The usblib files included in this project were ported from TivaWare 2.1.1.71. Doing a diff between these and the StarterWare usblib files shows many similarities. TivaWare appears to be actively in development (last updated in 2015) while StarterWare does not (v2.00.01.01). Could someone please research what is going on with these code sets? When was USB hub support added to TivaWare? What other goodies are in TivaWare that StarterWare is lacking? It appears StarterWare is falling behind. 

    It took me 6 days to do this port and I had no prior experience with this code so I’m sure one of the TivaWare engineers could do a much better job in a similar amount of time. For example, my port does not support DMA. DMA isn’t critical for a mouse or keyboard but it would help mass storage.

    Our application required both host and device modes using both BeagleBone Black USB connectors. We’ve since also ported the TivaWare usblib device files (device and host mode share some common files).

  • Hi Ray, this is a major breakthru.  Kudos! 

    I am considering using your USB code. 

    Do you think the ti usb drivers are too large/convoluted/cpu hungry for practical real-time use? 

    thx..................dd

  • Most of my testing has been with StarterWare and TivaWare USB Device libraries and they both work well. They’re fast, efficient and I haven’t encountered any bugs or odd behavior. I don’t think these libraries introduce meaningful delays, assuming you use DMA. It would be interesting if TI has published any real world performance benchmarks which you can compare to your own tests. Remember to use the code I posted at your own risk - I take no responsibility for it's suitability for any application.

    StarterWare lacked USB Host hub support which is why I did the TivaWare port. In addition, rather than figuring out how to make the TivaWare Host and StarterWare Device USB libraries coexist (along with the assumption that TivaWare is later so it must be better), I ported the TivaWare Device library as well (I may post this later).

    After comparing the StarterWare and TivaWare Host code (a worthwhile "diff" exercise for anyone planning on using it), it seemed easier to port the TivaWare USB Host rather than rework StarterWare (the structural changes to support enumerating multiple devices goes deep). It appears StarterWare and TivaWare had a common ancestry, but at some point, TivaWare was branched and updated but StarterWare sat idle.

    The next challenge is getting DMA to work. Anyone out there willing to take this on? The TivaWare USB libraries have DMA support but need porting to am335x. I'll make you ‘all a deal. Someone add DMA support to the ported Host code and verify speed improvement with Mass Storage then I'll post my ported TivaWare USB Device code!
  • I would be interested to see your TivaWare USB device code for beaglebone black - I am also developing a host/device application.  I might take on the DMA support in the future but have a lot of work to do before I even get there.  I am going to try out your TivaWare USB Host library because Hub support is a must in my application.

  • I considered your offer but I am swamped with hacking other modules that I need more.  Have you considered breaking your code out of ccs/starterware entirely?  I have, it has been a tough job but it is finally paying off.  I am rewriting MMC, UART, PWM, I2C under GNU and implementing interrupts throughout.  Lets collaborate.

    later.............dd