cancel
Showing results for 
Search instead for 
Did you mean: 

SD card on STM3240

bouhoula
Associate II
Posted on May 31, 2013 at 16:15

Hello, 

I need some help with creating fat files on  microSD.

I found some files on the demo builder but it only provied viewing directories.

Many thanks.
6 REPLIES 6
Posted on May 31, 2013 at 16:25

FatFs is usually used to access and create files. The access methods are quite similar to STDIO file functions, and documented on the FatFs web page with examples.

I don't have an STM3240(G-EVAL) myself, but have ported SDIO + FatFs to the STM32F4-Discovery, STM324x9I-EVAL, and a host of other custom F2 and F4 boards.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
bouhoula
Associate II
Posted on May 31, 2013 at 16:33

Thanks for the quick reply, it's not my main job to develop it , I was looking for a ready API.

Posted on May 31, 2013 at 16:45

Thanks for the quick reply, it's not my main job to develop it , I was looking for a ready API.

You must be a Java guy.

FatFs provides a well documented ''API'', the examples from ST do all the hard integration work.

http://elm-chan.org/fsw/ff/en/open.html

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Writing%20on%20USB-Memory&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=97]Add to file example

It's also possible to connect the SDCard to USB via an MSC implementation, that way you can plug the board into a PC via USB, and access the SDCard like a normal flash drive from there.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
bouhoula
Associate II
Posted on May 31, 2013 at 17:47

Nope, I m working on my eval board with C langage.

Ive found the right API but its working with an OS.

My project is creating a webserver without an OS.

So I wanted to insert my website pages inside the SD Card.

Thats why I need it.

Posted on May 31, 2013 at 18:42

So basically stitching together the STM32F4x7_ETH_LwIP standalone webserver demo, and replacing the existing in memory file handling with the FatFs+SDIO example code.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
bouhoula
Associate II
Posted on June 01, 2013 at 22:28

Exactly.