您的当前位置:首页正文

Pc Card Standard 8.0 volume 7

2022-10-11 来源:好兔宠物网
PC CARD STANDARD

Volume 7

PC Card ATA Specification

REVISION HISTORY

Date07/9211/9207/9302/9503/9505/9511/9505/9603/9704/9802/9903/0011/00

PC Card ATA

Specification Version1.01.011.025.0N/AN/AN/AN/A6.06.17.07.17.2

PCMCIA 2.01

PCMCIA 2.1/JEIDA 4.2February 1995 (5.0)Release

March 1995 (5.01) UpdateMay 1995 (5.02) UpdateNovember 1995 (5.1)Update

May 1996 (5.2) Update6.0 Release6.1 Update7.0 Release7.1 Update7.2 UpdatePC Card StandardRelease

Revisions

Initial release as independent specificationEditorial correctionsEditorial correctionsReformattedNoneNoneNoneNoneNone

Correction for CISTPL_FUNCENoneNone

Editorial corrections to bring the PC Card ATASpecification into line with current ANSI ATASpecifications

Changed to PC Card Standard Volume Number 7(was Volume Number 8)

04/018.08.0 Release

©2001 PCMCIA/JEITAAll rights reserved.

No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means,mechanical, electronic, photocopying, recording or otherwise, without prior written permission of PCMCIA and JEITA.Published in the United States of America.

PC CARD ATA SPECIFICATION

CONTENTS

1.Introduction___________________________________________11.1Purpose...........................................................................................................................................11.2Scope................................................................................................................................................11.3Related Documents.......................................................................................................................11.4Conventions...................................................................................................................................21.4.1Signal Naming....................................................................................................................................................21.4.2Numeric Representation....................................................................................................................................21.4.3Bit Action Representation.................................................................................................................................22.Overview_____________________________________________32.1Feature Summary..........................................................................................................................32.2Differences Between PC Card ATA and ATA..........................................................................33.Electrical Interface_____________________________________73.1Pin Assignment Table...................................................................................................................73.2Reset Conditions..........................................................................................................................103.3READY Signal and RREADY Bit...............................................................................................103.4Interrupt Request: IREQ#...........................................................................................................114.ATA Specific Register Definitions______________________134.1PC Card ATA Drive Register and Protocol Definitions........................................................134.2ATA Registers..............................................................................................................................144.2.1Data Register.....................................................................................................................................................144.2.2Error Register....................................................................................................................................................144.2.3Feature Register................................................................................................................................................154.2.4Sector Count Register.......................................................................................................................................154.2.5Sector Number Register...................................................................................................................................154.2.6Cylinder Low Register.....................................................................................................................................164.2.7Cylinder High Register....................................................................................................................................164.2.8Drive/Head Register.......................................................................................................................................174.2.9Status and Alternate Status Registers............................................................................................................174.2.10Command Register..........................................................................................................................................184.2.11Device Control Register...................................................................................................................................184.2.12Drive Address Register...................................................................................................................................194.2.13Duplicate Data, Error and Feature Registers................................................................................................194.3ATA Specific Register Mapping................................................................................................204.3.1I/O Mapped Addressing................................................................................................................................20©2001 PCMCIA/JEITAiii

CONTENTS

4.3.2Memory Mapped Addressing........................................................................................................................225.Software Interface____________________________________235.1ATA Command Block.................................................................................................................235.1.1ATA Command Block for Cylinder-Head-Sector Addressing..................................................................235.1.2ATA Command Block for Logical Block Addressing.................................................................................245.2Command Descriptions..............................................................................................................246.Interface Protocol____________________________________256.1ATA Soft Reset.............................................................................................................................256.1.1ATA Soft Reset Timing Definitions...............................................................................................................256.1.2Software Reset One Drive...............................................................................................................................266.1.3Software Reset Two Drives.............................................................................................................................267.PC Card Specific Considerations_______________________297.1Card Configuration Registers....................................................................................................297.2Card Removal, Insertion and Change Detection....................................................................298.Appendix A: Implementation Notes____________________318.1Special Handling of I/O Ports 3F7H and 377H.......................................................................319.Appendix B: Card Information Structure________________339.1Card Information Structure.......................................................................................................339.2Function ID Tuple for Disk Function.......................................................................................339.3Disk Device Interface Function Extension Tuple....................................................................349.4PC Card ATA Features Function Extension Tuple.................................................................349.5PC Card ATA JEDEC ID's..........................................................................................................3510.Appendix C: CompactFlash and PC Card ATA Differences3710.1CompactFlash Differences......................................................................................................3711.Appendix D: True IDE Mode________________________3911.1True IDE mode.........................................................................................................................39iv©2001 PCMCIA/JEITA

PC CARD ATA SPECIFICATION

TABLES

Table 3-1: PC Card ATA Signal Names and Pin Assignment.................................................7Table 4-1: Standard Configurations.........................................................................................13Table 4-2: Data Register.............................................................................................................14Table 4-3: Error Register............................................................................................................14Table 4-4: Feature Register........................................................................................................15Table 4-5: Sector Count Register...............................................................................................15Table 4-6: Sector Number Register...........................................................................................15Table 4-7: Cylinder Low Register.............................................................................................16Table 4-8: Cylinder High Register............................................................................................16Table 4-9: Drive/Head Register...............................................................................................17Table 4-10: Status and Alternate Status Registers..................................................................17Table 4-11: Device Control Register.........................................................................................18Table 4-12: Drive Address Register..........................................................................................19Table 4-13: Duplicate Data Register.........................................................................................19Table 4-14: Access to Data, Error and Feature Registers Including Duplicate Registers.20Table 4-15: I/O Mapped Addressing......................................................................................21Table 4-16: Memory Mapped Address Map...........................................................................22Table 5-1: Commands with Cylinder-Head-Sector Encoding.............................................23Table 5-2: Commands with Logical Block Address Encoding.............................................24Table 6-1: Soft Reset Timing Diagram.....................................................................................27©2001 PCMCIA/JEITAv

PC CARD ATA SPECIFICATION

1. INTRODUCTION

1.1 Purpose

This specification defines the standard method for incorporating an ATA mass storage protocolperipheral on a 16-bit PC Card. This specification supplements the definitions of an ATA mass

storage peripheral found in the ANSI ATA Standard and the definition of a PC Card found in the PCCard Standard.

The PC Card ATA protocol described in this document is compatible with existing PC Card definedsocket hardware without any changes or additional pins. PC Card ATA mass storage cards shall beimplemented to operate as I/O devices in conformance with PCMCIA 2.0/JEIDA 4.1 or later. Thecards are also permitted to provide a memory mapped configuration compatible with sockethardware defined in PCMCIA 1.0/JEIDA 4.0.

This document describes the electrical and software interfaces for a PC Card ATA mass storage card.The standard address mappings for a PC Card ATA mass storage card are also described.

1.2 Scope

This document is intended to be used together with the PC Card Standard and the ANSI ATA

Standard. It is intended to highlight those areas of implementation in which the PC Card Standardand the ANSI ATA Standard conflict. In addition, an indication is made of areas within the ANSI ATAStandard which are modified for operation in a PC Card environment. Both mandatory and optionalspecifications are presented.

In the event of a conflict between one of the base documents (PC Card Standard or ANSI ATAStandard) and this document, the interpretation of this document shall prevail if and only if thisdocument specifies that a conflict exists between the documents.

This document also highlights differences between CompactFlash and PC Card ATA.

Note:

CompactFlash is a registered trademark of the CompactFlash Association.

1.3 Related Documents

There are related documents upon which this document is based and which are required forunderstanding and implementing a PC Card ATA mass storage peripheral.PC Card Standard Release 8.0 (April 2001), PCMCIA/JEITA

Volume 1. Overview and GlossaryVolume 2. Electrical SpecificationVolume 3. Physical SpecificationVolume 4. Metaformat SpecificationVolume 5. Card Services SpecificationVolume 6. Socket Services SpecificationVolume 7. PC Card ATA Specification

Volume 8. PC Card Host Systems SpecificationVolume 9. Guidelines

Volume 10. Media Storage Formats SpecificationVolume 11. XIP Specification©2001 PCMCIA/JEITA

1

INTRODUCTION

The following are referred to as the “ANSI ATA Standard”:

AT Attachment For Disk Drives , Document Number X3.221-1994, ANSIAT Attachment – 2 Interface (with Extensions) (ATA-2), ANSIAT Attachment – 3 Interface (ATA-3), ANSIAT Attachment – 4 Interface (ATA-4), ANSI

Note:

Since this document describes the PC Card bus interface to an ATA device, itis expected that future AT Attachment specifications will be compatible withthis PC Card ATA Standard.

CompactFlash Specification, CompactFlash Association

1.4 Conventions

This section is intended to give general descriptions of notational conventions used in this document.See the Overview and Glossary volume for an extensive set of definitions of terms found in the PCCard ATA Specification. In many cases, more detailed information about these terms may be found inthe PC Card Standard or one of the ANSI ATA Standards. These documents should be consulted formore detailed and precise definitions of terms.

1.4.1 Signal Naming

All signals are named with respect to their asserted state as follows:

a)Each signal which is not a logic signal, such as Vcc, has a name which does not end with a \"#\"

character.b)Each logic signal whose name does not end with a \"#\" character has logic high as the asserted

state and logic low as the negated state.c)

Each logic signal whose name ends with a \"#\" character has logic low as the asserted state andlogic high as the negated state.

1.4.2 Numeric Representation

Numbers are expressed as follows:

a)Individual bits are expressed as \"0\" for zero, \"1\" for one, or \"X\" for don't care.

b)Groups of bits (fields) are expressed in hexadecimal number which begin with a decimal digit

and are followed by an \"H\". Each digit represents 4 bits and ranges from 0H to 9H and AH to FHfor 0 to 15 (decimal) with an \"X\" being used for don't care. The number of bits in the fielddetermines how many bits in the hexadecimal number are significant.

1.4.3 Bit Action Representation

Bits of a register are said to be set when they are made equal to \"1\" and to be cleared when they aremade equal to \"0.”

2©2001 PCMCIA/JEITA

PC CARD ATA SPECIFICATION

2. OVERVIEW

This document details the requirements and considerations in implementing an ATA protocol massstorage peripheral within the PC Card environment.

The ATA protocol is followed except where the PC Card interface imposes conflicting constraints totraditional ATA host bus adapters. This document describes how the ATA protocol maps onto the PCCard interface. It resolves and clarifies the enhancements and restrictions which result from the use ofthe PC Card interface with the ATA protocol.

Mandatory support is provided for the AT BIOS ATA Control Block and Command Block registers at1F0H-1F7H, 3F6H-3F7H or 170H-177H, 376H-377H typically using IRQ14. These I/O registerassignments are usable with pre-existing AT BIOS Device Drivers. Mandatory support is also

provided for locating the I/O ports in a contiguous I/O window of at least 16 bytes which is decodedfor the PC Card by the socket. PC Cards can also be built that may be placed by the system in a 2 KBhost memory space by a dedicated driver.

The use of a well known, dominant, standard interface in mobile computers guarantees systemvendors an interface which remains stable over the coming generations of silicon and rotating massstorage devices.

2.1 Feature Summary

a)The PC Card ATA protocol is based on the widely accepted and established ATA protocol which

is an accepted standard for disk drives in mobile computers. It is also based on the PC Cardinterface standard which is the peripheral interface for mobile computing.b)The ATA protocol is very familiar to both system designers and software developers.c) This protocol allows PC Card ATA mass storage cards to be \"plug and play\" in many existing

systems and applications.d) The protocol is compatible with existing ATA software.

e) The protocol fits easily into the architecture of desktop PCs as well as mobile computers.f) Allows a CompactFlash adapter to operate a CompactFlash card in a PC Card slot.

2.2 Differences Between PC Card ATA and ATA

a)The Diagnostic command runs only on the card which is addressed by the Drive/Head register

when the Diagnostic Command is issued. This is because the PC Card interface does not providefor direct inter-drive communication (i.e., the ATA PDIAG- and DASP- signals). Therefore,unlike ATA, it is not possible when using the PC Card interface for Drive 0 to report status forboth drives.b)The PC Card ATA Specification provides for two cards at a single address through the Twin Card

option in CIS (See the Metaformat Specification) and card enumeration using the Socket andCopy register (See the Electrical Specification). The ANSI ATA Standard provides cardenumeration using a jumper or cable strap. The ATA signals PDIAG- and DASP- are notimplemented in the PC Card ATA Specification.c)

The PC Card ATA Specification provides a READY signal which can be used to prevent the hostfrom accessing the card's registers before the card is available following card detected power-on,

3

©2001 PCMCIA/JEITA

OVERVIEW

hardware reset, or PC Card soft reset. With an appropriate socket, this signal is also used while acard is configured in the memory mapped mode to provide a socket generated host interrupt onthe transition to ready.

d)The PC Card ATA Specification provides an ATA Soft Reset protocol described in Section 6.1,ATA Soft Reset.e)The implementation of the Index bit, IDX, in the Status register and the Alternate Status register is

optional. If implemented, it shall be implemented as defined in the ANSI ATA Standard.f)

I/O ports 3F7H and 377H in the Primary and Secondary I/O mapped modes have a potentialconflict with a floppy disk controller installed in the host. There is a potential problem with theprotocol described in the ANSI ATA Standard for sharing the Drive Address register with afloppy disk controller when either the ATA peripheral or the floppy disk controller are accessedthrough the PC Card interface.

Refer to Appendix B for possible methods to avoid this problem.

g)The PC Card interface permits the host to access the ATA registers in more alternative ways than

the traditional ATA host bus adapter allows. These alternatives arise from the presence of twocard enable signals, CE[2::1]#, in addition to address line A0.

The PC Card interface allows access to registers at odd addresses with two different methods.a) When address line A0 is 1 (logic high), if CE1# is asserted and CE2# is negated during the reador write cycle, then the byte of data at the odd address is transferred on signals D[7::0] of the DataBus.

b) Regardless of the state of address line A0 and of the state of CE1#, if CE2# is asserted the byteof data at the odd address is transferred on signals D[15::8] of the Data Bus. If CE1# is also

asserted, then a 16-bit word is accessed. If CE1# is negated, then only the byte at the odd addressis accessed.

A sixteen bit word of data is accessed when both CE[2::1]# are active, regardless of the state ofA0.

h)I/O accesses are constrained at the PC Card interface as follows:

a) The host shall perform all word (16-bit) I/O accesses with A0 = 0.

b) During a host's word access attempt, if a card asserts IOIS16# in response to the address onthe bus then the host system is permitted to transfer 16 bits of data to the card in a single cycle,otherwise, the host system shall perform two 8-bit cycles: even byte then odd byte.i)

The ANSI ATA Standard specifies that the Data register is two bytes wide and is located at offset,or relative address zero while the Error and Feature registers are one byte wide and are located atoffset one within the ATA registers. This results in an overlap of the address spaces between theData register and Error-Feature register combination.

Some host architectures do not permit word and byte registers to overlap. To permit those hoststo access all the registers of the PC Card ATA mass storage card, the PC Card ATA Specificationprovides a non-overlapping duplicate copy of each of these registers in the Memory Mapped andContiguous I/O mapped configurations. Within the 16 byte space occupied by the ATA registersin these configurations, the duplicate data register is located at offset 8H while the duplicate Errorand Feature registers are located at offset 0DH.

Refer to Section 4.2.13, Duplicate Data, Error and Feature Registers, for more information aboutthe duplicate copies of these registers.

4©2001 PCMCIA/JEITA

PC CARD ATA SPECIFICATION

j) Implementation of the Identify Drive Command is mandatory in the PC Card Standard, but

optional in some versions of the ANSI ATA Standard.k) Eight and 16-bit data accesses are mandatory in PC Card -- only 16-bit accesses are specified in

some ANSI ATA Standards.l)

IOCS16# (IOIS16#) is obsolete in some ANSI ATA Standards.m)The Drive Address register is obsolete in some ANSI ATA Standards.

©2001 PCMCIA/JEITA5

PC CARD ATA SPECIFICATION

3. ELECTRICAL INTERFACE

A PC Card ATA mass storage card uses the PC Card electrical interface. A subset of the entire PCCard interface is sufficient for PC Card ATA implementation. Both mandatory and optional signalsare given in this section. Special consideration is given to some signals whose definition is expandedwhen used in the PC Card ATA mass storage card.

3.1 Pin Assignment Table

The following is the recommended pin assignment table for implementing PC Card ATA protocol.The mandatory Interface signals are required for using the card in the mandatory card decoded andhost decoded I/O spaces.

Table 3-1: PC Card ATA Signal Names and Pin Assignment

Pin #

PC CardMemoryInterface Signal

GNDD3D4D5D6D7CE1#A10OE#A11A9A8A13A14WE#READYVccVpp1A16A15A12A7A6A5

PC Card I/OInterface Signal

GNDD3D4D5D6D7CE1#A10OE#A11A9A8A13A14WE#IREQ#VccVpp1A16A15A12A7A6A5

A7A6A5WE#READY:IREQ#

1718192021222324

VccVpp1 or No Connect

A16A15A12

22236

A9A8

A13A14

22

OE#

A11

2

PC Card ATAMandatorySignal

GNDD3D4D5D6D7CE1#

A10

1

PC Card ATAOptional Signal

Notes 7

12345678910111213141516

©2001 PCMCIA/JEITA7

ELECTRICAL INTERFACE

Table 3-1: PC Card ATA Signal Names and Pin Assignment(Continued)

Pin #

PC CardMemoryInterface Signal

A4A3A2A1A0D0D1D2WPGNDGNDCD1#D11D12D13D14D15CE2#VS1#

PC Card I/OInterface Signal

A4A3A2A1A0D0D1D2IOIS16#GNDGNDCD1#D11D12D13D14D15CE2#VS1#IORD#IOWR#

A17A18A19A20A21VccVpp2A22A23A24A25VS2#RESET

A17A18A19A20A21VccVpp2A22A23A24A25VS2#RESET

VS2#RESETVccVpp2 or NoConnect

A22A23A24A25

32222

PC Card ATAMandatorySignal

A4A3A2A1A0D0D1D2WP: IOIS16#

34353637383940414243444546474849505152535455565758

GNDGNDCD1#D11D12D13D14D15CE2#VS1#IORD#IOWR#

A17A18A19A20A21

22222

PC Card ATAOptional Signal

Notes 7

252627282930313233

8©2001 PCMCIA/JEITA

PC CARD ATA SPECIFICATION

Table 3-1: PC Card ATA Signal Names and Pin Assignment(Continued)

Pin #

PC CardMemoryInterface Signal

WAIT#REG#BVD2

PC Card I/OInterface Signal

WAIT#INPACK#REG#SPKR#

PC Card ATAMandatorySignal

WAIT#INPACK#REG#Logic Highunless BVD2:SPKR#

63

BVD1

STSCHG#

Logic Highunless BVD: STSCHG#

6465666768

D8D9D10CD2#GND

D8D9D10CD2#GND

D8D9D10CD2#GND

BVD1: STSCHG#

5

BVD2:SPKR#

4

PC Card ATAOptional Signal

Notes 7

59606162

NOTES:

Signal names in the PC Card ATA columns indicate dual function signals by listing the Memory

Interfaced function, followed by a colon (:), and then the I/O Interfaced function of the signal. Signals inthe PC Card ATA Optional column may be mandatory for particular features which the card vendormay choose to implement. The use of optional signals is described in the following numbered notes.1.Address line A10 is mandatory if Memory Mapped addressing is supported. Otherwise, A10 is

permitted to be implemented at the discretion of the card vendor.2.Address lines A[25::11] are permitted to be implemented at the discretion of the card vendor.3.The use of the Vpp[2::1] supplies is optional. If they are used, it is recommended that the card

vendor select +12 V as the Vpp value. A card which does not require any Vpp supply, shallleave both Vpp pins unconnected at the card.

The Vpp[2::1] supplies shall not be connected to each other on the card.When only one supply is required, it is recommended that Vpp1 be used.

At power up, the host shall provide at least minimal current at Vcc Volts on both Vpp[2::1].4.The I/O signal SPKR# is optional. If the function is not implemented, this pin shall be held at

logic high (negated) by the card. The memory signal BVD2 shall be held high unless it isindicating the state of a battery on the card.5.The I/O signal STSCHG# is optional, however it shall be implemented if both the Function

Configuration and Status register and the Pin Replacement register are implemented. If the

function is not implemented, this pin shall be held high (negated) by the card. The memory signalBVD1 shall be held high unless it is indicating the state of a battery on the card.6.The negated state of the READY signal shall be interpreted to be the Busy state of the signal.

See 3.3 READY Signal and RREADY Bit, for additional information on the READY signal.7.All signals shown in the PC Card ATA mandatory column shall be implemented by all PC Card

ATA mass storage cards.

©2001 PCMCIA/JEITA9

ELECTRICAL INTERFACE

3.2 Reset Conditions

There are four distinct reset conditions associated with the PC Card ATA mass storage card. They areas follows:

a)Card detected Power-On Reset;

b)Host generated PC Card Hardware Reset using the Reset signal;c)

Host initiated PC Card Soft Reset using SRESET bit in the Configuration Option register;d)ATA Soft Reset using the SRST bit in the ATA Device Control register.

The host should always accompany a card Power-On event with a host generated hardware reset asdescribed in the Power-Up and Power-Down section of the Electrical Specification.

Power-On, PC Card Hardware Reset and PC Card Soft Reset all clear the Configuration Optionregister (configuration index value of 0H) as described in the RESET signal description in theElectrical Specification and cause the card to perform the ATA Hard Reset protocol.

The PC Card Soft Reset has the same effect as the Host generated hardware reset with the exceptionthat the PC Card Software Reset bit itself is not cleared by the assertion of Soft Reset as described inthe Configuration Option register section of the Electrical Specification.

The ATA Soft Reset protocol does not affect the card's PC Card configuration, but does perform ATASoft Reset protocol as specified in the ANSI ATA Standard and modified in Section 6.1 ATA SoftReset, of this document.3.3 READY Signal and RREADY Bit

The READY signal is available while the card is configured to use the Memory Interface. This signalis unavailable and is replaced by the interrupt request signal, IREQ#, while the card is configured touse the I/O interface. The READY signal is negated when the card is in the Busy condition.

If the Pin Replacement register is implemented on the card, the RREADY bit in that register is clearedwhen the card is busy and set when the card is ready.The card shall be Busy under the following conditions:a)From Power-On until the card is ready to be accessed.

b)From PC Card Hardware Reset until the card is ready to be accessed.c)

From PC Card Soft Reset until the card is ready to be accessed.

d)If a card supports the PC Card Power-Down bit in the Configuration and Status register, then

from a change in the PC Card Power-Down bit until the card has completed the requestedPower-Down or Power-Up operation.e)While the card is in a Memory interface configuration, whenever the BSY bit in the ATA Status

register is set.

10©2001 PCMCIA/JEITA

PC CARD ATA SPECIFICATION

3.4 Interrupt Request: IREQ#

The interrupt request signal from the card (IREQ#) is available only when the card is configured touse the PC Card I/O interface. The handling of this signal is slightly different from the handling ofthe ATA interrupt request signal, IRQ.

The polarity of the PC Card IREQ# signal is opposite to that of the ATA IRQ signal. The PC CardIREQ# signal has a mandatory PC Card level mode interrupt and an optional PC Card pulse modeinterrupt. The pulse mode interrupt is designed to allow sharing of interrupts in hosts which use anISA compatible system bus between the PC Card socket and the host's CPU. To take advantage of aPC Card pulse mode interrupt, the host socket must be able to pass the interrupt request signalwithout inversion from the PC Card to the internal ISA bus and to drive the ISA bus IRQn signalwith an open collector driver.

When the nIEN bit in the ATA Device Control register is set, the PC Card ATA mass storage cardshall not assert the IREQ# signal. This is in contrast to the ANSI ATA Standard which specifies thatthe ATA interrupt request signal, IRQ, is placed in high impedance during these times.

©2001 PCMCIA/JEITA11

PC CARD ATA SPECIFICATION

4. ATA SPECIFIC REGISTER DEFINITIONS

4.1 PC Card ATA Drive Register and Protocol Definitions

PC Card ATA mass storage cards can be configured as a high performance I/O device throughstandard I/O address spaces: 1F0H-1F7H, 3F6H-3F7H (primary); 170H-177H, 376H-377H (secondary)and IRQ 14 or anywhere in the I/O space or memory space requiring a dedicated driver. The

communications to and from the drive is performed using the ATA Command Block which providesall the necessary control and status information. The PC Card interface connects peripherals to thehost using four register mapping methods. Table 4-1: Standard Configurations is a description ofthese methods:

Table 4-1: Standard Configurations

ConfigIndex0H11H

1

I/O orMemoryMemoryI/O

AddressA[10::0]0H - 0FH,400H - 7FFHXX0H - XXFH

DriveNumber

00

Socket &CopyX000XXXXX000XXXX

Mandatory orOptionalOptionalMandatory

Description

MemoryMappedI/O Mapped 16ContiguousRegistersPrimary I/OMapped Drive 0

2H1

I/O

1F0H -1F7H,3F6H - 3F7H-------------5F0H - 5F7H,7F6H - 7F7H

0X000XXXXMandatory

2H1

I/O

1F0H -1F7H,3F6H- 3F7H -------------5F0H - 5F7H,7F6H - 7F7H

1X001XXXXOptional

Primary I/OMapped Drive 1

3H1

I/O

170H - 177H,376H - 377H------------570H - 577H,776H - 777H

0X000XXXXMandatory

Secondary I/OMapped Drive 0

3H1

I/O

170H - 177H,376H - 377H-------------570H - 577H,776H - 777H

1X001XXXXOptional

Secondary I/OMapped Drive 1

NOTES:1.The configuration indices indicated here are for example only for PC Card ATA. (These indices

are required for CompactFlash cards).

The host selects the card's register mapping configuration by writing the Function ConfigurationIndex value to the least significant 6 bits of the card's Configuration Option register. The actual

configuration index values used by a card are vendor specific and are reported to the host using the

©2001 PCMCIA/JEITA13

ATA SPECIFIC REGISTER DEFINITIONS

Configuration Table Entry tuples. However, configuration 0H shall always select the PC CardMemory-Only interface.

4.2 ATA Registers

The ATA registers are the registers which are provided on the card specifically to implement the ATAaspects of the PC Card ATA protocol. The first eight registers and duplicates are referred to as theATA Command Block.

In accordance with the PC Card Standard each of the registers below which is located at an oddaddress may be accessed using either data bus lines D[15::8] or using data bus lines D[7::0]. Refer toSection 2.2, Differences Between PC Card ATA and ATA, or to the Electrical Specification for moreinformation.

4.2.1 Data Register

The Data register is a 16-bit register which is used to transfer data blocks between the card data buffer

and the host. Data may be transferred by either a series of word accesses to the Data register or aseries of byte accesses to the Data register. The ANSI ATA Standard Signal Descriptions and Set

Features Command sections specify under what conditions word and byte accesses from the host areappropriate to access this register.Table 4-2: Data Register

D15

D14

D13

D12

D11

D10

D9

D8

D7

D6

D5

D4

D3

D2

D1

D0

Data Word

Data Byte

Refer to the ANSI ATA Standard for detailed information about this register. Refer also to Section

4.2.13, Duplicate Data, Error and Feature Registers, for additional information about the Data register,the Duplicate Data registers, and the interactions between the Data register and the Error or Featureregister.

Some ANSI ATA Standards define this as a 16-bit-only register. PC Card ATA requires this register tobe accessible as 8 or 16 bits.

4.2.2 Error Register

This register contains additional information about the source of an error which has occurred in

processing of the preceding command. This register should be checked by the host when bit 0 (ERR)in the Status register is set. The Error register is a read only register. When writing to the address ofthe Error register, the Feature register is written.Table 4-3: Error Register

D7BBK

D6UNC

D5MC

D4IDNF

D3MCR

D2ABRT

D1TKNOF

D0AMNF

All bits in this register are defined in the ANSI ATA Standard. Refer to the ANSI ATA Standard for adetailed description of this register. Refer also to Section 4.2.13, Duplicate Data, Error and Feature14

©2001 PCMCIA/JEITA

PC CARD ATA SPECIFICATION

Registers, for additional information about the Error register, the Duplicate Error register, and theinteractions between the Data register and the Error register.Note: The BBK bit is reserved in some ANSI ATA Standards.

4.2.3 Feature Register

This register is written by the host to provide command specific information to the drive regarding

features of the drive which the host wishes to utilize. The Feature register is a write only register.When reading from the address of the Feature register, the Error register is read. This register may beignored by some drives.Table 4-4: Feature Register

D7

D6

D5

D4

D3

Feature Byte

D2

D1

D0

Refer to the ANSI ATA Standard for a detailed description of this register. Refer also to Section 4.2.13:Duplicate Data, Error and Feature Registers, for additional information about the Feature register, theDuplicate Feature register, and the interactions between the Data registers and the Feature register.4.2.4 Sector Count Register

This register is written by the host with the number of sectors or blocks to be processed in the

subsequent command. After the command is complete, the host may read this register to obtain thecount of sectors left unprocessed by the command.Table 4-5: Sector Count Register

D7

D6

D5

D4

D3

Sector Count

D2

D1

D0

Refer to the ANSI ATA Standard for a detailed description of this register.

4.2.5 Sector Number Register

This register is written by the host with the starting sector number to be used in the subsequentCylinder-Head-Sector command. After the command is complete, the host may read the final sectornumber from this register. When logical block addressing is used, this register is written by the hostwith bits 7 to 0 of the starting logical block number and contains bits 7 to 0 of the final logical blocknumber after the command is complete.Table 4-6: Sector Number Register

D7

D6

D5

D4

D3

D2

D1

D0

Sector Number (CHS Addressing)Logical Block Number bits (LBA [7::0])

Refer to the ANSI ATA Standard for a detailed description of this register.

©2001 PCMCIA/JEITA15

ATA SPECIFIC REGISTER DEFINITIONS

4.2.6 Cylinder Low Register

This register is written by the host with the low-order byte of the starting cylinder address to be usedin the subsequent Cylinder-Head-Sector command. After the command is complete, the host may

read the low-order byte of the final cylinder number from this register. When logical block addressingis used, this register is written by the host with bits 15 to 8 of the starting logical block number andcontains bits 15 to 8 of the final logical block number after the command is complete.Table 4-7: Cylinder Low Register

D7

D6

D5

D4

D3

D2

D1

D0

Cylinder Number Low Byte (CHS Addressing)Logical Block Number bits (LBA [15::8])

Refer to the ANSI ATA Standard for a detailed description of this register.

4.2.7 Cylinder High Register

This register is written by the host with the high-order byte of the starting cylinder address to be usedin the subsequent Cylinder-Head-Sector command. After the command is complete, the host mayread the high-order byte of the final cylinder number from this register. When logical block

addressing is used, this register is written by the host with bits 23 to 16 of the starting logical blocknumber and contains bits 23 to 16 of the final logical block number after the command is complete.Table 4-8: Cylinder High Register

D7

D6

D5

D4

D3

D2

D1

D0

Cylinder Number High Byte (CHS Addressing)Logical Block Number bits (LBA [23::16])

Refer to the ANSI ATA Standard for a detailed description of this register.

16©2001 PCMCIA/JEITA

PC CARD ATA SPECIFICATION

4.2.8 Drive/Head Register

The Drive/Head register is used to specify the selected drive of a pair of drives sharing a set of

registers. The bits are defined as follows:Table 4-9: Drive/Head Register

D71

D6LBA (0)LBA(1)

D51

D4 DEV

D3HS3LBA27

D2HS2LBA26

D1HS1LBA25

D0HS0LBA24

Bit 7Bit 6Bit 5Bit 4

1LBA1DEV

This bit is '1'.

This bit is '0' for Cylinder-Head-Sector addressing and '1' for Logical BlockAddressing.This bit is '1'.

This bit is number of the device which the host has selected. When DEV iscleared, device 0 (card 0) is selected. When DEV is set, drive 1 (card 1) isselected. The card is selected to be Card 0 or to be Card 1 using the \"Copy\"field of the PC Card Socket and Copy configuration register, if present. If noSocket and Copy configuration register is present on the card, or if the Card'sCIS indicates that it does not support Twin-Cards for the selected configuration,then DEV shall be cleared by the host.

This is bit 3 of the head number in CHS addressing or bit 27 of the Logical BlockNumber in LBA addressing.

This is bit 2 of the head number in CHS addressing or bit 26 of the Logical BlockNumber in LBA addressing.

This is bit 1 of the head number in CHS addressing or bit 25 of the Logical BlockNumber in LBA addressing.

This is bit 0 of the head number in CHS addressing or bit 24 of the Logical BlockNumber in LBA addressing

Bit 3Bit 2Bit 1Bit 0

HS3/LBA27HS2/LBA26HS1/LBA25HS0/LBA24

4.2.9 Status and Alternate Status Registers

The Status register and the Alternate Status register return the card status when read by the host.Reading the Status register clears a pending interrupt request while reading the Alternate Statusregister does not.

The Status register and the Alternate Status register are read only registers. When writing to theaddress of the Status register, the Command register is written. When writing to the address of theAlternate Status register, the Device Control register is written.The status bits are identified as follows:

Table 4-10: Status and Alternate Status Registers

D7BSY

D6DRDY

D5DF

D4DSC

D3DRQ

D2CORR

D1IDX

D0ERR

©2001 PCMCIA/JEITA17

ATA SPECIFIC REGISTER DEFINITIONS

Refer to the ANSI ATA Standard for a description of the bits which are described in this registerexcept where the ANSI ATA Standard conflicts with the descriptions below.

Bit 1Bit 5

IDXDF

This bit is optional. If implemented it shall be implemented as described in theANSI ATA Standard.

This bit is used to indicate a device write failure. Devices which require Vpp forwrite operations should use this bit to signal if the Vpp voltage is out of tolerancewhen a write is attempted.

4.2.10 Command Register

The Command register contains the command code being sent to the device. Command execution

begins immediately after this register is written.

The Command register is a write only register. When reading from the address of the Commandregister, the Status register is read.

D7

D6

D5

D4

D3

D2

D1

D0

Command

4.2.11 Device Control Register

This register is used to control the card interrupt request and to issue a soft reset to the card.The Device Control register is a write only register. When reading from the address of the DeviceControl register, the Alternate Status register is read.The bits are defined as follows:Table 4-11: Device Control Register

D7X

D6X

D5X

D4X

D31

D2SRST

D1nIEN

D00

Refer to the ANSI ATA Standard for the general description of the bits which are described in thisregister except where it conflicts with the descriptions noted below:

Bit 1nIEN

While the card is operating in the memory mapped mode this bit is permitted tobe ignored; but see additional requirements in Section 7.1, Card ConfigurationRegisters, for cards which implement the Function Configuration and Statusregister.While this bit is cleared, interrupts shall operate as described in the PC CardStandard in response to the events described in the ANSI ATA Standard.While this bit is set, the interrupts on the card shall be disabled. The IREQ#signal in the PC Card I/O interface shall be negated unless the nIEN bit iscleared and an interrupt has been requested.

Bit 2SRST

The Software Reset bit shall operate generally as described in the ANSI ATAStandard with the following exceptions:

Sections of ANSI ATA Standard which refer to the PDIAG- and the DASP-signals are not applicable to PC Card implementations. Section 6.1, ATA SoftReset, of this document shall define the Soft Reset Function and protocol.18©2001 PCMCIA/JEITA

PC CARD ATA SPECIFICATION

4.2.12 Drive Address Register

This register is provided for compatibility with the AT disk drive interface. The bits can be read bythe host and are defined as follows:Table 4-12: Drive Address Register

D7X

D6nWTG

D5nHS3

D4nHS2

D3nHS1

D2nHS0

D1nDS1

D0nDS0

Bit 7Bit 6

XnWTG

This bit shall be ignored by the host. Please see Appendix B: Card Information Structureof this document for a discussion of the considerations involving this bit.This bit is cleared while a write operation is in progress, otherwise, it is set.

When the bit is cleared the host should not alter the Vpp or Vcc supply voltages to the card.

Refer to the ANSI ATA Standard for description of the bits which are described in this register exceptwhere the ANSI ATA Standard conflicts with the descriptions provided above.

Note: This register is obsolete in some ANSI ATA Standards.

4.2.13 Duplicate Data, Error and Feature Registers

The address space occupied by the Data register overlaps with space occupied by the Error andFeature registers. The table below describes the combinations of Data register access and Error orFeature register accesses. The table is provided here to assist in understanding the overlapped Dataregister and Error or Feature register rather than to attempt to define general PC Card word and byteaccess modes and operations. See the PC Card Standard for definitions of the Card Accessing Modesfor I/O and Memory cycles. These cycles are also summarized in Section 2.2 Differences Between PCCard ATA and ATA.Table 4-13: Duplicate Data Register

D15

D14

D13

D12

D11

D10

D9

D8

D7

D6

D5

D4

D3

D2

D1

D0

Data Word

Odd Data Byte Only

Even or Even-Odd Data Byte

Because of the overlapped registers, access to the Error or Feature registers at 1F1H, 171H and offset1H are not possible when word accesses are performed, i.e., with CE1# and CE2# both asserted. TheDuplicate Registers at relative addresses 8H, 9H and 0DH have no restrictions on the operations whichcan be performed by the socket.

©2001 PCMCIA/JEITA19

ATA SPECIFIC REGISTER DEFINITIONS

Table 4-14: Access to Data, Error and Feature Registers Including Duplicate Registers

Data RegisterWord Data registerWord Data registerEven Byte Data registerOdd Byte Data registerOdd Byte Data registerError / Feature RegisterError / Feature RegisterError / Feature Register

CE2#LLHHLHLL

CE1#LLLLHLHL

A0LHLHXHXX

Offset0H, 8H1H, 9H0H,8H9H8H, 9H1H, 0DH0H, 1H0C, 0DH

Data BusD15-D0D15-D0D7-D0D7-D0D15-D8D7-D0D15-D8D15-D8

NOTES:1.The Data register at 0H is accessed with both CE1# and CE2# asserted as a word register on

the combined Odd Data Bus and Even Data Bus (D[15::0]). This register may also be accessedby a pair of byte accesses to the offset 0H with CE1# asserted and CE2# negated. Wordaccesses at odd address N+1 is the same as a word access at address N, however, word

accesses at odd addresses are illegal for I/O accesses. Note that the address space of this wordregister overlaps the address space of the Error and Feature byte-wide registers which are

located at offset 1H. When accessed twice as byte register with CE1# asserted, the first byte tobe accessed is the Even byte of the Word and the second byte accessed is the Odd byte of theequivalent Word access.

A byte access to address 0H with CE1# negated and CE2# asserted accesses the Error (read)or Feature (write) register.2.The registers located at offsets 8H, 9H and 0DH are non-overlapping duplicates of the registers

at offsets 0 and 1.

Register 8H is equivalent to register 0H, while register 9H accesses only the Odd byte of theData register. Therefore, if the registers are byte accessed in the order 9H then 8H the data willbe transferred Odd byte then Even byte. Repeated byte accesses to register 8H or 0H willaccess consecutive (even then odd) bytes from the data buffer. Repeated word accesses toregister 8H, 9H or 0H will access consecutive words from the data buffer. Repeated byteaccesses to register 9H are not supported. However, repeated alternating byte accesses toregisters 8H then 9H will access consecutive (even then odd) bytes from the data buffer. Byteaccesses to register 9H access only the odd byte of the data word.3.Memory accesses to even addresses at offsets between 400H and 7FFH access register 8H.

Accesses to odd addresses at offsets between 400H and 7FFH access register 9H. This 1 Kbytememory window to the Data register is provided so that hosts can perform memory to memoryblock moves to the Data register when the register lies in memory space. This entire windowaccesses the Data register FIFO and does not directly address the data buffer within the card.Some hosts, such as the 80x86 processors, increment both the source and destinationaddresses when executing the memory to memory block move instruction. Some PC Card

socket adapters also have auto incrementing address logic embedded within them. This addresswindow allows these hosts and adapters to function efficiently.

4.3 ATA Specific Register Mapping

4.3.1 I/O Mapped Addressing

The Primary I/O, Secondary I/O, and Contiguous I/O address maps are shown in Table 4-15: I/OMapped Addressing.The contiguous I/O mapping mode requires that the system decode a contiguous block of at least 16I/O registers to uniquely select the card.

20©2001 PCMCIA/JEITA

PC CARD ATA SPECIFICATION

Table 4-15: I/O Mapped Addressing

REG#LLLLLLLLLLLLL

PrimaryA[9::0]1F0H1F1H1F2H1F3H1F4H1F5H1F6H1F7H---------3F6H3F7H

SecondaryA[9::0]170H171H172H173H174H175H176H177H---------376H377H

Contiguous A[3::0]0H1H2H3H4H5H6H7H8H9H0DH0EH0FH

Even Read DataError RegisterSector CountSector NumberCylinder LowCylinder HighDrive/HeadStatusDuplicateEven Read Data

DuplicateOdd Read DataDuplicate ErrorAlternate StatusDrive Address

Even Write Data

FeatureSector CountSector NumberCylinder LowCylinder HighDrive/HeadCommandDuplicateEven Write Data

Duplicate Odd Write DataDuplicate FeatureDevice ControlReserved

431,31,312

IORD# =0

IOWR# =0

Note

NOTES:1. This register supports word or byte accesses. See note 1 for Table 4-14: Access to Data, Errorand Feature Registers Including Duplicate Registers.2.This register overlaps the address space of the Data register. See note 1 for Table 4-14:Access to Data, Error and Feature Registers Including Duplicate Registers.3. This register address is a duplicate address assignment for another register. A duplicate address

is not available in the Primary I/O and Secondary I/O decodings. See note 2 for Table 4-14:Access to Data, Error and Feature Registers Including Duplicate Registers.4. Drive Address register is obsolete in some ANSI ATA Standards.

Address lines which are not indicated in the decoding above are ignored by the card for accessing

these registers. The primary and secondary modes decode 10 address lines while the contiguousdecoding decodes only 4 address lines on the card.

©2001 PCMCIA/JEITA21

ATA SPECIFIC REGISTER DEFINITIONS

4.3.2 Memory Mapped Addressing

When the card registers are accessed via memory references, the registers appear in the commonmemory space window from 0-2K bytes as shown in Table 4-16: Memory Mapped Address Map.Table 4-16: Memory Mapped Address Map

REG#HHHHHHHHHHHHHHH

A10LLLLLLLLLLLLLHH

A[9::4]XXXXXXXXXXXXXXX

A3LLLLLLLLHHHHHXX

A2LLLLHHHHLLHHHXX

A1LLHHLLHHLLLHHXX

A0LHLHLHLHLHHLHLH

OE#=0Read DataErrorSector CountSector NumberCylinder LowCylinder HighDrive /HeadStatusDuplicate EvenRead DataDuplicate OddRead DataDuplicate ErrorAlt StatusDrive AddressEven Read DataOdd Read Data

WE#=0Write Data FeatureSector CountSector NumberCylinder LowCylinder HighDrive/HeadCommandDuplicate EvenWrite DataDuplicate OddWrite Data Duplicate Feature

Device CtlReservedEven Write DataOdd Write Data

5441,31,31,3Notes12

NOTES:1. This register supports word or byte accesses. See note 1 for Table 4-14: Access to Data, Errorand Feature Registers Including Duplicate Registers.2. This register overlaps the address space of the Data register. See note 1 Table 4-14: Access toData, Error and Feature Registers Including Duplicate Registers.3. This register address is a duplicate address assignment for another register. A duplicate address

is not available in the Primary I/O and Secondary I/O decodings. See note 2 for Table 4-14:Access to Data, Error and Feature Registers Including Duplicate Registers.4. Memory accesses to even addresses at offsets between 400H and 7FFH access register 8H.

Accesses to odd addresses at offsets between 400H and 7FFH access register 9H. This 1 KBmemory window to the Data register is provided so that hosts can perform memory to memoryblock moves to the Data register when the register lies in memory space. Note that this entirewindow accesses the Data register FIFO and does not directly address the data buffer within thecard.

Some hosts, such as the 80x86 processors, increment both the source and destinationaddresses when executing the memory to memory block move instruction. Some PC Card

socket adapters also have auto incrementing address logic embedded within them. This addresswindow allows these hosts and adapters to function efficiently.5.Drive Address register is obsolete in some ANSI ATA Standards

If memory mapped mode is supported, the card shall be implemented so that the card will respond at

the addresses indicated within the ranges of 0H-0FH and 400H-7FFH from the start of the address

space allocated to the PC Card ATA memory mapped registers as indicated by the CIS Device ID andJEDEC ID tuples. Additional decoding is permitted to be provided at the discretion of the cardmanufacturer.

22©2001 PCMCIA/JEITA

PC CARD ATA SPECIFICATION

5. SOFTWARE INTERFACE

This section defines the software requirements and the commands the host sends to the card. Thecontroller executes the commands and reports the results to the host using the Status register.

5.1 ATA Command Block

The ATA command block includes the Data register and the group of seven registers which are usedto issue commands using the ATA command protocol. The interpretation of the contents of theseregisters is a function of the addressing mode which is used to address the media in the card. ACylinder-Head-Sector addressing method of addressing, and a Logical Block addressing mode aresupported.

5.1.1 ATA Command Block for Cylinder-Head-Sector Addressing

To perform a function the host writes up to seven bytes to the card. These bytes, called the ATACommand Block, specify the command to be executed and its associated parameters. The followingfigure shows the general content of the ATA command block. Refer to specific commands in the ANSIATA Standard for the bytes required by each command.Table 5-1: Commands with Cylinder-Head-Sector Encoding

Bit !(Byte offset)

1

234567

1

LBA=0

1

D7

D6

D5

D4

FeatureSector CountSector NumberCylinder LowCylinder HighDRV

Command

Head

D3

D2

D1

D0

©2001 PCMCIA/JEITA23

SOFTWARE INTERFACE

5.1.2 ATA Command Block for Logical Block Addressing

To perform a function using Logic Block Addressing, the host writes to the same seven registers as forCylinder-Head-Sector addressing. However, the LBA bit is Set and the Sector Number, Cylinder Low,Cylinder High and Head fields of the command block provide a starting logical block address on thecard. They are interpreted as follows:

Table 5-2: Commands with Logical Block Address Encoding

Bit !(Byte offset)

1

234567

1

LBA=1

1

D7

D6

D5

D4

FeatureSector Count

Logical Block Number (LBA [7::0])Logical Block Number (LBA [15::8])Logical Block Number (LBA [23::16])

DRV

Command

Logical Block Number (LBA [27::24])D3

D2

D1

D0

CHS to LBA translation formula:LBA to CHS translation formulas:

LBA = (C * HpC + H) * SpH + S- 1C = LBA / (HpC * SpH)H = (LBA / SpH) mod HpCS = (LBA mod SpH) + 1

whereLBACHSHpCSpH

is Logical Block Addressis Cylinder Numberis Head Numberis Sector Numberis Heads per Cylinderis Sectors per Head (Track)

5.2 Command Descriptions

The ANSI ATA Standard should be consulted for detailed tables and descriptions of the commands.Exceptions to the descriptions are noted below and also in Section 2.2, Differences Between PC CardATA and ATA, of this document.Section 2.2, Differences Between PC Card ATA and ATA describes a difference in the handling of theDiagnostic command between the PC Card ATA Specification and the ANSI ATA Standard.

Implementation of the Identify Drive Command is mandatory in this PC Card Standard, but optionalin some ANSI ATA Standards.

24©2001 PCMCIA/JEITA

PC CARD ATA SPECIFICATION

6. INTERFACE PROTOCOL

Refer to the Logical Interface section of the ANSI ATA Standard for Logical Interface descriptionswith the following exceptions:a.b.

All references to the PDIAG- and the DASP- signals shall be ignored.

Port addressing given in the ANSI ATA Standard I/O Port Functions/Selection Addresses isreplaced by Sections 4.2.3, Feature Register, and 4.3.1, I/O Mapped Addressing, of thisdocument.

The high impedance state of INTRQ is replaced by the interrupts disabled state as described inSection 3.4, Interrupt Request: IREQ#, of this document.The host provides drive number configuration of each card by writing bit 4 of the Card's Socketand Copy register with the value 0 for drive 0 or with the value 1 for drive 1 (when operating inTwin Card mode).

DMA is not supported by PC Card ATA.

PC Card Standard bus timing applies for PC Card ATA.

c.

d.Support for the Index bit (IDX) in the status registers is optional.e.

f.g.

6.1 ATA Soft Reset

This bit is set to 1 in the Device Control register to force the card to perform an AT Disk Controllerhard reset operation. This reset does not change the configuration of the card interface as wouldeither a PC Card hardware reset or a PC Card Soft Reset.

In Twin Card, use the following software protocol to determine when Drive 0 and Drive 1 are ready.

6.1.1 ATA Soft Reset Timing Definitions

Definitions:

tB Drive 0

is the time from ATA Soft Reset cleared until drive 0clears BSY when Drive 1 may be present. It is specifiedas a minimum.

is the time from ATA Soft Reset cleared until drive 1clears BSY. It is specified as a maximum.

is the time from ATA Soft Reset set until the drive setsBSY. It is specified as a maximum.

is the time from the posting of Drive Ready andDiagnostic Results until the drive clears BSY. It isspecified as a minimum.

tB Drive 1tNtU

©2001 PCMCIA/JEITA25

INTERFACE PROTOCOL

6.1.2 Software Reset One Drive

This protocol applies only when the drive is configured so that it is the only drive which can bepresent at an address. This is the case when an I/O Mapped Configuration without Twin Cardssupport or the memory-mapped configuration is used.1.2.3.4.5.6.

Host sets SRST=1 in the Device Control register.Drive 0 sets BSY within 400 ns after SRST is set to 1.Drive 0 begins hardware initialization.Drive 0 may revert to its default condition.

Drive 0 posts diagnostic results to the Error register.Drive 0 clears BSY when ready to accept commands.

6.1.3 Software Reset Two Drives

This protocol applies whenever the drive is in a configuration which supports more than one drive ata single address whether or not more than one drive is actually present at that address in the system.1.2.3.4.5.6.7.

Host sets SRST=1 in the Device Control register.

Drive 0 and Drive 1 each set BSY within 400 ns after SRST is set.Drive 0 and Drive 1 begin hardware initialization.Drive 0 and Drive 1 may revert to their default condition.

Drive 1 performs initialization and diagnostics which will complete within tB Drive 1 after SoftReset is cleared.

With adequate time remaining to complete steps 7 through 9 before tB Drive 1 has expired, Drive1 determines whether it has completed diagnostics and is ready to execute a command.If the diagnostic results are uncertain at this time, then the drive will report the diagnostics ashaving passed. The drive shall place the value \"01H\" (passed diagnostic) in the Error register.If the diagnostic results are available at this time, then the drive shall place the diagnostic result inthe Error register.8.9.5.6.7.8.9.26

If the drive is ready to execute a command then the drive shall set the DRDY bit in the Statusregister otherwise the drive shall clear the DRDY bit in the Status register.The drive clears BSY in the Status register.

Drive 0 shall perform and complete initialization and diagnostics.Drive 0 shall delay until tB Drive 0 has expired.

Drive shall place the diagnostic result in the Error register with the assumption that drive 1 haspassed diagnostics.

If the drive is ready to execute a command then the drive shall set the DRDY bit in the Statusregister otherwise the drive shall clear the DRDY bit in the Status register.The drive clears BSY in the Status register.

©2001 PCMCIA/JEITA

Drive 1

Drive 0

PC CARD ATA SPECIFICATION

Table 6-1: Soft Reset Timing Diagram SRST

BSY

Drive 0 tN tB Drive 0 DRDY

Result Drive 0 tU BSY

Drive 1 tN tB Drive 1 DRDY

Result Drive 1 tULabelValue

Units

Conditions

tN400nsec

MaxAll

tB Drive 00msecMinSingle Drive ConfigurationtB Drive 0100msecMinMulti Drive ConfigurationtB Drive 150msecMaxMulti Drive ConfigurationtU

0

nsec

Min

All

©2001 PCMCIA/JEITA27

PC CARD ATA SPECIFICATION

7. PC CARD SPECIFIC CONSIDERATIONS

7.1 Card Configuration Registers

The PC Card Configuration registers are described in the Electrical Specification, Card Configurationsection. When only some of the bits in a register are required by a card, the unsupported bits may beignored by the card when written and should return stable data (typically 0) when read.

The Configuration Option register is the only register which is mandatory for all PC Card ATA massstorage cards. This register is used to specify the addressing mode of the card, the interrupt mode(Level or Pulsed) and to assert PC Card Soft Reset.

The Function Configuration and Status register is required to be implemented on the card only if thecard supports the PC Card power-down, audio, or Status Changed features, none of which are

mandatory. If PC Card power-down is supported, it is recommended that this place the drive in thelowest power state available from which the drive can recover by restoring the PC Card Power DownBit to 0. The Status Changed feature also requires that the Pin Replacement register be implemented.If the Function Configuration and Status register is implemented on the card, the Interrupt Requestbit in the register shall be controlled as follows: The bit shall be set when the drive has an interruptrequest pending and the Interrupt Enable bit in the ATA Device Control register is set to permitinterrupts. While a drive is configured for the Memory-Only interface, the behavior of the InterruptRequest bit in the Function Configuration and Status register is the same as if an I/O interface wereconfigured, although the Hardware Interrupt Request signal will not be available from the card.The IOis8-bit in the Card Configuration and Status register is set by the host to inform the card thatthe host will perform all I/O to the card as 8-bit I/O transferred on the Even Data Bus. This bit shouldnot be interpreted as controlling the width of data accesses to the card.

The Pin Replacement register is required to be implemented on the card only if the card is designed toreturn READY, Write Protect Switch or Battery Status while the card is using the I/O interface.The Socket and Copy register, bit 4, is required to be implemented on the card if the card is designedto be host selectable as either drive 0 or as drive 1. A card indicates this capability with the TwinCards field in the Configuration Table Entry Tuple of the Card Information Structure. The drivenumber selection is performed by clearing bit 4 of the Socket and Copy register to 0 for drive 0 orsetting the bit to 1 for drive 1. The Twin Card operation is intended for emulating ATA Master/Slaveoperation in the AT Primary and AT Secondary I/O mapped addressing configurations.

7.2 Card Removal, Insertion and Change Detection

The ATA Card insertion and removal shall be detected by having the socket monitor the Card Detectpins of the card and notify the client driver when there is a change in their status. The Identify Drivecommand can be used (Model and Serial Number) to determine whether a drive which is insertedinto a socket is already mounted by the system. Be aware, however, that the data on the PC Card mayhave been altered on another system between the time it is removed from and then returned to thefirst system.

©2001 PCMCIA/JEITA29

PC CARD ATA SPECIFICATION

8. APPENDIX A: IMPLEMENTATION NOTES

8.1 Special Handling of I/O Ports 3F7H and 377H

The standard, AT-BIOS compatible, address for the Drive Address register at its primary location isshared with bit 7, the Disk Change bit, of the Floppy Disk Controller at its standard primary location.A non-PC Card ATA host adapter prevents a bus conflict between the Floppy Disk Controller and theATA peripheral by keeping data bit 7 in high-impedance at the system bus while the register is read.When an ATA host bus adapter is used, the Floppy Disk Controller and the ATA Drive are connectedto the same physical wires on the data bus, so that when the Drive Address register is accessed, theFloppy Disk Controller places D[6::0] in the high impedance state while the ATA drive places D7 inthe high impedance state. This action prevents a bus conflict.

A PC Card socket in a host is likely to include a bus transceiver between the card's data pins and thehost's system data bus. Unless the socket has been custom designed to resolve this problem, the bustransceiver is unable to generate a high-impedance output on the system data bus signal D7 inresponse to a high impedance input from the D7 data line on the PC Card socket. Therefore, thetraditional ATA solution to the 3F7H register is not directly usable in the PC Card interface.

Therefore, a PC Card ATA mass storage card configured to operate at the Primary (or Secondary) I/Oaddresses, conflicts with a Floppy Disk Controller which resides in the system and also uses port3F7H (or 377H). A conflict also occurs if the bus width supported by the PC Card ATA mass storagecard and the Floppy Disk Controller are not equal.

The following are methods to avoid this condition in PC Card implementations. The selection of thebest mechanism for a particular system will depend upon the characteristics of the host's socket, thehost's driver software and the PC Card ATA mass storage card installed in the socket.1.

Locate the PC Card ATA mass storage card at a non-conflicting address. In hosts where a FloppyDisk Controller is potentially present at 3F7H in the PC Card ATA mass storage card’s PrimaryI/O address range, the PC Card ATA mass storage card would not be configured to use itsPrimary I/O address range. Either a contiguous I/O space decoded by the socket in a

non-conflicting area of the I/O space or the PC Card ATA mass storage card’s Secondary addressrange, 170H to 177H and 376H to 377H, would be configured by the host.

This method will work with any socket and PC Card ATA mass storage card but requires that thesoftware which accesses the card be aware of the location of the I/O ports for the card.2.

Hosts in which it is impossible for a Floppy Disk Controller and a PC Card ATA mass storagecard to reside in the system at the same time are not subject to this problem.

This method will work only in systems where it is not possible to install both devices at the sametime. For example, a system with a single PC Card socket, no embedded Floppy Disk Controllerand no I/O expansion bus.3.

Avoid enabling the PC Card ATA mass storage card’s Drive Address register. There are twoconditions to allow this method. 1) The software used to access the PC Card ATA mass storagecard must not use this register. 2) The port on the PC Card ATA mass storage card must be

prevented by socket or card hardware from responding. This may be accomplished in two ways.a) If byte granularity of I/O port address decoding is supported by the socket, the socket wouldbe programmed to enable the PC Card ATA mass storage card only for I/O addresses 1F0

©2001 PCMCIA/JEITA

31

APPENDIX A: IMPLEMENTATION NOTES

through 1F7H and 3F6H for a Primary address conflict. For a Secondary address conflict, thesocket would be programmed to enable only I/O addresses 170H through 177H and 376H to thecard.

b) If the PC Card ATA mass storage card provides an additional Primary or Secondary

configuration of the card which does not respond to accesses to I/O locations 3F7H or 377H, thatconfiguration should be selected in preference to the configuration which also includes 3F7H or377H.

This method requires that either the socket or the PC Card ATA mass storage card have theability to selectively disable port 3F7H or 377H while keeping the other addresses in the Primaryor Secondary address range active. This method also requires that the host software shall notattempt to use information in the Drive Address register.4.

If socket hardware in the system is designed specifically to avoid this conflict then it shall be ableto selectively force the socket's system data bus signal D7 to be in high impedance and the PCCard's IOIS16# signal (IOCS16# on the host ISA or EISA bus) to treated as negated duringaccesses to I/O address 3F7H or 377H. This feature would be used when PC Card ATA massstorage card is installed. If a floppy disk controller PC Card is permitted to be installed in thesystem, then each socket must also have the ability to force the socket's system data bus signallines D6 through D0 to be in high impedance and the card's IOIS16# signal to treated as negatedduring accesses to I/O address 3F7H or 377H.

This method requires special socket hardware. This method does not require any specialtreatment or modifications to existing software accessing the drive at the primary addresses.

32©2001 PCMCIA/JEITA

PC CARD ATA SPECIFICATION

9. APPENDIX B: CARD INFORMATION

STRUCTURE

9.1 Card Information Structure

A Card Information Structure shall be present on the card. The minimum required tuples for the cardare not necessarily in order of appearance:

a)Required: Device ID Tuple, CISTPL_DEVICE, tuple code 01H. This tuple must be the first tuple

on the card. If the card supports the memory mapped PC Card ATA mode, a Device ID tupleshall be present which identifies the region of memory space occupied by the ATA registers ashaving a device type DH; Function Specific region. In PCMCIA 1.0 & 2.0/JEIDA 4.0 & 4.1nomenclature, this device type was named \"I/O\".b)Required: Configuration Tuple, CISTPL_CONFIG, tuple code 1AH. This tuple identifies the

location and presence of the Card Configuration registers in the attribute memory space of thecard. In the PCMCIA 2.0/JEIDA 4.1 nomenclature, this tuple was labeled \"CISTPL_CONF\".c)

Required: Configuration Entry Tuples, CISTPL_CFTABLE_ENTRY, tuple code 1BH. One of thesetuples shall be present for each Configuration Index value which is supported by the card. In thePCMCIA 2.0/JEIDA 4.1 nomenclature, this tuple was labeled \"CISTPL_CE\".

d)Required: Function ID Tuple, CISTPL_FUNCID, tuple code 21H, with a function ID value of 04H

for disk function. This tuple allows Card Services clients to quickly determine the class of cardwhich is present in the socket. See 9.2 Function ID Tuple for Disk Function.e)Required: Function Extension Tuple, CISTPL_FUNCE, tuple code 22, Type 1, Disk Interface with

an interface ID value of 01, PC Card ATA interface. This tuple identifies the card as being PCCard ATA. See 9.3 Disk Device Interface Function Extension Tuple.f)

Recommended/Required: Function Extension Tuple, CISTPL_FUNCE, tuple code 22, Types 2and 3, PC Card ATA Features. These tuples identify optional features of the PC Card ATA

protocol which are implemented on the card. These tuples are optional unless the card supportsthe Dual drive mode in which case both Type 2 and Type 3 versions are required. See 9.4 PC CardATA Features Function Extension Tuple.g)Recommended: JEDEC ID Tuple, CISTPL_JEDEC C, tuple code 18H. It is recommended that cards

which support the memory mapped ATA registers described in this document identify the regionof memory space containing the registers with a JEDEC ID code indicating PC Card ATA protocolsupport. Use of a standardized ID from Section 9.5 PC Card ATA JEDEC ID's is recommended,although a vendor specific JEDEC ID codes is permitted. If a vendor specific JEDEC ID is used,the interoperability of the card will be limited to those host systems which recognize vendor'sunique IDs.See Guidelines for ATA CIS considerations and samples.

9.2 Function ID Tuple for Disk Function

This tuple specifies that the card supports disk device functionality. This tuple is followed by one ormore Function Extension Tuples which further specify the disk function which is supported. The PCCard ATA CIS shall include this tuple and a Function Extension Tuple describing the disk interface©2001 PCMCIA/JEITA

33

APPENDIX B: CARD INFORMATION STRUCTURE

protocol as PC Card ATA. Additional Function Extension tuples describing the disk function on thecard are also permitted. For details on the tuple structure please refer to the MetaformatSpecification.

9.3 Disk Device Interface Function Extension Tuple

This tuple specifies the device interface protocol used in the disk function described in the FunctionID tuple of Section 9.2: Function ID Tuple for Disk Function. This tuple shall follow the Function IDtuple for Disk Function described in Section 9.2: Function ID Tuple for Disk Function without anyother intervening Function ID tuples. For details on the tuple structure please refer to the MetaformatSpecification.

9.4 PC Card ATA Features Function Extension Tuple

This Function Extension Tuple specifies the PC Card ATA related features of the disk function

described in the Function ID tuple of Section 9.2: Function ID Tuple for Disk Function. This tuple isoptional unless the card contains a Dual drive (coupled Master and Slave drives) in which case thetuples are required. When present, the extension tuple with function extension type code 02H (Singleor Master Drive) shall follow the Function ID tuple for Disk Function described in Section 9.2:Function ID Tuple for Disk Function without any other intervening Function ID tuples. Whenpresent, the extension tuple with type code 03H (Slave Drive) shall follow the extension tuple withextension type 02H without any intervening tuples.

The PC Card ATA Slave Drive Features Extension Tuple applies only to card configurations (valuesof Configuration Index) which have a value of 0 in the Max Twin Cards field (either explicit or

implied) of the Miscellaneous Features Field of the Configuration Entry tuple. For details on the tuplestructure please refer to the Metaformat Specification.

34©2001 PCMCIA/JEITA

PC CARD ATA SPECIFICATION

9.5 PC Card ATA JEDEC ID's

PCMCIA 2.01/JEIDA 4.1 and previous releases provide for the use of JEDEC Identifiers to specify theaccess algorithm for regions of memory space on a PC Card. PCMCIA/JEITA have adopted specificJEDEC ID codes to indicate regions of memory space which contain the memory mapped PC CardATA registers as described in this document. These identifiers use the JEDEC Manufacturer ID of DFH(95 decimal with odd parity), which has been assigned to PCMCIA/JEITA by JEDEC. The followingtwo byte JEDEC ID's are used for PC Card ATA regions. The JEDEC ID's for PC Card ATA identifyboth the access protocol, PC Card ATA, and the handling of the VPP supply within the PC Card ATAprotocol.

The JEDEC ID's for PC Card ATA are defined as follows:

First ByteSecondDescription

ByteDFH01HPC Card ATA with no Vpp required for any operation.

DFH02HPC Card ATA with Vpp required for media modification operationsonly.

DFH04HPC Card ATA with Vpp required for all media access.DFH

08H

PC Card ATA with Vpp required continuously.

©2001 PCMCIA/JEITA35

PC CARD ATA SPECIFICATION

10. APPENDIX C: COMPACTFLASH AND PC

CARD ATA DIFFERENCES

10.1 CompactFlash Differences

The following summaries the major differences between the CompactFlash and the PC Card ATA.The CompactFlash card is intended to be compatible with the PC Card Standard when used with aPC Card adapter card.

a) Configure Index values are predefined for CompactFlash cards (not defined in PC Card).b) Function Configuration Register base address fixed at 200h for CompactFlash cards (not defined

in PC Card).c) Memory access mode is required on CompactFlash cards (optional mode on PC Card).d) Both 8- and 16-bit accesses are permitted to CompactFlash Common Memory space.e) All CompactFlash I/O addresses must support both 8- and 16-bit accesses.f) CompactFlash defines a True IDE mode.

g) Maximum WAIT# signal width is 350 nSec. for CompactFlash (12 uSec. for PC Card).h) CompactFlash electrical interface is CMOS levels (PC Card is TTL).

i) Minimum pull-up resistance value is 50K ohms and maximum value is 500K ohms for

CompactFlash. PC Card is 10K minimum – no maximum defined.j) CompactFlash does not have Vpp pins.

k) CompactFlash power mode limits. PC Card does not define a maximum current.l) CompactFlash rates 3.3V Vcc at +/- 5%. PC Card is +/- 0.3V.

m) CompactFlash cards support both 3.3V and 5.0V Vcc. PC Cards may support one or both

voltages.n) CompactFlash uses a 50 contact connector – PC Card uses 68 contacts.o) CompactFlash is physically smaller than a PC Card.

©2001 PCMCIA/JEITA37

APPENDIX C: COMPACTFLASH AND PC CARD ATA DIFFERENCES

38This page intentionally left blank.

©2001 PCMCIA/JEITA

PC CARD ATA SPECIFICATION

11. APPENDIX D: TRUE IDE MODE

11.1 True IDE mode

CompactFlash Storage Cards can be configured in a True IDE mode of operation. Since PC Card ATAcards may also provide this, the mode definition is included here.

True IDE mode is configured when the OE# input signal is grounded in the host socket during thepower-on cycle. In this mode the PC Card protocol and configuration registers are disabled and onlyI/O operations to the Task File and Data registers are allowed. In this mode no Memory or Attributeaccesses are allowed by the host. Eight bit data accesses are only allowed when the ATA Set FeaturesCommand is issued to place the device in the 8-bit data mode.

©2001 PCMCIA/JEITA39

APPENDIX D: TRUE IDE MODE

40This page intentionally left blank.

©2001 PCMCIA/JEITA

因篇幅问题不能全部显示,请点此查看更多更全内容