2016-09-12 08:38 AM
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 #host2016-09-12 09:09 AM
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¤tviews=17]thread you already started?
I'm not aware that the 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.2016-09-12 05:17 PM
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 - 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