cancel
Showing results for 
Search instead for 
Did you mean: 

How to access a SD-Card connected by STM32 SDIO as a U-Disk by PC?

Junde
Senior II

Hi there,

I am working on STM32F429BIT6, and I have a SD-Card connected.

Now, I want to copy some data between the PC and SD-Card by USB directly.

Is there any example or document?

Anything is welcome, thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Junde
Senior II

For MDK IDE, the USB related code must compiled by "MDK compiler V5", the binary by "MDK compiler V6" will NOT work!

Demo reference: https://github.com/ShadowThree/STM32V6_extFlash_SDcard_FatFS_Udisk_Demo

 

View solution in original post

4 REPLIES 4

There should be a MSC USB Device example amongst those ib CubeF4, perhaps as Applications for EVAL or DISCO series boards that map operations to SDIO port.

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

@Tesla DeLorean  Thank you for your information!

I find a example similar with my requirement at STM32Cube_FW_F4_V1.28.0\Projects\STM32F412G-Discovery\Applications\USB_Device\MSC_Standalone, I will read it carefully.

Junde
Senior II

Hi, @Tesla DeLorean 

I have read the example and this tutorial carefully.

But my program always can't work, the code is stopped at USBD_GetEpDesc() because pdesc->bDescriptorType always NOT equals to USB_DESC_TYPE_ENDPOINT

Junde_0-1723008719797.png

I am not skillful at USB, but I can sure the hardware is work well, as I have a project can do that thins.

If need, refer my project at attachment.

Thanks for your help!

 

Junde
Senior II

For MDK IDE, the USB related code must compiled by "MDK compiler V5", the binary by "MDK compiler V6" will NOT work!

Demo reference: https://github.com/ShadowThree/STM32V6_extFlash_SDcard_FatFS_Udisk_Demo