Serving the Critical Data Storage Needs
of Industrial and OEM Customers

FORTASA BLOG

Flash Storage Solutions for Embedded Designs
High Reliability Flash SSDs, Cards and Modules for Industrial Applications

CompactFlash Memory Card Interface Modes and Capabilities

Posted by Biraj Jamalayam on Friday, 11 Apr 2014

Fortasa CompactFlash Card and SATA Adapter

CompactFlash memory cards have been a preferred storage device in many of embedded application. Developers appreciate the compact physical size, high performance interface, environment robustness and ability to easily remove the device even during system operation. Most often the CompactFlash memory card is used as a direct replacement of a conventional magnetic Hard Disk Drive.

Most conventional operating systems, such as Windows or Unix/Linux, have standard device drivers that recognize CompactFlash cards as a HDD and enable transparent interface to the card. This handshaking is performed by the system device driver that reads the CompactFlash card's Device ID table to recognize the Flash card capability and sets up an appropriate level of interface to the card.

Compact Flash standard defines a physical interface between the card and host system. The interface is physically smaller but electrically identical to the conventional ATA interface. As the CompactFlash specification progressed, there were developed multiple revisions of CF memory cards, each compliant with the higher revision of the specification. Revision 2.0, 3.0 and 4.0 will work in Ultra DMA16 (Speed 16MB/s), Ultra DMA66 (Speed 66MB/s) and Ultra DMA133 (Speed 133MB/s) mode respectively. PIO mode supports up to 25 MB/s. All the revisions have been specifically developed to retain backward capability.

CF Memory Card Device Information

As mentioned earlier, each CF card contains specific information such as revision details, sectors, cylinders, PIO mode support, DMA support and other specifics of the card. These details are available in the storage area withing the CompactFlash called - device information memory. This information is read by the host by issuing “Identify Device” Command. The following locations of the device information register that defines the PIO and DMA capabilities of the CompactFlash card.

Word Address Default Value Data Field
 49  0h  Capabilities
 53  000Xh  Field Validity
 64  00XXh  Advanced PIO Modes Supported
 88  XXXXh  Ultra DMA (UDMA) mode supported and selected

In the Word 49 – Bit 9 and 8:

Bit 9: LBA supported

Bit 9 shall be set to 1, indicating that this Compact Flash Storage Card supports LBA mode addressing. CF devices shall support LBA addressing.

Bit 8: DMA Supported

If bit 8 is set to 1 then Read DMA and Write DMA commands are supported.

If bit 8 is set to 0, then Read DMA and Write DMA commands are not supported.

In the Word 64:

Bits 7 through 2 are reserved.

Bit 0, if set to one, indicates that the Compact Flash Storage Card supports PIO mode 3.

Bit 1, if set to one, indicates that the Compact Flash Storage Card supports PIO mode 4.

If bit 1 of word 53 is set to 1, the values in words 64 through 70 are valid. If this bit is cleared to 0, the values reported in words 64-70 are not valid. Any Compact Flash Storage Card that supports PIO mode 3 or above shall set bit 1 of word 53 to one and support the fields contained in words 64 through 70.

In the Word 88:

Bit 15: Reserved.

Bit 14: 1 = Ultra DMA mode 6 is selected 0 = Ultra DMA mode 6 is not selected.

Bit 13: 1 = Ultra DMA mode 5 is selected 0 = Ultra DMA mode 5 is not selected.

Bit 12: 1 = Ultra DMA mode 4 is selected 0 = Ultra DMA mode 4 is not selected.

Bit 11: 1 = Ultra DMA mode 3 is selected 0 = Ultra DMA mode 3 is not selected.

Bit 10: 1 = Ultra DMA mode 2 is selected 0 = Ultra DMA mode 2 is not selected.

Bit 9: 1 = Ultra DMA mode 1 is selected 0 = Ultra DMA mode 1 is not selected.

Bit 8: 1 = Ultra DMA mode 0 is selected 0 = Ultra DMA mode 0 is not selected.

Bit 7: Reserved.

Bit 6: 1 = Ultra DMA mode 6 and below are supported. Bits 0-5 shall be set to 1.

Bit 5: 1 = Ultra DMA mode 5 and below are supported. Bits 0-4 shall be set to 1.

Bit 4: 1 = Ultra DMA mode 4 and below are supported. Bits 0-3 shall be set to 1.

Bit 3: 1 = Ultra DMA mode 3 and below are supported, Bits 0-2 shall be set to 1.

Bit 2: 1 = Ultra DMA mode 2 and below are supported. Bits 0-1 shall be set to 1.

Bit 1: 1 = Ultra DMA mode 1 and below are supported. Bit 0 shall be set to 1.

Bit 0: 1 = Ultra DMA mode 0 is supported.

Bit 2 shall be set to 1 indicating that word 88 is valid and reflects the supported True IDE UDMA transfer modes:

From the preset definitions of the above Device ID register it is possible to know the mode of transfer supported by the specific CompactFlash card.

Please contact Fortasa for any information about our Industrial CompactFlash card products.