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

    Join Date
    Mar 2016
    Posts
    56
    Helped
    0 / 0
    Points
    417
    Level
    4

    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, 20:03

      advertising

        
       

  2. #2
    Super Moderator
    Points: 36,371, Level: 46
    Awards:
    Most Frequent Poster

    Join Date
    Apr 2014
    Posts
    7,422
    Helped
    1803 / 1803
    Points
    36,371
    Level
    46

    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.

    •   Alt7th May 2016, 00:40

      advertising

        
       

  3. #3
    FvM
    FvM is offline
    Super Moderator
    Points: 221,981, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    38,104
    Helped
    11664 / 11664
    Points
    221,981
    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.

+ Post New Thread
Please login
--[[ ]]--