AnsweredAssumed Answered

STM32F4 - USB composite device

Question asked by harasak on Mar 1, 2013
Hi everybody!
I'm working with STM32F4 Discovery kit. I want to create USB composite device using HID and MSC class. The USB libraries for STM32F4 uses this initialization (for example for HID):

    USBD_Init(&USB_OTG_dev,
        USB_OTG_FS_CORE_ID,
        &USR_desc,
        &USBD_HID_cb,        // descriptors and callback functions for HID
        &USR_cb);

In the 4th argument (USBD_HID_cb) there can be descriptors and functions only for one USB class. So how to initialize USB with 2 interfaces (2 classes)? Does anyone have an experience with that?

I have checked library for STM32F1 and F3 devices (STM32_USB-FS-Device_Lib_V4.0.0) with example for composite device. But the files and libraries are completely different compare to USB libs for STM32F4 devices (there is USB OTG). Does anyone know about example of composite device for F4?

Thanks.

Outcomes