cancel
Showing results for 
Search instead for 
Did you mean: 

FatFS + sdCard + Usb device

Posted on November 23, 2015 at 10:05

Hello there,

I am using STM32F407 with HAL lib. I am looking for an example in the ''STM32Cube_FW_F4_V1.7.0'' that would contain following functionality:

FatFS system on a SD card using SDIO and that system should be seen through usb as mass storage (the whole SD card). Is there any example of how to do this? Because I could only find FatFs + SDIO but without mass storage interface.
4 REPLIES 4
Posted on November 23, 2015 at 15:51

Examples don't tend to embrace that level of complexity. You are going to have to put your developer pants on, and merge/port in the functionality you want. I'd probably start with the MSC+SDIO, and merge in the FatFs stuff at the DISKIO.C level.

Can't help you with the HAL stuff.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on November 23, 2015 at 19:38

I understand. Well, in the examples there are SDIO+FatFS and MSC within flash I think so I would have to start from those examples, maybe work out sd card without usb first, to write stuff from mcu level.

Thank you for the hints, ill have to work this out :).

dttworld
Associate II
Posted on November 30, 2015 at 21:06

There are examples of this on ST Eval boards that have a micro SD card socket. Check out the examples for the STM324x9I-EVAL and STM32F756G-DISCO boards. It's under ''....applications\usb_device\msc_standalone''

abhishek kr
Associate II
Posted on December 27, 2017 at 10:29

Hi, The Mass storage is detected in my PC, but i am not able to read/write/erase file/folders.

After deleting a file it bounces back. And whatever written is i think corrupt data.