+ Post New Thread
Results 1 to 3 of 3
  1. #1
    Member level 4
    Points: 669, Level: 5

    Join Date
    Mar 2016
    Posts
    73
    Helped
    0 / 0
    Points
    669
    Level
    5

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

    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.

    •   Alt6th May 2016, 19:03

      advertising

        
       

  2. #2
    Super Moderator
    Points: 52,038, Level: 55
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster

    Join Date
    Apr 2014
    Posts
    10,446
    Helped
    2487 / 2487
    Points
    52,038
    Level
    55

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

    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


    1 members found this post helpful.

    •   Alt6th May 2016, 23:40

      advertising

        
       

  3. #3
    Super Moderator
    Points: 236,416, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    40,887
    Helped
    12494 / 12494
    Points
    236,416
    Level
    100

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

    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.


    1 members found this post helpful.

--[[ ]]--