cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407VET6 USB advice :)

russdx
Associate II
Posted on August 20, 2012 at 12:04

I have just bought a Core407V STM32F407VET6 STM32 ARM Cortex-M4 Development Board

I want to use it to send data from my pc to the STM32 around 2048bytes 60 times a second.

Im a bit confused what type of USB library i should be using HID or OTG or some other library? I basically just need bulk transfer.

Would some one be able to point me in the right direction please 🙂

Thank you 🙂

12 REPLIES 12
Posted on August 20, 2012 at 17:47

Have you tried working through the ST USB examples?

\STM32_USB-Host-Device_Lib_V2.1.0\Project\USB_Device_Examples\HID

The STM324xG-EVAL_USBD-FS uses the following options

USE_STDPERIPH_DRIVER,STM32F4XX,USE_STM324xG_EVAL,USE_USB_OTG_FS

The examples should be reasonably portable to other boards, I have the MSC and VCP working on STM32F4-Discovery boards.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
russdx
Associate II
Posted on August 20, 2012 at 18:35

Sounds great 🙂

May i ask where you are downloading these examples from? I could not find a download section on the stm site.

Thanks 🙂

Posted on August 20, 2012 at 19:12

Should be off one of the chip resource pages via ''Design Support'' tab

http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm32_f105-07_f2_f4_usb-host-device_lib.zip

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
russdx
Associate II
Posted on August 20, 2012 at 20:49

russdx
Associate II
Posted on August 20, 2012 at 20:49

russdx
Associate II
Posted on August 21, 2012 at 11:17

thanks 🙂

russdx
Associate II
Posted on August 26, 2012 at 15:06

I have tried the 

stm32_f105-07_f2_f4_usb-host-device_lib\STM32_USB-Host-Device_Lib_V2.1.0\Project\USB_Device_Examples\VCP

example, i replaced the LCD log outs with printfs (so i can see what is going on)

But it does not do much :(

The code seams to setup all the usb stuff but only ever calls

USBD_USR_Init

the other

USBD_USR_DeviceReset

USBD_USR_DeviceConfigured

USBD_USR_DeviceSuspended

USBD_USR_DeviceResumed

etc.. never get called

and the pc just says 'unknown device' but im pretty sure thats just because i have enabled the usb on my dev board. nothing to do with the code running on the stm.

I was kind of hoping a out of the box example would just work :( as there is so much code i have not got a clue where to look / figure out where it has gone wrong.

im using the Core407V dev board from waveshare. Is there a better dev board i can use with examples that will just work?

russdx
Associate II
Posted on August 26, 2012 at 16:16

have bought the STM32F4DISCOVERY, im guessing this is the actual board the example code was written for so hopefully i have more luck with this 🙂

(+ only £9.99 from RS components!!!) 🙂
Posted on August 26, 2012 at 20:32

The STM32F4-Discovery is not the target of the USB library, the target is the EVAL series boards the STM3240G-EVAL, etc

I have ported a number of the drivers to the STM32F4-Discovery board using GNU and Keil tool chains. Mainly the MSC and VCP, but others would be relatively straight forward.

I've posted by GNU/GCC port here

https://docs.google.com/open?id=0B7OY5pub_GfIdnREeExyRWNXbFE

I'd dig up the threads on the forum here if I could find them quickly. The on-point ones covered USB and porting to different chains, or boards.

Functional forum software would permit you to click on my avatar and see all posts, and search them. This Microsoft forum software was coded by people who've never used forums before, just those who used Word/Office and thought it was awesome. Thank god they didn't add ribbons to make it more awesomer!

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..