EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Compact Flash confusion

Started by Gaurav March 3, 2005
Please help me understand various modes in which CF can be accessed.
 I understand that there are 3 access modes of CompactFlash card:

  1. PC Card ATA memory mode (uses OE-, WE-)
  2. PC Card ATA IO mode (uses IORD-, IOWR-)
  3. true IDE mode (complies to ATA-4)

 I have following doubts:

 1. In PC Card ATA memory mode, how does the host access complete
memory space when only 11 address pins are there (limiting addressable
space to 4KB)
 
 2. In PC Card ATA IO mode, there is one memory mapped mode and 3 IO
mapped Modes. Can someone please throw light on this memory mapped IO
mode inside IO mode.

 3. I read somewhere that CF+ card extends CF functionality beyond CF
card IO modes. How?

 4. I read that PC Card ATA mode complies to ATA spec. Then why have
another True IDE mode? (I have partial answer: TrueIDE provides DMA
mode and can use existing drivers but then why can't PC Card ATA IO
mode do the same?)

 I have access to CompactFlash and ATA specs but not PC Card ATA spec.

Thanks for any response.
Gaurav
which make you are using. If it is SST you can just call the loca
distributer  and their support is just excellan

Good luck.  I've been trying to find out from the manufacturers how to determine
the actual geometry of CF devices, and have heard nothing.  It can't be more
than half a dozen instructions.


On 3 Mar 2005 04:02:19 -0800, gaurav_iet@yahoo.com (Gaurav) wrote:

>Please help me understand various modes in which CF can be accessed. > I understand that there are 3 access modes of CompactFlash card: > > 1. PC Card ATA memory mode (uses OE-, WE-) > 2. PC Card ATA IO mode (uses IORD-, IOWR-) > 3. true IDE mode (complies to ATA-4) > > I have following doubts: > > 1. In PC Card ATA memory mode, how does the host access complete >memory space when only 11 address pins are there (limiting addressable >space to 4KB) > > 2. In PC Card ATA IO mode, there is one memory mapped mode and 3 IO >mapped Modes. Can someone please throw light on this memory mapped IO >mode inside IO mode. > > 3. I read somewhere that CF+ card extends CF functionality beyond CF >card IO modes. How? > > 4. I read that PC Card ATA mode complies to ATA spec. Then why have >another True IDE mode? (I have partial answer: TrueIDE provides DMA >mode and can use existing drivers but then why can't PC Card ATA IO >mode do the same?) > > I have access to CompactFlash and ATA specs but not PC Card ATA spec. > >Thanks for any response. >Gaurav
Gaurav The three modes do not really differ that much. Especially the memory mapped mode is most confusing in that all it boils down to is some support for memory block copy operations your host controller might have. In fact only five address lines are really important a0-a3 and a10. The latter is only of use in memory mapped mode. If set, It instructs the card to ignore all other address lines and asuming address '0 is selected. Since the data register is at address '0' you can therefore use block copy move operations as they are found on many CPUs. Such a mode otherwise could not be used cause other card registers would be adressed. Apart from this major difference all three modes require to (slicghtly simplified) set the sector number and read or write sector data etc. For embedded work I think it boils down to either useing true IDE mode or memory mapped mode. Personally I prefer the latter because it supports hot pluging and unplugging and because of the advantage to use block move operations. If you carefully read the CF specs (meanwhile available in revision 3) you should get a clear picture of all this. Again, the most confusing thing is the naming "memory mapped mode" - you are definately not the first thinking that this would allow random byte access to all of the CF card which it does not. HTH Markus

Memfault Beyond the Launch