2016-04-27 01:55 AM
Hi,
My application includes USB with mass storage class, I am using STM32F103VE MCU running at 72Mhz. Sandisk uSD(8GB, Class 10) used with SDIO interface.I have used USB MSC code from STM32F1 library(STM32_USB-FS-Device_Lib_V4.0.0\Projects\Mass_Storage\MDK-ARM).I have made my own device to test this software and it is working fine because I have tested USB HID and USB MSC.My only problem is that I am getting ~50KB/S speed in USB MSC, how to increase it?It would be really helpful if any one can give suggestion or workaround for it. #fatfs #sdio #sd #stm32 #stm32 #usb #dma #massstorage
2016-04-27 04:04 AM
Hi KVK,
I recommend the following references to get correct : - ''MSC-Standalone'' example in library at this path: STM32Cube_FW_F1_V1.3.0\Projects\STM3210E_EVAL\Applications\USB_Device\MSC_Standalone-
USB on-the-go Host and device library that you can download at this
http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF257882#
with it user Manual- Application note
http://www.st.com/st-web-ui/static/active/jp/resource/technical/document/user_manual/DM00108129.pdf
''USB device library'' (6.2 Mass storage class)
-
http://www.st.com/web/en/catalog/tools/PF259242
tool that help you to generate your necessary initialization code for your project.
-Hannibal-2016-04-27 04:10 AM
Hi KVK,
Check if you have not the same problem shown at this -Hannibal-2016-04-27 08:34 AM
I'm not sure Cube is the answer to anything in the SDIO domain, there's a trail of people having issues. The OP isn't using it, and it will just add an extra dimension of fail/frustration.
As I suggested in the other thread, separate out and validate the SDIO functionality. You need to make sure the card has been walked into the 4-bit mode, and higher clock rates. If it is left at 400KHz 1-bit mode it is going to be a veritable sloth.Can't say I've dealt with the F1 in years, on the F2/F4 platforms USB-FS + SDIO MSC can delivery 700-800 KBps2016-04-28 09:37 PM
Hi,
Thanks Clive, Thanks Hannibal.I have checked SDIO functionalities and it is proper(i.e 4-bit mode with clock 24Mhz) in STM32_USB-FS-Device_Lib_V4.0.0\Projects\Mass_Storage\MDK-ARMAlso tried software generated from cubemx(additionally added USB_DISCONNECT GPIO), not working proper. PC is showing drive for that but it is asking to format the memory card.Drive format window
is showing 32MB memory size instead of 2GB.because of this issue I was unable to test speed by increasing packet sizeMSC_MEDIA_PACKET to 0x4000.
Also tried software suggested by Hannibal (STM32Cube_FW_F1_V1.2.0\Projects\STM3210E_EVAL\Applications\USB_Device\MSC_Standalone
).Got speed nearly 80KB/S.2016-04-30 01:23 AM
Can anyone suggest what to do next?