EmbeddedRelated.com
Forums

Combining SD card with flash IC

Started by myfriendmarkis November 30, 2006
Hi All,

I've implemented a FAT file system on a NAND flash chip (ST M25P64) and
everything works fine.

I'm now looking at expanding the design to include an SD card.

Have been through the EFSL filesystem example on this forum and it
looks great, but how can I integrate it with my existing flash IC?

I think I need to modify efsl to target the NAND chip or SD card as
needed but is this the best way of doing it? The NAND chip does not use
SD style commands so I'll have to unpick the efsl functions to insert
the flash layer code instead of the SPI SD commands. This looks like a
lot of work and I'm wondering if there is an easiler way (software or
hardware)???

Your thoughts are greatly appreciated,

Mark.

An Engineer's Guide to the LPC2100 Series

myfriendmarkis wrote:
>
> Hi All,
>
> I've implemented a FAT file system on a NAND flash chip (ST M25P64) and
> everything works fine.
>
> I'm now looking at expanding the design to include an SD card.
>
> Have been through the EFSL filesystem example on this forum and it
> looks great, but how can I integrate it with my existing flash IC?
>
> I think I need to modify efsl to target the NAND chip or SD card as
> needed but is this the best way of doing it? The NAND chip does not use
> SD style commands so I'll have to unpick the efsl functions to insert
> the flash layer code instead of the SPI SD commands. This looks like a
> lot of work and I'm wondering if there is an easiler way (software or
> hardware)???
>

Well, it depends on how the EFSL is written. I've thought of doing
something like that with the RDCF2 fat filesystem. In RDCF2, the actual
point of contact with the SD/MMC card is just four functions:
selectMMC(), unselectMMC(), blockRead(), and blockWrite().

All you would really have to do is to rewrite the 512byte blockRead()
and blockWrite() functions to access the appropriate block of Flash.

Since the Flash memory is so tiny compared with the bulk storage of the
MMC card, I just forgot about it as more an intellectual excercise than
a practical one.

Regards,

TomW

> Your thoughts are greatly appreciated,
>
> Mark.
>
>
--
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net http://cyberiansoftware.com http://openzipit.org
"Windows? No thanks, I have work to do..."
----------------
> -----Original Message-----
> From: l...
> [mailto:l...]On Behalf
> Of myfriendmarkis
> Sent: Thursday, November 30, 2006 2:09 PM
> To: l...
> Subject: [lpc2000] Combining SD card with flash IC
> Hi All,
>
> I've implemented a FAT file system on a NAND flash chip (ST
> M25P64) and
> everything works fine.
>
> I'm now looking at expanding the design to include an SD card.
>
> Have been through the EFSL filesystem example on this forum and it
> looks great, but how can I integrate it with my existing flash IC?
>
> I think I need to modify efsl to target the NAND chip or SD card as
> needed but is this the best way of doing it? The NAND chip
> does not use
> SD style commands so I'll have to unpick the efsl functions to insert
> the flash layer code instead of the SPI SD commands. This
> looks like a
> lot of work and I'm wondering if there is an easiler way (software or
> hardware)???
>
> Your thoughts are greatly appreciated,
>
> Mark.
There is an interface layer that talks to the hardware in EFSL. It
does support multiple hardware interfaces, but I'm not sure if it can
do them at the same time. I would suggest posing the question on the
EFSL forums, as the developers usually respond there.

Mike