cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4-Discovery Board OTG

mshanna42
Associate II
Posted on November 07, 2012 at 05:55

I am trying to transfer data packets from a meter ( has a usb port) using the board to my PC. I am trying to transfer real time data packets using control transfer.  What would be the configurations for the mini and micro usb USBs on my board? Could you help me, please?  

#connect-uart-to-pc #thanks #stm32f4-otg
6 REPLIES 6
Posted on November 07, 2012 at 12:58

The mini USB is connected  to the F103 ST-LINK device, not the F407.

You'll need a different board that natively supports two USB interfaces, or examine if you can wire up a second one if the pin use/assignments permit.

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

Hey Clive,

Thanks for your Replay. I got a question. I see on STM32F4-Discovery board, two USBs. One USB Port which they call Mini USB (Connected to CN1), and the other is connected to CN5 ''on the go''. Is OTG is not a valid way of coomunication? I am kind of confused !

________________

Attachments :

stm32f4_discovery.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzSb&d=%2Fa%2F0X0000000bP1%2Fuq4VKc9CRT5WzyA3Hb9obRmdrj8yDvwRQr1foPUfg.I&asPdf=false
Posted on November 12, 2012 at 20:52

As noted CN1 is useless to your application of the STM32F4 chip, it's not connected to it.

CN5 can take an A or B micro cable, so you can either connect it to a PC, or use it to connect (host) a flash drive etc. You'll need to compile and install suitable software, The USB examples mostly target the STM32x0x-EVAL boards.

If you want to use both USB peripherals (host and device) on the STM32F407 chip you'll need a different board.

The STM32F4-Discovery board also does not support HS USB as it does not have a PHY.

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

mshanna42
Associate II
Posted on November 20, 2012 at 02:18

Got a question,

I am getting this error codesevery timeI try to build the project.

1- 'LIBUSB_OUT_EP' undeclared here (not in a function) Line 192

2-Description Resource Path Location Type

'LIBUSB_OUT_PACKET' undeclared here (not in a function) usbd_libusb_core.cline 194

3- near intitalization for 'USB_Lib_USB_cb''

________________

Attachments :

STM32F4_Discovery_RCC.rar : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzkV&d=%2Fa%2F0X0000000bOz%2FHAUNkYGHogcxsZotSgELP2zOCdSXFbXkYJK1rqy9E58&asPdf=false
Andrew Neil
Evangelist III
Posted on November 20, 2012 at 09:12

''You'll need a different board that natively supports two USB interfaces''

Or maybe use something like this for the connection to the PC:

http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm

It connects direct to the microcontroller's

UART pins - be sure to choose the correct voltage version!

Or this:

0690X00000603FrQAI.jpg

http://www.ftdichip.com/Products/Cables/RPi.htm

Although it's described as a ''Raspberry Pi'' cable, it neither knows nor cares what you actually connect it to!

This one just provides Rx, Tx, and Ground. 3.3V only.