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
sreejaya
Associate II
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

Posted on August 28, 2012 at 17:40

I've emailed you the Keil project, hope that helps.

I'm pretty sure that the LCD code, and STM32-EVAL board specific code needs to be purged from the code to make any progress on the STM32F4-Discovery board, or boards with less/different resources from the original target. I'm not a huge fan of how ST deals with their cross board support, but I can see some of the reasoning.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sreejaya
Associate II
Posted on September 12, 2012 at 11:36

Hi,

   Thanks a lot for the code.The VCP works quites smoothly now. I have  enabled the ADC sampling too and am sampling three different channels using the 3 adc's and sending the data through vcp. Now I see quite a bit of data loss  when i capture the data in PC. I have set the baudrate at 128000 bps.  I am continuously streaming the 3 adc channel data every time it samples it and am reading 228 bytes of data at one shot in the pc side.  How could i resolve this? Is there any way I can control the data rate in the discovery board?

Regards,

Sreejaya