cancel
Showing results for 
Search instead for 
Did you mean: 

USB Host Middleware for STM32L4 with hub compatibility

AJard.1
Associate

I am currently developping a system which uses an STM32L496 as a USB host that communicates with up to 6 USB devices through a few hubs. The devices are all CDC or Audio class, and are controlled by the singular STM32L496 on the USB bus, but there is very little data passing through (dozens of messages a second at most and maybe an audio stream), so I think the L4 chips line should be able to handle this task.

So for this system I need a USB Host library that is compatible with STM32L4 MCUs and hubs/multiple devices.

Now as you may be aware the STM32 USB host library that is part of the STM32L4 package does not support the hub class and so cannot communicate with mutliple devices through a hub. That leaves me with 3rd party solutions.

There are several commercial USB Host libraries available that seem to support hubs, see below, and there is also the Azure RTOS USBX stack. The problem is the USBX stack specifically for the L4 line has been announced (STM32Cube and AzureRTOS: Overview) but hasn't been made available yet. As I am hoping to get project completed in the next few months I would like to use something that is already available, even if I have to buy a license for it.

The USB Host libraries I am considering are:

Ubiquitous USB Host

CMX-USBHost

HCC-Embedded USB Stack

Micro Digital smxUSBH Stack

Can anyone recommend a particular USB Host stack for the STM32L4 line that supports hubs and can handle several devices? I am new to STM32 development and am not yet familiar with the different options available. If there is an open source solution that exists or just another licensed solution that I haven't mentioned here please let me know as well.

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @AJard.1​,

Welcome to ST Community 🙂

Unfortunately, we don't have the hub class yet, it will be supported in the future. To have it today, you have to use a third party class like HCC or Zephyr or similar.

BeST Regards,

Walid

View solution in original post

3 REPLIES 3
Bob S
Principal

I haven't tried this yet so I can't say if it works, and don't know what capabilities the "host" version supports. And, it may not yet be ported to the L4, but you might look at TinyUSB:

https://github.com/hathach/tinyusb

Hello @AJard.1​,

Welcome to ST Community 🙂

Unfortunately, we don't have the hub class yet, it will be supported in the future. To have it today, you have to use a third party class like HCC or Zephyr or similar.

BeST Regards,

Walid

AJard.1
Associate

Thanks to both of you.

I had already noticed TinyUSB but didn't consider it as the README didn't list some of the class drivers I need. Because of your post Bob I've looked into it a bit more and the source code seems to include the missing software comopnents so I'm looking into it more in depth to decide whether it suits my needs. We have already contacted HCC and we'll look into using Zephyr, thanks again!