cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4-Discovery USB Mass storage

eran2
Associate II
Posted on August 02, 2012 at 15:25

Hi,

My company is in a phaze where we evaluate STM32F4xx using STM32F4-Discovery EVB.

For the past few days we tried to activate USB mass storage feature bug failed.

We couldn't find any example for that issue.

Can anyone help us with that issue?

Thanks.

#usb-mass-storage
16 REPLIES 16
Posted on August 02, 2012 at 16:01

Can anyone help us with that issue?

 

If your company needs consultants, I believe ST maintains a list.

I've posted working examples of a USB MSC using SDCards on the STM32F4-Discovery to the forum. It's a pretty simple port.

The Discovery is a pretty poor platform for such evaluations, an STM3240G-EVAL or one of the others would be better. Having an SDCard socket built in, and High-Speed USB, and all.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
eran2
Associate II
Posted on August 02, 2012 at 16:17

Hello clive1,

Thank you for your fast reply.

What do you mean by saying ''believe ST maintains a list.'' a list of what does ST maintains?

What is the reason that my EVB is not good enough for testing USB mass storage?

Can you send me link to your samples code? is it for STM32F407 MCU?

I must admit that the samples ST released are pretty poor comparing to TI's.

Instead of having small code samples with code only for the relevant module, the samples

contains code of other modules which makes it difficult to find the relevant module.

Thanks for your fast reply again.

Posted on August 02, 2012 at 17:26

They have a list of consultants who provide programming assistance, etc.

The Discovery is poor choice because it doesn't have any memory devices wired up to provide any of the ''Mass'' storage you aim to test, nor does it support High Speed USB (ie 480 Mbps), only Full Speed USB (ie 12 Mbps), with the obvious bandwidth limitations that comes with that.

The examples work well with the boards they are designed to demonstrate, less so with those that were not. You picked the Discovery because it was cheap, not full featured.

[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=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Where%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..
Posted on August 02, 2012 at 17:34

My current GNU release for the STM32F4-Discovery USB MSC for an external SD Card is attached to this post.

/public/STe2ecommunities/mcu/Lists/STM32Discovery/Attachments/2816/stm32f4_discovery_msc_sdhc_release_3.zip

0690X00000603EZQAY.jpg

See also

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/ST32f4discovery%2Bsdcard%2Bfatfs problem&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=568]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FST32f4discovery%2Bsdcard%2Bfatfs%20problem&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=568

________________

Attachments :

stm32f4_discovery_msc_sdhc_release_3.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hzk5&d=%2Fa%2F0X0000000bOu%2FZj80912SR.ABc4sfsQ2boxK.FO8PCQLy6S81aJ68QCw&asPdf=false
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
waleedaslam89
Associate II
Posted on August 03, 2012 at 11:52

''The Discovery is poor choice because it doesn't have any memory devices wired up to provide any of the ''Mass'' storage you aim to test, nor does it support High Speed USB (ie 480 Mbps), only Full Speed USB (ie 12 Mbps), with the obvious bandwidth limitations that comes with that. ''

 

Hi Clive, 

So it means that i cannot achieve USB High Speed (480Mbps) configuration with my F4 Discovery Board ?? 

if i wanted a high speed configuration what should i do ? Change the crystal ? or is it not possible with STMF407VG microcontroller ?

Posted on August 03, 2012 at 14:37

You'd need to be using an external PHY attached to the UPLI. Given the speed and characteristics you'd want a more considered design.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
eran2
Associate II
Posted on August 05, 2012 at 10:46

Hi clive1,

According to the spec, STM32F407VG supports HS

(

http://www.st.com/internet/mcu/product/252140.jsp

)

dannym
Associate II
Posted on August 05, 2012 at 13:39

You will need external USB phy hardware to use the high speed USB interface.  This uses the ULPI, a different hardware peripheral than the standard-speed onboard USB.  If high speed USB is your goal, I'd recommend you start on the ULPI because AFAIK the onboard is so different that getting it to work won't help you much with the ULPI.

Waveshare sells some useful boards in this area, here is the USB phy:

http://www.ebay.com/itm/USB3300-USB-HS-Board-Host-OTG-PHY-Low-Pin-ULPI-Evaluation-Development-Module-Kit-/251069458682?pt=LH_DefaultDomain_0&hash=item3a74e7e8fa#ht_1299wt_1168

You may notice the shipping $ is high.  If you look at Waveshare's page, there is a lot of neat stuff, but there's 3 items here you WILL want for the STM32F4 Discovery (and can be used with other processors too) and the shipping should combine under the same $7: you want that USB phy, and:

the DP83848  Ethernet phy:

http://www.ebay.com/itm/DP83848-Ethernet-Board-Physical-Layer-Transceiver-Evaluation-Development-Module-/261005557816?pt=LH_DefaultDomain_0&hash=item3cc524c038#ht_1620wt_1168

and CAN transceiver:

http://www.ebay.com/itm/SN65HVD230-CAN-Board-Network-Transceiver-Evaluation-Development-Module-Kit-3-3V-/251042740085?pt=LH_DefaultDomain_0&hash=item3a73503775#ht_1262wt_1168

There's other USB and Ethernet stuff there.  For example, the ENC28J60 standalone Ethernet controller.  It's actually more advanced at a lower price, but it's a SPI interface- it won't use the STM32's Ethernet MAC at all.  Consequently, you won't learn much, and it probably won't be nearly as fast or as capable.  Those are better suited for 8-bit Arduinos which simply couldn't talk to Ethernet on their own.  The ENC28J60 is still kinda worth getting, it's cheap and maybe one day you'll need to put it on a core with no MAC peripheral and it'll be useful.  Or maybe you'll need to put a second Ethernet port on the STM32 board, perhaps even for loopback testing. But really for the STM3F4 Discovery, get the DP83848 phy for that.  There's some USB controllers there at Waveshare too, same story- get the phy.

They also have the breakout for the SD card interface, you might want that one too.

eran2
Associate II
Posted on August 05, 2012 at 13:56

Hi danny,

We are not interested in HS. FS is good for us.

The problem is that so far we didn't manage to run mass storage USB on our EVB.

None of the samples work.