cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 USB

sidiq
Associate II
Posted on November 12, 2012 at 17:27

Hello, I am working on a project which consist in retriving data from the Accelerometer, and then transmit it through a USB connection,

So far, I quite understand how to retrive the data from the Accelerometer.

But here is my problem, I don't know how to transmit it via USB.

If you could give me some examples, I would appreciate it.

#camera #usb
7 REPLIES 7
Posted on November 12, 2012 at 18:23

Have you looked at any of the example code in the USB FW library?

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

Hum, i checked in  the STP32F4-Discovery_FW_V1.1.0.

I'm not sure but I didn't find any direct example using the USB port.

I've to say i'm a beginer in this domain. Any help would be appreciated

its
Associate II
Posted on November 13, 2012 at 06:48

HI:  i have same problem. i have seen code of audio play back and record. using this i have managed to write and read text file, but at very abstract level. i dont know what is happening inside.

I have interfaced the Camera with stm32f4, now i want to use it as WebCam..like webcam USB plug and play. how can I do it, please. any hint?

thanks

sidiq
Associate II
Posted on November 13, 2012 at 16:15

I searched a bit in the forum and found STM32_USB-Host-Device_Lib_V2.1.0, it seemed perfect.

I'm using VCP example, I've tried to send data with that example and it seems i can't even use the fonction, (''VCP_DataTx''), any ideas ?

its
Associate II
Posted on November 14, 2012 at 05:41

I think in VCP you can not exceed baud rate more than 115200. then why one need VCP? except you have not serial port on your PC!

I would like to use USB as data transfer as it happens in USB based webcam etc.. but I dont know how to do it!

Posted on November 14, 2012 at 16:52

The VCP is not limited to 115200, but rather the limits of your interfaces to consume data. It doesn't have to represent actual hardware, or data rates, being virtual as it is.

For VCP_DataTx you typically call it when you have data to queue, in examples this has been the USART RX IRQ.

You'd need to create a UVC device for a webcam.

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Any example on STM32F2xx with UVC&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=494]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FAny%20example%20on%20STM32F2xx%20with%20UVC&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=494

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
its
Associate II
Posted on November 19, 2012 at 05:54

thanks clive for UVC.

I meant to say VCP with PC serial port couldn't reach above 115200 ...i think.!