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-cdc2011-12-12 02:26 AM
2011-12-12 04:11 AM
You can use libusb even for windows.
2011-12-12 04:55 AM
What exactly do you mean?
2011-12-12 05:46 AM
2011-12-12 06:07 AM
I'm currently still studying engineering and I need to know how to send data across to my pc via the usb. This is my first time using USB as communication the other micro controllers I have used use serial communication via an FTDI chip. So I am not sure what you mean... I would like some example code and which libaries I need to make it work. Like I said first time ever working with USB and first time ever using a STM chip. I basically need to capture data from ADC use the fourier transform on it and send it via usb so I can interpretd the signal in mathlab. I have done everything else but still struggeling trying to figure out how I can send a few thousand bytes via USB to my PC. I don't know where to start. Tried modifing the demo code (which uses a mose) but no luck there... Could you maybe list a few points as to what exactly I need to do to get it working? Please I am really stuck been surfing the net for answers for a few days now...
2011-12-12 04:12 PM
2011-12-13 04:19 PM
http://hackaday.com/tag/stm32/
http://www.micromouseonline.com/2009/12/31/stm32-usart-basics/#axzz1gSnTBtbG
Might want to consider this approach: USART to USB-serial adaptor on the PC side. The USB-BUB is only $14. Could save a lot of grief...2011-12-13 05:12 PM
''On older chips they just had an FTDI chip which was very easy to set up and use''
There's nothing to stop you using an FTDI chip (or equivalent)in exactly the same manner! Or one of their ready-made cables that provide a direct, logic-level connection:
http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm
If speed and ease of implementation are your key concerns, then this may well be your best option. USB development isnot
trivial: you need to budget significant time & study effort to gaining familiarity with USB in general, gaining familiarity with the STM32F4's specific USB implementation, and developing & debugging your own code.2011-12-13 10:55 PM
Unfortunately I have to use the USB interface not only because speed is a big issue but also because my boss wants me to only use the peripherials on the chip and nothing else . So Usart is not an option. If I do find an answer I will post it up here. Thank you anyways