cancel
Showing results for 
Search instead for 
Did you mean: 

Need USB Mass Storage device example code for STM32f4 - Discovery Board

parth
Associate II
Posted on February 10, 2017 at 09:19

Hi All,

I am evaluating the STM32f4 discovery board. I want to implement the USB mass storage functionality.I interfaced the SD card using the SDIO 1-bit mode.But, I want to share SD card's data in the PC use of USB Mass storage option.

Please help to make it happen.

I need some reference code or document for the same.

Please let me know if you need more information from our side,

Thanks,

Parth Modi

#stm32f407vgt6 #usb_otg_fs #stm32f4-discovery #sd-as-usb-mass-storage
14 REPLIES 14
Oliver Beirne
Senior
Posted on February 10, 2017 at 17:24

Hello

I have moved your question to the

https://community.st.com/community/stm32-community/stm32-forum?sr=search&searchId=b261d3a7-eead-4438-bad4-5bda55ec5b23&searchIndex=0

‌ where someone should be able to assist you.

Thanks

Posted on February 10, 2017 at 17:43

This is a topic area I've covered a lot on the forum

This is some example code for the STM32F4-DISCO posted about 70% down this thread

https://community.st.com/0D50X00009XkZmmSAF

 
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 11, 2017 at 07:47

Hi Clive one,

Thanks for quick response.

I check your suggested post.But I find reference code's download link is expired.

So, can you share the working download link for the same?

Thanks,

Parth Modi

Posted on February 11, 2017 at 14:48

Hi Parth. The download is working for me. The same URL is reposted here:

https://community.st.com/servlet/JiveServlet/download/43657-1-3309/stm32f4_discovery_msc_sdhc_release_1.zip

Does this download URL work for you ?

Posted on February 11, 2017 at 17:34

Works for me, it's the one in this specific post

https://community.st.com/0D50X00009XkZmmSAF

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 14, 2017 at 08:48

Hi Clive one,

Thanks for link.

I tried your suggested example code and i get the USB mass storage drive on the host's PC. But this drive contain the 0 byte space. I used 1-bit sdio interface for interfacing SD CARD.SD card's capacity is 16GB. I am use the IAR as Development tool.

I found this code based on the standard peripheral library. But,I need the USB MSC device sample code with the HAL

library.

Please Share me the working example code with the HAL

library

.

I work for company. So, Can you share the technical support details for the same.?

Thanks,

Parth Modi

Posted on February 14, 2017 at 09:18

You'd have to modify code so it doesn't switch to 4-bit mode, and uses the right card detect pin.

I'm not using IAR or HAL, you could try using CubeMX to generate your code.

What technical support details are you seeking? Is your company looking to contract support?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 14, 2017 at 09:41

Hello

Modi.Parth

‌,

I suggest you to try the

MSC_Standalone

example that you can find in the

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef4.html

firmware package:

STM32Cube_FW_F4_V1.0\Projects\STM32469I-Discovery\Applications\USB_Device\MSC_Standalone

Best Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on February 14, 2017 at 11:51

Dear

Clive One

,

.

What technical support details are you seeking? Is your company looking to contract support?

I need technical assistance for USB Mass Storage device functionality.

No.

Thanks,

Parth