2011-12-11 11:47 PM
Hello there,
I desperatly need help getting data from my stm32f4 to my pc. I was thinking of using the OTG and set it up as a keyboard and transfer the data accross like that but it seems like a huge mission to transfer data. On older chips they just had an FTDI chip which was very easy to set up and use. Does anyone maybe know of an easier way to transfer data over to my Computer using the built in micro usb? Some sample code will also help a lot as the otg seems very complex #transfer-data-using-usb #stm32f4discovery-usart-serial-us #vcp(virtual-com-port)-stm32f4 #stm32f4-usb-cdc2012-01-21 03:57 PM
2012-02-11 07:29 AM
I have managed to establish usb connection between my pc and the discovery board.
I took Mard's VCP example and ripped out all USART stuff. Changed vendor and product id's so the board was no longer recognized as COM device. Next i downloadedhttp://www.libusb.org/wiki/libusb-win32
. There is a driver generator in the package. With those i had the board recognized by windows. In the libusb package there are some examples and of course library and sources. With help of libusb-win32 examples i wrote test software. Here are sources for discovery board and windows application:http://dl.dropbox.com/u/56124886/stm32f4-discovery/stm32f4-discovery-usb-cdc-example.zip
http://dl.dropbox.com/u/56124886/stm32f4-discovery/usbTest.zip
Some helpful links:http://codeandlife.com/2012/01/22/avr-attiny-usb-tutorial-part-1/
Well worth reading even though it's for different controller. And ofcourse big thanks to Mard's VCP tutorial.2012-03-08 11:47 AM
2012-03-28 05:09 AM
Hello,
I had a look at your example and it seems pretty nice. I installed libusb and found the the ST-link device (the SWD side of the STM32F4-Discovery board). I am using IAR workbench as development but your STM32F4xx example ''stm32f4-discovery-usb-cdc-example'' is done with Atollic TrueSTUDIO.Do you have also an example for IAR workbench?Best regards2012-10-10 03:02 AM
if i want to change the mouse device example in stm32 to a keyboard what changes i have to make in the usbd_desc.c/h file ??? also why the ''USBD_HID_SendReport'' function is in SysTick_Handler if we work with the interrupt transfer and what is the real work of the endpoints interruptions in the usbd_hid example for stm32f4 usb otg library?? because i remove it from the joystick example and still works!!
also what is thr difference between the SendReport functon and the DCD_EP_Tx function ?? and why there is no receiving function DCD_EP_PrepareRx ?is the HID class supposed to only send data ?2014-05-16 05:25 AM
2014-05-16 06:30 AM
Really nice! I can't compile though. Dev-c++ gives me ''undefined references'' to all usb-functions. Maybe I haven't installed/linked the libusb right? Can you please help? :)
Be conscious that you are responding to a post from 2+ years ago, by a person who visited the site once. The site does not email respondents. Consider if there is a more effective way to contact the author of the post/code.