FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-07-2006, 05:27 AM
sachink321@gmail.com
Guest
 
Posts: n/a
Default Accessing compact flash?????????

Environment in which system works:

Microblaze softcore processor on spartan 3 fpga board
compact flash, acting as a mass storage.

How to access the compact flash in embedded applications
write to and read from the compact flash? how to access the FAT table?
to which sector i need to write, which address?

which mode of addressing is easy way out
CHS or LBA??

I got no clue how to access, it would be great help if i could
understand in and out of doing tht becoz i need to write a code in C

Thanks in advance

Reply With Quote
  #2 (permalink)  
Old 04-07-2006, 06:45 AM
John Williams
Guest
 
Posts: n/a
Default Re: Accessing compact flash?????????

Hello,

sachink321@gmail.com wrote:

> Microblaze softcore processor on spartan 3 fpga board
> compact flash, acting as a mass storage.
>
> How to access the compact flash in embedded applications
> write to and read from the compact flash? how to access the FAT table?
> to which sector i need to write, which address?


There is sample code in the Xilinx ML40x reference designs, under
software applications. In particular, there is an example program for
MicroBlaze that shows how to read and write files from the DOS partition
on the compact flash card. I don't think you have to worry about
partitions and all that, it's handled by some Xilinx FAT filesystem code.

Regards,

John
Reply With Quote
  #3 (permalink)  
Old 04-07-2006, 02:25 PM
Eli Hughes
Guest
 
Posts: n/a
Default Re: Accessing compact flash?????????

sachink321@gmail.com wrote:
> Environment in which system works:
>
> Microblaze softcore processor on spartan 3 fpga board
> compact flash, acting as a mass storage.
>
> How to access the compact flash in embedded applications
> write to and read from the compact flash? how to access the FAT table?
> to which sector i need to write, which address?
>
> which mode of addressing is easy way out
> CHS or LBA??
>
> I got no clue how to access, it would be great help if i could
> understand in and out of doing tht becoz i need to write a code in C
>
> Thanks in advance
>



If you use the SYSTEM Ace controller chip , you can easily get to FAT
file system access! There is actually a nice piece of IP that comes
with the EDk that gives you basic file access.


-ELi

Reply With Quote
  #4 (permalink)  
Old 04-07-2006, 03:21 PM
Jan Panteltje
Guest
 
Posts: n/a
Default Re: Accessing compact flash?????????

On a sunny day (Fri, 07 Apr 2006 09:25:33 -0400) it happened Eli Hughes
<emh203@psu.edu> wrote in <e15p8e$1hji$1@f04n12.cac.psu.edu>:

>sachink321@gmail.com wrote:
>> Environment in which system works:
>>
>> Microblaze softcore processor on spartan 3 fpga board
>> compact flash, acting as a mass storage.
>>
>> How to access the compact flash in embedded applications
>> write to and read from the compact flash? how to access the FAT table?
>> to which sector i need to write, which address?
>>
>> which mode of addressing is easy way out
>> CHS or LBA??
>>
>> I got no clue how to access, it would be great help if i could
>> understand in and out of doing tht becoz i need to write a code in C
>>
>> Thanks in advance
>>

>
>
>If you use the SYSTEM Ace controller chip , you can easily get to FAT
>file system access! There is actually a nice piece of IP that comes
>with the EDk that gives you basic file access.


I dunno, but 100 years ago or so when I moved from CP/M to MSDOS
I hacked together a simple file transfer function in C.
It is 'clean room', but then I did have MS floppies to test.
ftp://panteltje.com/pub/ms_fat.bz2

Not even sure that will work with current FAT, have to try some day.
But it has some test routines....
At the center of it it has a routine rwsabs()

rwsabs(sabs,dma,rwf) /*read or write sector abs*/
int sabs;/*absolute sector, starting at 0*/
unsigned dma; // memory address

Could be informative perhaps, ignore the sys14 routine calls.
Now to hope the richest man in the world does not sue me :-)


Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
WIFI Compact Flash eziggurat@gmail.com FPGA 2 02-17-2006 02:09 AM
Interfacing Compact Flash with Spartan 3 George Mercury FPGA 3 03-11-2005 10:00 PM
FPGA in a Compact Flash format. John Carter FPGA 5 07-21-2004 05:32 AM
Compact Flash FPGA card Iwo Mergler FPGA 4 05-13-2004 10:14 AM


All times are GMT +1. The time now is 02:40 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved