cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 Discovery and 2nd USB port

triemann
Associate
Posted on January 14, 2014 at 00:02

Hi,

I am currently playing around with the STM32F4 Discovery board and saw that the STM32F407VG contains a second USB port. Connector CN5 is the first one, which is connected to PA11 and PA12 and also described in the examples. The second one needs to be connected on PB14 and PB15, but it seems that it isn't use on the board.

It seems to be possible to use the second port by connecting PB14/PB15 to D-/D+ (for a USB device), but is it possible to use both USB ports at once? And if so: how can I choose the port in the USB libraries? Does anyone have a simple example or a hint on howt to use it?

Thanks in advance,

Tim

#usb #stm32 #stm32f4 #discovery
2 REPLIES 2
Posted on January 14, 2014 at 00:58

The examples generally target the STM3240G-EVAL board, and will need to be ported for the DISCOVERY board, this may involve removing LCD code and changing pin assignments. You should review the STM3240G-EVAL schematics to better understand connectivity options.

You are referring to the HS port, the examples for the Discovery board normally use the FS port. To switch the code must be compiled with the appropriate defines passed to the compiler.

USE_STDPERIPH_DRIVER

STM32F4XX

USE_STM324xG_EVAL

USE_USB_OTG_HS

USE_EMBEDDED_PHY

vs

USE_STDPERIPH_DRIVER

STM32F4XX

USE_STM324xG_EVAL

USE_USB_OTG_FS
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
triemann
Associate
Posted on January 14, 2014 at 17:58

Thanks clive1. The schematics of the board were indeed very helpful and I guess that's exactly what I was looking for.