Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to use a compact flash(CF) in shared space?

Status
Not open for further replies.

hamidkavianathar

Member level 5
Joined
Mar 6, 2016
Messages
89
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
804
hey guys
there is a CF and I want to read and write on it with a computer and a micro controller. both of them ( PC and MCU) can read and write independently but PC has higher priority ( when PC and MCU want to read anonymously, micro must wait until PC finishes its job). could tell me what should I do?
I'm familiar with ARM, AVR, PIC micro controllers. and I don't have any information about CF.
is it better to use a FPGA?
thank you.
 

Hi,

First i have to say I don't think a CF card is a good memor for this.

If you want to do this you need a good concept.
* how do you (FPGA) recognize that there is access or not?
--> only watching the CS signal won't work. Usually a PC needs to "release" the card before you may disconnect it, or use it with the microcontroller. All PC inside cache must be flushed and the FAT must be up to date before the it is released.

* how do you handle if the microcontroller just is having acces to the SD card, but the PC wants to have access?
--> Any stop of writing ... will case data loss.

Priority:
On first sight I don't think it is possible or useful to create priority for SD card access.

Only if you "release" and "reconnect" the SD card....but i can't imagine to manage it with a PC...without writing a special SD card access driver for the operating system.

Klaus
 
Some information is missing. What's the intended PC to SD interface? SPI or 4-bit SD? If it's SD, do you also use SD-interface for the µC? Otherwise the SD Card must be reinitialized each time you switch the access.

A possible solution could be a hardware mux that signals SD busy state while the µC is accessing the card. Would not necessarily need a FPGA, but could be well implemented in a CPLD.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top