Skip to main content
russdx
Associate III
August 20, 2012
Question

STM32F407VET6 USB advice :)

  • August 20, 2012
  • 12 replies
  • 2656 views
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 :)

    This topic has been closed for replies.

    12 replies

    Tesla DeLorean
    Guru
    August 20, 2012
    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 VenmoUp vote any posts that you find helpful, it shows what's working..
    russdx
    russdxAuthor
    Associate III
    August 20, 2012
    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 :)

    Tesla DeLorean
    Guru
    August 20, 2012
    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 VenmoUp vote any posts that you find helpful, it shows what's working..
    russdx
    russdxAuthor
    Associate III
    August 20, 2012
    Posted on August 20, 2012 at 20:49

    russdx
    russdxAuthor
    Associate III
    August 20, 2012
    Posted on August 20, 2012 at 20:49

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

    thanks :)

    russdx
    russdxAuthor
    Associate III
    August 26, 2012
    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
    russdxAuthor
    Associate III
    August 26, 2012
    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!!!) :)
    Tesla DeLorean
    Guru
    August 26, 2012
    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 VenmoUp vote any posts that you find helpful, it shows what's working..
    sreejaya
    Visitor II
    August 28, 2012
    Posted on August 28, 2012 at 12:22

    Hi,

       I have recently purchase STM32F4 Discovery board and I am trying to make the VCP work so that I could streamed ADC data to the PC. I downloaded the firmware code from the link you had posted in the previous thread and tried to understand how things work. I am very new to USB programming and the  STM environment. These are the following things that I have tried:

    1) I am using Keil uvision4 to debug my program.

    2) I downloaded STM324xG-EVAL_USBD-FS project onto my board. I have not made any changes in the code. I understand that the LCD functionality is enabled in this project but for the time being I have not altered anything as I just want to check if the VCP works. 

    3) I have installed the VCP_V1.3.1 driver in my PC running Windows7

    4) When I debugg the code, after executing USB_OTG_CoreInitDev(pdev) in usb_dcd.c the host says that installation failed.

    5) When I checked the device properties the host lists the device as unknown device. Presuming that this could be because the device driver installed in the host has some problem I tried to manually assign the virtual com port driver to the device. Unfortunately I cannot find it listed in the list of device driver the system shows. What could be the problem? is it the firmware code or the driver? 

    Kindly help me to fix this. Also if you have a keil project of your working verison of the code please send me a link. Thanks in advance.

    Regards,

    Sreejaya