STM32F4 USB composite HID+MSC

Hi all!

Does anyone have an experience with making multi-interface (multi-class) USB with STM32F4 device? I am using STM32F4-discovery kit and usb library STM32_USB-Host-Device_Lib_V2.1.0. I have made my HID and MSC applications and now I wanna make a composite device with this classes.

The biggest problem is to set the callback functions for both interfaces. I tried to make one set of universal callbacks (for example one function USBD_HID_MSC_DataOut operating with both interfaces. The code inside the function is divided by endpoint number) but only HID is working. Windows recognize also Mass Storage device but cannot operate with it.
I thing the USR_desc (User descriptors: SerialStrDescriptor, ConfigStrDescriptor, InterfaceStrDescriptor and so on) has also some impact.
Does anyone made some USB composite application with this library?
Thanks for comments.

Jan

Parents
  • I've looked in ST's STM32_USB-Host-Device_Lib_V2.1.0, and found that it isn't so easy to make it a composite device. The core-/ class-layer organization of this library is not good. When we plug-in two or more classes, duplicated processes on classes interfer each other. Such processes should be implemented in the core layer. It is obvious that ST have not achieved any composite device yet, on this library.

    In my estimation, around 10-20% of the code in usbd_core.c, usbd_hid_core.c and usbd_msc_core.c should be touched. So, it will take long time. Wait it in patience ;-)

    Tsuneo

Reply
  • I've looked in ST's STM32_USB-Host-Device_Lib_V2.1.0, and found that it isn't so easy to make it a composite device. The core-/ class-layer organization of this library is not good. When we plug-in two or more classes, duplicated processes on classes interfer each other. Such processes should be implemented in the core layer. It is obvious that ST have not achieved any composite device yet, on this library.

    In my estimation, around 10-20% of the code in usbd_core.c, usbd_hid_core.c and usbd_msc_core.c should be touched. So, it will take long time. Wait it in patience ;-)

    Tsuneo

Children
More questions in this forum