2017-10-31 11:17 AM
Hi,
I want to create USB device but I want to have few interfaces like:
- DFU (can be generated with stm32cubemx)- my own iface with bulk transfers
- HID (also can be generated by
stm32cubemx)
But from what I see I can only generate only one USB interface with stm32cubemx.
So the questions are:
1. Can I generate code from stm32cubemx with many USB interfaces?
2. If not, how can I implement my USB device? (By implementing everything from scratch in USBD_ClassTypeDef?)
#bulk #usb #hid #dfu2017-11-01 07:43 AM
1. Can I generate code from stm32cubemx with many USB interfaces?
No.
2. If not, how can I implement my USB device? (By implementing everything from scratch in USBD_ClassTypeDef?)
Yes. The STM32 USB Device Library itself is not designed to support a composite USB device. Unfortunately there are several challenges to overcome e.g. when handling endpoint 0 class specific requests, or handling pClassData. Therefore you cannot simply create a new class which will call the existing class callbacks, you will need rework in the ST classes themselves.