Ata 2
Ata 2
Draft
Information Technology -
AT Attachment Interface with Extensions (ATA-2)
Revision 4c
March 18, 1996
This is an internal working document of X3T10, a Technical Committee of the Accredited Standards
Committee X3. As such, this is not a completed standard and has not been approved. The contents may be
modified by the X3T10 Technical Committee. This document is made available for review and comment only.
Permission is granted to members of X3, its technical committees, and their associated task groups to
reproduce this document for the purposes of X3 standardization activities without further permission, provided
this notice is included. All other rights are reserved. Any duplication for commercial or for-profit use is
prohibited.
ABSTRACT
This standard defines an integrated interface between devices and host processors. It provides a common point of
attachment for systems manufacturers, system integrators, and suppliers of intelligent devices.
Reference number
ANSI X3.279 - 199x
Printed 09/03/97
i
Other Points of Contact:
X3T13 Chair X3T13 Vice-Chair
Gene Milligan Pete McLean
Seagate Maxtor
MS OKM 251 2190 Miller Drive
Oklahoma City, OK 73157 Longmont, CO 80501
Voice: 405-324-3070 303-678-2149
Fax: 405-324-3794 303-678-2165
Email: gene_milligan@[Link] pete_mclean@[Link]
X3 Secretariat
Lynn Barra
Administrator Standards Processing
X3 Secretariat Voice: 202-626-5738
1250 Eye Street, NW Suite 200 FAX: 202-638-4922
Washington, DC 20005 Email: lbarra@[Link]
X3T13 Reflector
Internet address for subscription to the ATA Reflector: majordomo@[Link]
Internet address for distribution via ATA reflector: ata@[Link]
Document Distribution
Global Engineering Voice: 303-792-2181
15 Inverness Way East or: 800-854-7179
Englewood, CO 80112-5704 FAX: 303-792-2192
PATENT STATEMENT
CAUTION: The developers of this standard have requested that holder's of patents that may be required for
the implementation of the standard, disclose such patents to the publisher. However, neither the developers
nor the publisher have undertaken a patent search in order to identify which, if any, patents may apply to this
standard.
As of the date of publication of this standard and following calls for the identification of patents that may be
required for the implementation of the standard, no such claims have been made. No further patent search is
conducted by the developer or the publisher in respect to any standard it processes. No representation is
made or implied that licenses are not required to avoid infringement in the use of this standard.
ANSI®
X3.279-1996
Secretariat
Information Technology Industry Council
Abstract
This standard defines an integrated interface between devices and host processors. It provides a common
point of attachment for systems manufacturers, system integrators, and suppliers of intelligent devices.
iii
Approval of an American National Standard requires verification by ANSI that the
American requirements for due process, consensus, and other criteria for approval have been met by the
National standards developer. Consensus is established when, in the judgment of the ANSI Board of
Standards Review, substantial agreement has been reached by directly and materially affected
Standard interests. Substantial agreement means much more than a simple majority, but not
necessarily unanimity. Consensus requires that all views and objections be considered, and
that a concerted effort be made towards their resolution.
The use of American National Standards is completely voluntary; their existence does not in
any respect preclude anyone, whether he has approved the standards or not, from
manufacturing, marketing, purchasing, or using products, processes, or procedures not
conforming to the standards,
The American National Standards Institute does not develop standards and in no
circumstances gives interpretation on any American National Standard. Moreover, no person
shall have the right or authority to issue an interpretation of an American National Standard
in the name of the American National Standards Institute. Requests for interpretations
should be addressed to the secretariat or sponsor whose name appears on the title page of this
standard.
CAUTION NOTICE: This American National Standard may be revised or withdrawn at any
time. The procedures of the American National Standards Institute require that action be
taken periodically to reaffirm, revise, or withdraw this standard. Purchasers of American
National Standards may receive current information on all standards by calling or writing the
American National Standards Institute.
CAUTION: The developers of this standard have requested that holder's of patents that may be required for
the implementation of the standard, disclose such patents to the publisher. However, neither the developers
nor the publisher have undertaken a patent search in order to identify which, if any, patents may apply to this
standard.
As of the date of publication of this standard and following calls for the identification of patents that may be
required for the implementation of the standard, no other such claims have been made. No further patent
search is conducted by the developer or the publisher in respect to any standard it processes. No
representation is made or implied that licenses are not required to avoid infringement in the use of this
standard.
Published by
American National Standards Institute
11 W. 42nd Street, New York, New York 10036
Copyright 1996 by American National Standards Institute
All rights reserved.
Contents
1. Scope ...........................................................................................................................................................1
2. Normative references ...................................................................................................................................1
3. Definitions, abbreviations, and conventions ..................................................................................................1
3.1 Definitions and Abbreviations .........................................................................................................1
3.2 Conventions ...................................................................................................................................3
3.2.1 Keywords........................................................................................................................3
3.2.2 Numbering ......................................................................................................................3
3.2.3 Signal conventions..........................................................................................................3
3.2.4 Bit conventions ...............................................................................................................3
3.2.5 Byte ordering for 8-bit and 16-bit data transfers ..............................................................4
4. Interface physical and electrical requirements ...............................................................................................4
4.1 Configuration..................................................................................................................................4
4.2 DC cable and connector .................................................................................................................6
4.2.1 4-pin power.....................................................................................................................6
4.3 I/O connector .................................................................................................................................6
4.4 I/O cable ........................................................................................................................................7
4.5 Electrical characteristics .................................................................................................................7
4.5.1 ATA-2 driver types and required pull-ups ........................................................................8
5. Interface signal assignments and descriptions ..............................................................................................8
5.1 Signal summary .............................................................................................................................8
5.2 Signal descriptions .......................................................................................................................10
5.2.1 CS0- (CHIP SELECT 0)................................................................................................10
5.2.2 CS1- (CHIP SELECT 1)................................................................................................10
5.2.3 DA2, DA1, and DA0 (DEVICE ADDRESS)....................................................................10
5.2.4 DASP- (Device active, device 1 present) ......................................................................10
5.2.5 DD0-DD15 (Device Data)..............................................................................................11
5.2.6 DIOR- (Device I/O read) ...............................................................................................11
5.2.7 DIOW- (Device I/O write) ..............................................................................................11
5.2.8 DMACK- (DMA acknowledge) (optional) .......................................................................11
5.2.9 DMARQ (DMA request) (optional).................................................................................11
5.2.10 INTRQ (Device interrupt) ............................................................................................12
5.2.11 IOCS16- (Device 16-bit I/O) ........................................................................................12
5.2.12 IORDY (I/O channel ready) (optional) .........................................................................12
5.2.13 PDIAG- (Passed diagnostics)......................................................................................13
5.2.14 RESET- (Device reset) ...............................................................................................13
5.2.15 SPSYNC:CSEL (Spindle synchronization/cable select) (optional) ...............................13
5.2.16 SPSYNC (Spindle synchronization) (optional) .............................................................13
5.2.17 CSEL (Cable select) (optional) ....................................................................................14
6. Interface register definitions and descriptions .............................................................................................15
6.1 Device addressing considerations ................................................................................................15
6.2 I/O register descriptions................................................................................................................15
6.2.1 Alternate status register ................................................................................................16
6.2.2 Command register ........................................................................................................16
6.2.3 Cylinder high register ....................................................................................................16
6.2.4 Cylinder low register .....................................................................................................17
6.2.5 Data register .................................................................................................................17
6.2.6 Device control register ..................................................................................................17
6.2.7 Device/Head register ....................................................................................................17
6.2.8 Error register.................................................................................................................18
6.2.9 Features register...........................................................................................................18
6.2.10 Sector count register...................................................................................................18
6.2.11 Sector number register................................................................................................19
6.2.12 Status register.............................................................................................................19
7. General operational requirements ...............................................................................................................21
i
X3T10/0948D Revision 4c
ii
X3T10/0948D Revision 4c
7.14.31 Word 65: Minimum Multiword DMA Transfer Cycle Time Per Word ..........................42
7.14.32 Word 66: Manufacturer’s Recommended Multiword DMA Cycle Time .......................42
7.14.33 Word 67: Minimum PIO Transfer Cycle Time Without Flow Control ..........................43
7.14.34 Word 68: Minimum PIO Transfer Cycle Time With IORDY .......................................43
7.14.35 Words 69-70: Reserved for future PIO modes. ..........................................................43
7.14.36 Words 71-127: Reserved. .........................................................................................43
7.14.37 Words 128-159: Vendor specific. ..............................................................................43
7.14.38 Words 160-255: Reserved. .......................................................................................43
7.15 IDLE...........................................................................................................................................44
7.16 Idle immediate ...........................................................................................................................44
7.17 Initialize device parameters ........................................................................................................45
7.18 Media eject (removable) .............................................................................................................46
7.19 NOP...........................................................................................................................................46
7.20 Read buffer ................................................................................................................................47
7.21 Read DMA (with retries and without retries)................................................................................47
7.22 READ LONG (with retries and without retries) ............................................................................48
7.23 READ MULTIPLE.......................................................................................................................48
7.24 READ SECTOR(S) (with retries and without retries) ...................................................................49
7.25 READ VERIFY SECTOR(S) (with retries and without retries) .....................................................50
7.26 RECALIBRATE ..........................................................................................................................50
7.27 SEEK .........................................................................................................................................51
7.28 SET FEATURES ........................................................................................................................51
7.29 SET MULTIPLE MODE ..............................................................................................................53
7.30 SLEEP .......................................................................................................................................53
7.31 STANDBY ..................................................................................................................................54
7.32 STANDBY IMMEDIATE .............................................................................................................54
7.33 WRITE BUFFER ........................................................................................................................55
7.34 WRITE DMA (with retries and without retries).............................................................................55
7.35 WRITE LONG (with retries and without retries) ..........................................................................56
7.36 WRITE MULTIPLE .....................................................................................................................56
7.37 WRITE SAME ............................................................................................................................57
7.38 WRITE SECTOR(S) (with retries and without retries) .................................................................58
7.39 WRITE VERIFY .........................................................................................................................59
8. Protocol ......................................................................................................................................................59
8.1 Power on and hardware resets .....................................................................................................60
8.1.1 Power on and hardware resets - device 0......................................................................60
8.1.2 Power on and hardware resets - device 1......................................................................60
8.2 Software reset..............................................................................................................................61
8.2.1 Software reset - device 0 ..............................................................................................61
8.2.2 Software reset - device 1 ..............................................................................................62
8.3 PIO data in commands.................................................................................................................62
8.4 9.4 PIO data out commands.........................................................................................................65
8.5 9.5 Non-data commands .............................................................................................................68
8.6 DMA data transfer commands (optional) ......................................................................................69
8.7 Device 0 only configurations ........................................................................................................70
9. Timing ........................................................................................................................................................71
9.1 Deskewing....................................................................................................................................71
9.2 Symbols .......................................................................................................................................71
9.3 Terms ..........................................................................................................................................71
9.4 Data transfers...............................................................................................................................72
9.4.1 PIO data transfers.........................................................................................................72
9.4.2 10.4.2 Single word DMA data transfer...........................................................................75
9.4.3 Multiword DMA data transfer.........................................................................................75
9.5 Power-on and hard reset ..............................................................................................................77
9.6 Power on and hardware reset (RESET-).......................................................................................78
9.7 Software reset..............................................................................................................................78
iii
X3T10/0948D Revision 4c
iv
X3T10/0948D Revision 4c
Figures
Figure 1 - ATA interface cabling diagram ..........................................................................................................5
Figure 2 - Drive side connector pin numbering ..................................................................................................6
Figure 3 - 40-pin connector mounting ...............................................................................................................7
Figure 4 - Cable select example .....................................................................................................................14
Figure 5 - Power management modes ............................................................................................................24
Figure 6 - Removable modes .........................................................................................................................26
Figure 7 - BSY and DRDY timing for Diagnostic command .............................................................................35
Figure 8 - BSY and DRDY timing for power on and hardware resets ...............................................................61
Figure 9 - BSY and DRDY timing for software reset ........................................................................................62
Figure 10 - PIO data in ...................................................................................................................................64
Figure 11 - PIO data out .................................................................................................................................67
Figure 12 - No data transfer............................................................................................................................69
Figure 13 - DMA steps....................................................................................................................................70
Figure 14 - PIO Data Transfer to/from Device ................................................................................................73
Figure 15 - Single word DMA data transfer .....................................................................................................75
Figure 17 - Reset sequence............................................................................................................................77
v
X3T10/0948D Revision 4c
Tables
Table 1 - DC interface using 4 pin power connector ......................................................................................... 6
Table 2 - DC characteristics ............................................................................................................................. 7
Table 3 - AC characteristics ............................................................................................................................ 7
Table 4 - ATA-2 driver types and required pull-ups .......................................................................................... 8
Table 5 - Interface signal names and pin assignments ..................................................................................... 9
Table 6 - Interface signals - Alphabetical listing ..............................................................................................10
Table 7 - I/O Port functions and selection addresses.......................................................................................16
Table 8 - Power conditions..............................................................................................................................24
Table 9 - Status and error usage.....................................................................................................................27
Table 10 - Command codes and parameters...................................................................................................29
Table 11 - Diagnostic Codes ...........................................................................................................................34
Table 12 - Identify device information .............................................................................................................37
Table 13 - Automatic standby timer periods ....................................................................................................44
Table 14 - SET FEATURES register definitions ..............................................................................................52
Table B.1 - Signal Assignments for 44-Pin ATA ..............................................................................................85
Table C.1 - Signal Assignments for 68-Pin ATA ..............................................................................................87
Table E.1 - Command Matrix ..........................................................................................................................93
Table E.2 - Commands Sorted By Command Value ........................................................................................94
vi
X3T10/0948D Revision 4c
Annexes
Annex A Diagnostic and reset considerations from a device firmware standpoint ......................78
Annex B 44-pin Small form factor connector .............................................................................84
Annex C 68-pin Small form factor connector ............................................................................86
Annex D Identify device data for ATA devices below 8 GB .......................................................90
Annex E ATA command set summary ......................................................................................93
vii
X3T10/0948D Revision 4c
Foreword (This foreword is not part of American National Standard X3.279 -1996.)
When the first IBM PC(TM) (Personal Computer) was introduced, there was no hard disk storage capability.
Successive generations of products resulted in the inclusion of a hard disk as the primary storage device.
When the PC AT(TM) was developed, a hard disk was the key to system performance, and the controller
interface became a de facto industry interface for the inclusion of hard disks in PC ATs.
The price of desktop systems has declined rapidly because of the degree of integration which reduced the
number of components and interconnects. A natural outgrowth of this integration was the inclusion of
controller functionality into the hard disk.
In October 1988 a number of device suppliers formed the Common Access Method Committee to encourage
an industry-wide effort to adopt a common software interface to dispatch input/output requests to SCSI
devices. Although this was the primary objective, a secondary goal was to specify what was known as the
AT Attachment interface. The resulting AT Attachment Interface For Disk Drives standard fulfilled that
requirement.
As personal computer type systems continued to evolve, there was a need to extend the capabilities of the
interface. The lap-top and small computer systems needed to modify the mechanical aspects of the
interface. High performance systems needed to have enhanced transfer rates. In addition, there were a
number of issues in the AT Attachment standard that needed to be addressed.
Requests for interpretation, suggestions for improvement and addenda, or defect reports are welcome. They should be
sent to the X3 Secretariat, Information Technology Industry Council, 1250 Eye Street, NW, Suite 200, Washington,
DC 20005-3922.
This standard was processed and approved for submittal to ANSI by Accredited Standards Committee on Information
Processing Systems, X3. Committee approval of the standard does not necessarily imply that all committee members
voted for approval. At the time it approved this standard, the X3 Committee had the following members:
James D. Converse, Chair
Donald C. Loughry, Vice-Chair
Joanne M. Flanagan, Secretary
viii
X3T10/0948D Revision 4c
ix
X3T10/0948D Revision 4c
Technical Committee X3T10 on I/O Interfaces, which reviewed this standard, had the following members:
John B. Lohmeyer, Chair
Lawrence J. Lamers, Vice-Chair
Ralph Weber, Secretary
Mr. Alan R. Olson (P) Mr. Rick Heidick (A) Mr. Norm Harris (P)
Mr. Richard Kalish (A) Mr. Lawrence J. Lamers (A#) Mr. Erik Falk (O)
Mr. David Wang (P) Mr. Ron Apt (O) Mr. Fernando L. Podio (L)
Mr. Edward Fong (P) Mr. Peter Haas (A) Mr. Jerrie L. Allen (O)
Mr. Charles Brill (P) Mr. Bob Whiteman (A) Mr. Jeff Rosa (P)
Mr. Michael Wingard (A) Mr. Carl Booth (O) Mr. Jan V. Dedek (P)
Mr. Gary Porter (A) Mr. Dennis Pak (P) Mr. Mike Eneboe (A#)
Mr. Ron Roberts (A) Mr. Joe Lawlor (P) Mr. Stephen Martin (O)
Mr. Christian Mollard (O) Mr. Dennis R. Haynes (P) Mr. Joe Stoupa (A)
Mr. Clifford E. Strang Jr. (P) Mr. Steven Ramberg (A) Mr. Bob Gannon (O)
Mr. Richard Wagner (O) Mr. Gerry Johnsen (P) Mr. Kurt Witte (A)
Mr. Ian Morrell (P) Mr. Dennis Lang (A) Mr. Joe Chen (P)
Mr. John Geldman (A#) Mr. Nicos Syrimis (A) Mr. Dave Weber (A)
Mr. Edward Haske (P) Mr. George Su (A#) Mr. Roger Wang (A)
Mr. Bill Galloway (P) Mr. Ken Bush (A) Mr. Peter Johansson (P)
Mr. Michael Bryan (P) Mr. Michael Alexenko (A#) Mr. Timothy Feldman (A)
Mr. Joseph Wach (A) Mr. Ed Carmona (O) Mr. Doug Pickford (O)
Mr. Ken Smith (O) Ms. Adrienne Turenne (A#) Mr. Louis Grantham (P)
Mr. Michael Smith (A) Mr. Charles Monia (P) Mr. William Dallas (A#)
Mr. Douglas Hagerman (A#) Dr. William Ham (A#) Mr. Matt Giovanetti (T)
Mr. Tom Treadway (O) Mr. James D. Converse (XO) Mr. I. Dal Allan (P)
Mr. Kenneth J. Hallam (A) Mr. Ralph O. Weber (A#) Mr. Edward Lappin (P)
Mr. David Andreatta (A) Mr. Nick Ladas (O) Mr. Gary R. Stephens (P)
Mr. Mike Chenery (A#) Mr. Robert Liu (P) Mr. Kevin R. Pokorney (A)
Mr. Joel Urban (A#) Mr. Steve Caron (O) Mr. Mark Woithe (P)
Mr. Don Coffin (A#) Mr. Jeff Epstein (A) Mr. Ray Kallio (O)
Mr. Jeffrey L. Williams (P) Mr. Kurt Chan (A) Mr. William Clemmey (A#)
Mr. Donald C. Loughry (XO) Mr. Pat Edsall (O) Mr. Peter Stevens (O)
Mr. Paul Boulay (A#) Mr. S. Nadershahi (P) Mr. Danny Yeung (A)
Mr. Motoyasu Tsunoda (O) Mr. Greg Kapraun (O) Mr. John Lohmeyer (O)
Mr. David McFadden (P) Mr. Thomas J. Kulesza (A) Mr. George Penokie (P)
Mr. Dan Colegrove (A#) Mr. John P. Scheible (A) Mr. Giles Frazier (O)
Dr. Gerald Marazas (A#) Mr. Duncan Penman (O) Mr. David Lawson (P)
Mr. Varouj Der-Hacopian (A) Mr. Geoffrey Barton (P) Mr. Gary Brandvold (A)
Mr. David H. Shaff (O) Mr. David J. Fox (O) Ms. Jeanne T. Martin (O)
Mr. Lansing Sloan (O) Mr. Dean Wallace (P) Mr. Shufan Chan (A)
Mr. Robert Bellino (P) Mr. Chuck Grant (A) Mr. Ron Crouch (O)
Ms. Donna Pope (P) Mr. Ezra Alcudia (A) Mr. Pete McLean (P)
Mr. LeRoy Leach (O) Mr. Andrew J. Toth (O) Mr. Bob Masterson (P)
Mr. John Cannon (A) Mr. Chris Nieves (O) Mr. Joe Dambach (P)
Mr. Jay Neer (A) Mr. Robbie Shergill (P) Mr. Simone Sadri (A)
Mr. Clifford Carlson (O) Mr. Robert J. Gallenberger (O) Mr. Chris D'Iorio (A#)
Mr. Bruce Anderson (P) Mr. Dan Kennedy (A) Mr. Peter Brown (P)
Mr. Mike Hetzel (A) Mr. Dan Davies (O) Mr. Earl J. Perera (O)
Mr. Thomas Steury (O) Mr. Stephen F. Heil (O) Mr. Skip Jones (P)
Mr. Ting Le Chan (A) Mr. Doug Prins (A#) Mr. James McGrath (P)
Mr. Edward A. Gardner (A) Mr. John F. Fobel (O) Dr. Tetsuro Motoyama (O)
Mr. S. Jauher Zaidi (O) Mr. Gene Milligan (P) Mr. Gerald Houlder (A)
Mr. Brian Johnson (A#) Mr. John Masiewicz (A#) Mr. Edward Hoskins (O)
Mr. Ron Werbow (O) Mr. Thomas 'Rick' Tewell (P) Dr. Colin Whitby-Strevens (O)
Mr. Stephen G. Finch (P) Mr. Daniel E. Moczarny (A) Mr. James Ryland (XO)
Mr. David Deming (O) Mr. Scott Smyers (P) Mr. Mike Yokoyama (A)
Mr. Erich Oetting (P) Mr. Roger Cummings (A) Mr. Robert N. Snively (P)
Mr. Vit Novak (A) Mr. Patrick Mercer (P) Mr. Akram Atallah (A)
Mr. John Moy (P) Mr. Pete Tobias (A) Mr. Bill Boyd (O)
Mr. Greg Kite (O) Mr. Harvey Waltersdorf (P) Mr. Gary M. Watson (P)
Mr. Skip Linehan (O) Mr. Peter Dougherty (P) Mr. Allen Spalding (A#)
Mr. Arlan P. Stone (A) Mr. Paul D. Aloisi (P) Mr. Mark Jordan (A)
Mr. William C. Rinehuls (XO) Mr. Michael G. Kaminski (O) Mr. Jeff Stai (P)
Mr. Tak Asami (A) Mr. Tom Hanan (A#) Mr. Devon Worrell (A#)
Mr. Doug Piper (P) Mr. E.J. Mondor (A) Mr. Dennis P. Moore (P)
x
X3T10/0948D Revision 4c
Introduction
This standard is divided into the following clauses and annexes.
Clause 3 provides definitions, abbreviations, and conventions used within this document.
Clause 4 contains the electrical and mechanical characteristics; covering the interface cabling requirements
of the DC, data cables and connectors.
xi
AMERICAN NATIONAL STANDARD X3.279-1996
Information Technology -
AT Attachment Interface with Extensions (ATA-2)
1. Scope
This standard extends the AT Attachment Interface with the addition of new commands, and defines
improved interface transfer rates. In addition, general improvements have been made in content for
completeness and to improve clarity.
This standard defines the AT Attachment Interface and integrated interfaces between devices and host
processors. It provides a common point of attachment for systems manufacturers, system integrators, and
suppliers of intelligent devices.
The application environment for the AT Attachment Interface is any device which uses internal storage.
The PC AT Bus(TM) is a widely used and implemented interface for which a variety of devices have been
manufactured. As a means of reducing size and cost, a class of products has emerged which embed the
controller functionality in the device. Because of their compatibility with existing AT hardware and software
this interface quickly became a de facto industry standard. While the AT Attachment Interface has its roots
in the PC AT Bus(TM), its use has extended to many other systems.
2. Normative references
None.
For the purposes of this American National Standard, the following definitions apply.
3.1.1 ATA (AT attachment): ATA defines the physical, electrical, transport, and command protocols for
the internal attachment of block storage devices.
3.1.2 ATA-1 device: A device which complies with ANSI X3.221-1994, the AT Attachement Interface for
Disk Drives.
3.1.4 Command acceptance: A command is considered accepted whenever the host writes to the
Command Register and the device currently selected has its BSY bit equal to zero. An exception exists for
the EXECUTE DIAGNOSTIC command (see the description of the EXECUTE DIAGNOSTIC command).
1
X3T10/0948D Revision 4c
3.1.5 CHS (Cylinder-head-sector): This term defines the addressing of the device as being by cylinder
number, head number and sector number.
3.1.6 Data block: This term describes a unit of data words transferred using PIO data transfer. A data
block is transferred between the host and the device as a complete unit. A data block is a sector, except for
data blocks of a READ MULTIPLE, WRITE MULTIPLE, READ LONG and WRITE LONG commands. In the
cases of READ MULTIPLE and WRITE MULTIPLE commands, the size of the data block may be changed in
multiples of sectors by the SET MULTIPLE MODE command. In the cases of READ LONG and WRITE
LONG, the size of the data block is a sector plus a vendor specific number of bytes. The default length of
the vendor specific bytes associate with the READ LONG and WRITE LONG commands is four bytes, but
may be changed by use of the SET FEATURES command.
3.1.7 Device: Device is a storage peripheral. Traditionally, a device on the ATA interface has been a hard
disk drive, but any form of storage device may be placed on the ATA interface provided it adheres to this
standard.
3.1.8 Device selection: A device is selected when the DEV bit of the Drive/Head register is equal to the
device number assigned to the device by means of a Device 0/Device 1 jumper or switch, or use of the
CSEL signal.
3.1.9 DMA (Direct memory access): A means of data transfer between device and host memory without
processor intervention.
3.1.10 LBA (Logical block address): This term defines the addressing of the device as being by the linear
mapping of sectors.
3.1.11 Master: Previous to this standard, Device 0 has also been referred to as the master. Throughout this
document the term Device 0 shall be used.
3.1.12 Optional: This term describes features which are not required by the standard. However, if any
optional feature defined by the standard is implemented, it shall be done in the way defined by the standard.
Describing a feature as optional in the text is done to assist the reader.
3.1.13 PIO (Programmed input/output): A means of accessing device registers. PIO is also used to
describe one form of data transfers. PIO data transfers are performed by the host processor utilizing PIO
register accesses to the Data register.
3.1.14 Reserved: Reserved bits, bytes, words, fields and code values are set aside for future
standardization. Their use and interpretation may be specified by future xtensions to this or other standards.
A reserved bit, byte, word or field all e set to zero, or in accordance with a future extension to this standard.
The recipient shall not check reserved bits, bytes, words or fields. Receipt of reserved code values in
defined fields shall be treated as an error.
3.1.16 Slave: Previous to this standard, Device 1 has also been referred to as the slave. Throughout this
document the term Device 1 shall be used.
3.1.17 Unrecoverable error: An unrecoverable error is defined as having occurred at any point when the
device sets either the ERR bit or the DF bit to one and the BSY bit to zero in the Status register when
processing a command.
3.1.18 VS (Vendor specific): This term is used to describe bits, bytes, fields and code values which are
reserved for vendor specific purposes. These bits, bytes, fields and code values are not described in this
2
X3T10/0948D Revision 4c
standard, and may be used in a way that varies between vendors. This term is also applied to levels of
functionality whose definition is left to the vendor.
3.2 Conventions
If there is a conflict between text and tables, the table shall be accepted as being correct.
3.2.1 Keywords
Lower case is used for words having the normal English meaning. Certain words and terms used in this
American National Standard have a specific meaning beyond the normal English meaning. These words and
terms are defined either in clause 3 or in the text where they first appear.
The names of abbreviations, commands, fields, and acronyms used as signal names are in all uppercase
(e.g., IDENTIFY DEVICE). Fields containing only one bit are usually referred to as the "name" bit instead of
the "name" field. (See 3.2.4 for the naming convention used for naming bits.)
Names of device registers begin with a capital letter (e.g., Cylinder Low register).
3.2.2 Numbering
Numbers that are not immediately followed by a lower-case "b" or "h" are decimal values. Numbers that are
immediately followed by a lower-case "b" (e.g., 01b) are binary values. Numbers that are immediately
followed by a lower-case "h" (e.g., 3Ah) are hexadecimal values.
All signals are either high active or low active signals. A dash character (-) at the end of a signal name
indicates it is a low active signal. A low active signal is true when it is below ViL, and is false when it is
above ViH. No dash at the end of a signal name indicates it is a high active signal. A high active signal is
true when it is above ViH, and is false when it is below ViL.
Asserted means that the signal is driven by an active circuit to its true state.
Negated means that the signal is driven by an active circuit to its false state.
Released means that the signal is not actively driven to any state. Some signals have bias circuitry that pull
the signal to either a true state or false state when no signal driver is actively asserting or negating the signal.
These cases are noted under the description of the signal, and their released state is stated.
Control signals that may be used for two mutually exclusive functions are identified with their two names
separated by a colon e.g.; SPSYNC:CSEL can be used for either the Spindle Sync (SPSYNC) or the Cable
Select (CSEL) functions.
Bit names are shown in all upper case letters except where a lower case n precedes a bit name. If there is
no preceding n, then when BIT is equal to one the meaning of the bit is true, and when BIT is equal to zero
the meaning of the bit is false. If there is a preceding n, then when nBIT is equal to zero the meaning of the
bit is true and when nBIT is equal to one the meaning of the bit is false.
3
X3T10/0948D Revision 4c
Assuming a block of data contains "n" bytes of information, and the bytes are labeled Byte(0) through Byte(n-
1), where Byte(0) is first byte of the field, and Byte(n-1) is the last byte of the block.
When such a block of data is transferred on the ATA interface in 16 bit wide transfer mode, then the bytes
shall be presented in the following order:
DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
First transfer --------Byte(1)-------- --------Byte(0)--------
Second transfer --------Byte(3)-------- --------Byte(2)--------
.........................
Last transfer -------Byte(n-1)------- -------Byte(n-2)-------
When such a block of data is transferred on the ATA interface in 8 bit wide transfer mode, then the bytes
shall be presented in the following order:
DD DD DD DD DD DD DD DD
07 06 05 04 03 02 01 00
First transfer --------Byte(0)--------
Second transfer --------Byte(1)--------
.........................
Next to last transfer -------Byte(n-2)-------
Last transfer -------Byte(n-1)-------
NOTE 1 - The above description is for data on the ATA Interface. Host systems and/or host
adapters may cause the order of data, as seen in the memory of the host, to be different.
4.1 Configuration
This standard defines the ATA interface containing a single host or host adapter and one or two devices. If
two devices are connected to the interface, they are connected in a daisy chained configuration. One device
is configured as Device 0 and the other device as Device 1.
4
X3T10/0948D Revision 4c
Host or
Adapter
Device 0 Device 1
Host or
Adapter
Device 1 Device 0
In a two drive configuration, the order of placement of Device 0 and Device 1 on the ATA interface cable is
not significant to the operation of the interface.
Host or
Adapter
Device
If only a single device is attached via the ATA interface to a host, it is recommended that the host and the
device be placed at the two ends of the cable.
5
X3T10/0948D Revision 4c
The pin assignments are shown in table 1. Recommended part numbers for the mating connector to 18
AWG cable are shown below, but compatible parts may be used.
4 3 2 1
+5VDC +5V return +12V return +12VDC
The I/O connector is a 40-pin connector as shown in figure 3, with pin assignments as shown in table 5. The
connector should be keyed to prevent the possibility of installing it upside down. A key is provided by the
removal of pin 20. The corresponding pin on the cable connector should be plugged.
The pin locations are governed by the cable plug, not the receptacle. The way in which the receptacle is
mounted on the printed circuit board affects the pin positions, and pin 1 should remain in the same relative
position. This means the pin numbers of the receptacle may not reflect the conductor number of the plug.
The header receptacle is not polarized, and all the signals are relative to pin 20, which is keyed.
By using the plug positions as primary, a straight cable can connect devices. As shown in figure 3, conductor
1 on pin 1 of the plug has to be in the same relative position no matter what the receptacle numbering looks
like. If receptacle numbering was followed, the cable would have to twist 180 degrees between a device with
top-mounted receptacles, and a device with bottom-mounted receptacles.
6
X3T10/0948D Revision 4c
1
40 20 2
Circuit board Circuit board
1
40 20 2
Table 2 - DC characteristics
Description Min Max
IOL Driver sink current 12 mA
IOH Driver source current 400 uA
VIH Voltage Input High 2,0 V d.c.
VIL Voltage Input Low 0,8 V d.c.
VOH Voltage Output High (I OH = -400 uA) 2,4 Vd.c.
VOL Voltage Output Low (IOL = 12ma) 0,5 V d.c.
Table 3 - AC characteristics
Description Min Max
tRISE Rise time for any signal on AT interface(1) 5 ns
tFALL Fall time for any signal on AT interface(1) 5 ns
Cin Input Capacitance(each host or Device) 25 pf
Cout Output Capacitance(each host or Device) 25 pf
(1) tRISE and tFALL are measured from 10-90% of full signal amplitude with a total
capacitive load of 100 pf.
NOTE 2 - IOH value at 400 uA is insufficient in the case of DMARQ which is typically pulled low by a
5.6k ohm resistor.
7
X3T10/0948D Revision 4c
8
X3T10/0948D Revision 4c
9
X3T10/0948D Revision 4c
This is the chip select signal from the host used to select the Command Block Registers. See table 7.
NOTE 3 - This signal has also been known in the industry as CS1FX-.
This is the chip select signal from the host used to select the Control Block Registers. See table 7.
NOTE 4 - This signal has also been known in the industry as CS3FX-.
This is the 3-bit binary coded address asserted by the host to access a register or data port in the device.
See table 7.
This is a time-multiplexed signal which indicates that a device is active, or that Device 1 is present. This
signal shall be an open collector output and each device shall have a 10K ohm pull-up resistor.
During power on initialization or after RESET- is negated, DASP- shall be deasserted by both Device 0 and
Device 1 within 1 ms, and then Device 1 shall assert DASP- within 400 ms, to indicate that Device 1 is
present.
10
X3T10/0948D Revision 4c
DASP- shall be negated following acceptance of a command by Device 1 or after 31 s, whichever comes
first.
Any time after negation of DASP-, either device may assert DASP- to indicate that a device is active.
If the host connects to the DASP- signal for the illumination of an LED or for any other purpose, the host shall
ensure that the signal level seen on the ATA interface for DASP- shall maintain Voh and Vol compatibility,
given the Ioh and Iol requirements of the DASP- device drivers.
This is an 8- or 16-bit bi-directional data interface between the host and the device. The lower 8 bits are
used for 8-bit transfers e.g., registers, vendor specific bytes associated with the READ LONG and WRITE
LONG commands and, if the device supports the Features register capability to enable 8-bit-only data
transfers (see 8.24, Set features).
This is the read strobe signal from the host. The falling edge of DIOR- enables data from a register or data
port of the device onto the signals, DD0-DD7 or DD0-DD15. The rising edge of DIOR- latches data at the
host and the host shall not act on the data until it is latched.
This is the Write strobe signal from the host. The rising edge of DIOW- latches data from the signals, DD0-
DD7 or DD0-DD15, into a register or the data port of the device. The device shall not act on the data until it
is latched.
This signal shall be used by the host in response to DMARQ to initiate DMA transfers.
NOTE 5 - This signal may be negated by the Host to suspend the DMA transfer in process. For Multi-Word
DMA transfers, the Device may negate DMARQ within the tL specified time (refer to figure 12) once
DMACK- is asserted and reassert it again at a later time to resume the DMA operation. Alternatively, if the
device is able to continue the transfer of data, the device may leave DMARQ asserted and wait for the host
to reassert DMACK-.
This signal, used for DMA data transfers between host and device, shall be asserted by the device when it is
ready to transfer data to or from the host. The direction of data transfer is controlled by DIOR- and DIOW-.
This signal is used in a handshake manner with DMACK- i.e.; the device shall wait until the host asserts
DMACK- before negating DMARQ, and re-asserting DMARQ if there is more data to transfer.
This line shall be released (high impedance state) whenever the device is not selected or is selected and no
DMA command is in progress. When enabled by DMA transfer, it shall be driven high and low by the device.
When a DMA operation is enabled, IOCS16-, CS0- and CS1- shall not be asserted and transfers shall be 16-
bits wide.
NOTE 6 - In ATA-1 devices, this signal was either totem-pole or tri-state in different
implementations. In EISA systems, 5.6K pull-down is used to cause a logic low on undriven lines.
ATA-2 defines this line to be in high-impedance mode except when DMA transfer is active from the
selected device.
11
X3T10/0948D Revision 4c
In systems which may use mixed devices where totem-pole drivers are used, and the system shares this line
with other non-ATA devices, the ATA host or ATA adapter shall ensure that appropriate protection is
employed to protect ATA device DMARQ drivers from damage.
This signal is used to interrupt the host system. INTRQ is asserted only when the device has a pending
interrupt, the device is selected, and the host has cleared the nIEN bit in the Device Control register. If the
nIEN bit is equal to one, or the device is not selected, this output is in a high impedance state, regardless of
the presence or absence of a pending interrupt.
On PIO transfers, INTRQ is asserted at the beginning of each data block to be transferred. A data block is
typically a single sector, except when declared otherwise by use of the SET MULTIPLE MODE command.
An exception occurs on FORMAT TRACK, WRITE SECTOR(S), WRITE BUFFER and WRITE LONG
commands - INTRQ shall not be asserted at the beginning of the first data block to be transferred.
On DMA transfers, INTRQ is asserted only once, after the command has completed.
If the system shares this line with non-ATA devices, the ATA host or ATA adapter shall ensure that
appropriate protection is employed to protect ATA device INTRQ drivers from damage.
During PIO transfer modes 0, 1 or 2, IOCS16- indicates to the host system that the 16-bit data port has been
addressed and that the device is prepared to send or receive a 16-bit data word. This shall be an open
collector output.
− When transferring in any PIO mode and accessing any register except the data port, transfers shall
be 8-bit using DD0-7;
− When transferring in PIO modes 0, 1 or 2, if IOCS16- is not asserted, transfers shall be 8-bit using
DD0-7;
− When transferring in PIO modes 0, 1 or 2, if IOCS16- is asserted, transfers shall be 16-bit using
DD0-15;
− When transferring in PIO modes 3 or 4, IOCS16- shall not be used by the host, and all transfers
shall be 16-bit using DD0-15, except for bytes beyond the 512th byte for READ LONG and WRITE
LONG commands which shall be 8-bit using DD0-7;
− When transferring in DMA mode, the host shall use a 16-bit DMA channel and IOCS16- shall not
be asserted.
This signal is negated to extend the host transfer cycle of any host register access (Read or Write) when the
device is not ready to respond to a data transfer request.
If actively asserted, this signal shall only be enabled during DIOR-/DIOW- cycles to the selected device. If
open collector, when IORDY is not negated, it shall be in the high-impedance (undriven) state.
12
X3T10/0948D Revision 4c
This signal shall be asserted by Device 1 to indicate to Device 0 that it has completed diagnostics. A 10K
ohm pull-up resistor shall be used on this signal by each device.
Following a power on reset, software reset or RESET-, Device 1 shall negate PDIAG- within 1 ms (to indicate
to Device 0 that it is busy). Device 1 shall then assert PDIAG- within 30 seconds to indicate that it is no
longer busy, and is able to provide status. If Device 1 is present, then Device 0 shall wait for up to 31
seconds from power-on reset, software reset or RESET- for Device 1 to assert PDIAG-. If Device 1 fails to
assert PDIAG-, Device 0 shall set bit 7 to 1 in the Error register to indicate that Device 1 failed. After the
assertion of PDIAG-, Device 1 may be unable to accept commands until it has finished its reset procedure
and is Ready (the DRDY bit is equal to one).
Following the receipt of a valid EXECUTE DEVICE DIAGNOSTIC command, Device 1 shall negate PDIAG-
within 1 ms to indicate to Device 0 that it is busy and has not yet passed its device diagnostics. Device 1
shall then assert PDIAG- within 5 seconds to indicate that it is no longer busy, and is able to provide status.
Device 1 should clear the BSY bit before asserting PDIAG-. If Device 1 is present then Device 0 shall wait
for up to 6 seconds from the receipt of a valid EXECUTE DEVICE DIAGNOSTIC command for Device 1 to
assert PDIAG-. If Device 1 fails to assert PDIAG-, Device 0 shall set bit 7 to 1 in the Error register to
indicate that Device 1 failed.
If DASP- was not asserted by Device 1 during reset initialization, Device 0 shall post its own status
immediately after it completes diagnostics, and clear the Device 1 Status register to 00h. Device 0 may be
unable to accept commands until it has finished its reset procedure and is Ready (the DRDY bit is equal to
one).
This signal from the host system shall be asserted beginning with the application of power and held asserted
until at least 25 usec after voltage levels have stabilized within tolerance during power on and negated
thereafter unless some event requires that the device(s) be reset following power on.
This is a dual purpose signal and neither, either or both functions may be implemented. If both functions are
implemented then they cannot be active concurrently: the choice as to which is active is vendor specific.
All devices connected to the same cable should have the same function active at the same time. If SPSYNC
and CSEL are mixed on the same cable, then device behavior is undefined.
Prior to the introduction of this standard, this signal was defined as DALE (Device Address Latch Enable),
and used for an address valid indication from the host system. If used, the host address and chip selects,
DAO through DA2, CS0-, and CS1- were valid at the negation of this signal and remained valid while DALE
was negated, therefore, the device did not need to latch these signals with DALE.
13
X3T10/0948D Revision 4c
The device is configured as either Device 0 or Device 1 depending upon the value of CSEL:
CSEL shall be maintained at a steady level for at least 31 seconds after the negation of RESET-.
NOTE 7 - Special cabling can be used by the system manufacturer to selectively ground CSEL e.g.,
CSEL of Device 0 is connected to the CSEL conductor in the cable, and is grounded, thus allowing
the device to recognize itself as Device 0. CSEL of Device 1 is not connected to CSEL because the
conductor is removed, thus the device can recognize itself as Device 1.
CSEL Conductor
Open
Ground
CSEL Conductor
Open
Ground
14
X3T10/0948D Revision 4c
Data is transferred in parallel (16 bits) either to or from host memory to the device's buffer under the
direction of commands previously transferred from the host. The device performs all of the operations
necessary to properly write data to, or read data from, the media. Data read from the media is stored in the
device's buffer pending transfer to the host memory and data is transferred from the host memory to the
device's buffer to be written to the media.
The devices using this interface shall be programmed by the host computer to perform commands and return
status to the host at command completion. When two devices are daisy chained on the interface, commands
are written in parallel to both devices, and for all except the Execute Diagnostics command, only the selected
device executes the command. On an Execute Diagnostics command addressed to Device 0, both devices
shall execute the command, and Device 1 shall post its status to Device 0 via PDIAG-.
Devices are selected by the DEV bit in the Device/Head register (see 6.2.7). When the DEV bit is equal to
zero, Device 0 is selected. When the DEV bit is equal to one, Device 1 is selected. When devices are daisy
chained, one shall be set as Device 0 and the other as Device 1. When a single device is attached to the
interface it shall be set as Device 0.
The Command Block Registers are used for sending commands to the device or posting status from the
device. The Control Block Registers are used for device control and to post alternate status.
Table 7 lists these registers and the addresses that select them.
15
X3T10/0948D Revision 4c
This register contains the same information as the Status register in the command block. The only
difference being that reading this register does not imply interrupt acknowledge or clear a pending interrupt.
7 6 5 4 3 2 1 0
BSY DRDY DF DSC DRQ CORR IDX ERR
This register contains the command code being sent to the device. Command execution begins immediately
after this register is written. The executable commands, the command codes, and the necessary parameters
for each command are listed in table 10.
In CHS Mode, this register contains the high order bits of the starting cylinder address for any media access.
In LBA Mode, this register contains Bits 23-16 of the LBA for any media access.
This register shall be updated to reflect the media address of the error when a media access command is
unsuccessfully completed.
16
X3T10/0948D Revision 4c
NOTE 8 - Prior to the development of this standard, this register was updated at the end of every
media access command to reflect the current media address.
In CHS Mode, this register contains the low order bits of the starting cylinder address for any media access.
In LBA Mode, this register contains Bits 15-8 of the LBA for any media access.
This register shall be updated to reflect the media address of the error when a media access command is
unsuccessfully completed.
NOTE 9 - Prior to the development of this standard, this register was updated at the end of every
media access command to reflect the current media address.
The data register is either 8-bits or 16-bits depending on the interface width currently selected and/or the type
of data being transferred by the current command.
7 6 5 4 3 2 1 0
r r r r r SRST nIEN 0
7 6 5 4 3 2 1 0
r L r DEV HS3 HS2 HS1 HS0
• Bit 7 is reserved;
• L is the sector address mode select. When the L bit is equal to zero, addressing is by CHS mode.
When the L bit is equal to one, addressing is by LBA mode;
• Bit 5 is reserved;
• DEV is the device address. When the DEV bit is equal to zero, Device 0 is selected. When the DEV bit
is equal to one, Device 1 is selected;
• If the L bit is equal to zero (CHS Mode), the HS3 through HS0 bits contain the head address of the CHS
address. The HS3 bit is the most significant bit. If the L bit is equal to one (LBA Mode), the HS3 through
HS0 bits contain bits 27 through 24 of the LBA. This field shall be updated to reflect the media address of
the error when a media access command is unsuccessfully completed.
NOTE 10 - Prior to the development of this standard, the head field (the HS3 through HS0 bits) of
this register was updated at the end of every media access command to reflect the current media
address.
17
X3T10/0948D Revision 4c
This register contains status from the last command executed by the device or a Diagnostic Code.
At the completion of any command except EXECUTE DEVICE DIAGNOSTIC, the contents of this register
are valid when the ERR bit is equal to one in the Status register.
Following a power on, a reset, or completion of an EXECUTE DEVICE DIAGNOSTIC command, this register
contains a diagnostic code (see table 11).
7 6 5 4 3 2 1 0
r UNC MC IDNF MCR ABRT TKNONF AMNF
• Bit 7 is reserved;
• UNC (Uncorrectable Data Error) indicates an uncorrectable data error has been encountered;
• MC (Media Changed) is reserved for use by removable media devices and indicates that new media is
available to the operating system. The MC bit shall be cleared by either a hardware reset or a power on
reset.
• The first command following a media change shall be rejected with the MC bit set in the error register
and the ERR bit set in the status register. The media changed state shall then be cleared and
subsequent commands accepted normally;
• IDNF (ID Not Found) indicates the requested sector's ID field could not be found;
• ABRT (Aborted Command) indicates the requested command has been aborted because the command
code is invalid or another device error has occurred;
• MCR (Media Change Requested) is reserved for use by removable media devices and indicates that a
request for media removal has been detected by the device. When a request for media removal is
detected, the MCR bit shall be returned in the error register and the ERR bit set in the status register for
all subsequent DOOR LOCK commands. The MCR bit shall be cleared by a DOOR UNLOCK command,
a MEDIA EJECT command or by a hard reset;
• TK0NF (Track 0 Not Found) indicates track 0 has not been found during a RECALIBRATE command;
• AMNF (Address Mark Not Found) indicates the data address mark has not been found after finding the
correct ID field.
This register is command specific and may be used to enable and disable features of the interface e.g.; by
the SET FEATURES Command to enable and disable caching.
Some hosts, based on definitions prior to the completion of this standard, set values in this register to
designate a recommended Write Precompensation Cylinder value.
This register contains the number of sectors of data requested to be transferred on a read or write operation
between the host and the device. If the value in this register is zero, a count of 256 sectors is specified.
For media access commands, this register shall be zero at the completion of a command if there is no error
indication in the Status register. For media access commands that complete with an error indication in the
Status register, this register contains the number of sectors which need to be transferred in order to complete
the request.
18
X3T10/0948D Revision 4c
The contents of this register may be redefined on some commands, e.g.; INITIALIZE DEVICE
PARAMETERS or WRITE SAME commands.
In CHS Mode, this register contains the starting sector number for any media access. In LBA Mode, this
register contains Bits 7-0 of the LBA for any media access. This register is used by some non-media access
commands to pass command specific information from the host to the device, or from the device to the host.
This register shall be updated to reflect the media address of the error when a media access command is
unsuccessfully completed.
NOTE 11 - Prior to the development of this standard, this register was updated at the end of every
media access command to reflect the current media address.
This register contains the device status. The contents of this register are updated to reflect the current state
of the device and the progress of any command being executed by the device. When the BSY bit is equal to
zero, the other bits in this register are valid and the other Command Block register may contain meaningful
information. When the BSY bit is equal to one, no other bits in this register and all other Command Block
registers are not valid.
NOTE 12 - Although host systems might be capable of generating read cycles shorter than the 400
ns specified for status update following the last command or data cycle, host implementations should
wait at least 400 ns before reading the status register to insure that the BSY bit is valid.
For devices that implement the Power Management features, the contents of the Status register and all other
Command Block registers are not valid while a device is in the Sleep mode.
If the host reads this register when an interrupt is pending, the interrupt is cleared.
7 6 5 4 3 2 1 0
BSY DRDY DF DSC DRQ CORR IDX ERR
• BSY (Busy) is set whenever the device has control of the command Block Registers. When the BSY bit
is equal to one, a write to a command block register by the host shall be ignored by the device.
19
X3T10/0948D Revision 4c
The device shall not change the state of the DRQ bit unless the BSY bit is equal to one. When the
last block of a PIO data in command has been transferred by the host, then the DRQ bit is cleared
without the BSY bit being set.
When the BSY bit equals zero, the device may only change the IDX, DRDY, DF, DSC and CORR
bits in the Status register and the Data register. All of the other command block registers and bits
within the Status register shall not be changed by the device.
NOTE 13 - The assertion of CORR by the device while the BSY bit is set to zero might not be
recognized by BIOS and drivers which sample status as soon as the BSY bit is equal to zero.
The BSY bit shall be set by the device under the following circumstances:
a) within 400 ns after either the negation of RESET- or the setting of the SRST bit in the Device
Control register;
b) within 400 ns after the acceptance of a command if the DRQ bit is not set;
c) between blocks of a data transfer during PIO data in commands if the DRQ bit is not set;
d) after the transfer of a data block during PIO data out commands if the DRQ bit is not set;
e) during the data transfer of DMA commands if the DRQ bit is not set.
The device shall not set the BSY bit at any other time.
When the BSY bit is set due to the negation of RESET- or the setting of the SRST bit, the BSY bit
shall remain set until the device has completed processing of the reset condition.
When a command is accepted either the BSY bit shall be set, or if the BSY bit is cleared, the DRQ
bit shall be set, until command completion.
NOTE 14 - There may be times when the BSY bit is set and then cleared so quickly, that the host
may not be able to detect that the BSY bit had been set.
• DRDY (Device Ready) is set to indicate that the device is capable of accepting all command codes. This
bit shall be cleared at power on. Devices that implement the power management features shall maintain
the DRDY bit equal to one when they are in the Idle or Standby power modes. When the state of the
DRDY bit changes, it shall not change again until after the host reads the Status register.
a) the device shall accept and attempt to execute the EXECUTE DEVICE DIAGNOSTIC and
INITIALIZE DEVICE PARAMETERS commands;
b) the device should reject all other commands codes by setting the ABRT bit in the Error
register and setting the ERR bit in the Status register before clearing the BSY bit to signal the
command completion. If a device accepts commands other than EXECUTE DEVICE
DIAGNOSTIC and INITIALIZE DEVICE PARAMETERS during the time the DRDY bit is equal to
zero, the results are vendor specific.
20
X3T10/0948D Revision 4c
• DF (Device Fault) indicates a device fault error has been detected. The internal status or internal
conditions that causes this error to be indicated is vendor specific.
• DSC (Device Seek Complete) indicates that the device heads are settled over a track. When an error
occurs, this bit shall not be changed until the Status Register is read by the host, at which time the bit
again indicates the current Seek Complete status.
• DRQ (Data Request) indicates that the device is ready to transfer a word or byte of data between the
host and the device.
• CORR (Corrected Data) is used to indicate a correctable data error. The definition of what constitutes a
correctable error is vendor specific. This condition does not terminate a data transfer.
• IDX (Index) is vendor specific.
• ERR (Error) indicates that an error occurred during execution of the previous command. The bits in the
Error register have additional information regarding the cause of the error. Once the device has set the
error bit, the device shall not change the contents of the following items until a new command has been
accepted, the SRST bit is set to one or RESET- is asserted:
the ERR bit in the status register
Error register
Cylinder High register
Cylinder Low register
Sector Count register
Sector Number register
Device/Head register.
• Power On Reset: the device executes a series of electrical circuitry diagnostics, spins up the HDA, tests
speed and other mechanical parametrics, and sets default values.
• Hardware Reset: the device executes a series of electrical circuitry diagnostics, and resets to default
values.
• Software Reset: the device resets the interface circuitry according to the Set Features requirement (See
8.24)
The power on reset, hardware reset, and software reset protocols are defined in 9.1 and 9.2.
An ATA device shall support at least one logical CHS translation mode known as the default translation
mode. The device shall enter this translation mode following a reset. A device may support other logical
translation modes and the host may use the INITIALIZE DEVICE PARAMETERS command to select the
default CHS mode or any of the other supported CHS modes. The default translation mode is described in
the Identify Device information. The current translation mode may also be described in the Identify Device
information.
A CHS address is made up of three fields: the sector address, the head number and the cylinder number.
Sectors are numbered from 1 to the maximum value allowed by the current CHS translation mode but can
not exceed 255. Heads are numbered from 0 to the maximum value allowed by the current CHS translation
21
X3T10/0948D Revision 4c
mode but can not exceed 15. Cylinders are numbered from 0 to the maximum value allowed by the current
CHS translation mode but cannot exceed 65,535.
When the host selects a CHS translation mode using the INITIALIZE DEVICE PARAMETERS command, the
host requests the number of sectors per logical track and the number of heads per logical cylinder. The
device then computes the number of logical cylinders available in requested mode.
Sequential access to logical sectors shall be accomplished by treating the sector number as the least
significant portion of the logical sector address, the head number as the middle portion of the logical sector
address and the cylinder number as the most significant portion of the logical sector address.
A device may support LBA addressing. A device that supports LBA addressing indicates this in the Identify
Device information. A host shall not attempt to use LBA addressing unless the device indicates the mode is
supported.
A device shall not change the addressing method and shall return status information utilizing the addressing
method specified for the command.
If a device supports LBA addressing mode, then the following shall be supported by the device:
a) The host may select either the currently selected CHS translation addressing or LBA addressing
on a command-by-command basis by using the L bit in the Device/Head register;
b) If LBA addressing is supported, then the device shall supported LBA addressing for all media
access commands, except for the FORMAT TRACK command. Implementation of LBA addressing
for the FORMAT TRACK command is vendor specific. The L bit of the Device/Head register shall be
ignored for commands that do not access the media;
c) Logical sectors on the device shall be linearly mapped with the first LBA addressed sector (sector
0) being the same sector as the first logical CHS addressed sector (cylinder 0, head 0, sector 1).
Irrespective of the logical CHS translation mode currently in effect, the LBA address of a given
logical sector does not change. The following is always true:
a) A standby timer;
b) Idle command;
c) Idle immediate command;
d) Sleep command;
e) Standby command;
f) Standby immediate command.
22
X3T10/0948D Revision 4c
The lowest power consumption when the device is powered on occurs in Sleep Mode. When in Sleep Mode,
the device requires a reset to be activated. The time to respond could be as long as 30 seconds.
In Standby Mode, the device interface is capable of accepting commands, but as the media may not be
immediately accessible, it could take the device as long as 30 seconds to respond.
In Idle Mode, the device is capable of responding immediately to media access requests. A device in Idle
Mode may take longer to complete the execution of a command because it may have to activate some
circuitry.
In Active mode, the device is capable of responding immediately to media access requests, and commands
complete execution in the shortest possible time. During the execution of a media access command a
device shall be in Active mode.
The Check Power Mode command allows a host to determine if a device is currently in, going to or leaving
Standby mode.
The Idle and Idle Immediate commands move a device to Idle mode immediately from the Active or Standby
modes. The Idle command also sets the Standby Timer count and enables or disables the Standby Timer.
The Sleep command moves a device to Sleep mode. The device's interface becomes inactive at the
completion of the Sleep command. A reset is required to move a device out of Sleep mode. When a device
exits Sleep mode it may enter Active, Idle or Standby mode. The mode selected by the device is based on
the type of reset received and on vendor specific implementation.
The Standby and Standby Immediate commands move a device to Standby mode immediately from the
Active or Idle modes. The Standby command also sets the Standby Timer count and enables or disables the
Standby Timer.
The Standby timer provides a method for the device to automatically enter Standby mode from either Active
or Idle mode following a host programmed period of inactivity. If the Standby timer is enabled and if the
device is in the Active or Idle mode, the device waits for the specified time period and if no command is
received, the device automatically enters the Standby mode.
If the Standby Timer is disabled, the device may not automatically enter Standby mode.
The transition to Idle mode is vendor specific, and may occur as a result of an IDLE or IDLE IMMEDIATE
command, or in vendor specific way.
7.3.5 Status
In the Active, Idle, and Standby modes, the device shall have DRDY bit of the Status register set and, if BSY
bit is not set, shall be ready to accept any command.
In Sleep mode, the device's interface is not active. A host shall not attempt to read the device's status or
issue commands to the device.
23
X3T10/0948D Revision 4c
Figure 5 shows the minimum set of mode transitions that shall be implemented.
1 Active 3
4 4
5
2
Idle Standby
3
5 Sleep 5
Resets 6 6
(see path 6)
The optional power commands permit the host to modify the behavior of the device in a manner which
reduces the power required to operate. These modes also affect the physical interface as defined in the
following table:
Ready is not a power condition. A device may post ready at the interface even though the media may not be
accessible.
24
X3T10/0948D Revision 4c
25
X3T10/0948D Revision 4c
State A
Ready
Unlocked
Door closed
Button off
MC active
1. Any command
MC status
State A: Following a media change, the device is ready, the media is not locked, the door is closed, the media change request
button is not active and a media change has been detected.
Path 1: The first command following a media change shall be rejected with the MC bit set in the Error register. The
device shall then be moved to state B and the MC condition cleared.
State B: In normal operation, the device is ready, the media is not locked, the door is closed, the media change request button is not
active and the MC bit is off.
Path 2: Activating the media change request button shall cause the device to complete any pending operations, spin
down the device, if needed, and move to state E, allowing media removal.
Path 3: A DOOR LOCK command shall lock the media and move the device to state C.
State C: In normal operation, the device is ready, the media is locked, the door is closed and the media change request button is not
active.
Path 4: A DOOR UNLOCK command shall unlock the media and move the device to state B.
Path 5: A DOOR LOCK command shall return good status.
Path 6: Pushing the media change button shall move the device to state D.
State D: The device is ready, the media is locked, the door is closed and the media change button is active.
Path 7: A DOOR LOCK command shall return MCR status.
Path 8: A DOOR UNLOCK command or a hard reset shall move the device to state E, allowing media removal.
State E: The device is not ready, the media is not locked and the door is open.
Path 9: A DOOR LOCK command shall return an ABRT error status.
Path 10: Closing the door shall move the device to state A (ready) and shall set the MC bit.
26
X3T10/0948D Revision 4c
27
X3T10/0948D Revision 4c
8. Command descriptions
Commands are issued to the device by loading the pertinent registers in the command block with the needed
parameters, and then writing the command code to the Command register.
Upon receipt of a command, the device sets the BSY bit or the DRQ bit within 400 ns. Following the setting
of BSY bit equal to one or equal to zero and DRQ bit equal to one, the status presented by the device
depends on the type of command: PIO data in, PIO data out, non-data transfer or DMA. See the individual
command descriptions and clause 9 for the protocol followed by each command and command type.
NOTE 15 - Some older host implementations may require the BSY bit being set to zero and the DRQ
bit equal to one in the Status register within 700 ns of receiving some PIO data out commands.
NOTE 16 - For the power mode related commands, it is recommended that the host utilize E0h
through E3h, E5h and E6h command values. While command values 94h through 99h command
values are valid, they should be considered obsolete and may be removed in future versions of this
standard.
In table 10, the “proto” column codes represent the command protocol used:
DM - A DMA command;
ND - A non data command;
PI - A PIO data in command;
PO - A PIO data out command;
VS - A Vendor specific command.
28
X3T10/0948D Revision 4c
29
X3T10/0948D Revision 4c
Each command description in the following clauses contains the following subclauses:
TYPE - Indicates if the command is mandatory, optional or vendor specific and, if the command is a member
of one or more feature sets, which feature sets it belongs to.
INPUTS - Describes the Command Block register data that the host shall supply.
NORMAL OUTPUTS - Describes the Command Block register data that shall be returned by the device at
the end of a command. The Status register shall always be valid and, if the ERR bit in the Status register is
set to one, then the Error register shall be valid.
ERROR OUTPUTS - Describes the Command Block register data that shall be returned by the device at the
end of a command which completes with an unrecoverable error.
PREREQUISITES - Any prerequisite commands or conditions that shall be met before the command can be
issued.
TYPE - Optional.
ERROR OUTPUTS - Vendor specific or if the device does not support this command, the device shall return
a Command Abort error.
DESCRIPTION - This command is reserved for use by removable media devices. The implementation of
this command is vendor specific.
TYPE - Optional.
30
X3T10/0948D Revision 4c
ERROR OUTPUTS - Vendor specific or if the device does not support this command, the device shall return
a Command Abort error.
DESCRIPTION - This command is reserved for use by removable media devices. The implementation of
this command is vendor specific.
OPCODE - DDh
TYPE - Optional.
ERROR OUTPUTS - Vendor specific or if the device does not support this command, the device shall return
a Command Abort error.
DESCRIPTION - This command is reserved for use by removable media devices. The implementation of
this command is vendor specific.
INPUTS - None.
NORMAL OUTPUTS - The Sector Count register is set to 0 (00h) if the device is going to, in or leaving
Standby mode. The Sector Count register is set to 255 (FFh) if the device is in Active or Idle mode.
ERROR OUTPUTS - Aborted Command if the device does not support the Power Management command
set.
PREREQUISITES - None.
DESCRIPTION - If the device is in, going to, or recovering from the Standby Mode the device shall set the
BSY bit, set the Sector Count register to 0 (00h), clear the BSY bit, and assert INTRQ.
If the device is in Active or Idle Mode, the device shall set the BSY bit, set the Sector Count register to 255
(FFh), clear the BSY bit, and assert INTRQ.
31
X3T10/0948D Revision 4c
TYPE - Optional
INPUTS - None.
ERROR OUTPUTS - If the device is not ready or is not capable of locking the media, the ABRT bit in the
Error register and the ERR bit in the Status register shall be returned.
If the device is already locked and the media change request button is active, then a Media Change
Requested status shall be returned by setting the MCR bit in the Error register and the ERR bit in the Status
register.
PREREQUISITES - None.
DESCRIPTION - This command either locks the device or media, or provides the status of the media change
request button.
If the device is not locked, the device shall be set to the locked state and good status returned.
If the device is locked, the status returned shall indicate the state of the media change request button. Good
status shall be returned while the media change request button is not active, and the MCR bit in the Error
register and the ERR bit in the Status register shall be returned when the media change request button is
active.
When a device is in a DOOR LOCKED state, the device shall not respond to the media change request
button, except by setting the MCR status, until the DOOR LOCKED condition is cleared. A DOOR LOCK
condition shall be cleared by a DOOR UNLOCK or MEDIA EJECT command, or by a hardware device reset.
TYPE - Optional
INPUTS - None.
ERROR OUTPUTS - If the device does not support this command or is not ready, then the ABRT bit shall
be returned in the Error register and the ERR bit shall be returned in the Status register.
PREREQUISITES - None.
DESCRIPTION - This command shall unlock the device, if it is locked, and shall allow the device to respond
to the media change request button.
32
X3T10/0948D Revision 4c
TYPE - Optional.
INPUTS - The head bits of the Device/Head register shall always be set to zero. The Cylinder High and Low
registers shall be set to zero. The Sector Number and Sector Count registers are used together as a 16-bit
sector count value. The Feature register specifies the subcommand code.
ERROR OUTPUTS - Aborted Command if the device does not support this command or did not accept the
microcode data.
PREREQUISITES - None.
DESCRIPTION - This command enables the host to alter the device’s microcode. The data transferred using
the DOWNLOAD MICROCODE command is vendor specific.
All transfers shall be an integer multiple of the sector size. The size of the data transfer is determined by the
contents of the Sector Number Register and the Sector Count register. The Sector Number Register shall be
used to extend the Sector Count register, to create a sixteen bit sector count value. The Sector Number
Register shall be the most significant eight bits and the Sector Count register shall be the least significant
eight bits. A value of zero in both the Sector Number Register and the Sector Count register shall indicate
no data is to be transferred. This allows transfer sizes from 0 bytes to 33 553 920 bytes, in 512 byte
increments.
The Features register shall be used to determine the effect of the DOWNLOAD MICROCODE command.
The values for the Feature Register are:
TYPE - Mandatory.
PROTOCOL - Non-data.
INPUTS - None, except that the device selection bit in the Device/Head register is ignored.
NORMAL OUTPUTS - The diagnostic code written into the Error register is an 8-bit code as shown in table
11, and not as defined in 6.2.8.
33
X3T10/0948D Revision 4c
The meaning of values other than 01h and 81h are vendor specific and should be considered a diagnostic
failed condition.
ERROR OUTPUTS - None. All error information is returned as a diagnostic code in the Error register.
PREREQUISITES - None.
DESCRIPTION - This command shall perform the internal diagnostic tests implemented by the device. See
also 6.2.8 and 6.2.12. The DEV bit in the Drive/Head register is ignored. Both devices, if present, shall
execute this command.
34
X3T10/0948D Revision 4c
f) Device 1 clears the BSY bit when ready to accept commands that do not require the DRDY bit to
be equal to one;
g) If Device 1 passed its diagnostics without error in step c), Device 1 asserts PDIAG-. If the
diagnostics failed, Device 1 does not assert PDIAG- and continues to the next step;
NOTE 19 - Device 1 shall clear the BSY bit and assert PDIAG- within 5 seconds of the time that the
EXECUTE DEVICE DIAGNOSTIC command is received.
h) Device 1 sets the DRDY bit when ready to accept any command.
NOTE 20 - Steps f), g) and h) may occur at the same time. While no maximum time is specified
for the DRDY bit to set to one, a host is advised to allow up to 2 minutes for the DRDY bit to be
equal to one. See figure 7.
__________________
BSY ___/ \______________________________
| | ___________
DRDY _________________________________________/
|<---------------------------------->|<--------------------------->|
Max for device 0 is 6 seconds. Minimum time is 0 seconds.
Max for device 1 is 5 seconds. No maximum time is specified.
ERROR OUTPUTS - Aborted Command if the device does not support this command. All other errors are
vendor specific.
TYPE - Mandatory
INPUTS - None.
PREREQUISITES - None.
35
X3T10/0948D Revision 4c
DESCRIPTION - The IDENTIFY DEVICE command enables the host to receive parameter information from
the device.
Some devices may have to read the media in order to complete this command.
When the command is issued, the device sets the BSY bit, prepares to transfer the 256 words of device
identification data to the host, sets the DRQ bit, clears the BSY bit, and generates an interrupt. The host can
then transfer the data by reading the Data register. The parameter words in the buffer have the arrangement
and meanings defined in Table 12. All reserved bits or words shall be zero.
The F/V column indicates if the word or part of a word has fixed (F) contents that do not change, variable (V)
contents that may change depending on the device state or the commands executed by the device, X for
words with vendor specific data which may be fixed or variable, and R for reserved words which shall be
zero. For removable media devices, the value of fields indicated as fixed (F) may change when media is
removed or changed.
Some parameters are defined as a group of bits. A word which is defined as a set of bits is transmitted with
indicated bits on the respective data bus bit (e.g., bit 15 appears on DD15).
Some parameters are defined as a sixteen bit value. A word which is defined as a sixteen bit value places
the most significant bit of the value on bit DD15 and the least significant bit on bit DD0.
Some parameters are defined as 32 bit values (e.g., words 57 and 58). Such fields are transferred using two
word transfers. The device shall first transfer the least significant bits, bits 15 through 0 of the value, on bits
DD15 through DD0 respectively. After the least significant bits have been transferred, the most significant
bits, bits 31 through 16 of the value, shall be transferred on DD15 through DD0 respectively.
Some parameters are defined as a string of ASCII characters. For the string “Copyright”, the character ‘C’ is
the first byte, ‘o’ is the 2nd byte, etc. When such fields are transferred, the order of transmission is:
the 1st character (‘C’) is on bits DD15 through DD8 of the first word
the 2nd character (‘o’) is on bits DD7 through DD0 of the first word
the 3rd character (‘p’) is on bits DD15 through DD8 of the second word
the 4th character (‘y’) is on bits DD7 through DD0 of the second word
etc.
36
X3T10/0948D Revision 4c
37
X3T10/0948D Revision 4c
If the device has been configured for eight bit transfers, then each word as defined in this table is transferred
as described in 3.2.5.
38
X3T10/0948D Revision 4c
The number of user-addressable logical heads per logical cylinder in the default translation mode.
The number of user-addressable logical sectors per logical track in the default translation mode.
If word 10 of this field is 0000h, then the serial number is not specified and the definition of the remaining
words of this field are vendor specific.
If word 10 of this field is not equal to 0000h, then this field contains the serial number of the device. The
contents of this field is an ASCII character string of twenty bytes. The device shall pad the character string
with spaces (20h), if necessary, to ensure that the string is the proper length.
7.15.12 Word 22: Number of vendor specific bytes on READ/WRITE LONG commands
The contents of this field specifies the number of vendor specific bytes that are appropriate for the device. If
the contents of this field are set to a value other than 4, the SET FEATURES command should be used to
switch the length of READ LONG and WRITE LONG commands from 512 plus 4 to 512 plus the value
specified in this word.
If word 23 of this field is 0000h, then the firmware revision is not specified and the definition of the remaining
words of this field are vendor specific.
If word 23 of this field is not equal to 0000h, then this field contains the firmware revision of the device. The
contents of this field is an ASCII character string of eight bytes. The device shall pad the character string
with spaces (20h), if necessary, to ensure that the string is the proper length.
If word 27 of this field is 0000h, then the model number is not specified and the definition of the remaining
words of this field are vendor specific.
If word 27 of this field is not equal to 0000h, then this field contains the model number of the device. The
contents of this field is an ASCII character string of forty bytes. The device shall pad the character string
with spaces (20h), if necessary, to ensure that the string is the proper length.
39
X3T10/0948D Revision 4c
Bits 7-0 of this word define the maximum number of sectors per block that the device supports for
READ/WRITE MULTIPLE commands. If a device supports the READ/WRITE MULTIPLE and SET
MULTIPLE MODE commands, these bits contain a non-zero value. If the device does not support the
READ/WRITE MULTIPLE and SET MULTIPLE MODE commands, these bits shall be zero.
Bit 13 of word 49 is used to determine whether a device utilizes the Standby Timer values defined in this
standard. If bit 13 is set to one, then the device utilizes the Standby Timer values as specified in table 13
(see 8.11). If bit 13 is set to zero, the timer values utilized are vendor specific.
Bit 11 of word 49 is used to help determine whether a device supports IORDY. If this bit is set to one, then
the device supports IORDY operation. If this bit is zero, the device may support IORDY. This insures
backward compatibility. If a device supports PIO Mode 3, then this bit shall be set.
Bit 10 of word 49 is used to indicate a device’s ability to enable or disable the use of IORDY. If this bit is set
to one, then the device supports the disabling of IORDY. Control of IORDY is accomplished using the SET
FEATURES command.
Bit 9 of word 49 is used to indicate if the device supports LBA mode addressing. If this bit is set, words 60-
61 shall be valid.
Bit 8 of word 49 is used to indicate if the device supports the READ/WRITE DMA commands.
The PIO transfer timing for each ATA device falls into categories which have unique parametric timing
specifications. To determine the proper device timing category, compare the Cycle Time specified in figure
10 with the contents of this field. The value returned in Bits 15-8 should fall into one of the mode 0 through
mode 2 categories specified in figure 10, and if it does not, then Mode 0 shall be used to serve as the default
timing.
NOTE 21 - For backwards compatibility with BIOSs written before Word 64 was defined for
advanced modes, a device reports in Word 51 the highest original PIO mode (i.e. PIO mode 0, 1, or
2) it can support.
40
X3T10/0948D Revision 4c
7.15.20 Word 52: Single Word DMA data transfer cycle timing mode
The DMA transfer timing for each ATA device falls into categories which have unique parametric timing
specifications. To determine the proper device timing category, compare the Cycle Time specified in figure
11 with the contents of this field. The value returned in Bits 15-8 should fall into one of the categories
specified in figure 11 (i.e. 0, 1, or 2), and if it does not, then Mode 0 shall be used to serve as the default
timing.
If bit 0 of word 53 is set, then the values reported in words 54 through 58 are valid. If this bit is cleared, the
values reported in words 54 through 58 may be valid. If bit 1 of word 53 is set, then the values reported in
words 64 through 70 are valid. If this bit is cleared, the values reported in words 64-70 are not valid. Any
device which supports PIO Mode 3 or above, or supports Multiword DMA Mode 1 or above, shall set bit 1 of
word 53 and support the fields contained in words 64 through 70.
NOTE 22 - For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command has not been
issued to the device then the value of this word is vendor specific.
The number of user-addressable logical heads per logical cylinder in the current translation mode.
NOTE 23 - For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command has not been
issued to the device then the value of this word is vendor specific.
7.15.24 Word 56: Number of current logical sectors per logical track
The number of user-addressable logical sectors per logical track in the current translation mode.
NOTE 24 - For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command has not been
issued to the device then the value of this word is vendor specific.
The current capacity in sectors excludes all sectors used for device-specific purposes. The value reported in
this field shall be the product of words 54, 55 and 56.
If bit 8 is set, then bits 7-0 reflect the number of sectors currently set to transfer on a READ/WRITE
MULTIPLE command. If word 47 bits 7-0 are zero then word 59 bits 8-0 shall also be zero.
If the device supports LBA Mode, these words reflect the total number of user addressable sectors. This
value does not depend on the current device geometry. If the device does not support LBA mode, these
words shall be set to 0.
41
X3T10/0948D Revision 4c
The low order byte identifies by bit all of the Modes which are supported e.g. if Mode 0 is supported, bit 0 is
set. The high order byte contains a single bit set to indicate which mode is active.
The low order byte identifies by bit all of the Modes which are supported e.g.; if Mode 0 is supported, bit 0 is
set. The high order byte contains a single bit set to indicate which mode is active.
Bits 7 through 0 of word 64 of the Identify Device parameter information is defined as the Advanced PIO
Data Transfer Supported Field. This field is bit significant. Any number of bits may be set in this field by the
device to indicate which Advanced PIO Modes are capable of supporting.
Of these bits, bits 7 through 2 are Reserved for future Advanced PIO Modes. Bit 0, if set, indicates that the
device supports PIO Mode 3. Bit 1, if set, indicates that the device supports PIO Mode 4.
NOTE 25 - For backwards compatibility with BIOSs written before Word 64 was defined for
advanced modes, a device reports in Word 51 the highest original PIO mode (i.e. PIO mode 0, 1, or
2) it can support.
7.15.31 Word 65: Minimum Multiword DMA Transfer Cycle Time Per Word
Word 65 of the parameter information of the IDENTIFY DEVICE command is defined as the Minimum
Multiword DMA Transfer Cycle Time Per Word. This field defines, in nanoseconds, the minimum cycle time
that the device can support when performing Multiword DMA transfers on a per word basis.
If this field is supported, bit 1 of word 53 shall be set. Any device which supports Multiword DMA Mode 1 or
above shall support this field, and the value in word 65 shall not be less than the minimum cycle time
reported by the fastest DMA mode supported by the device.
If bit 1 of word 53 is set because a device supports a field in Words 64-70 other than this field and the device
does not support this field, the device shall return a value of zero in this field.
Word 66 of the parameter information of the IDENTIFY DEVICE command is defined as the Manufacturer’s
Recommended Multiword DMA Transfer Cycle Time. This field defines, in nanoseconds, the minimum cycle
time per word during a single sector host transfer while performing a multiple sector READ DMA or WRITE
DMA commands over all locations on the media under nominal conditions. If a host runs at a faster cycle
rate by operating at a cycle time of less than this value, the device may negate DMARQ for flow control. The
rate at which DMARQ is negated could result in reduced throughput despite the faster cycled rate. Transfer
at this rate does not ensure that flow control will not be used, but implies that higher performance MAY result.
If this field is supported, bit 1 of word 53 shall be set. Any device which supports Multiword DMA Mode 1 or
above shall support this field, and the value in word 66 shall not be less than the value in word 65.
If bit 1 of word 53 is set because a device supports a field in Words 64-70 other than this field and the device
does not support this field, the device shall return a value of zero in this field.
42
X3T10/0948D Revision 4c
7.15.33 Word 67: Minimum PIO Transfer Cycle Time Without Flow Control
Word 67 of the parameter information of the IDENTIFY DEVICE command is defined as the Minimum PIO
Transfer Without Flow Control Cycle Time. This field defines, in nanoseconds, the minimum cycle time that,
if used by the host, the device guarantees data integrity during the transfer, without utilization of flow control.
Any device may support this field, and if this field is supported, Bit 1 of word 53 shall be set.
Any device which supports PIO Mode 3 or above shall support this field, and the value in word 67 shall not
be less than the value reported in word 68.
If bit 1 of word 53 is set because a device supports a field in Words 64-70 other than this field and the device
does not support this field, the device shall return a value of zero in this field.
7.15.34 Word 68: Minimum PIO Transfer Cycle Time With IORDY
Word 68 of the parameter information of the IDENTIFY DEVICE command is defined as the Minimum PIO
Transfer With IORDY Flow Control Cycle Time. This field defines, in nanoseconds, the minimum cycle time
that the device can support while performing data transfers while utilizing IORDY flow control.
Any device may support this field, and if this field is supported, Bit 1 of word 53 shall be set.
Any device which supports PIO Mode 3 or above shall support this field, and the value in word 68 shall not
be less than the fastest PIO mode reported by the device.
If bit 1 of word 53 is set because a device supports a field in Words 64-70 other than this field and the device
does not support this field, the device shall return a value of zero in this field.
43
X3T10/0948D Revision 4c
7.16 IDLE
OPCODE - 97h or E3h
INPUTS - The value in the Sector Count register when the IDLE command is issued shall determine the time
period programmed into the Standby Timer. See table 13.
ERROR OUTPUTS - Aborted Command - The device does not support the Power Management command
set.
PREREQUISITES - None.
DESCRIPTION - This command causes the device to set the BSY bit, enter the Idle Mode, clear the BSY bit,
and assert INTRQ. INTRQ is asserted even though the device may not have fully transitioned to Idle Mode.
If the Sector Count register is non-zero then the Standby Timer shall be enabled. The value in the Sector
Count register shall be used to determine the time programmed into the Standby Timer.
If the Sector Count register is zero then the Standby Timer is disabled.
INPUTS - None.
ERROR OUTPUTS - Aborted Command - The device does not support the Power Management command
set.
PREREQUISITES - None.
44
X3T10/0948D Revision 4c
DESCRIPTION - This command causes the device to set the BSY bit, enter the Idle Mode, clear the BSY bit,
and assert INTRQ. INTRQ is asserted even though the device may not have fully transitioned to Idle Mode.
TYPE - Mandatory.
PROTOCOL - Non-data.
INPUTS - The Sector Count register specifies the number of logical sectors per logical track, and the
Device/Head register which specifies the number of logical heads minus 1.
ERROR OUTPUTS - Aborted Command if the device does not support the requested CHS translation.
NOTE 26 - Previous ATA specifications were unclear about the error conditions that this command
may indicate. Some implementations do not indicate any errors for this command even when the
command fails. However, most of these implementations do fail media access commands if a valid
CHS translation is not in effect.
PREREQUISITES - None.
DESCRIPTION - This command enables the host to set the number of logical sectors per track and the
number of logical heads minus 1, per logical cylinder for the current CHS translation mode.
Upon receipt of the command, the device sets the BSY bit, saves the parameters, clears the BSY bit, and
generates an interrupt.
A device shall support the CHS translation described in words 1, 3 and 6 of the IDENTIFY DEVICE
information. Support of other CHS translations is optional.
If the requested CHS translation is not supported, the device shall set the Error bit in the Status register and
set the Aborted Command bit in the Error register before clearing the BSY bit in the Status register.
If the requested CHS translation is not supported, the device shall fail all media access commands with an ID
Not Found error until a valid CHS translation is established.
NOTE 27 - Host implementations should use the default CHS translation mode described in words 1,
3 and 6 of the IDENTIFY DEVICE information. Future ATA specifications may restrict the valid input
parameters for this command to these values.
NOTE 28 - Some ATA-1 devices require that this command be issued prior to media access.
45
X3T10/0948D Revision 4c
TYPE - Optional.
PROTOCOL - Non-data.
ERROR OUTPUTS - If the device does not support this command, the device shall return a Command Abort
error.
PREREQUISITES - None.
DESCRIPTION - This command completes any pending operations, spins down the device if needed,
unlocks the door or media if locked, and initiates a media eject, if required.
7.20 NOP
OPCODE - 00h
TYPE - Optional.
PROTOCOL - Non-data.
NORMAL OUTPUTS - The Command Block registers, other than the Error and Status registers, are not
changed by this command.
ERROR OUTPUTS - This command always fails with an Aborted Command error.
PREREQUISITES - None.
DESCRIPTION - This command enables a host which can only perform 16-bit register accesses, to check
device status. The device shall respond, as it does to an unrecognized command, by setting Aborted
Command in the Error register, Error in the Status register, clearing Busy in the Status register, and asserting
INTRQ.
NOTE 29 - When a 16-bit host writes to the Device/Head Register, one byte contains the Command
register, so the device sees a new command when the intended purpose is only to select a device.
Both devices may be Busy but not necessarily Ready, e.g.; Device 0 may be ready, but not device 1. To
check this possibility a typical sequence for an 8-bit host would be:
46
X3T10/0948D Revision 4c
As a 16-bit host executes b and d simultaneously, a problem occurs if the device being selected is Not
Ready at the time the command is issued.
TYPE - Optional.
PREREQUISITES - None.
NOTE 30 - A WRITE BUFFER command should immediately proceed a READ BUFFER command.
DESCRIPTION - The READ BUFFER command enables the host to read the current contents of the device’s
sector buffer. When this command is issued, the device sets the BSY bit, sets up the sector buffer for a read
operation, sets the DRQ bit, clears the BSY bit, and generates an interrupt. The host then reads the data
from the buffer.
The READ BUFFER and WRITE BUFFER commands shall be synchronized such that sequential WRITE
BUFFER and READ BUFFER commands access the same 512 bytes within the buffer.
TYPE - Optional.
PROTOCOL - DMA.
INPUTS - The Cylinder Low, Cylinder High, Device/Head and Sector Number registers specify the starting
sector address to be read. The Sector Count register specifies the number of sectors to be transferred.
ERROR OUTPUTS - Aborted Command if the command is not supported. An unrecoverable error
encountered during the execution of this command results in the termination of the command and the
Command Block registers contain the sector address of the sector where the first unrecoverable error
occurred.
DESCRIPTION - This command executes in a similar manner to the READ SECTOR(S) command except
for the following:
• the host initializes the DMA channel prior to issuing the command
• data transfers are qualified by DMARQ and are performed by the DMA channel
47
X3T10/0948D Revision 4c
• the device issues only one interrupt per command to indicate that data transfer has terminated
and status is available.
During the DMA transfer phase of a Read DMA command, the device shall provide status of the BSY bit or
the DRQ bit until the command is completed.
The with retries and without retries versions of this command differ in operation only in the level of error
recovery performed by the device. The level of error recovery performed by the device for either command
is vendor specific.
TYPE - Optional.
INPUTS - The Cylinder Low, Cylinder High, Device/Head and Sector Number specify the starting sector
address to be read. The Sector Count register shall not specify a value other than 1.
ERROR OUTPUTS - Aborted Command if the command is not supported. An unrecoverable error
encountered during the execution of this command results in the termination of the command and the
Command Block registers contain the sector address of the sector where the first unrecoverable error
occurred.
PREREQUISITES - The SET FEATURES subcommand to enable more than 4 vendor specific bytes shall be
executed prior to the READ LONG command if other than 4 vendor specific bytes are to be transferred.
DESCRIPTION - The READ LONG command performs similarly to the READ SECTOR(S) command except
that it returns the data and a number of vendor specific bytes appended to the data field of the desired
sector. During a READ LONG command, the device does not check to determine if there has been a data
error. Only single sector READ LONG operations are supported.
The transfer of the vendor specific bytes shall be one byte at a time over bits DD0-7 only (8-bits wide).
The “with retries” and “without retries” versions of this command differ in operation only in the level of error
recovery performed by the device. The level of error recovery performed by the device for either command
is vendor specific.
NOTE 31 - Some ATA-1 devices are not capable of delivering the 8 bit ECC immediately after the
word sector data. BIOS and driver developers should use PIO mode 0 for 8 bit ECC accesses.
TYPE - Optional.
INPUTS - The Cylinder Low, Cylinder High, Device/Head and Sector Number specify the starting sector
address to be read. The Sector Count register specifies the number of sectors to be transferred.
48
X3T10/0948D Revision 4c
ERROR OUTPUTS - Aborted Command if the command is not supported. An unrecoverable error
encountered during the execution of this command results in the termination of the command and the
Command Block registers contain the sector address of the sector where the first unrecoverable error
occurred.
PREREQUISITES - A successful SET MULTIPLE MODE command shall precede a READ MULTIPLE
command.
DESCRIPTION - The READ MULTIPLE command performs similarly to the READ SECTOR(S) command.
Interrupts are not generated on every sector, but on the transfer of a block which contains the number of
sectors defined by a SET MULTIPLE MODE command. Command execution is identical to the READ
SECTOR(S) operation except that the number of sectors defined by a SET MULTIPLE MODE command are
transferred without intervening interrupts. The DRQ bit qualification of the transfer is required only at the
start of the data block, not on each sector.
The block count of sectors to be transferred without intervening interrupts is programmed by the SET
MULTIPLE MODE command, which shall be executed prior to the READ MULTIPLE command. When the
READ MULTIPLE command is issued, the Sector Count register contains the number of sectors (not the
number of blocks or the block count) requested.
If the number of requested sectors is not evenly divisible by the block count, as many full blocks as possible
are transferred, followed by a final, partial block transfer. The partial block transfer shall be for n sectors,
where n = remainder (SECTOR COUNT / block count).
If the READ MULTIPLE command is attempted before the SET MULTIPLE MODE command has been
executed or when READ MULTIPLE commands are disabled, the READ MULTIPLE operation shall be
rejected with an Aborted Command error.
Device errors encountered during READ MULTIPLE commands are posted at the beginning of the block or
partial block transfer, but the DRQ bit is still set and the data transfer shall take place as it normally would,
including transfer of corrupted data, if any.
The contents of the Command Block Registers following the transfer of a data block which had a sector in
error are undefined. The host should retry the transfer as individual requests to obtain valid error
information.
Subsequent blocks or partial blocks are transferred only if the error was a correctable data error. All other
errors cause the command to stop after transfer of the block which contained the error. Interrupts are
generated when the DRQ bit is set at the beginning of each block or partial block.
TYPE - Mandatory.
INPUTS - The Cylinder Low, Cylinder High, Device/Head and Sector Number specify the starting sector
address to be read. The Sector Count register specifies the number of sectors to be transferred.
49
X3T10/0948D Revision 4c
ERROR OUTPUTS - Aborted Command if the command is not supported. An unrecoverable error
encountered during the execution of this command results in the termination of the command and the
Command Block registers contain the sector address of the sector where the first unrecoverable error
occurred.
PREREQUISITES - None.
DESCRIPTION - This command reads from 1 to 256 sectors as specified in the Sector Count register. A
SECTOR COUNT of 0 requests 256 sectors. The transfer begins at the sector specified in the Sector
Number register.
The DRQ bit is always set prior to data transfer regardless of the presence or absence of an error condition.
The with retries and without retries versions of this command differ in operation only in the level of error
recovery performed by the device. The level of error recovery performed by the device for either command
is vendor specific.
TYPE - Mandatory.
PROTOCOL - Non-data.
INPUTS - The Cylinder Low, Cylinder High, Device/Head and Sector Number specify the starting sector
address to be verified. The Sector Count register specifies the number of sectors to be verified.
ERROR OUTPUTS - Aborted Command if the command is not supported. An unrecoverable error
encountered during the execution of this command results in the termination of the command and the
Command Block registers contain the sector address of the sector where the first unrecoverable error
occurred.
PREREQUISITES - None.
DESCRIPTION - This command is identical to the READ SECTOR(S) command, except that the DRQ bit is
never set, and no data is transferred to the host.
When the requested sectors have been verified, the device clears the BSY bit and generates an interrupt.
The with retries and without retries versions of this command differ in operation only in the level of error
recovery performed by the device. The level of error recovery performed by the device for either command
is vendor specific.
7.27 RECALIBRATE
OPCODE - 10h through 1Fh
TYPE - Optional.
PROTOCOL - Non-data.
50
X3T10/0948D Revision 4c
INPUTS - None.
NORMAL OUTPUTS - If the command is executed in CHS addressing mode, Cylinder High, Cylinder Low
and the head portion of Device/Head shall be zero. The Sector Number register shall be 1. If the command
is executed in LBA addressing mode, the Cylinder High, Cylinder Low, the head portion of the Device/Head
and the Sector Number register shall be zero.
ERROR OUTPUTS - If the device cannot reach cylinder 0, a Track 0 Not Found error is posted.
PREREQUISITES - None.
7.28 SEEK
OPCODE - 70h through 7Fh
TYPE - Mandatory.
PROTOCOL - Non-data.
INPUTS - The Cylinder High, Cylinder Low, head portion of the Device/Head register and the Sector Number
register contain the sector address to which the device should move the read/write heads.
ERROR OUTPUTS - Aborted Command if the command is not supported. An unrecoverable error
encountered during the execution of this command results in the termination of the command and the
Command Block registers contain the sector address of the sector where the first unrecoverable error
occurred.
PREREQUISITES - None.
PROTOCOL - Non-data.
INPUTS - The Feature register contains a subcommand code as described in table 14. Some subcommands
use other registers, such as the Sector Count register to pass additional information to the device.
ERROR OUTPUTS - If the device does not support the command or if any input value is not supported or is
invalid, the device posts an Aborted Command error.
PREREQUISITES - None.
DESCRIPTION - This command is used by the host to establish the following parameters which affect the
execution of certain device features as shown in table 14.
51
X3T10/0948D Revision 4c
All values not contained in table 14 are reserved for future definition.
At power on, or after a hardware reset, the default setting of the functions specified by the subcommands are
vendor specific.
A setting of 66h allows settings of greater than 80h which may have been modified since power on to remain
at the same setting after a software reset.
A host can choose the transfer mechanism by Set Transfer Mode and specifying a value in the Sector Count
register. The upper 5 bits define the type of transfer and the low order 3 bits encode the mode value.
Where “nnn” is a valid mode number in binary and “x” is the mode number in decimal for the associated
transfer type.
NOTE: 32 - It is intended that the reserved values be used for future specification of an alternative
flow control mechanism.
If a device supports this specification, and receives a SET FEATURES command with a Set Transfer Mode
parameter and a Sector Count register value of “00000 000”, it shall set its default PIO transfer mode. If the
value is “00000 001” and the device supports disabling of IORDY, then the device shall set its default PIO
transfer mode and disable IORDY.
See vendor specification for the default mode of the commands which are vendor specific.
52
X3T10/0948D Revision 4c
Devices reporting support for Multi Word DMA Transfer Mode 1 shall also support Multi Word DMA Transfer
Mode 0. Support of IORDY is mandatory when PIO Mode 3 or above is the current mode of operation.
TYPE - Optional.
PROTOCOL - Non-data.
INPUTS - The Sector Count register contains number of sectors per block to use on all following
READ/WRITE MULTIPLE commands.
ERROR OUTPUTS - If the device does not support the READ/WRITE MULTIPLE and SET MULTIPLE
MODE commands or if a block count is not supported, a Aborted Command error is posted, and READ
MULTIPLE and WRITE MULTIPLE commands are disabled.
PREREQUISITES - None.
DESCRIPTION - This command enables the device to perform READ AND WRITE MULTIPLE operations
and establishes the block count for these commands.
Devices shall support the block size specified in the IDENTIFY DRIVE parameter word 47, bits 7 through 0,
and may also support smaller values.
Upon receipt of the command, the device sets the BSY bit equal to one and checks the Sector Count
register. If the Sector Count register contains a valid value and the block count is supported, the value is
used for all subsequent READ MULTIPLE and WRITE MULTIPLE commands and their execution is enabled.
If the Sector Count register contains 0 when the command is issued, READ AND WRITE MULTIPLE
commands are disabled.
At power on, or after a hardware reset, the default mode is READ AND WRITE MULTIPLE disabled.
Following a software reset, the READ and WRITE MULTIPLE commands may be enabled or disabled. The
SET FEATURES command Disable Reverting To Power on Defaults and Enable Reverting To Power on
Defaults subcommands, if supported, can be used to control the results of a software reset.
7.31 SLEEP
OPCODE - 99h or E6h
INPUTS - None.
ERROR OUTPUTS - Aborted Command - The device does not support the Power Management command
set.
53
X3T10/0948D Revision 4c
PREREQUISITES - None.
DESCRIPTION - This command is the only way to cause the device to enter Sleep Mode.
This command causes the device to set the BSY bit, prepare to enter Sleep mode, clear the BSY bit and
assert INTRQ. The host shall read the Status register in order to clear the interrupt and allow the device to
enter Sleep mode. In Sleep mode the interface becomes inactive without affecting the operation of the ATA
interface. The host shall not attempt to access the Command Block registers while the device is in Sleep
mode.
Because some host systems may not read the Status register and clear the interrupt, a device may
automatically deassert INTRQ and enter Sleep mode after a vendor specified time period of not less than 2
seconds.
The only way to recover from Sleep Mode is with a software reset or a hardware reset.
A device shall not power on in Sleep Mode nor remain in Sleep Mode following a reset sequence.
7.32 STANDBY
OPCODE - 96h or E2h
INPUTS - The value in the Sector Count register when the STANDBY command is issued shall
determine the time period programmed into the Standby Timer. See table 13, 8.11.
ERROR OUTPUTS - Aborted Command if the device does not support the Power
Management command set.
PREREQUISITES - None.
DESCRIPTION - This command causes the device to set the BSY bit, enter the Standby Mode, clear the
BSY bit, and assert INTRQ. INTRQ is asserted even though the device may not have fully transitioned to
Standby Mode.
If the Sector Count register is non-zero then the Standby Timer shall be enabled. The value in the Sector
Count register shall be used to determine the time programmed into the Standby Timer.
If the Sector Count register is zero then the Standby Timer is disabled.
INPUTS - None.
54
X3T10/0948D Revision 4c
ERROR OUTPUTS - Aborted Command - The device does not support the Power Management command
set.
PREREQUISITES - None.
DESCRIPTION - This command causes the device to set the BSY bit, enter the Standby Mode, clear the
BSY bit, and assert INTRQ. INTRQ is asserted even though the device may not have fully transitioned to
Standby Mode.
TYPE - Optional.
INPUTS - None.
PREREQUISITES - None.
DESCRIPTION - This command enables the host to overwrite the contents of one sector in the device’s
buffer. When this command is issued, the device sets the BSY bit, sets up the buffer for a write operation,
sets the DRQ bit, clears the BSY bit, and waits for the host to write the data. Once the host has written the
data, the device sets the BSY bit, clears the BSY bit, and generates an interrupt.
The READ BUFFER and WRITE BUFFER commands shall be synchronized within the device such that
sequential WRITE BUFFER and READ BUFFER commands access the same 512 bytes within the buffer.
TYPE - Optional.
PROTOCOL - DMA.
INPUTS - The Cylinder Low, Cylinder High, Device/Head and Sector Number specify the starting sector
address to be written. The Sector Count register specifies the number of sectors to be transferred.
ERROR OUTPUTS - Aborted Command if the command is not supported. An unrecoverable error
encountered during the execution of this command results in the termination of the command and the
Command Block registers contain the sector address of the sector where the first unrecoverable error
occurred.
55
X3T10/0948D Revision 4c
DESCRIPTION - This command executes in a similar manner to WRITE SECTOR(S) except for the
following:
• the host initializes the DMA channel prior to issuing the command;
• data transfers are qualified by DMARQ and are performed by the DMA channel;
• the device issues only one interrupt per command to indicate that data transfer has terminated and
status is available.
During the execution of a Write DMA command, the device shall provide status of the BSY bit or the DRQ bit
until the command is completed.
The “with retries” and “without retries” versions of this command differ in operation only in the level of error
recovery performed by the device. The level of error recovery performed by the device for either command
is vendor specific.
TYPE - Optional.
INPUTS - The Cylinder Low, Cylinder High, Device/Head and Sector Number specify the starting sector
address to be written. The Sector Count register shall not specify a value other than 1.
ERROR OUTPUTS - Aborted Command if the command is not supported. An unrecoverable error
encountered during the execution of this command results in the termination of the command and the
Command Block registers contain the sector address of the sector where the first unrecoverable error
occurred.
PREREQUISITES - The SET FEATURES subcommand to enable other than 4 vendor specific bytes shall be
executed prior to the WRITE LONG command if other than 4 vendor specific bytes are to be transferred.
DESCRIPTION - This command is similar to the WRITE SECTOR(S) command except that it writes the data
and the vendor specific bytes as supplied by the host; the device does not generate the vendor specific bytes
itself. Only single sector WRITE LONG operations are supported.
The transfer of the vendor specific bytes shall be one byte at a time over bits DD0-7 only (8-bits wide).
The “with retries” and “without retries” versions of this command differ in operation only in the level of error
recovery performed by the device. The level of error recovery performed by the device for either command
is vendor specific.
TYPE - Optional.
56
X3T10/0948D Revision 4c
INPUTS - The Cylinder Low, Cylinder High, Device/Head and Sector Number specify the starting sector
address to be written. The Sector Count register specifies the number of sectors to be transferred.
ERROR OUTPUTS - Aborted Command if the command is not supported. An unrecoverable error
encountered during the execution of this command results in the termination of the command and the
Command Block registers contain the sector address of the sector where the first unrecoverable error
occurred.
PREREQUISITES - A successful SET MULTIPLE MODE command shall proceed a WRITE MULTIPLE
command.
DESCRIPTION - This command is similar to the WRITE SECTOR(S) command. interrupts are not generated
on every sector, but on the transfer of a block that contains the number of sectors defined by SET
MULTIPLE MODE.
Command execution is identical to the WRITE SECTOR(S) operation except that the number of sectors
defined by the SET MULTIPLE MODE command are transferred without intervening interrupts. The DRQ bit
qualification of the transfer is required only at the start of the data block, not on each sector.
The block count of sectors to be transferred without intervening interrupts is programmed by the SET
MULTIPLE MODE command, which shall be executed prior to the WRITE MULTIPLE command.
When the WRITE MULTIPLE command is issued, the Sector Count register contains the number of sectors
(not the number of blocks or the block count) requested.
If the number of requested sectors is not evenly divisible by the block count, as many full blocks as possible
are transferred, followed by a final, partial block transfer. The partial block transfer is for n sectors, where n
= Remainder (SECTOR COUNT / block count).
If the WRITE MULTIPLE command is attempted before the SET MULTIPLE MODE command has been
executed or when WRITE MULTIPLE commands are disabled, the Write Multiple operation shall be rejected
with an Aborted Command error.
Device errors encountered during WRITE MULTIPLE commands are posted after the attempted device write
of the block or partial block transferred. The Write command ends with the sector in error, even if it was in
the middle of a block. Subsequent blocks are not transferred in the event of an error.
The contents of the Command Block Registers following the transfer of a data block which had a sector in
error are undefined. The host should retry the transfer as individual requests to obtain valid error
information. Interrupts are generated when the DRQ bit is set at the beginning of each block or partial block.
TYPE - Optional.
INPUTS - The Feature register contains a subcommand code, either 22H or DDH. If the Feature register
contains 22H, the Cylinder Low, Cylinder High, Device/Head and Sector Number specify the starting sector
address to be written. The Sector Count register specifies the number of sectors to be written (not the
57
X3T10/0948D Revision 4c
number of sectors transferred by the host). If the Feature register contains code DDH, the Cylinder High,
Cylinder Low, head portion of the Device/Head, Sector Number and Sector Count registers are not used.
ERROR OUTPUTS - Aborted Command, if the command is not supported. An unrecoverable error
encountered during the execution of this command results in the termination of the command and the
Command Block registers contain the sector address of the sector where the first unrecoverable error
occurred.
NORMAL OUTPUTS - If no error, the Cylinder Low, Cylinder High, Device/Head and Sector Number
registers specify the address of the last sector written. If the command ends with an error, these registers
contain the address of the sector where the first error was detected and the Sector Count register contains
the number of sectors remaining to be transferred in order to complete the original request.
ERROR OUTPUTS - If the Feature register contains a value other than 22H or DDH, the command shall be
rejected with an aborted command error. Other errors possible are Bad Block, Uncorrectable Data Error, ID
Not Found and Address Mark Not Found.
PREREQUISITES - None.
DESCRIPTION - This command executes in a similar manner to WRITE SECTOR(S) except that only one
sector of data is transferred. The contents of the sector are written to the media one or more times.
NOTE 33 - The WRITE SAME command allows for initialization of part or all of the medium to the
specified data with a single command.
If the Features register is 22H, the device shall write that part of the medium specified by the Sector Number
and sector address registers.
The support of the Features register value of DDH is optional. If the Features register contains DDH and is
supported, the device shall initialize all the user accessible media.
The device issues an interrupt to indicate that the command is complete. Any error encountered during
execution results in the termination of the write operation.
TYPE - Mandatory.
INPUTS - The Cylinder Low, Cylinder High, Device/Head and Sector Number specify the starting sector
address to be written. The Sector Count register specifies the number of sectors to be transferred.
ERROR OUTPUTS - Aborted Command if the command is not supported. An unrecoverable error
encountered during the execution of this command results in the termination of the command and the
Command Block registers contain the sector address of the sector where the first unrecoverable error
occurred.
58
X3T10/0948D Revision 4c
PREREQUISITES - None.
DESCRIPTION - This command writes from 1 to 256 sectors as specified in the Sector Count register. A
SECTOR COUNT of 0 requests 256 sectors.
The “with retries” and “without retries” versions of this command differ in operation only in the level of error
recovery performed by the device. The level of error recovery performed by the device for either command
is vendor specific.
TYPE - Optional.
INPUTS - The Cylinder Low, Cylinder High, Device/Head and Sector Number specify the starting sector
address to be written. The Sector Count register specifies the number of sectors to be transferred.
ERROR OUTPUTS - Aborted Command if the command is not supported. An unrecoverable error
encountered during the execution of this command results in the termination of the command and the
Command Block registers contain the sector address of the sector where the first unrecoverable error
occurred.
PREREQUISITES - None.
DESCRIPTION - This command is similar to the WRITE SECTOR(S) command, except that each sector is
verified from the media after being written and before the command is completed.
8. Protocol
Commands can be grouped into different classes according to the protocols followed for command
execution. The command classes with their associated protocols are defined below.
For all commands, the host first checks if the BSY bit is equal to one, and should proceed no further unless
and until the BSY bit is equal to zero. For most commands, the host shall also wait for the DRDY bit to be
equal to one before proceeding. The commands shown with DRDY=x can be executed when the DRDY bit is
equal to zero.
Data transfers may be accomplished in more ways than are described below, but these sequences should
work with all known implementations of ATA devices.
A device shall maintain either the BSY bit equal to one or the DRQ bit equal to one at all times until the
command is completed. The INTRQ signal is used by the device to signal most, but not all, times when the
BSY bit is changed from 1 to 0 during command execution.
A command shall only be interrupted with a hardware or software reset. The result of writing to the
Command register while the BSY bit is equal to one or the DRQ bit is equal to one is unpredictable and may
result in data corruption. A command should only be interrupted by a reset at times when the host thinks
there may be a problem, such as a device that is no longer responding. Host programmers are warned
59
X3T10/0948D Revision 4c
against setting unrealistically short command timeout periods since this may impact a device's ability to
perform device level retry and data recovery activities.
a) DASP- is asserted by Device 1 and received by Device 0 at power-on or hardware reset to indicate the
presence of Device 1. At all other times it is asserted by Device 0 or Device 1 to indicate when a device
is active;
b) PDIAG- is asserted by Device 1 and detected by Device 0. It is used by Device 1 to indicate to Device 0
that it has completed diagnostics without error and is ready to accept commands from the Host (BSY bit
is cleared). This does not indicate that the device is ready, only that it can accept commands.
NOTE 34 - Steps i) and j) may occur at the same time. While no maximum time is specified for the
DRDY bit to be set to 1, a host should allow up to 2 minutes for the DRDY bit to become 1. See
figure 8.
60
X3T10/0948D Revision 4c
i) Device 1 clears the BSY bit when ready to accept commands that do not require the DRDY bit to be equal
to 1;
j) If Device 1 passed its diagnostics without error in step f), Device 1 asserts PDIAG-. If the diagnostics
failed, Device 1 does not assert PDIAG- and continues to the next step. Device 1 shall clear the BSY bit,
and optionally assert PDIAG-, no later than 30 seconds from the time RESET- is negated. The device
shall set the Sector Count register to 01h, the Sector Number register to 01h, the Cylinder Low register to
00h, the Cylinder High register to 00h, and the Device/Head register to 00h;
k) Device 1 sets the DRDY bit when ready to accept any command;
NOTE 35 - Steps i), j) and k) may occur at the same time. While no maximum time is specified for
the DRDY bit to be set to 1, a host should allow up to 2 minutes for the DRDY bit to become 1.
See figure 8.
l) Device 1 negates DASP- after the first command is received or negates DASP- if no command is received
within 31 seconds after RESET- is asserted.
__
RESET- ____/ \_________________________________________
______________________
BSY ____/ \____________________
___
DRDY ____________________________________________/
|<-------------------->|<-------------->|
Max for device 0 Minimum time is
is 31 seconds. 0 seconds.
Max for device 1 No maximum time
is 30 seconds. is specified.
Figure 8 - BSY and DRDY timing for power on and hardware resets
61
X3T10/0948D Revision 4c
i) Device 0 sets the DRDY bit when ready to accept any command.
NOTE 35 - Steps h) and i) may occur at the same time. While no maximum time is specified for the
DRDY bit to become equal to 1 to occur, a host should allow up to 2 minutes for the DRDY bit to be
set to 1. See figure 9.
NOTE 38 - Steps h), i) and j) may occur at the same time. While no maximum time is specified for
the DRDY bit to be set to 1, a host should allow up to 2 minutes for the DRDY bit to become 1. See
figure 9.
__
SRST ___/ \__________________________________________
_____________________
BSY ___/ \________________________
_____
DRDY ____________________________________________/
|<--------------->|<---------------->|
Max for device 0 Minimum time is
is 31 seconds. 0 seconds.
Max for device 1 No maximum time
is 30 seconds. is specified.
* IDENTIFY DEVICE
* READ BUFFER
* READ LONG (with and without retry)
* READ SECTOR(S) (with and without retry)
* READ MULTIPLE
Execution of this class of command includes the transfer of one or more blocks of data from the device to
the host. The following steps describe the processing of a PIO data in command. This description does not
include all possible error conditions.
62
X3T10/0948D Revision 4c
a) The host reads the Status or Alternate Status register until BSY bit to become equal to 0;
b) The host writes the Device/Head register with the appropriate DEV bit value;
c) The host reads the Status or Alternate Status register until the BSY bit is equal to 0 and the DRDY bit is
equal to 1;
d) The host writes any required command parameters to the Features, Sector Count, Sector Number,
Cylinder High, Cylinder Low and Device/Head registers;
f) The device sets the BSY bit and prepares to execute the command including preparation to transfer the
first block of data to the host;
g) When the block of data is available, the device sets the DRQ bit (setting the DRQ bit is optional if an error
condition exists). If there is an error condition, the device sets the appropriate status and error bits as
required by that error condition. Finally, the device clears the BSY bit and then asserts INTRQ;
NOTE 39 - There may be times when the BSY bit is set in step f) and then cleared in step g) so
quickly, that the host may not be able to detect that the BSY bit had been set.
h) After detecting either BSY bit is equal to 0 by polling the Alternate Status register or INTRQ, the host
reads and saves the contents of the Status register;
i) If the DRQ bit is set, the host transfers a block of data by reading the Data register. If any error conditions
are present in the status read in step h), the data transfer may not be valid;
j) In response to the Status register being read, the device negates INTRQ. In response to the complete data
block being read, one of the following actions is taken:
- If no error status was presented to the host in step h) and if transfer of another block is required, the
device sets the BSY bit and the above sequence is repeated from step g).
- If an error status was present in the Status read in step h), the device clears the DRQ bit and the
command execution is complete.
- If the last block was transferred, the device clears the DRQ bit and the command execution is
complete.
63
X3T10/0948D Revision 4c
BSY=1 BSY=1
+--<---+ +--<---+
| | BSY=0 | | BSY=0 BSY=1
start ---+-> a -+-------> b -+-> c -+-------> d ---> e,f ------+
|
|
+--------------------------------------------------------------+
|
| DRQ=0
| +-->---------+
| | |
| BSY=1 BSY=0, assert INTRQ | DRQ=1 |
+---+------> g ---------------------> h -+-->----> i -+-> j ---+
| |
| no error and another block, BSY=1 |
+------------------<---------------------------------------+
|
error or no more blocks, BSY=0 |
+---------------------------<----------------------------------+
|
+---> end
64
X3T10/0948D Revision 4c
* DOWNLOAD MICROCODE
* FORMAT TRACK
* WRITE BUFFER
* WRITE LONG (with and without retry)
* WRITE MULTIPLE
* WRITE SAME
* WRITE SECTOR(S) (with and without retry)
* WRITE VERIFY
Execution of this class of command includes the transfer of one or more blocks of data from the host to the
device. The following steps describe the processing of a PIO data out command. This description does not
include all possible error conditions.
a) The host reads the Status or Alternate Status register until BSY bit is equal to 0;
b) The host writes the Device/Head register with the appropriate DEV bit value;
c) The host reads the Status or Alternate Status register until BSY bit is equal to 0 and the DRDY bit is equal
to 1;
d) The host writes any required command parameters to the Features, Sector Count, Sector Number,
Cylinder High, Cylinder Low and Device/Head registers;
f) The device sets the BSY bit and prepares to execute the command including preparation to receive the
first block of data from the host;
g) When ready to receive the first block of data from the host, the device sets the DRQ bit (setting the DRQ
bit is optional if an error condition exists) and any other status or error bits as required and clears the BSY
bit;
NOTE 40 - There may be times when the BSY bit is set in step f) and then cleared in step g) so
quickly, that the host may not be able to detect that the BSY bit had been set.
h) The host reads the Status or Alternate Status register until BSY bit is equal to 0;
i) If the DRQ bit is set, the host transfers a complete block of data to the device by writing the Data register;
- If any error status was present in the status read in step h), the device clears the DRQ bit, asserts
INTRQ and the command execution is complete. The data transferred in step i) is not processed by
the device.
- If no error status was presented to the host in step h), the device sets the BSY bit and processing
continues with the next step;
65
X3T10/0948D Revision 4c
k) The device processes the data block just received from the host. When this processing is completed, one
of the following actions is taken:
- If no error occurred while processing the data block and if no additional blocks are to be transferred,
the device clears the BSY bit and then asserts INTRQ. Command execution is complete;
- If an error occurred while processing the data block the device sets the appropriate status and error
bits as required by that error condition. The device clears the BSY bit and then asserts INTRQ.
Command execution is complete;
- If no error occurred while processing the data block and if transfer of another block is required,
processing continues with the next step;
l) When ready to receive the next data block from the host, the device sets the DRQ bit, clears the BSY bit
and then asserts INTRQ;
m) After detecting either the BSY bit is equal to 0 by polling the Alternate Status register or INTRQ, the host
reads the contents of the Status register;
n) The host transfers a complete block of data to the device by writing the Data register;
o) The device sets the BSY bit and processing continues at step k).
The following diagrams the PIO data out steps:
66
X3T10/0948D Revision 4c
BSY=1 BSY=1
+--<---+ +--<---+
| | BSY=0 | | BSY=0 BSY=1
start ---+-> a -+-------> b -+-> c -+-------> d ---> e,f ------+
|
|
+--------------------------------------------------------------+
|
| DRQ=0
| +-->---------+
| | |
| BSY=0 | DRQ=1 |
+---> g -------> h -+-->----> i -+-> j ---+
|
|
+-----------------------------------------+
|
| error, DRQ=0, assert INTRQ
+--->-------------------------> end
|
|
| +------------<-------------------------+
| no error, BSY=1 | |
+--->---------------+-> k ---+ |
| |
| |
+----------------------------+ |
| |
| no error and no more blocks, BSY=0, assert INTRQ |
+--->----------------------------------------------> end |
| |
| error, BSY=0, assert INTRQ |
+--->-------------------------> end |
| |
| no error and more blocks, BSY=1 |
+--->-----------------------------+ |
| |
| |
+---------------------------------+ |
| |
| BSY=0/DRQ=1, assert INTRQ BSY=1 |
+---> l ---------------------------> m ---> n -------------+
Figure 11 - PIO data out
67
X3T10/0948D Revision 4c
Execution of these commands involves no data transfer. The following steps describe the processing of a no
data transfer command. This description does not include all possible error conditions. See the EXECUTE
DEVICE DIAGNOSTICS command description in 8.8, the NOP command description in 8.15 and the SLEEP
command description in 8.26 for additional protocol requirements.
a) The host reads the Status or Alternate Status register until the BSY bit is equal to 0;
b) The host writes the Device/Head register with the appropriate DEV bit value;
c) The host reads the Status or Alternate Status register until the BSY bit is equal to 0 and the DRDY bit is
equal to 1;
d) The host writes any required command parameters to the Features, Sector Count, Sector Number,
Cylinder High, Cylinder Low and Device/Head registers;
f) The device sets the BSY bit and executes the command. If any error occurs while processing the
command, the device set the appropriate status and error bits as required by the error condition;
g) When command processing is completed, the device clears the BSY bit and then asserts INTRQ.
Command processing is complete.
68
X3T10/0948D Revision 4c
BSY=1 BSY=1
+--<---+ +--<---+
| | BSY=0 | | BSY=0 BSY=1
start ---+-> a -+-------> b -+-> c -+-------> d ---> e,f ------+
|
|
+--------------------------------------------------------------+
|
| BSY=0
+---> g -------> end
Figure 12 - No data transfer
Data transfers using DMA commands differ in two ways from PIO transfers:
Initiation of the DMA transfer commands is identical to the READ SECTOR(S) or WRITE SECTOR(S)
commands except that the host initializes the DMA channel prior to issuing the command.
The interrupt handler for DMA transfers is different in that no intermediate sector interrupts are issued on
multi-sector commands.
a) The host reads the Status or Alternate Status register until the BSY bit is equal to 0;
b) The host writes the Device/Head register with the appropriate DEV bit value;
c) The host reads the Status or Alternate Status register until the BSY bit is equal to 0 and the DRDY bit
is equal to 1;
d) The host writes any required command parameters to the Features, Sector Count, Sector Number,
Cylinder High, Cylinder Low and Device/Head registers;
e) The host initializes the DMA channel;
NOTE 40 - This step may be performed at anytime after step b) and prior to step f).
f) The host writes the command code to the Command register;
g) The device sets the BSY bit and prepares to execute the command;
h) When the device is ready to transfer data, the device asserts DMARQ. The DMA data transfer may
be split into several partial transfers at the discretion of the device or DMA channel. The device shall
have either the BSY bit or the DRQ bit in the status registers during the entire DMA data transfer phase.
If any error occurs the device set the appropriate status and error bits for the error condition. Data
transfer is optional if an error condition exists;
i) When the device has completed processing, it clears both the BSY bit and the DRQ bit and then
asserts INTRQ. Command processing is complete;
69
X3T10/0948D Revision 4c
BSY=1 BSY=1
+--<---+ +--<---+
| | BSY=0 | | BSY=0
start ---+-> a -+-------> b -+-> c -+-------> d ---> e ---+
|
|
+---------------------------------------------------------+
|
| BSY=1 BSY=0, DRQ=0, assert INTRQ
+---> f,g -------> h ---> i ----------------------------+
|
+-------------------------------------------------------+
|
+---> j ---> end
The second method requires that device 0 implement an Error, Status and Alternate Status register that is
used whenever device 1 is selected.
70
X3T10/0948D Revision 4c
d) A write to the Command register with a command code other than the INITIALIZE DEVICE
PARAMETERS or EXECUTE DEVICE DIAGNOSTICS command causes the device 1 Error, Status and
Alternate status registers to be used as follows:
1) the BSY bit is set in the device 1 status register;
2) the ABRT bit is set in the device 1 Error register;
3) the ERR bit is set in the device 1 status registers;
4) the BSY bit is cleared in the device 1 status register;
5) if the nIEN bit in the Device Control Register is cleared, the INTRQ signal is asserted;
e) An EXECUTE DEVICE DIAGNOSTIC command is executed as if it addressed to device 0;
f) An INITIALIZE DEVICE PARAMETERS command is executed as if device 1 is present and is actually
executing the command. The command shall have no effect of the device parameters of device 0;
g) A read of the Control Block or Command Block registers, other than the Status or Alternate Status
registers, shall complete as if device 0 was selected;
h) A read of the Error, Status or Alternate status register returns the value in the device 1 copy of these
registers. The device 1 status registers shall contain 00H following a reset and the value 01H following
an attempt to execute a command, other than EXECUTE DEVICE DIAGNOSTICS or INITIALIZE
DEVICE PARAMETERS, on device 1.
9. Timing
9.1 Deskewing
The host shall provide cable deskewing for all signals originating from the controller. The device shall
provide cable deskewing for all signals originating at the host.
All timing values and diagrams are shown and measured at the connector of either device connected to the
ATA interface. No values are given for measurement at the host interface.
9.2 Symbols
Certain symbols are used in the timing diagrams. These symbols and their respective definitions are listed
below.
* All signals are shown with the asserted condition facing to the top of the page. The negated condition is
shown towards the bottom of the page relative to the asserted condition.
9.3 Terms
71
X3T10/0948D Revision 4c
The interface uses a mixture of negative and positive signals for control and data. The terms asserted and
negated are used for consistency and are independent of electrical characteristics.
In all timing diagrams, the lower line indicates negated, and the upper line indicates asserted e.g. the
following illustrates the representation of a signal named TEST going from negated to asserted and back to
negated, based on the polarity of the signal.
Assert Negate
| |
Bit Setting=1 |__________|
Bit Setting=0 TEST _____/ \_______
Assert Negate
| |
Bit Setting=0 |__________|
Bit Setting=1 TEST- _____/ \_______
Figure 14 defines the relationships between the interface signals for both 16-bit and 8-bit PIO data transfers.
Peripherals reporting support for PIO Transfer Mode 3 or 4 shall power up in a PIO Transfer Mode 0, 1 or 2.
For PIO modes 3 and above, the minimum value of t0 is specified by word 68 in the Identify Drive parameter
list. The value in word 68 shall not be less than the value shown in the table below.
It is mandatory that IORDY be supported when PIO Mode 3 or 4 are the current mode of operation.
72
X3T10/0948D Revision 4c
|<---------------- t0 --------------------------->|
| _______________________________________________________
Addr Valid (1) _______/ | \_____________
| |<----t1---->| |<---t9--->|
| | |<-------- t2 ----------------->| |<-t8->|
__ | |_______________________________|<----------t2i------>|__
DIOR-/DIOW- \_________________/ \_____________________/
| | | |
WRITE (2) | | _____________________ |
DD0-15 -------------------------------------<_____________________>-----------------
| | |<-----t3----->| | |
| | |<-t4->| |
READ (2) | | _______________________ |
DD0-15 --------------------------------------<_______________________XXXX>----------
| | |<-----t5---->| | | |
|<-t7->| | | |<--t6--->| | |
| | | | |<----t6Z---->| |
| |_______________________________________________________|
IOCS16- (3) ______________/ | | \______
| | |
_______|____________|_________________|______________________________________
IORDY (4,4-1) | | |
| |<--tA-->| |
_______|____________|________|________|______________________________________
IORDY (4,4-2) \XXXXXXXXXXXXXXXXXXXXX/ |
| | | |<-tRD->|
_______|____________|________|________|_______|______________________________
IORDY (4,4-3) \XXXXXXXXXXXXXXXXXXXXX\________________/
NOTES:
(1) Device Address consists of signals CS0-, CS1- and DA2-0
(2) Data consists of DD0-15 (16-bit) or DD0-7 (8-bit)
(3) IOCS16- shown for PIO modes 0,1 and 2. For other modes, this signal is not valid. (See clause 5.2.11)
(4) The negation of IORDY by the device is used to extend the PIO cycle. The determination of whether the cycle is to
be extended is made by the host after tA from the assertion of DIOR- or DIOW-. The assertion and negation of IORDY
are described in the following three cases:
(4-1) Device never negates IORDY: no wait is generated.
(4-2) Device starts to drive IORDY low before tA, but causes IORDY to be asserted before tA: no wait generated.
(4-3) Device drives IORDY low before tA: wait generated. The cycle completes after IORDY is reasserted. For cycles
where a wait is generated and DIOR- is asserted, the device shall place read data on DD0-15 for tRD before causing
IORDY to be asserted.
73
X3T10/0948D Revision 4c
74
X3T10/0948D Revision 4c
|<----------------------- t0 ----------------------->|
____________ _______
DMARQ ___/ \_______________________________________/ |
|<- tC ->| |
|______________________________________________ |___
DMACK- _______/ \_____/
|<--- tI --->|_________________|<----- tJ -----| |
DIOR-/DIOW- ____________________/ \_________________________
| | | |
| |<------ tD ----->| |
Read | _________________ |
DD0-15 -----------------------------<_________________>----------------
| |<- tE ->|<- tS ->|<- tF ->| |
Write | __________________________ |
DD0-15 --------------------------<__________________________>-----------
| | | | |
| |<--- tG --->|<-- tH -->| |
The timings associated with Multiword DMA Transfers are defined in figure 16.
For Multiword DMA modes 1 and above, the minimum value of t0 is specified by word 65 in the Identify
Drive parameter list. The value in word 65 shall not be less than the value shown in the table below.
Devices reporting support for Multiword DMA Transfer Mode 2 shall also support Multiword DMA Transfer
Mode 0 and 1 and shall power up with Mode 0 as the default Multiword DMA Mode.
75
X3T10/0948D Revision 4c
|<----------------- t0 --------------->|
_________________________________________________________ | ________
DMARQ ___/ \__________________/
| |<--tL-->| |
| | |
___________________________________________________________________ _
DMACK- ______/ \____________/
|<-tI->| | | |
|<-- tD ---->|<----------- tK -------->| |<--tJ-->|
| | | | |
DIOR- |____________| |____________| |
DIOW- _____________/ \_________________________/ \_______________________
| | |
->| tE |<- | |<-tZ->|
READ ________________ ___________ |
DD0-15 --------------<XXXX________________XXXXXXXXXXXXXXXXXXXXXXXXXXXX___________XXXXXXX>-------
| | |
|<-tGr->|<--tF-->|
WRITE _____________________ ____________________
DD0-15 XXXXXXXXXXXXXXXX_____________________XXXXXXXXXXXXXXXXXXXXXXX____________________XXXXXXXXX
|<--tGw--->|<---tH--->|
76
X3T10/0948D Revision 4c
______
RESET- _____/ \_____________________________________________________
|<-tM->|
| |
| |
| | Device 0
_ _ _ _ _ _ _ _______ _ _ _ _ _ _ _ _ _ _ _ _ _|
BSY _ _ _ _ _ _ _/ \_ _ _ _ _ *1 _ _ _ _ _ _\________________
->|tN|<-
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
DASP- _ _ _ _ _ _ _ _\_______/_ _ _ _ *2 _ _ _ _ _ _ _ _ _ _\=== *3 ==
->| tP |<- | |_ _ _ __________
Control Registers_______________________________________/_ _ _ /
| |
| |
| |
| | Device 1
_ _ _ _ _ _ _ _ _________________________________|
BSY _ _ _ _ _ _ _ _/ \________________
_ _ _ _ _ _ _ _ _ _ ______ _ _ _ _ _
PDIAG- _ _ _ _ _ _ _ _ _ _\____________________________/ \_ _ _ _ _
| |<----------- tQ -------->|
_ _ _ _ _ _ _ _ _ _ _ _ _________________________ _ _ _
DASP- _ _ _ _ _ _ _ _ _ _ _ _/ \ _ _ _\=== *3 ==
|<- tR ->|
|<-------------------- tS ----------------->|
_ _ _ __________
Control Registers_______________________________________/_ _ _ /
*1 Device 0 can set the BSY bit equal to zero if Device 1 not present.
*2 Device 0 can use DASP- to indicate it is active if Device 1 is not present.
*3 DASP- can be asserted to indicate that the device is active.
Label Units
tM (Min) 25 usec
tN (Max) 400 nsec
tP (Max) 1 msec
tQ (Max) 30 secs
tR Device 0 (Max) 450 msec
tR Device 1 (Max) 400 msec
tS (Max) 31 secs
Figure 17 - Reset sequence
77
X3T10/0948D Revision 4c
Annex A.
(informative)
DASP- is read by Device 0 to determine if Device 1 is present. If Device 1 is present Device 0 shall read
PDIAG- to determine when it is valid to clear the BSY bit and whether Device 1 has powered on or reset
without error, otherwise Device 0 clears the BSY bit whenever it is ready to accept commands. Device 0
may assert DASP- to indicate device activity.
If Device 1 is present Device 0 shall read PDIAG- to determine when it is valid to clear the BSY bit and
whether Device 1 has reset without any errors, otherwise Device 0 shall simply reset and clear the BSY bit.
DASP- is asserted by Device 0 (and Device 1 if it is present) in order to indicate device active.
If Device 1 is present, Device 0 shall read PDIAG- to determine when it is valid to clear the BSY bit and if
Device 1 passed or failed the EXECUTE DEVICE DIAGNOSTIC command, otherwise Device 0 shall simply
execute its diagnostics and then clear the BSY bit. DASP- is asserted by Device 0 (and Device 1 if it is
present) in order to indicate the device is active.
In all the above cases: Power on, RESET-, software reset, and the EXECUTE DEVICE DIAGNOSTIC
command the Device 0 Error register is calculated as shown in the following table:
Where x indicates the appropriate Diagnostic Code for the Power on, RESET-, software reset, or device
diagnostics error.
78
X3T10/0948D Revision 4c
NOTE 43 - In the following algorithms, the notation 1* refers to the Drive 1 status register copy that
Drive 0 keeps when there is no Drive 1 present.
5) Perform any remaining time critical hardware initialization including starting the spin up of the device if
needed. Complete all the hardware initialization and diagnostic tests needed to get the device ready,
including:
a) Set the Sector Count register to 01h.
b) Set the Sector Number register to 01h.
c) Set the Cylinder Low register to 00h.
d) Set the Cylinder High register to 00h.
e) Set the Device/Head register to 00h.
6) If Device 1 was detected in step 4:
a) Monitor PDIAG- until PDIAG- is asserted by Device 1 or for 31 seconds.
b) If PDIAG- is asserted within 31 seconds, set bit 7 equal to 0 in the Error register.
c) If PDIAG- is not asserted within 31 seconds, set bit 7 equal to 1 in the Error register.
7) Post Device 0's initialization and diagnostic results:
a) If Device 0 completed all initialization and diagnostics without error, set bits 6-0 of the Error register to
0000001b.
b) If Device 0 failed any initialization or diagnostics, set bits 6-0 of the Error register to a value other than
0000001b as described in Table 11.
8) Set the BSY bit of the Status register to zero and set Drive 1* Status register to 00H.
79
X3T10/0948D Revision 4c
5) Perform any remaining time critical hardware initialization including starting the spin up of the device if
needed. Complete all the hardware initialization and diagnostic tests needed to get the device ready,
including:
a) Set the Sector Count register to 01h.
b) Set the Sector Number register to 01h.
c) Set the Cylinder Low register to 00h.
d) Set the Cylinder High register to 00h.
e) Set the Device/Head register to 00h.
6) Post Device 1's initialization and diagnostic results:
a) If Device 1 completed all initialization and diagnostic without error, Set the Error register to 01h and
assert PDIAG-.
b) If Device 1 failed any initialization or diagnostics, set the Error register to a value other than 01h (see
Table 11) and do not assert PDIAG-.
7) Set the status register to 00.
80
X3T10/0948D Revision 4c
3) Assert DASP-.
4) Finish all the hardware initialization needed to place the device in reset including all diagnostics.
5) Wait for SRST bit to be set to 0.
6) Reset the Command Block registers:
a) Set the Sector Count register to 01h.
b) Set the Sector Number register to 01h.
c) Set the Cylinder Low register to 00h.
d) Set the Cylinder High register to 00h.
e) Set the Device/Head register to 00h.
7) If Device 1 is present:
a) Monitor PDIAG- for 31 seconds or until PDIAG- is asserted by Device 1.
b) If PDIAG- is asserted within 31 seconds, set bit 7 to 0 in the Error register.
c) If PDIAG- is not asserted within 31 seconds, set bit 7 to 1 in the Error register.
8) Post Device 0's initialization and diagnostic results:
a) If Device 0 completed all initialization and diagnostics without error, set bits 6-0 of the Error register the
value 0000001b.
b) If Device 0 failed any initialization or diagnostics, set bits 6-0 of the Error register to a value other than
0000001b (see table 11).
9) Set the DRDY bit in its Status register and set Drive 1* Status register to 00h.
4) Assert DASP-.
5) Finish all the hardware initialization needed to place the device in reset including all diagnostics.
6) Wait for SRST bit to be set to 0.
7) Reset the Command Block registers:
a) Set the Sector Count register to 01h.
b) Set the Sector Number register to 01h.
c) Set the Cylinder Low register to 00h.
d) Set the Cylinder High register to 00h.
e) Set the Device/Head register to 00h.
8) Post Device 1's initialization and diagnostic results:
81
X3T10/0948D Revision 4c
a) If Device 1 completed all initialization and diagnostics without error, set bits 6-0 of the Error register the
value 01h and assert PDIAG-.
b) If Device 1 failed any initialization or diagnostics, set bits 6-0 of the Error register to a value other than
01h (see table 11) and does not assert PDIAG-.
9) Set the DRDY bit in the Status register when ready to accept any command.
4) Assert DASP-.
5) Perform all the device diagnostics and note the results.
6) Finish all the hardware initialization needed to get the device ready to receive any type of command from
the host including:
a) Set the Sector Count register to 01h.
b) Set the Sector Number register to 01h.
c) Set the Cylinder Low register to 00h.
d) Set the Cylinder High register to 00h.
e) Set the Device/Head register to 00h.
7) If Device 1 is present:
a) Monitor PDIAG- until PDIAG- is asserted by Device 1 or for 6 s.
b) If PDIAG- is asserted within 6 s, set bit 7 to 0 in the Error register.
c) If PDIAG- is not asserted within 6 s, set bit 7 to 1 in the Error register.
8) Post Device 0's initialization and diagnostic results:
a) If Device 0 completed all initialization and diagnostics without error, set bits 6-0 of the Error register the
value 0000001b.
b) If Device 0 failed any initialization or diagnostics, set bits 6-0 of the Error register to a value other than
0000001b (see Table 11).
9) Set the Status register to 50h and set Drive 1* Status register to 00h.
10) Assert INTRQ.
82
X3T10/0948D Revision 4c
4) Assert DASP-.
5) Perform all the device diagnostics and note the results.
6) Finish all the hardware initialization needed to get the device ready to receive any type of command from
the host including:
a) Set the Sector Count register to 01h.
b) Set the Sector Number register to 01h.
c) Set the Cylinder Low register to 00h.
d) Set the Cylinder High register to 00h.
e) Set the Device/Head register to 00h.
7) Post Device 1's initialization and diagnostic results:
a) If Device 1 completed all initialization and diagnostics without error, set bits 6-0 of the Error register the
value 1 and assert PDIAG-.
b) If Device 1 failed any initialization or diagnostics, set bits 6-0 of the Error register to a value of 2 or
greater indicating the type of failure and do not assert PDIAG-.
8) Set the DRDY bit in the Status register when ready to accept any command.
83
X3T10/0948D Revision 4c
Annex B.
(informative)
In an effort to broaden the applications for small form factor devices, a group of companies representing
system integrators, device suppliers, and component suppliers decided to address the issues involved.
A primary purpose of the SFF Committee was to define the external dimensions of small form factor devices
so that products from different vendors could be used in the same mounting configurations.
The restricted area, and the mating of devices directly to a motherboard required that the number of
connectors be reduced, which caused the assignment of additional pins for power. Power is provided to the
devices on the same connector as used for the signals, and addresses are set by the receptacle into which
the devices are plugged.
The 50-pin connector that has been widely adopted across industry for SFF devices is a low density 2mm
connector which has no shroud on the plug which is mounted on the device. A number of suppliers provide
intermatable components. The following information has been provided to assist users in specifying
components used in an implementation.
The signals assigned for 44-pin applications are described in table B.1. Although there are 50 pins in the
plug, a 44 pin mating receptacle may be used(the removal of pins E and F provides room for the wall of the
receptacle).
Some devices may utilize pins A, B, C and D for option selection via physical jumpers. Such
implementations may require use of the 44 pin receptacles.
The first four pins of the connector plug located on the device are not to be connected to the host, as they
are reserved for manufacturer's use. Pins E, F, and 20 are keys, and are removed.
+-------------------------------------------1-E-----+
| o o o o o o o o o o o o o o o o o o o o o o K C A |
| o o o o o o o o o o o o K o o o o o o o o o K D B |
+44----------------------20-----------------2-F-----+
84
X3T10/0948D Revision 4c
85
X3T10/0948D Revision 4c
Annex C.
(informative)
C.1 Overview
This annex defines the pinouts used for the 68-pin alternative connector for the AT Attachment Interface.
This connector is the same as the one defined by PCMCIA. This annex defines a pinout alternative that
allows a device to function as an AT Attachment Interface compliant device, while also allowing the device to
be compliant with PC Card-ATA mode defined by PCMCIA. The signal protocol allows the device to identify
the host interface as being 68-pin ATA or PCMCIA.
To simplify the implementation of dual-interface devices, the 68-pin AT Attachment Interface maintains
commonality with as many PC Card-ATA signals as possible, while supporting full command and signal
compliance with the ATA standard.
The 68-pin ATA pinout does not cause damage or loss of data if a PCMCIA card is accidentally plugged into
a host slot supporting this interface. The inversion of the reset signal between the ATA and PCMCIA
interfaces prevents loss of data if the device is unable to reconfigure itself to the appropriate host interface.
C.2 Signals
This Specification relies upon the electrical and mechanical characteristics of PCMCIA and unless otherwise
noted, all signals and registers with the same names as PCMCIA signals and registers have the same
meaning as defined in PCMCIA.
The PC Card-ATA specification is used as a reference to identify the signal protocol used to identify the host
interface protocol.
Unless otherwise noted, all signals and registers with the same names as ATA signals and registers have the
same meaning as defined in X3.221-199x, which defines the protocol by which commands are directed to the
storage device.
Any signals not defined below are as described in the ATA, PCMCIA, or the PC Card-ATA documents.
Table C.1 shows the ATA signals and relationships such as direction, as well as providing the signal name of
the PCMCIA equivalent.
86
X3T10/0948D Revision 4c
This signal shall be grounded by the device. CD1- and CD2- are used by the host to detect the presence of
the device.
87
X3T10/0948D Revision 4c
This signal shall be grounded by the device. CD1- and CD2- are used by the host to detect the presence of
the device.
Hosts shall provide CS1- on both the pins identified in table C.1.
Devices are required to recognize only one of the two pins as CS1-.
If this signal is supported by the host or the device, the function of DMARQ shall also be supported.
If this signal is supported by the host or the device, the function of DMACK- shall also be supported.
This signal is the inverted form of CSEL. Hosts shall support both M/S- and CSEL though devices need only
support one or the other.
Hosts shall assert CSEL and M/S- prior to applying VCC to the connector.
This pin is used by the host to select which mode to use, PC Card-ATA mode or the 68-pin ATA mode. To
select 68-pin ATA mode, the host shall assert SELATA- prior to applying power to the connector, and shall
hold SELATA- asserted.
The device shall not re-sample SELATA- as a result of either a Hard or Soft Reset. The device shall ignore
all interface signals for 19 ms after the host supplies Vcc within the device's voltage tolerance. If SELATA- is
negated following this time, the device shall either configure itself for PC Card-ATA mode or not respond to
further inputs from the host.
88
X3T10/0948D Revision 4c
This standard supports the removability of devices that use the ATA protocol. As removability is a new
consideration for ATA devices, several issues need to be considered with regard to the insertion or removal
of devices.
− Connector pin sequencing should protect the device by making contact to ground before any other
signal in the system.
− SELATA- should be asserted at all times.
− All devices should be reset and reconfigured to the same base address each time a device at that
address is inserted or removed.
− The removal or insertion of a device at the same address should be detected so as to prevent the
corruption of a command.
- The DOOR LOCK and DOOR UNLOCK commands and the MC and MCR bits in the Error register
should be used to prevent unexpected removal of the device or media.
89
X3T10/0948D Revision 4c
Annex D.
(informative)
- 528 MB is used to describe a drive that has 1,032,192 sectors or 528,482,304 bytes.
The original IBM PC BIOS (Basic Input/Output System) imposed several restrictions on the support of disk
drives, and these have been incorporated into many higher level software products. One such restriction
limits the capacity of a hard disk drive. Most BIOS software cannot support a disk drive with more than
1,024 cylinders, 16 heads and 63 sectors per track. The maximum addressable capacity of an ATA disk
drive under this scheme is 528 MB.
There is growing support of auto-configuration for disk drives on PC systems. The auto-configuration
capability usually resides in the BIOS and uses the Identify Drive command data to configure an ATA disk
drive.
This annex defines rules for the Identify Drive data of all capacity ATA disk drives and allows BIOS support
of ATA drives up to 8 GB using Cylinder/Head/Sector (CHS) addressing.
This specification defines information that newer BIOSs and system software can use to determine the true
size of a disk drive and access the full capacity of the drive.
BIOSs and other software that operate an ATA disk drive in CHS (Cylinder, Head and Sector) addressing
mode use Identify Drive data words 1, 3, 6 and words 53-58 to ascertain the appropriate translation mode to
use and determine the capacity of an ATA disk drive.
Maximum compatibility is achieved if the following rules are obeyed. These rules limit the values placed into
words 1, 3, 6, and 53-58. The rules specified here for CHS addressing apply to drives up to 8 GB.
D.2.1 Word 1
For drives less than or equal to 528 MB, Identify Data word 1 (Default Cylinders) shall not specify a value
greater than 1,024.
If a drive is greater than 528 MB but less than or equal to 8 GB, the maximum value that shall be placed into
this word is determined by the value in Word 3 as shown in the following table.
90
X3T10/0948D Revision 4c
D.2.2 Word 3
Identify Data word 3 (Default Heads) shall not specify a value greater than 16.
D.2.3 Word 6
For drives of 8 GB or less, Identify Data word 6 (Default Sectors) shall not specify a value greater than 63.
ATA drives that are over 528 MB shall implement words 53-58. Drives not over 528 MB may also implement
these words. These words define the addressing for all sectors accessible in CHS mode.
D.2.5 Word 53
Identify Data word 53 bit 0 shall be set to 1 at all times that the drive is in a valid translation mode. Some
drives may have translation modes that cannot be supported. An attempt to put a drive into one of these
unsupported modes shall cause word 53 bit 0 to be set to 0 with words 54-58 cleared to zero until a valid
translation mode is established.
D.2.6 Word 54
Identify Data word 54 (Current Cylinders) shall specify the number of full logical cylinders that can be
accessed in the current translation mode. If an Initialize Drive Parameters command has not been executed,
the contents of this word shall be the same as word 1. If an Initialize Drive Parameters command has been
executed, this word is the integer result of dividing the total number of user sectors (this value may be in
words 60-61) by the number of sectors per logical cylinder ( [word55] x [word56] ), but shall not be a value
greater than 65,535.
91
X3T10/0948D Revision 4c
D.2.7 Word 55
Identify Data word 55 (Current Heads) is the number of heads specified by the last Initialize Drive
Parameters command. This word may contain a value of between 1 and 16. If an Initialize Drive
Parameters command has not been executed, the contents of this word shall be the same as word 3.
D.2.8 Word 56
Identify Data word 56 (Current Sectors) is the number of sectors specified by the last Initialize Drive
Parameters command. This word may contain a value of between 1 and 255. If an Initialize Drive
Parameters command has not been executed, the contents of this word shall be the same as word 6.
Identify Data words 57-58 contain a 32-bit value that shall be equal to [word54] multi [word55] multi [word56].
If words 60-61, LBA sectors, are not zero, words 57-58 shall be less than or equal to the value in words 60-61
at all times.
It is recommended that ATA drives over 528 MB support Logical Block Addressing (LBA).
Identify Data words 60-61 shall specify the total number of user sectors available in LBA mode at all times.
This value shall be equal to or greater than the value in words 57-58 at all times. The contents of these
words shall not change.
The sectors, if any, between the last sector addressable in CHS mode and the last sector addressable in LBA
mode are known as "orphan" sectors. A drive may or may not allow access to these sectors in CHS
addressing mode.
The values in words 1, 3, and 6 should be selected such that the number of orphan sectors is minimized.
Normally, the number of orphan sectors should not exceed ( [word55] multi [word56] - 1 ). However, the host
system can create conditions where there are a larger number of orphans sectors by issuing the Initialize
Drive Parameters command with values other than the values in words 3 and 6.
92
X3T10/0948D Revision 4c
Annex E.
(informative)
The following two tables are provided to facilitate the understanding of the ATA command set. Table 18
provide information on which command codes are currently defined. Table 19 provides a list of all of the
ATA commands in order of command code.
93
X3T10/0948D Revision 4c
94
X3T10/0948D Revision 4c
95