Im trying writing a custom USB midi driver for my Virus TI....
and Ive found a bug i the way the STM host library handles interfaces, which means the interface descriptions are corrupted, and also it will not read all interfaces.
the bug is in: STM32_USB_Host_Library/Core/Src/usbh_ctlreq.c
basically, it assumes one interface description per interface but this is incorrect since, there can be alternative interfaces descriptions (which the TI has one, hence why I stumbled on the issue)
so my questions are:
- is this the latest version of the library?
- so I just update my copy , or is there a better way....?
Ive currently fixed it so it takes one of the settings, as it appears there is no behaviour for correctly dealing with alternative settings. (actually has numerous bugs in this area)
Also Ive noticed the current 'architecture' for handling usb hosting is not really very flexible if we start adding multiple drivers. the usb core code, only allows for one registration per class... either we change this, or we should put the firmware such that alternatives can be installed.
e.g. we might need a particular 'driver' for a specific device, even though it is a midi streaming subclass.
(becomes even more obvious when you start handling vendor specific classes, where having one implementation makes no sense at all)
Also... on first glance, it looks like a particular device is of one type... e.g I'm not sure it can handle the fact that a particular device might have (e.g.) a midi interface and also an audio interface.... the current implementation appears to just match the first one according to the order they are listed in usb_conf.c
I mention this, as this is an issue for the Push 2, where I will be using a midi handler for one interface, and a vendor specific for the LCD display.
talking of Push 2...
can you confirm if the STM32F4 support USB 2, or just 1.1?
Im getting a message when inserting the Push 2...
"Please use USB2.0 socket for Push 2"
and its not finding any interfaces.... is this a hardware limitation or do I just need to dig more into the STM32 hot Library?