cancel
Showing results for 
Search instead for 
Did you mean: 

USB Flash drive

payon
Associate
Posted on September 12, 2016 at 17:38

Hi I have the STM32L152 Discovery board. 

Is there any possibility to use one of the two USB ports to connect a USB flash drive to them to write files? Are there any examples of such implementation?

Or is this also availablr for the STM32F103?

Thanks a lot!

#usb #host
2 REPLIES 2
Posted on September 12, 2016 at 18:09

Can we please keep continuations of basically the same topic theme in the [DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/USB%20flash%20memory%20and%20drive&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/AllItems.aspx&currentviews=17]thread you already started?

I'm not aware that the

http://www.st.com/content/ccc/resource/technical/document/user_manual/08/f8/63/f5/7b/3d/40/ff/DM00027954.pdf/files/DM00027954.pdf/jcr:content/translations/en.DM00027954.pdf

has two USB connectors, just one for the ST-LINK not connected directly to the L152.

ST has a number of USB library firmwares, and their Cube framework, I'm not personally using L1 parts, but other STM32 parts can do USB/MSC without much complication, and there are examples of MSC and also SPI/SDIO access for SD cards, although not things I'd rate as commercial grade, just demo/example stuff.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
tsuneo
Senior
Posted on September 13, 2016 at 02:17

To run a USB flash drive, your MCU should have USB host engine.

Both of STM32L152 and STM32F103 have just USB device engine, not USB host.

Select one of a STM32 with OTG_FS (or OTG_HS) on the

http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus.html?querycriteria=productId=SC1169

- touch to ''USB Type'' column.

OR

You may connect an external USB host chip to these STM32s, like FTDI Vinculum (II), to connect to a USB flash drive.

Tsuneo