Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
782 Views

Compact Flash Controller

Hello, 

 

I'am working on a project that consists in making a Compact Flash Controller for a specific microprocessor (Verilog). I've found some documents about this subject, but I'm still in doubt about many points. Actually, I don't really know how to start. 

 

A compact flash memory has 50 pins I/O. So I guess my controller will have 50 pins I/O going to the memory card, and another 50 pins I/O going from the CPU to the controller. Am I right ? 

 

Then, let's say I want to read the compact flash memory. The controller will receive the read signal, so I will make an assignment to connect address bus coming from the CPU to address bus going to the memory (and others assigments as well). Is it how it works ? In that case, it looks like connecting directly the CPU to the memory. I'm confused. 

 

Thanks ! 

 

Julien.
0 Kudos
6 Replies
Altera_Forum
Honored Contributor I
36 Views

Hi, 

 

Basically compact flash card can be used in different mode like Ture IDE PIO mode, DMA mode.  

 

Out of 50 Pins some of the pins are not used in while you are using CF card in True IDE PIO mode. You have to keep pins as ground/VCC.  

 

You have to take care of timing of address/read/write signals coming from CPU when you want to pass them to CF card. Before do read/write to CF card you have set CF's register like cylinder no, sector no, etc.. 

 

Regards, 

Hardik Sheth
Altera_Forum
Honored Contributor I
36 Views

Ok thanks, I have others questions : 

- What is the difference between PC Card ATA Memory mode and PC Card ATA I/O mode ? 

- Is there another way for driving the CF card instead of using the command register ? 

- What is the command register address ? (I didn't find it into the CF specifications) 

- What does "mapping" mean ? (PC Card mapping for example) 

 

Thanks, 

 

Julien.
Altera_Forum
Honored Contributor I
36 Views

So I found much information about my previous questions. But I still don't understand why there are many memory mappings ? What is the purpose ?  

 

Then, my other question now is about UDMA : How do I select UDMA mode ? Is it only by cabling devices in the correct way ? Or is there a register that needs to be changed ? 

 

Thanks, 

 

Julien.
Altera_Forum
Honored Contributor I
36 Views

Hello Friends, 

Just try yourself google and search just "PC card ATA". 

You will get your required answers.
Altera_Forum
Honored Contributor I
36 Views

Does sb know where I can find a Compact Flash model in Verilog ?

Altera_Forum
Honored Contributor I
36 Views

My controller is done and seems to work. I tried to read/write/erase an old CF card and everything is fine. Then I bought a new one (Lexar 233x), and now I'm not able to erase it. I tried the erase sector command, format unit command without any success.  

 

Does sb have any idea ?