cancel
Showing results for 
Search instead for 
Did you mean: 

sd card file system

mtraman
Associate II
Posted on November 20, 2007 at 22:01

sd card file system

6 REPLIES 6
mtraman
Associate II
Posted on May 17, 2011 at 09:39

Hi

does anyone hav the code for sd card file system?

i saw the embedded file system library in souceforge.net. it does not have the str9 port.

please, send some links if u know.

thanks

vik

bramos
Associate
Posted on May 17, 2011 at 09:39

I'm actually working in a port for EFSL (http://efsl.be) now though I'm having trouble with the STR9's SSP. The port is actually pretty straight forward as the documentation does a good job of telling you how to do it. So far all I've needed to do is:

1) Add my new end point to interface.h by adding:

#elif defined(HW_ENDPOINT_STR91X)

#include ''interfaces/str91x_spi.h''

2) Add a str91x_spi.c file to the src/interfaces folder that defines the functions that send the SPI data.

3) Add a header file called str91x_spi.h to the inc/interfaces folder. I pretty much copied the lpc200_spi.h header file.

4) Copy one of the sample config files in the conf folder, add it to your project, and changed a few definitions. I used the LPC2000 sample.

In str91x_spi.c, I included interfaces/sd.h which does most of the work for you. Just define the if_initInterface(...) that sets up the SSP, and copy the if_readBuf(...), if_writeBuf(...), and if_setPos(...) functions out of lpc2000_spi.c. Then just define if_spiSend(...) that puts and gets one byte of data and your done.

I'm having a bit of trouble reading back data from the SSP (it's reading what I send out and the loopback is off) but the card looks like it's responding properly on the scope.

Once I get past my problems with the SSP I'll test out EFSL and let you know how it works.

mark9
Associate II
Posted on May 17, 2011 at 09:39

The IAR demo code includes an MP3 player that has the EFSL ported to the STR9122. After cleaning up the demo and turning it into a neat file system module, I discovered that EFSL does not support file erase! It's essentially read-only worthy.

C:\Program Files\IAR Systems\Embedded Workbench 4.0\ARM\examples\ST\STR91x\STR912-SK-IAR\MP3_player

I have successfully ported the PowerPac filesystem to the STR912. This is included for free in the latest IAR EWARM release. If you start with the IAR mp3 player demo, and then use that to port to PowerPac, it isn't too difficult (a day or so to port).

-Mark

mtraman
Associate II
Posted on May 17, 2011 at 09:39

Thanks for the replies.

i hav done something similar to what u(bramos) have done. i will tell u when it starts working.

No support for delete is a unpleasant surprise. Is there any work around for this shortcoming?

vik

mtraman
Associate II
Posted on May 17, 2011 at 09:39

I forgot to mention that i am using Realview tool chain and the mkfs.c file has some unaligned access which gives some problems while compiling.

Can the mkfs.c be left out?

i think it is only for making the file system. this can even be done by a card reader using a pc.

Can the mkfs.c be left out?

nafaazayen
Associate II
Posted on May 17, 2011 at 09:39

Hi,

When I try to run MP3 player of IAR Embedded Workbench in my STR912, I always have a same message in the LCD “Can’t find MP3 module�?.

My SD card contains 3 MP3 songs.

Can you tell me why and help me to solve this issue.

Thanks a lot.