read from flash memory

Thread Starter


Joined Feb 24, 2008
Hi, I'm thinking about designing an FPGA system, the systems purpose is to read data (files) from a flash memory. My questions are: is that possible?? and how are the files are organized in the flash memory (thumb drive)?? is there any special table in the flash memory which tells you the name of the file and the location?? can I achieve this by using a spartan3 or a spartan 2E??
any info counts


Joined Oct 14, 2005
It is certainly possible. The files are organized according to the formatting used, which is usualy FAT/FAT32. You would have to interface to the USB port on the flash disk (provide the USB host interface) and then send appropriate commands. The details could be found on the internet. For example look at Mass Storage section on this page

There is an easier method, such as using dedicated interfacing IC like Vinculum from FTDI. Unless you have specific reasons not to, then you would have to crammed all the functionalities (USB host interface, Mass Storage driver, etc.) into the FPGA.

If you're not particular to the USB flash drive, you could consider an SD card instead. It is much easier to interface to an FPGA or microcontroller, because there is no need to have the USB host interface driver.


Joined Jun 30, 2006
You can use SPI to write to SD cards without any proprietary code. I'm pretty sure if you look on the forums dedicated to FPGA's you'll find a file system the will work with an SPI device.
Compact flash will work as an IDE drive with a simple adapter. USB is also a posibility.
With an SPI device you can write all the data raw but you'll have to keep track of it which can be tedious. It's nice if you're doing sequential data like weather monitoring or linear process recording but hell if you need random read/write.