CompactFlash
CompactFlash is a flash memory mass storage device used mainly in portable electronic devices. The format was specified and the devices were first manufactured by SanDisk in 1994.
CompactFlash became one of the most successful of the early memory card formats, surpassing Miniature Card and SmartMedia. Subsequent formats, such as MMC/SD, various Memory Stick formats, and xD-Picture Card offered stiff competition. Most of these cards are smaller than CompactFlash while offering comparable capacity and speed. Proprietary memory card formats for use in professional audio and video, such as P2 and SxS, are faster, but physically larger and more costly.
CompactFlash's popularity is declining as CFexpress is taking over. As of 2022, both Canon and Nikon's newest high end cameras, e.g. the Canon EOS R5, Canon EOS R3, and Nikon Z9 use CFexpress cards for the higher performance required to record 8K video.
Traditional CompactFlash cards use a miniaturized variant of the 16-bit PCMCIA interface. This PCMCIA interface is closely related to the Parallel ATA interface as both are based on the ISA bus. CompactFlash Revision 2.0 added support for UDMA transfer modes. In 2008, CFast, a variant of CompactFlash, was announced as successor. CFast is based on the Serial ATA interface.
In November 2010, SanDisk, Sony and Nikon presented a next generation card format to the CompactFlash Association. The new format has a similar form factor to CF/CFast but is based on the PCI Express interface instead of Parallel ATA or Serial ATA. With potential read and write speeds of 1 Gbit/s and storage capabilities beyond 2 TiB, the new format is aimed at high-definition camcorders and high-resolution digital cameras, but the new cards are not backward compatible with either CompactFlash or CFast. The XQD card format was officially announced by the CompactFlash Association in December 2011.
Description
There are two main subdivisions of CF cards, 3.3 mm-thick type I and 5 mm-thick type II. The type II slot is used by miniature hard drives and some other devices, such as the Hasselblad CFV Digital Back for the Hasselblad series of medium format cameras. There are four main card speeds: original CF, CF High Speed, faster CF 3.0 standard and the faster CF 4.0 standard adopted as of 2007.CompactFlash was originally built around Intel's NOR-based flash memory, but has switched to NAND technology. CF is among the oldest and most successful formats, and has held a niche in the professional camera market especially well. It has benefited from both a better cost to memory-size ratio and, for much of the format's life, generally greater available capacity than other formats.
CF cards can be used directly in a PC Card slot with a plug adapter, used as an ATA or PCMCIA storage device with a passive adapter or with a reader, or attached to other types of ports such as USB or FireWire. As some newer card types are smaller, they can be used directly in a CF card slot with an adapter. Formats that can be used this way include SD/MMC, Memory Stick Duo, xD-Picture Card in a Type I slot and SmartMedia in a Type II slot, as of 2005. Some multi-card readers use CF for I/O as well.
The first CompactFlash cards had capacities of 2 to 10 megabytes. This increased to 64 MB in 1996, 128 MB in 1998, 256 MB in 1999, 512 MB in 2001, and 1 GB in 2002.
Technical details
The CompactFlash interface is a 50-pin subset of the 68-pin PCMCIA connector. "It can be easily slipped into a passive 68-pin PCMCIA Type II to CF Type I adapter that fully meets PCMCIA electrical and mechanical interface specifications", according to compactflash.org. The interface operates, depending on the state of a mode pin on power-up, as either a 16-bit PC Card or as an IDE interface.Unlike the PC Card interface, no dedicated programming voltages are provided on the CompactFlash interface.
CompactFlash IDE mode defines an interface that is smaller than, but electrically identical to, the ATA interface. The CF device contains an ATA controller and appears to the host device as if it were a hard disk. CF devices operate at 3.3 volts or 5 volts, and can be swapped from system to system. CompactFlash supports C-H-S and 28-bit logical block addressing. CF cards with flash memory are able to cope with extremely rapid changes in temperature. Industrial versions of flash memory cards can operate at a range of −45 °C to +85 °C.
NOR-based flash has lower density than newer NAND-based systems, and CompactFlash is therefore the physically largest of the three memory card formats introduced in the early 1990s, being derived from the JEIDA/PCMCIA Memory Card formats. The other two are Miniature Card and SmartMedia. However, CF did switch to NAND type memory later. The IBM Microdrive format, later made by Hitachi, implements the CF Type II interface, but is a hard disk drive as opposed to solid-state memory. Seagate also made CF HDDs.
Speed
CompactFlash IDE emulation speed is usually specified in "x" ratings, e.g. 8x, 20x, 133x. This is the same system used for CD-ROMs and indicates the maximum transfer rate in the form of a multiplier based on the original audio CD data transfer rate, which is 150 kB/s.where R = transfer rate, K = speed rating. For example, 133x rating means transfer rate of: 133 × 150 kB/s = 19,950 kB/s ≈ 20 MB/s.
These are manufacturer speed ratings. Actual transfer rate may be higher, or lower, than shown on the card depending on several factors. The speed rating quoted is almost always the read speed, while write speed is often slower.
Solid state
For reads, the onboard controller first powers up the memory chips from standby. Reads are usually in parallel, error correction is done on the data, then transferred through the interface 16 bits at a time. Error checking is required due to soft read errors. Writes require powerup from standby, wear leveling calculation, a block erase of the area to be written to, ECC calculation, write itself.Because the USB 2.0 interface is limited to 35 MB/s and lacks bus mastering hardware, USB 2.0 implementation results in slower access.
Modern UDMA-7 CompactFlash Cards provide data rates up to 145 MB/s and require USB 3.0 data transfer rates.
A direct motherboard connection is often limited to 33 MB/s because IDE to CF adapters lack high speed ATA cable support. Power on from sleep/off takes longer than power up from standby.
Magnetic media
Many hard drives typically spin at 3600 RPM, so rotational latency is a consideration, as is spin-up from standby or idle. Seagate's 8 GB ST68022CF drive spins up fully within a few revolutions but current drawn can reach up to 350 milliamps and runs at 40-50 mA mean current. Its average seek time is 8 ms and can sustain 9 MB/s read and write, and has an interface speed of 33 MB/s. Hitachi's 4 GB Microdrive is 12 ms seek, sustained 6 MB/s.Capacities and compatibility
The CF 5.0 Specification supports capacities up to 128 PiB using 48-bit logical block addressing. Prior to 2006, CF drives using magnetic media offered the highest capacities. Now there are solid-state cards with higher capacities.As of 2011, solid-state drives have supplanted both kinds of CF drive for large capacity requirements.
Solid state capacities
announced its 16 GB Extreme III card at the photokina trade fair, in September, 2006. That same month, Samsung announced 16, 32 and 64 GB CF cards. Two years later, in September, 2008, PRETEC announced 100 GB cards.Magnetic media capacities
Seagate announced a 5 GB "1-inch hard drive" in June, 2004, and an 8 GB version in June, 2005.Use in place of a hard disk drive
In early 2008, the CFA demonstrated CompactFlash cards with a built in SATA interface. Several companies make adapters that allow CF cards to be connected to PCI, PCMCIA, IDE and SATA connections, allowing a CF card to act as a solid-state drive with virtually any operating system or BIOS, and even in a RAID configuration.CF cards may perform the function of the master or slave drive on the IDE bus, but have issues sharing the bus. Moreover, late-model cards that provide DMA may present problems when used through a passive adapter that does not support DMA.
Reliability
Original PC Card memory cards used an internal battery to maintain data when power was removed. The rated life of the battery was the only reliability issue. CompactFlash cards that use flash memory, like other flash-memory devices, are rated for a limited number of erase/write cycles for any "block." While NOR flash has higher endurance, ranging from 10,000 to 1,000,000, they have not been adapted for memory card usage. Most mass storage usage flash are NAND based. NAND flash were being scaled down to 16 nm. They are usually rated for 500 to 3,000 write/erase cycles per block before hard failure. This is less reliable than magnetic media. Car PC Hacks suggests disabling the Windows swap file and using its Enhanced Write Filter to eliminate unnecessary writes to flash memory. Additionally, when formatting a flash-memory drive, the Quick Format method should be used, to write as little as possible to the device.Most CompactFlash flash-memory devices limit wear on blocks by varying the physical location to which a block is written. This process is called wear leveling. When using CompactFlash in ATA mode to take the place of the hard disk drive, wear leveling becomes critical because low-numbered blocks contain tables whose contents change frequently. Current CompactFlash cards spread the wear-leveling across the entire drive. The more advanced CompactFlash cards will move data that rarely changes to ensure all blocks wear evenly.
NAND flash memory is prone to frequent soft read errors. The CompactFlash card includes error checking and correction that detects the error and re-reads the block. The process is transparent to the user, although it may slow data access.
As a flash memory device is solid-state, it is less affected by physical shock than a spinning disk.
The possibility for electrical damage from upside-down insertion is prevented by asymmetrical side slots, assuming that the host device uses a suitable connector.