cancel
Showing results for 
Search instead for 
Did you mean: 

USB host on stm32f107

batist_2008
Associate II
Posted on July 02, 2012 at 10:03

Hello everyone!

I want to create a new topic for incremental learning with usb for beginners.

I've started to learn usb library, seen examples, but I have many questions.

First of all, I can't undestand, how to configure pins VBUS, ID, DP,DM fot host.

7 REPLIES 7
alok472
Associate II
Posted on July 02, 2012 at 14:57

Use the Host example directly. The USB library has example for Host-HID and Mass-Storage.

See for UM1021(

http://www.st.com/stonline/stappl/resourceSelector/app?page=resourceSelector&doctype=USER_MANUAL&ClassID=1734

)

At link below Search= Host (

http://www.st.com/stonline/stappl/resourceSelector/app?page=resourceSelector&doctype=FIRMWARE&FamilyID=141

batist_2008
Associate II
Posted on July 05, 2012 at 14:39

batist_2008
Associate II
Posted on July 05, 2012 at 14:55

I try efsl using example from st stm32f105_107_usb_fw. When I use usb flash storage 16 Gb capacity I had problems with efsl initialization bacause of fs_varifySanity returns 0 (BytesPerSector>512). When I try mobile phone sd card (2Gb capasity) with FAT I have succeed. When I make partitions on flash, one partition is 2Gb capacity, and formate it with FAT or  FAT32 I have fs_varifySanity=0 because of SectorsPerClaster=128(supported only 2,4,6,8,16,32,64). When I make partition 1Gb capacity on usb flash storage, formatted with FAT or FAT32 I have succeed.  Where is problem? What can I do to use any usb flash storage with any capacity? 

batist_2008
Associate II
Posted on July 17, 2012 at 14:28

Can anybody help me?

Posted on July 17, 2012 at 15:44

Can anybody help me?

 

Probably not a lot. The USB and SD examples posted by ST pass addresses as 32-bit values, you'll clearly have problems with media >4GB in these situations. It is important to use BLOCK NUMBERS and not OFFSET ADDRESSES. I've posted a fixed version of the SD/MSC code for the STM32F4-Discovery board. Suggest you review that.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
batist_2008
Associate II
Posted on July 19, 2012 at 07:46

Where can I find it?

Posted on July 19, 2012 at 13:24

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Where is the UsbMassStorage Examples Supt for stm32f4xx&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=445]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FWhere%20is%20the%20UsbMassStorage%20Examples%20%20Supt%20for%20stm32f4xx&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=445

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