cancel
Showing results for 
Search instead for 
Did you mean: 

How to use USB as Mass Storage Class ?

antonius
Senior
Posted on March 01, 2017 at 22:17

Everybody,

How to use USB as Mass Storage Class ?

This question is related with SDIO I had done intiating,

Which configuration file do  I need to change ?

I can see drive E on my computer now, but can not read the content yet,

Anyone knows ?

Thanks

13 REPLIES 13
Posted on March 02, 2017 at 00:46

As per FatFs, the SDIO layer must present coherent data from the media.

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

 
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 02, 2017 at 10:21

I got SDIO and FATFs running, then put USB as MSC on STM32CubeMX, what

else do I need to connect them ?

Posted on March 02, 2017 at 13:30

Is it related with this function ? SD Init must be here ?

Posted on March 02, 2017 at 13:59

In the first order the GET CAPACITY and READ functionality of the MSC are critical to Windows successfully mounting the media.

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

How can I do that ? Please give a clue ? thanks

Posted on March 02, 2017 at 14:24

6.2 Mass storage class

6.2.1 Mass storage class implementation

UM1734 page 32, how to implement that with STM32CubeMX ??

Posted on March 02, 2017 at 22:26

Can I call like this in usbd_storage_if.c ?

Any ideas ?

&sharpinclude 'bsp_driver_sd.h'

/*******************************************************************************

  • Function Name : STORAGE_Init_FS

  • Description :

  • Input : None.

  • Output : None.

  • Return : None.

*******************************************************************************/

int8_t STORAGE_Init_FS (uint8_t lun)

{

/* USER CODE BEGIN 2 */

BSP_SD_Init();

return (USBD_OK);

/* USER CODE END 2 */

}

Posted on March 02, 2017 at 23:02

Aren't them some examples you can analyze? I really can't hold your hand doing USB/HAL related stuff, I don't learn stuff by asking millions of question, I review available information/examples from all available sources.

STM32Cube_FW_F1_V1.3.0\Projects\STM3210C_EVAL\Applications\USB_Device\MSC_Standalone\Src\usbd_storage.c

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 02, 2017 at 23:10

This one :

STM32Cube\Repository\STM32Cube_FW_F1_V1.4.0\Projects\STM3210E_EVAL\Applications\USB_Device\MSC_Standalone