cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f207 composite USB device

adrian
Associate III
Posted on July 25, 2013 at 09:37

I'm trying to create a composite full speed device which combines HID (vendor specific) and Mass Storage.

Anybody out there managed to create a working composite device using the ST libraries for the f2xx? (or f4xx)

There is no example in the library code, I've been unable to create a working device (created a composite device descriptor will callbacks to the provided classes) but it doesn't enumerate properly, the composite descriptor gets passed to the PC but the interfaces don't seem to setup correctly.

Reading the web it would seem that the library is broken for composite devices and I tend to agree, the F3 library specifically includes a composite example but the library architecture is different to the F2/F4 library.

This is driving me insane.

Adrian

#sm32f207-usb-composite-hid-msc
7 REPLIES 7
Amel NASRI
ST Employee
Posted on July 31, 2013 at 15:32

Hi Adrian,

Discussions in this

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/UM0424%20Composite%20example&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=420

may bring you some help.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

adrian
Associate III
Posted on August 01, 2013 at 08:09

I've read that before.

I think the problem stems from the fact that it doesn't work if you try to use the supplied class drivers, i.e create a composite device descriptor and then in the relevant callbacks call the correct class function for that callback depending on which interface the function call was for.

I've searched the web and there was a post by a guy called Tsuneo who if you've ever done any USB searching will know that he's a bit of a guru in these matters - somebody else had asked the same question and his response was along the lines of:

''The library is broken because there's not enough separation between the layers, there are bits of code that are duplicated - it's obvious that ST have not had a working composite device with this code''

Which ties in with why there is not a composite device example!  I have no doubt that if I were to implement my *own* class drives for MSC & HID using your libraries then I could get it to work, but then I'd be re-inventing the wheel and I'd rather use your MSC driver than spend X weeks writing own.  Beside, I already had to modify the HID driver because it's very specific to being a mouse (or keyboard, I can't remember what now) and I needed a vendor defined one, so I already did that months ago.

I suppose the question I should have asked was:

Has anybody managed to make a composite USB+HID device using the class drivers supplied in the ST USB library.

As I mentioned before, the USB library for the 3 series is different and is obviously architected better because it does include an example.

I can't believe that such a basic operation has been omitted from the library for the F2XX/F4XX....

Anybody in ST who works on the USB library care to fix this? :)

Adrian

adrian
Associate III
Posted on August 08, 2013 at 10:03

Nobody from ST has anything to comment on with this?

This is a pretty *basic* feature that appears to be broken in the USB library for the F2/F4 series.

I'm currently skirting around this issue by finishing up other pieces of code, but sooner or later I'm going to get back around to USB device mode and I'm going to hit the same brick wall.

Please ST, can we have a working example/explanation on this?

Adrian

adrian
Associate III
Posted on September 01, 2013 at 12:29

I solved this.

I put the ST USB library in the bin and used a third party one which works correctly.
jdalin9
Associate
Posted on April 09, 2014 at 09:35

Could you please tell me which third party library you used?

Would be greatful if you could assist me.

jdalin9
Associate
Posted on May 09, 2014 at 10:08

I need to realise a usb composite device with

- HID and

- isochronous data stream (OUT) in high speed

(STM32f4-controller)

 The ST USB library does seem to help me further. Which third party library did you use to solve your issue?

hi mate

did you find any solution for your problem?

thank you