cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 USB Host Device Library v2.1.0 with F4 support

tony2399
Associate II
Posted on April 03, 2012 at 19:57

Hi all,

I don't see this mentioned anywhere on the forum, but a new version of the STM32 USB library was released recently and it adds the long-awaited support for the STM32F4 family. I've tried it with the STM32F4-Discovery kit and it works fine after I modified the crystal and clock settings (and removing much of the LCD code for the non-existent display). So far I've got the virtual com and HID examples working reasonably well, considering the hardware differences between the discovery kit and the EVM.

Has anyone else tried the library yet?

Tony
8 REPLIES 8
vibrolax
Associate
Posted on April 12, 2012 at 04:38

No, I haven't tried it yet - though I plan to soon.  I previously got the virtual serial port to work using code from mcu.cz.  The authors adapted it from the pre-F4 release of the library.  I would like to get the USB Audio class examples working with the F4Discovery's codec and microphone.

Jon

bjoern2
Associate II
Posted on April 16, 2012 at 09:31

Hi Tony,

I just made a short search for the usb 2.1 library, but I couldn´t find anything, could you give me a link for the library.

I just modiefied the

''Audio playback and recording using the STM32F4DISCOVER'' example so I could write a file on an USB stick. But if there is a new version I would have a look.

Greetings Bjoern

jlchoobs
Associate II
Posted on April 20, 2012 at 11:32

Hey Tony !

Great to see somebody else trying the Usb Device Library on the Stm32f4Discovery Board.

I have limited success too.

I can get a Virtual Com working on the USB on the F4Disc Brd.

But, I am stuck on the Usb MSC with the SDCard on the F4Disc Brd.

See:

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/New Project Download - Virtual Com with Cmd Shell and ADC Reading&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F]New Project Download - Virtual Com with Cmd Shell and ADC Reading

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/New Project Download - Virtual Com with Cmd Shell and ADC Reading&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fSTM32Discovery%2fNew%20Project%20Download%20%2d%20Virtual%20Com%20with%20Cmd%20Shell%20and%20ADC%20Reading&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F

-and-

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Using Stm3240g firmware on the Stm32f4Discovery Board&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B]Using Stm3240g firmware on the Stm32f4Discovery Board

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Using Stm3240g firmware on the Stm32f4Discovery Board&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fcortex%5fmx%5fstm32%2fUsing%20Stm3240g%20firmware%20on%20the%20Stm32f4Discovery%20Board&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B
jlchoobs
Associate II
Posted on April 20, 2012 at 11:56

Tony - can you post a Zip of your Project -so others can try to test/expand it ?

hi
Associate
Posted on April 26, 2012 at 15:12

Yeah if you could post your working examples, that would be great, I can't quite get my examples to work. 

seawwh2
Associate II
Posted on May 15, 2012 at 06:35

Hi Tony,

   I've tried Lib 2.1.0 HOST MSC example with the STM32F4-Discovery kit and it can only works for some U disk。 For some  U disk  it  always loop at    

  status = USBH_MSC_GETMaxLUN(pdev, phost);   // File: usbh_msc_core.c

seawwh

jlchoobs
Associate II
Posted on May 24, 2012 at 21:40

Yes, do you have some code to show ?

What did you compile with ?

How did you set up the project ?
polimorphic
Associate II
Posted on June 07, 2012 at 21:49

Hi all.

I try a USB HOST HID (lib version 2.1.0) example for stm32f4discovery on board software ported by me from some stm32f2xx board.

I have 3 mouses working well on 2 desktop computers and laptop. None of them working fully well with discovery board.

Only one of the three mouses somtimes passes device enumeration and stops on USBH_HID_ClassRequest : HID_REQ_SET_IDLE state.

If any of You try this usb hid host example?

Sorry for my language, I write in English first time.