cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 Discovery & Replicating USB Host

Rogers.Gary
Senior II
Posted on January 25, 2015 at 18:49

Hello,

I am in the process of developing a board with the STM32F407. On the Discovery MMB997C card, it uses a very convenient USB host interface for programming, debugging,etc, that I would like to also replicate on my card. Is it possible to do this any other way but what is shown in the Discovery schematic? Can the USB not be connected directly to the STM32F407 as on pg. 171 to 173 of the manual (DM00037051) ? I'm presently using IAR EWARM to connect. I guess I don't really understand the purpose of the STM32F103C8T6 device, if it's just to support that USB functionality?

Can someone please clarify this for me, and what hardware is actually needed to provide the same interface?

Thank you.

#stm32f4-usb-debug-discovery
6 REPLIES 6
Posted on January 25, 2015 at 19:20

The STM32F103 contains the ST-LINK firmware, and connects to the F407 via the SWD pins (SWDIO,SWCLK,SWO)

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Rogers.Gary
Senior II
Posted on January 25, 2015 at 20:00

k, if I understand you, this arrangement with the STM32F103 excludes the requirement to use this ST-Link pod:

http://www.digikey.ca/product-detail/en/ST-LINK%2FV2/497-10484-ND/2214535

To use the pod, I would connect the same pins (SWDIO,SWCLK,SWO) from the STM32F405/7 to the 4 pin header for the pod?

Thanks for the clarification and help clive1.

Posted on January 25, 2015 at 21:19

The external ST-LINK supports JTAG connectivity, and signal buffers.

You'd want a 10-pin or 20-pin standard pin header, at least I recommend that over 4-pin headers, as you can use standard off-the shelf cables and hardware.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Rogers.Gary
Senior II
Posted on January 25, 2015 at 21:25

thanks clive1, I had a good look at the ST documents and it's all clear now.

8--)

anjali8122
Associate II
Posted on October 09, 2015 at 10:33

Hey,

Are we able to mount more than one device at a time on STM32f4?

I want to copy a file from SD card to USB flash drive and vice versa.

Will you give a flow how to write a code for that?

Please help me to write the code for that.

Please reply me as soon as possible.

Posted on October 09, 2015 at 18:29

Yes, you can use SPI, SDIO, USB and USART peripherals all functioning concurrently.

For an example of USB FLASH attached to F4, review the ''FW Upgrade'' example from the

http://www.st.com/web/en/catalog/tools/PF257904

You'd want to take the FatFs implementation, add the SDIO as a secondary drive in the DISKIO abstraction, and then code your top level application to traverse the directory trees and copy the files one at a time. If it's just one file you'd open up the source file, reading blocks of data, and writing them back out to a file you've created on the destination, until you've copied the entire content. Then close both files. Think about how you'd do it on a PC using regular File IO operations (stdio.h)

Sorry got no real interest in coding the project for you, or the immediacy or urgency of doing so.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..