AnsweredAssumed Answered

Fat32 driver for SDCard

Question asked by aloui.seifeddine@gmail.com on Apr 11, 2012
Latest reply on Apr 12, 2012 by aloui.seifeddine@gmail.com

Hello,

 

I have written a custom Driver for SD Cards for my Cyclone III FPGA that enables an external device (ex: a Blackfin DSP BF527) to read and write data from and to the SD-Card seamelessly.

 

The idea is simple:

There are two buffers in the FPGA accessible from the DSP via the external bus (it is mapped as external memories at different addresses).

There are several registers accessible from the DSP via external bus that enables sending commands to the driver and gethering SDCard informations.

 

When an SDCard is inserted, the driver detectes its presence, makes the necessary initialization process and tells the DSP via an intterrupt on portF.

All SD card registers are accessible directly via the external Bus and seen as external memory (so no need to explicitely send CMD commands to the Card to gether Registers informations, the FPGA does that automatically).

 

At this point, the driver waits for the DSP to fill its in-buffer then send a writeblock command (by writing in a register), or readblock command to gether the requested sector

 

 

I implemented two simple functions for the DSP: readblock and writeblock and i have an interrupt handler to detect when a card is ready or when it is removed...

 

The buffers are both 512Bytes memories to be able to read a sector. The readblock command requires an address (multiple of 512). The writeblock requests an address and a buffer to fill.

 

I would like to install the Blackfin Fat32 filesystem to be able to read and write files seamelessly to my SD/Card. Is there any example or something that can help me use the service layout to integrate it with my driver with minimum effort?

 

Thanks.

Outcomes