1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

problem accessing a specific CF Card (Compact Flash) in 8-bit TrueIDE mode

Discussion in 'Embedded' started by Rufus V. Smith, Jan 12, 2006.

  1. Compact Flash Card Users!

    We have developed a card reader/writer for Compact Flash (and
    other cards) as part of a bigger controller chip my company
    designs.

    For Compact Flash, we have been using TrueIDE mode and the
    8-bit feature for operation (each pin used costs money...),
    to change the data register from 16-bit to 8-bit.

    We have recently come across a CF card
    (16Mb, branded "Choice Only", model C16ZH)

    Which we are not able to read, all signs being that it is not switching
    into 8-bit mode upon request. This one does not go into 8-bit mode, nor
    does it report 8-bit mode in error as an "unsupported feature". And yes,
    this card does know how to report an error; if I give it code for a
    non-existant feature, it returns an error code.

    We have tried dozens of other different CF cards without incident, all
    of them happy to go to 8 bit mode.

    But reading sectors from this one, it is evident I am only getting the
    even-numbered bytes, indicating 16-bit operation.

    Other devices we have plugged it into (memory card readers, printers)
    can read and write the card.

    However, the devices we know the hardware architecture of use a
    16-bit data path.

    Does anyone know if:

    a) This is actually a brain-damaged card and is unique.

    b) All CF read/writers use a 16-bit data path because this is not a unique
    problem.

    c) All CF cards handle TrueIDE and 8-bit operation properly, the error
    is in my hardware and/or firmware.


    My preferred answer is a.

    I could almost live with c, if I had a clue of what I might be doing wrong.

    Answer b is seriously painful.


    Thanks,


    Rufus
     
    Rufus V. Smith, Jan 12, 2006
    #1
    1. Advertisements

  2. Rufus V. Smith

    larwe Guest

    To conform to this specification, a CompactFlash Storage Card or CF+
    Card must conform to all physical, electrical and Metaformat
    specifications in this document. A CompactFlash Storage Card must
    implement all PC Card and True IDE ATA commands listed in this
    specification. Commands can be implemented as "no operation" to
    meet this requirement. In addition, a CompactFlash card must implement
    all commands in section 6 except the Security commands (F1 to F6).
    While the security commands are optional, CFA members are encouraged to
    implement them.

    Then in the pinout, D8-D15 are marked with this note:

    1. These signals are required only for 16 bit access and not required
    when installed in 8-
    bit systems. Devices should allow for 3-state signals not to consume
    current.

    Implicitly, all CF cards are required to implement 8-bit mode.

    Just out of interest, is the card asserting _IOIS16 after you put it in
    8-bit mode and do a sector read?
     
    larwe, Jan 12, 2006
    #2
    1. Advertisements

  3. That is the way I read the spec, too! I certainly wouldn't expect
    a shipped part to not be compatible at this stage of the game.

    I will check that signal, assuming it is valid in TrueIDE mode.
    (Will look at it in 8 and 16 bit modes on known good and the
    "ornery" card)


    Stay Tuned.

    Rufus
     
    Rufus V. Smith, Jan 12, 2006
    #3
  4. Rufus V. Smith

    alyc Guest

    Hi Rufus,

    I've seen this!! Came across it a few months back while developing a
    library. I have about a dozen cards, all different sizes, all sorts. And
    there's just one card which doesn't behave. It won't reply to the ID E9h (i
    think it is) command. Put it into a camera or laptop and no problems at
    all. It behaves like this in both 8 and 16bit mode. Will read and write
    sectors no problems though.

    Also... I discovered that some commands return their 512byte results in big
    endian, and others little endian.. Spinning IDE drives also do it too...
    Not widely documented and made obvious either.

    What I've also found out is that you can 'kill' a CF card by writing to it's
    lower sectors. Well 'killed' is perhaps a bit OTT as you can still use it
    in a CF reader and via the logger library I've developed. But insert it
    into a camera and it can't initialise it, format it, nothing.

    Hope this helps somewhat :) It's a balance between following the specs to
    the letter and trial and error.
     
    alyc, Jan 15, 2006
    #4
  5. Rufus V. Smith

    Grumps Guest

    I'd like to know more about what parts of the CF you write to in order to
    cause these problems. And what cameras you have experience of that are
    unable to re-format.
     
    Grumps, Jan 16, 2006
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.