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 the BSY bit equal to one, or the BSY bit equal to zero and the 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 9: Some older host implementations may require the BSY bit being cleared to zero and the DRQ bit equal to one in the Status register within 700 ns of receiving some PIO data out commands.
Note 10: 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.
Each command description in the following clauses contains the following subclauses:
COMMAND CODE - Indicates the command code for this command.
TYPE - Indicates if the command is:
If the command is a member of one or more feature sets, which feature sets it belongs to is noted.
PROTOCOL - Indicates which protocol is used by the command.
INPUTS - Describes the Command Block register data that the host shall supply.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
||||||||
|
Command |
Command Code |
|||||||
|
Note: No entry indicates register or bit not used by the device. If the register is written by the host, no entry bits with no entry shall be written to zero. |
||||||||
NORMAL OUTPUTS - Describes the Command Block register data 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.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
Note: No entry indicates bit is not used. V indicates bit is valid. |
|||||||||
PREREQUISITES - Any prerequisite commands or conditions that shall be met before the command shall be issued.
DESCRIPTION - The description of the command function(s).
COMMAND CODE - 98h or E5h
TYPE - Optional - Power Management Feature Set.
PROTOCOL - Non-data command.
INPUTS -
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
98h or E5h |
|||||||
NORMAL OUTPUTS - The Sector Count register shall be set to written with a value of 0 (00h) if the device is in Standby mode. The Sector Count register may be set to written with a value of 128 (80h) if the device is in Idle Mode. The Sector Count register may be set to written with a value of 255 (FFh) if the device is in Active mode.
ERROR OUTPUTS - Aborted Command if the device does not support the Power Management feature set.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
||||||
PREREQUISITES - DRDY set equal to one.
DESCRIPTION - If the device is in 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 the Idle Mode, the device shall set BSY, may set the Sector Count register to 128 (80h), clear BSY, and assert INTRQ.
If the device is in Active Mode, the device shall set the BSY bit, may set the Sector Count register to 255 (FFh), clear the BSY bit, and assert INTRQ.
COMMAND CODE - DEh
TYPE - Optional - Removable.
PROTOCOL - Non-data command.
INPUTS -
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
DEh |
|||||||
NORMAL OUTPUTS - 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 set to one.
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 to one in the Error register and the ERR bit in the Status register to one.
|
Status register |
Error register |
|||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
MCR |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
||||||
PREREQUISITES - DRDY set equal to one.
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 no error set.
If the device is locked, the status returned shall indicate the state of the media change request button. Good status No error shall be returned set 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 set to one 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 bit to one, 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. See 7.4.
Note 11 - Some caching controllers not reporting ATA-3 capability hang if issued this command.
COMMAND CODE - DFh
TYPE - Optional - Removable.
PROTOCOL - Non-data command.
INPUTS -
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
DFh |
|||||||
NORMAL OUTPUTS - None.
ERROR OUTPUTS - If the device does not support this command or is not ready, then the ABRT bit shall be returned set to one in the Error register and the ERR bit shall be returned set to one in the Status register.
|
Status register |
Error register |
|||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
MCR |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
|||||||
PREREQUISITES - DRDY set equal to one.
DESCRIPTION - This command shall unlock the device, if it is locked, and shall allow the device to respond to the media change request button. See 7.4.
Note 12 - Some caching controllers not reporting ATA-3 capability hang if issued this command.
COMMAND CODE - 92h
TYPE - Optional.
PROTOCOL - PIO data out.
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.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
Subcommand code |
|||||||
|
Sector Count |
Sector count (low order) |
|||||||
|
Sector Number |
Sector count (high order) |
|||||||
|
Cylinder Low |
00h |
|||||||
|
Cylinder High |
00h |
|||||||
|
Device/Head |
1 |
1 |
D |
0 |
0 |
0 |
0 |
|
|
Command |
92h |
|||||||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - Aborted Command if the device does not support this command or did not accept the microcode data. Aborted error if subcommand code not a supported value.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
||||||
PREREQUISITES - DRDY set equal to one.
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:
01h - download is for immediate, temporary use
07h - save downloaded code for immediate and future use
Either or both values may be supported. All other values are reserved.
COMMAND CODE - 90h
TYPE - Mandatory.
PROTOCOL - Non-data.
INPUTS - None. The device selection bit in the Device/Head register is ignored.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
||||||||
|
Command |
90h |
|||||||
NORMAL OUTPUTS - The diagnostic code written into the Error register is an 8-bit code as shown in Table 8, and not as defined in 6.2.9.
Code |
Description |
|
|
01h |
Device 0 passed, Device 1 passed or not present |
|
|
00h, 02h-7Fh |
Device 0 failed, Device 1 passed or not present |
|
|
81h |
Device 0 passed, Device 1 failed |
|
|
80h, 82h-FFh |
Device 0 failed, Device 1 failed |
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.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
See Table 8 |
||||||
PREREQUISITES - None.
DESCRIPTION - This command shall perform the internal diagnostic tests implemented by the device. See also 6.2.9 and 6.2.13. The DEV bit in the Device/Head register is ignored. Both devices, if present, shall execute this command.
Device 0 performs the following operations for this command:
a)Device 0 sets the BSY bit within 400 ns after the EXECUTE DEVICE DIAGNOSTIC command is received;
b)Device 0 performs diagnostics;
c)Device 0 resets the Command Block registers to the following:
|
Cylinder Low |
= |
00h |
Cylinder High |
= |
00h |
||
|
Sector Count |
= |
01h |
Device/Head |
= |
00h |
||
|
Sector Number |
= |
01h |
d)Device 0 posts diagnostic results to bits 6-0 of the Error Register;
e)If Device 0 detected that Device 1 is present during the most recent power on or hardware reset sequence, then Device 0 waits up to 6 s from the time that the EXECUTE DEVICE DIAGNOSTIC command was received for Device 1 to assert PDIAG-. If PDIAG- is asserted within 6 s, Device 0 clears bit 7 to zero in the Error Register, else Device 0 sets bit 7 equal to 1 in the Error Register.
If device 1 was not detected during the most recent power up or hardware reset sequence, then Device 0 clears bit 7 to zero in the Error register;
f)Device 0 clears the BSY bit when ready to accept commands that do not require the DRDY bit to be equal to 1.Device 0 shall clear the BSY bit within 6 s from the time that the EXECUTE DEVICE DIAGNOSTIC command was received;
g)Device 0 sets the DRDY bit when ready to accept any command.
NOTE 13: Steps f) and g) may occur at the same time. While no maximum time is specified for the DRDY bit to be set to one to occur, a host is advised to allow at least 30 s for the DRDY bit to be set to one. See Figure 7.
Device 1 performs the following operations for this command:
a)Device 1 sets the BSY bit within 400 ns after the EXECUTE DEVICE DIAGNOSTIC command is received;
b)Device 1 negates PDIAG- within 1 ms after the command is received;
c)Device 1 performs diagnostics;
d)Device 1 resets the Command Block registers to the following:
|
Cylinder Low |
= |
00h |
Cylinder High |
= |
00h |
||
|
Sector Count |
= |
01h |
Device/Head |
= |
00h |
||
|
Sector Number |
= |
01h |
e)Device 1 clears bit 7 of the Error register to zero and posts its diagnostic results to bits 6 through 0 of Error register;
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 14: Device 1 shall clear the BSY bit and assert PDIAG- within 5 s 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 15: 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 at least 30 s for the DRDY bit to be equal to one. See Figure 7.
|
Word |
F/V |
||
|
0 |
General configuration bit-significant information: |
||
|
F
|
15
14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 |
0=ATA device 1=ATAPI device Vendor specific (obsolete) Vendor specific (obsolete) Vendor specific (obsolete) Vendor specific (obsolete) Vendor specific (obsolete) Vendor specific (obsolete) Vendor specific (obsolete) 1=removable media device 1=not removable controller and/or device Vendor specific (obsolete) Vendor specific (obsolete) Vendor specific (obsolete) Vendor specific (obsolete) Vendor specific (obsolete) Reserved |
|
|
1 |
F |
Number of logical cylinders |
|
|
2 |
R |
Reserved |
|
|
3 |
F |
Number of logical heads |
|
|
4 |
X |
Vendor specific (obsolete) |
|
|
5 |
X |
Vendor specific (obsolete) |
|
|
6 |
F |
Number of logical sectors per logical track |
|
|
7-9 |
X |
Vendor specific |
|
|
10-19 |
F |
Serial number (20 ASCII characters) |
|
|
20 |
X |
Vendor specific (obsolete) |
|
|
21 |
X |
Vendor specific (obsolete) |
|
|
22 |
F |
Number of vendor specific bytes available on READ/WRITE LONG cmds |
|
|
23-26 |
F |
Firmware revision (8 ASCII characters) |
|
|
27-46 |
F |
Model number (40 ASCII characters) |
|
|
47 |
X R |
15-8 7-0 |
Vendor specific 00h =Reserved 01h-FFh = Maximum number of sectors that can be transferred per interrupt on READ/WRITE MULTIPLE commands |
|
48 |
R |
Reserved |
|
Table 9 - Identify device information (continued)
|
Word |
F/V |
||
|
49 |
Capabilities |
||
|
R |
15-14 13
12 11
10 9 8 7-0 |
Reserved 1=Standby timer values as specified in this standard are supported 0=Standby timer values are vendor specific Reserved (for advanced transfer mode) 1=IORDY supported 0=IORDY may be supported 1=IORDY can be disabled Obsolete Obsolete Vendor specific |
|
|
50 |
R |
Reserved |
|
|
51 |
F X |
15-8 7-0 |
PIO data transfer cycle timing mode Vendor specific |
|
52 |
R X |
15-8 7-0 |
Obsolete Vendor specific |
|
53 |
R F F V V |
15-2 1
0 |
Reserved 1=the fields reported in words 64-70 are valid 0=the fields reported in words 64-70 are not valid 1=the fields reported in words 54-58 are valid 0=the fields reported in words 54-58 may be valid |
|
54 |
V |
Number of current logical cylinders |
|
|
55 |
V |
Number of current logical heads |
|
|
56 |
V |
Number of current logical sectors per track |
|
|
57-58 |
V |
Current capacity in sectors |
|
|
59 |
R V V |
15-9 8 7-0 |
Reserved 1=Multiple sector setting is valid xxh=Current setting for number of sectors that can be transferred per interrupt on R/W Multiple command |
|
60-61 |
F |
Total number of user addressable sectors (LBA mode only) |
|
|
62 |
R |
Obsolete |
|
|
63 |
V F |
15-8 7-0 |
Multiword DMA transfer mode active Multiword DMA transfer modes supported |
|
64 |
R F |
15-8 7-0 |
Reserved Advanced PIO transfer modes supported |
|
65 |
Minimum Multiword DMA transfer cycle time per word |
||
|
F |
15-0 |
Cycle time in nanoseconds |
|
|
66 |
Manufacturer’s recommended Multiword DMA transfer cycle time |
||
|
F |
15-0 |
Cycle time in nanoseconds |
|
|
67 |
Minimum PIO transfer cycle time without flow control |
||
|
F |
15-0 |
Cycle time in nanoseconds |
|
|
68 |
Minimum PIO transfer cycle time with IORDY flow control |
||
|
F |
15-0 |
Cycle time in nanoseconds |
|
|
69-79 |
R |
Reserved (for future command overlap and queuing) |
|
Table 9 - Identify device information (concluded)
|
Word |
F/V |
||
|
80 |
F |
Major version number 0000h or FFFFh = device does not report version |
|
|
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 |
Reserved Reserved for ATA-14 Reserved for ATA-13 Reserved for ATA-12 Reserved for ATA-11 Reserved for ATA-10 Reserved for ATA-9 Reserved for ATA-8 Reserved for ATA-7 Reserved for ATA-6 Reserved for ATA-5 Reserved for ATA-4 1=supports ATA-3 1=supports ATA-2 1=supports ATA-1 |
||
|
81 |
F |
Minor version number 0000h or FFFFh=device does not report version 0001h-FFFEh=see 8.7.37 |
|
|
82 |
F |
Command set supported. If words 82 and 83 =0000h or FFFFh command set notification not supported. |
|
|
15-4 3 2 1 0 |
Reserved 1=supports power management feature set 1=supports removeable feature set 1=supports security feature set 1=supports SMART feature set |
||
|
83 |
F |
Command sets supported. If words 82 and 83 =0000h or FFFFh command set notification not supported. |
|
|
15 14 13-0 |
Shall be cleared to zero. Shall be set to one Reserved |
||
|
842-127 |
R |
Reserved |
|
|
128 |
F |
Security status |
|
|
15-9 8 7-5 44 3 2 1 0 |
Reserved Security level 0=High, 1=Maximum Reserved 1=Security count expired 1=Security frozen 1=Security locked 1=Security enabled 1=Security supported |
||
|
129-159 |
X |
Vendor specific |
|
|
160-255 |
R |
Reserved |
|
|
Key: F=the content of the word is fixed and does not change. For removable media devices, these values may change when media is removed or changed. V=the contents of the word is variable and may change depending on the state of the device or the commands executed by the device. X=the content of the word is vendor specific and may be fixed or variable. R=the content of the word is reserved and shall be zero. |
|||
Devices that conform to this standard shall clear bit 15 to zero. These values are shown to maintain alignment with the X3T10/1120 standard.
The number of user-addressable logical cylinders in the default translation mode. If the value in Words 60 and 61 exceed 16 515 072, this word shall contain 16 383. See 7.2.
The number of user-addressable logical heads per logical cylinder in the default translation mode. If the value in Words 60 and 61 exceed 16 515 072, this word shall contain 16. See 7.2.
The number of user-addressable logical sectors per logical track in the default translation mode. If the value in Words 60 and 61 exceed 16 515 072, this word shall contain 63. See 7.2.
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. The combination of Serial number (Words 10-19) and Model number (Words 27-46) shall be unique.
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.
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. The combination of Serial number (Words 10-19) and Model number (Words 27-46) shall be unique.
Bits 7-0 of this word define the maximum number of sectors per block that the device supports for READ/WRITE MULTIPLE commands.
Bit 13 of word 49 is used to determine whether a device utilizes the Standby Timer Values as defined in this standard. If bit 13 is set to one, then the device utilizes the Standby Timer values as specified in Table 11 . If bit 13 is cleared 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.
Bits 8 and 9 of word 49 areobsolete.
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 10.4.1 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 10.4.1, and if it does not, then Mode 0 shall be used to serve as the default timing.
Note 16: 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.
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.
The number of user-addressable logical cylinders in the current translation mode.
Note 17: 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 18: 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 sectors per logical track in the current translation mode.
Note 19: 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. This field may be defaulted to the optimum value.
These words reflect the total number of user addressable sectors in LBA translation. This value does not depend on the current device geometry
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 to one. The high order byte contains a single bit set to indicate which mode is active supported, e.g., if Mode 0 is active, bit 0 is set to one.
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 it is 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 20: 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.
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 for 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 Device 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 command 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 cycle 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.
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.
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.
Words 69 through 79 are reserved for future command overlap and queuing.
If not 0000h or FFFFh, the device claims compliance with the major version(s) as indicated by bits 1 through 3 being equal to one. Values other than 0000h and FFFFh are bit significant. Since the ATA-3 and ATA-2 standards maintain downward compatibility with ATA-1 (published as ATA), it is allowed for an ATA-3 device to set all of bits 1 through 3 to one.
If an implementor claims that the revision of the standard they used to guide their implementation does not need to be reported or if the implementation was based upon a standard prior to this revision of the standard, Word 81 shall be 0000h or FFFFh.
A revision of the standard which guided the implementation may optionally be reported in Word 81 as shown in Table 10.
Table 10 - Minor version number
|
Value |
Minor revision |
|
0001h |
ATA (ATA-1) X3T9.2 781D prior to revision 4 |
|
0003h |
ATA (ATA-1) X3T9.2 781D revision 4 |
|
0005h |
ATA-2 X3T10 948D prior to revision 2k |
|
0007h |
ATA-2 X3T10 948D revision 2k |
|
0009h |
ATA-2 X3T10 948D revision 3 |
|
0008h |
ATA-3 X3T10 2008D revision 0 |
|
0006h |
ATA-3 X3T10 2008D revision 1 |
|
0002h, 0004h, 000Ah-FFFFh |
Reserved |
Words 82 and 83 indicate command sets supported. The values 0000h and FFFFh in these words indicate that command set support is not indicated. Bits 4 through 15 of Word 82 are reserved. Bits 0 through 13 of Word 83 are reserved. Bit 14 of Word 83 shall be set to one. Bit 15 of Word 83 shall be cleared to zero.
If bit 0 of Word 82 is set, the SMART feature set is supported.
If bit 1 of Word 82 is set, the security feature set is supported.
If bit 2 of Word 82 is set, the removable feature set is supported.
If bit 3 of Word 82 is set, the power management feature set is supported.Bit 0 of Word 82 indicates that the SMART feature set is supported if set to one. Bit 15 of Word 83 shall be cleared to zero. Bit 14 of Word 83 shall be set to one. All other bits of Words 82 and 83 are reserved and shall be ckeared to zero.
Bit 4 of Word 128 indicates that the security count has expired. If bit 4 is set to one, the security count is expired and SECURITY UNLOCK and SECURITY ERASE UNIT are aborted until a power-on reset or hard reset.
Bit 8 of Word 128 indicates the security level. If bit 8 is cleared to zero, the security level is high. If bit 8 is set to one, the security level is maximum.
Bit 3 of Word 128 indicates security frozen. If bit 3 is set to one, the security is frozen.
Bit 2 of Word 128 indicates security locked. If bit 2 is set to one, the security is locked.
Bit 1 of Word 128 indicates security enabled. If bit 1 is set to one, the security is enabled.
Bit 0 of Word 128 indicates security supported. If bit 0 is set to one, security is supported.
COMMAND CODE - EEh
TYPE - Optional
PROTOCOL - DMA
INPUTS -
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
EEh |
|||||||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - None.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
|||||||||
PREREQUISITES - DRDY set equal to one.
DESCRIPTION - The IDENTIFY DEVICE DMA command enables the host to receive parameter information from the device in DMA mode. The command transfers the same 256 words of device identification data as transferred by the IDENTIFY DEVICE command.
COMMAND CODE - 97h or E3h
TYPE - Optional - Power Management Feature Set.
PROTOCOL - Non-data command.
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 11.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
Timer period value |
|||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
97h or E3h |
|||||||
Table 11 - Automatic standby timer periods
|
Sector Count register contents |
Corresponding timeout period |
|
|
0 |
(00h) |
Timeout disabled |
|
1-240 |
(01h-F0h) |
(value * 5) s |
|
241-251 |
(F1h-FBh) |
((value - 240) * 30) min |
|
252 |
(FCh) |
21 min |
|
253 |
(FDh) |
Period between 8 and 12 hrs |
|
254 |
(FEh) |
Reserved |
|
255 |
(FFh) |
21 min 15 s |
|
Note: Times are approximate. |
||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - Aborted Command - The device does not support the Power Management feature set.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
||||||
PREREQUISITES - DRDY set equal to one.
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. See 7.3.
If the Sector Count register is zero then the Standby Timer is disabled.
COMMAND CODE - 95h or E1h
TYPE - Optional - Power Management Feature Set.
PROTOCOL - Non-data command.
INPUTS -
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
95h or E1h |
|||||||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - Aborted Command - The device does not support the Power Management feature set.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
||||||
PREREQUISITES - DRDY set equal to one.
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. See 7.3.
COMMAND CODE - 91h
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 maximum head number.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
Logical sectors per logical track |
|||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
Max head |
||||
|
Command |
91h |
|||||||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - Aborted Command if the device does not support the requested CHS translation.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
||||||||
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.
COMMAND CODE - EDh
TYPE - Optional - Removable.
PROTOCOL - Non-data.
INPUTS -
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
EDh |
|||||||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - If the device does not support this command, the device shall return a Command Abort error.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
||||||
PREREQUISITES - DRDY set equal to one.
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.
COMMAND CODE - 00h
TYPE - Optional.
PROTOCOL - Non-data.
INPUTS -
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
00h |
|||||||
NORMAL OUTPUTS - The Command Block registers, other than the Error and Status registers, are not changed by this command. This command always fails with an Aborted Command error.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
||||||
ERROR OUTPUTS - None.
PREREQUISITES - DRDY set equal to one.
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.
COMMAND CODE - E4h
TYPE - Optional.
PROTOCOL - PIO data in.
INPUTS -
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
E4h |
|||||||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - Aborted Command if the command is not supported.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
||||||
PREREQUISITES - DRDY set equal to one. A WRITE BUFFER command shall 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.
COMMAND CODE - C8h (with retries) or C9h (without retries)
TYPE - Mandatory
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.
NORMAL OUTPUTS - None required.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
Sector count |
|||||||
|
Sector Number |
Sector number or LBA |
|||||||
|
Cylinder Low |
Cylinder low or LBA |
|||||||
|
Cylinder High |
Cylinder high or LBA |
|||||||
|
Device/Head |
1 |
LBA |
1 |
D |
Head number or LBA |
|||
|
Command |
C8h or C9h |
|||||||
ERROR OUTPUTS - 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. The amount of data transferred is indeterminant.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
V |
V |
V |
V |
|
PREREQUISITES - DRDY set equal to one. The host shall initialize the DMA channel.
DESCRIPTION - This command executes in a similar manner to the READ SECTOR(S) command except for the following:
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.
Error recovery performed by the device either with or without retries is vendor specific.
COMMAND CODE - 22h (with retries) or 23h (without retries)
TYPE - Optional.
PROTOCOL - PIO data in.
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 one.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
01h |
|||||||
|
Sector Number |
Sector number or LBA |
|||||||
|
Cylinder Low |
Cylinder low or LBA |
|||||||
|
Cylinder High |
Cylinder high or LBA |
|||||||
|
Device/Head |
1 |
LBA |
1 |
D |
Head number or LBA |
|||
|
Command |
22h or 23h |
|||||||
NORMAL OUTPUTS - None required.
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. The amount of data transferred is indeterminant.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
V |
V |
|||
PREREQUISITES - DRDY set equal to one. 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. The READ LONG command shall be immediately preceded by a Write LONG command.
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 16 bit transfers with the vendor specific byte in bits 7 through 0. Bits 15 through 8 shall be ignored by the host. BIOS and driver developersThe host shall use PIO mode 0 when using this command.
Error recovery performed by the device either with or without retries is vendor specific.
Note 21 - The committee is considering removing READ LONG and WRITE LONG commands in future versions of this a future ATA standard.
COMMAND CODE - C4h
TYPE - Mandatory
PROTOCOL - PIO data in.
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.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
Sector count |
|||||||
|
Sector Number |
Sector number or LBA |
|||||||
|
Cylinder Low |
Cylinder low or LBA |
|||||||
|
Cylinder High |
Cylinder high or LBA |
|||||||
|
Device/Head |
1 |
LBA |
1 |
D |
Head number or LBA |
|||
|
Command |
C4h |
|||||||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - 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. The amount of data transferred is indeterminant.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
V |
V |
V |
V |
|
PREREQUISITES - DRDY set equal to one. If bit 8 of Word 59 of the IDENTIFY DEVICE response is cleared to zero, 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 or the default if no intervening SET MULTIPLE command has been issued. 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 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.
COMMAND CODE - 20h (with retries) or 21h (without retries)
TYPE - Mandatory.
PROTOCOL - PIO data in.
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.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
Sector count |
|||||||
|
Sector Number |
Sector number or LBA |
|||||||
|
Cylinder Low |
Cylinder low or LBA |
|||||||
|
Cylinder High |
Cylinder high or LBA |
|||||||
|
Device/Head |
1 |
LBA |
1 |
D |
Head number or LBA |
|||
|
Command |
20h or 21h |
|||||||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - 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. The amount of data transferred is indeterminant.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
V |
V |
V |
V |
|
PREREQUISITES - DRDY set equal to one.
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.
Error recovery performed by the device either with or without retries is vendor specific.
COMMAND CODE - 40h (with retries) or 41h (without retries)
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.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
Sector count |
|||||||
|
Sector Number |
Sector number or LBA |
|||||||
|
Cylinder Low |
Cylinder low or LBA |
|||||||
|
Cylinder High |
Cylinder high or LBA |
|||||||
|
Device/Head |
1 |
LBA |
1 |
D |
Head number or LBA |
|||
|
Command |
40h or 41h |
|||||||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - 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.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
V |
V |
V |
V |
|
PREREQUISITES - DRDY set equal to one.
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.
Error recovery performed by the device either with or without retries is vendor specific.
COMMAND CODE - 10h
TYPE - Optional.
PROTOCOL - Non-data.
INPUTS -
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
10h |
|||||||
NORMAL OUTPUTS - If the command is executed in CHS addressing, 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, 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.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
|||||
PREREQUISITES - DRDY set equal to one.
DESCRIPTION - The function performed by this command is vendor specific.
COMMAND CODE - BFh or F6h
TYPE - Optional - Security mode feature set.
PROTOCOL - PIO data out.
INPUTS -
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
BFh or F6h |
|||||||
NORMAL OUTPUTS - None.
ERROR OUTPUTS - Device returns Aborted command error if command is not supported, the device is in Locked mode, or the device is in Frozen mode.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
|||||
PREREQUISITES - Device shall be in Unlocked mode.
DESCRIPTION - The SECURITY DISABLE PASSWORD command requests a transfer of a singlre sector of data from the host including the information specified in Table 12. Then the device checks the transferred password. If the User password or the Master password match, the device disables the lock function. This command does not change the Master password which may be reactivated later by setting a User password.
Table 12 - Security password content
|
Word |
Content |
|
|
0 |
Control word |
|
|
Bit 0 |
Identifier 0=compare user password 1=compare master password |
|
|
Bit 1-15 |
Reserved |
|
|
1-16 |
Password (32 bytes) |
|
|
17-255 |
Reserved |
|
COMMAND CODE - BCh or F3h
TYPE - Optional - Security mode feature set.
PROTOCOL - Non-data.
INPUTS -
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
BCh or F3h |
|||||||
NORMAL OUTPUTS - None.
ERROR OUTPUTS - Device returns Aborted command error if command is not supported, the device is in Locked mode, or the device is in Frozen mode.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
|||||
PREREQUISITES - None
DESCRIPTION - The SECURITY ERASE PREPARE command shall be issued immediately before the SECURITY ERASE UNIT command to enable device erasing and unlocking. This command is to prevent accidental erasure of the device.
COMMAND CODE - BDh or F4h
TYPE - Optional - Security mode feature set.
PROTOCOL - PIO data out.
INPUTS -
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
BDh or F4h |
|||||||
NORMAL OUTPUTS - None.
ERROR OUTPUTS - Device returns Aborted command error if command is not supported, the device is in Locked mode, or the device is in Frozen mode.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
|||||
PREREQUISITES - This command must be immediately preceded by a SECURITY ERASE PREPARE command.
DESCRIPTION - This command requests to transfer a single sector of data from the host as decsribed in Table 12. If the password does not match then the device rejects the command with an Aborted error.
The SECURITY ERASE UNIT command erases all user data. The SECURITY ERASE PREPARE command shall be completed immediately prior to the SECURITY ERASE UNIT command. If the device receives a SECURITY ERASE UNIT command without an immediately prior SECURITY ERASE PREPARE command, the device aborts the SECURITY ERASE UNIT command
This command disables the device lock function, however, the master password is still stored internally within the device and may be reactivated later when a new user password is set.
COMMAND CODE - BEh or F5h
TYPE - Optional - Security mode feature set.
PROTOCOL - Non-data.
INPUTS -
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
BEh or F5h |
|||||||
NORMAL OUTPUTS - None.
ERROR OUTPUTS - Device returns Aborted command error if command is not supported, or the device is in Locked mode.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
|||||
PREREQUISITES - None
DESCRIPTION - The SECURITY FREEZE LOCK command sets the device to frozen mode. After this command is completed any other commands which update the device lock functions are rejected. Frozen mode is quit by power off. If SECURITY FREEZE LOCK is issued when the device is in frozen mode, the command executes and the device remains in frozen mode.
Commands disabled by SECURITY FREEZE LOCK are:
COMMAND CODE - BAh or F1h
TYPE - Optional - Security mode feature set.
PROTOCOL - PIO data out.
INPUTS -
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
BAh or F1h |
|||||||
NORMAL OUTPUTS - None.
ERROR OUTPUTS - Device returns Aborted command error if command is not supported, the device is in Locked mode, or the device is in Frozen mode.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
|||||
PREREQUISITES - None
DESCRIPTION - This command requests a transfer of a single sector of data from the host including the information specified in Table 13. The data transferred controls the function of this command.
Table 13 SECURITY SET PASSWORD data content
|
Word |
Content |
||
|
0 |
Control word |
||
|
Bit 0 Bits 1-7 Bit 8 Bits 9-15 |
Identifier Reserved Security level Reserved |
0=set user password 1=set master password 0=High 1=Maximum |
|
|
1-16 |
Password (32 bytes) |
||
|
17-255 |
Reserved |
||
The setting of the identifier and security level bits interact as shown in Table 14.
Table 14 - Identifier and security level bit interaction
|
Identifier |
Level |
Command result |
|
User |
High |
The password supplied with the command shall be saved as the new user password. The lock function shall be enabled from the next power-on. The device shall then be unlocked by either the user password or the previously set master password. |
|
Master |
High |
This combination shall set a master password but shall not enable the lock function. |
|
User |
Maximum |
The password supplied with the command shall be saved as the new user password. The lock function shall be enabled from the next power-on. The device shall then be unlocked by only the user password. The master password previously set is still stored in the device but shall not be used to unlock the device. |
|
Master |
Maximum |
This combination shall set a master password but shall not enable the lock function |
COMMAND CODE - BBh or F2h
TYPE - Optional - Security mode feature set.
PROTOCOL - PIO data out.
INPUTS -
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
BBh or F2h |
|||||||
NORMAL OUTPUTS - None.
ERROR OUTPUTS - Device returns Aborted command error if command is not supported, or the device is in Frozen mode.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
|||||
PREREQUISITES - None
DESCRIPTION - This command requests to transfer a single sector of data from the host as decsribed in Table 12
If the Identifier bit is set to master and the device is in high security level, then the password supplied shall be compared with the stored master password. If the device is in maximum security level then the unlock shall be rejected.
If the Identifier bit is set to user then the device compares the supplied password with the stored user password.
If the password compare fails then the device returns an abort error to the host and decrements the unlock counter. This counter is initially set to five and is decremented for each password mismatch, this includes password mismatches for all security commands when SECURITY UNLOCK is issued and the device is locked. When this counter reaches zero then all password protected SECURITY UNLOCK and SECURITY ERASE UNIT commands are rejected aborted until a power-on reset or a hard reset. SECURITY UNLOCK commands issued when the device is unlocked have no effect on the unlock counter.
COMMAND CODE - 70h
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 may move the read/write heads.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
Sector number or LBA |
|||||||
|
Cylinder Low |
Cylinder low or LBA |
|||||||
|
Cylinder High |
Cylinder high or LBA |
|||||||
|
Device/Head |
1 |
LBA |
1 |
D |
Head number or LBA |
|||
|
Command |
70h |
|||||||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - Error reporting is vendor specific.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
|||||
PREREQUISITES - DRDY set equal to one.
DESCRIPTION - The function performed by this command is vendor specific, and may or may not aeffect the position of the read/write heads.
COMMAND CODE - EFh
TYPE - The command is mandatory.Each subcommand is optional.
PROTOCOL - Non-data.
INPUTS - The Feature register contains a subcommand code as described in Table 15. Some subcommands use other registers, such as the Sector Count register to pass additional information to the device.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
Subcommand code |
|||||||
|
Sector Count |
Subcommand specific |
|||||||
|
Sector Number |
Subcommand specific |
|||||||
|
Cylinder Low |
Subcommand specific |
|||||||
|
Cylinder High |
Subcommand specific |
|||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
EFh |
|||||||
NORMAL OUTPUTS - See the subcommand descriptions.
ERROR OUTPUTS - If any subcommand input value is not supported or is invalid, the device posts an Aborted Command error.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
||||||
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 15.
At power on, or after a hardware reset, the default setting of the functions specified by the subcommands are vendor specific.
Table 15 - SET FEATURES register definitions
|
Value (see note1) |
|
|
01h |
Obsolete |
|
02h |
Enable write cache |
|
03h |
Set transfer mode based on value in Sector Count register (See Table 16) |
|
04h |
Enable all automatic defect reassignment |
|
33h |
Disable retry |
|
44h |
Length of vendor specific data appended on READ LONG/WRITE LONG commands |
|
54h |
Set cache segments to Sector Count register value |
|
55h |
Disable read look-ahead feature |
|
66h |
Disable reverting to power on defaults |
|
77h |
Disable ECC |
|
81h |
Obsolete |
|
82h |
Disable write cache |
|
84h |
Disable all automatic defect reassignment |
|
88h |
Enable ECC |
|
99h |
Enable retries |
|
9Ah |
Set device maximum average current |
|
AAh |
Enable read look-ahead feature |
|
ABh |
Set maximum prefetch using Sector Count register value |
|
BBh |
4 bytes of vendor specific data appended on READ LONG/WRITE LONG commands |
|
CCh |
Enable reverting to power on defaults |
|
Note: (1) All values not shown are reserved for future definition. |
|
Vendor specific subcommand code ABh allows the host to request the device to set the maximum prefetch to the value in sectors contained in the Sector Count register. Error recovery performed by the device with or without retries is vendor specific.
COMMAND CODE - C6h
TYPE - Mandatory
PROTOCOL - Non-data.
INPUTS - The Sector Count register contains number of sectors per block to use on all following READ/WRITE MULTIPLE commands. It is recommended that tThe host shall set Sector Count values equal to 2, 4, 8, 16, 32, 64, or 128.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
Sectors per block |
|||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
C6h |
|||||||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - If a block count is not supported, a Aborted Command error is posted.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
||||||
PREREQUISITES - DRDY set Equal to one.
DESCRIPTION - This command establishes the block count for READ MULTIPLE and WRITE MULTIPLE 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.
COMMAND CODE - 99h or E6h
TYPE - Optional - Power Management Feature Set.
PROTOCOL - Non-data command.
INPUTS -
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
99h or E6h |
|||||||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - Aborted Command - The device does not support the Power Management feature set.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
||||||
PREREQUISITES - DRDY set equal to one.
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 specific time period of not less than 2 s.
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.
COMMAND CODE - B0h
TYPE - Optional - SMART Feature set. If the SMART feature set is implemented, this command shall be implemented.
PROTOCOL - Non-data command
INPUTS - The Features register shall be set to D9h. The Cylinder Low register shall be set to 4Fh. The Cylinder High register shall be set to C2h.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
D9h |
|||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
4Fh |
|||||||
|
Cylinder High |
C2h |
|||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
B0h |
|||||||
NORMAL OUTPUTS - None
ERROR OUTPUTS - If the device does not support this command, if SMART is not enabled or if the values in the Features, Cylinder Low or Cylinder High registers are invalid, an Aborted command error is posted.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
|||||||
PREREQUISITES - DRDY set equal to one. SMART enabled.
DESCRIPTION - This command disables all SMART capabilities within the device including any and all timer functions related exclusively to this feature. After receipt of this command the device will disable all SMART operations. Attribute values will no longer be monitiored or saved by the device. The state of SMART (either enabled or disabled) will be preserved by the device across power cycles.
Upon receipt of the SMART DISABLE OPERATIONS command from the host, the device sets BSY, disables SMART capabilities and functions, clears BSY and asserts INTRQ.
After receipt of this command by the device, all other SMART commands, with the exception of SMART ENABLE OPERATIONS, are disabled and invalid and shall be aborted by the device (including SMART DISABLE OPERATIONS commands), returning the Aborted command error.
COMMAND CODE - B0h
TYPE - Optional - SMART Feature set. If the SMART feature set is implemented, this command is optional and not recommended.
PROTOCOL - Non-data command
INPUTS - The Features register shall be set to D2h. The Cylinder Low register shall be set to 4Fh. The Cylinder High register shall be set to C2h. The Sector Count register is set to 00h to disable attribute autosave and a value of F1h is set to enable attribute autosave.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
D2h |
|||||||
|
Sector Count |
00h or F1h |
|||||||
|
Sector Number |
||||||||
|
Cylinder Low |
4Fh |
|||||||
|
Cylinder High |
C2h |
|||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
B0h |
|||||||
NORMAL OUTPUTS - None
ERROR OUTPUTS - If the device does not support this command, if SMART is disabled or if the values in the Features, Cylinder Low or Cylinder High registers are invalid, an Aborted command error is posted.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
|||||||
PREREQUISITES - DRDY set equal to one. SMART enabled.
DESCRIPTION - This command enables and disables the optional attribute autosave feature of the device. Depending upon the implementation, this command may either allow the device, after some vendor specified event, to automatically save its updated attribute values to non-volitile memory; or this command may cause the autosave feature to be disabled. The state of the attribute autosave feature (either enabled or disabled) will be preserved by the device across power cycles.
A value of zero written by the host into the device’s Sector Count register before issuing this command will cause this feature to be disabled. Disabling this feature does not preclude the device from saving attribute values to non-volitile memory during some other normal operation such as during a power-on or power-off sequence or during an error recovery sequence.
A value of F1h written by the host into the device’s Sector Count register before issuing this command will cause this feature to be enabled. Any other meaning of this value or any other non-zero value written by the host into this register before issuing this command is vendor specific. The meaning of any non-zero value written to this register at this time will be preserved by the device across power cycles.
If the SMART ENABLE/DISABLE ATTRIBUTE AUTOSAVE command is supported by the device, upon receipt of the command from the host, the device sets BSY, enables or disables the autosave feature (depending on the implementation), clears BSY and asserts INTRQ.
If this command is not supported by the device, the device shall abort the command upon receipt from the host, returning the Aborted command error.
During execution of the autosave routine the device shall not assert BSY nor deassert DRDY. If the device receives a command from the host while executing its autosave routine it must respond to the host within two seconds.
Implementation of this feature is optional and vendor specific.
COMMAND CODE - B0h
TYPE - Optional - SMART Feature set. If the SMART feature set is implemented, this command shall be implemented.
PROTOCOL - Non-data command
INPUTS - The Features register shall be set to D8h. The Cylinder Low register shall be set to 4Fh. The Cylinder High register shall be set to C2h.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
D8h |
|||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
4Fh |
|||||||
|
Cylinder High |
C2h |
|||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
B0h |
|||||||
NORMAL OUTPUTS - None
ERROR OUTPUTS - If the device does not support this command or if the values in the Features, Cylinder Low or Cylinder High registers are invalid, an Aborted command error is posted.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
|||||||
PREREQUISITES -DRDY set equal to one.
DESCRIPTION - This command enables access to all SMART capabilities within the device. Prior to receipt of this command attribute values are neither monitored nor saved by the device. The state of SMART (either enabled or disabled) will be preserved by the device across power cycles. Once enabled, the receipt of subsequent SMART ENABLE OPERATIONS commands shall not affect any of the attribute values.
Upon receipt of this command from the host, the device sets BSY, enables SMART capabilities and functions, clears BSY and asserts INTRQ.
COMMAND CODE - B0h
TYPE - Optional - SMART Feature set. If the SMART feature set is implemented, this command is optional and not recommended.
PROTOCOL - PIO data in
INPUTS - The Features register shall be set to D1h. The Cylinder Low register shall be set to 4Fh. The Cylinder High register shall be set to C2h.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
D1h |
|||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
4Fh |
|||||||
|
Cylinder High |
C2h |
|||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
B0h |
|||||||
NORMAL OUTPUTS - None
ERROR OUTPUTS - If the device does not support this command, if SMART disabled or if the values in the Features, Cylinder Low or Cylinder High registers are invalid, an Aborted command error is posted.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
|||||||
PREREQUISITES - DRDY set equal to one. SMART enabled.
DESCRIPTION - This command returns the device’s attribute thresholds to the host. Upon receipt of this command forrom the host, the device sets BSY, reads the attribute thresholds from non-volitile memory, sets DRQ, clears BSY, asserts INTRQ, and then waits for the host to transfer the 512 bytes of attribute threshold information from the device via the Data register.
The following defines the 512 bytes that make up the attribute threshold information. All multi-byte fields shown in these data structures follow the byte ordering specified in 3.2.5.
The sequence of active attribute thresholds must appear in the same order as their corresponding attribute values (see 8.31.5).
The data structure revision number shall be the same value used in the device attribute values data structure.
Table 18 defines the twelve bytes that make up the information for each threshold entry in the device attribute thresholds data structure. Attribute entries in the individual threshold data structure must be in the same order and correspond to the entries in the individual attribute data structure.
The attribute ID numbers are vendor specific. Any non-zero value in the attribute ID number indicates an active attribute.
Attribute threshold values are to be set at the factory and are not changeable in the field.
The data structure checksum is the two’s compliment of the result of a simple eight-bit addition of the first 511 bytes in the data structure.
Table 17 - Device attribute thresholds data structure
|
Description |
Bytes |
Format |
Type |
|
Data structure revision number = 0x0004h for this revision |
2 |
binary |
Rd only |
|
1st attribute threshold |
12 |
(see Table 18) |
Rd only |
|
..... |
|||
|
..... |
|||
|
..... |
|||
|
30th attribute threshold |
12 |
(see Table 18) |
Rd only |
|
reserved (0x00) |
18 |
Rd only |
|
|
Vendor specific |
131 |
Rd only |
|
|
Data structure checksum |
1 |
Rd only |
|
|
Total bytes |
512 |
Table 18 - Individual threshold data structure
|
Description |
Bytes |
Format |
Type |
|
Attribute ID number |
1 |
binary |
Rd only |
|
Attribute threshold (for comparison with attribute values from 0x00 to 0xFFh) |
1 |
binary |
Rd only |
|
0x00 "always passing" threshold value to be used for code test purposes |
|||
|
0x01 minimum value for normal operation |
|||
|
0xFD maximum value for normal operation |
|||
|
0xFE invalid for threshold value - not to be used |
|||
|
0xFF "always failing" threshold value to be used for code test purposes |
|||
|
Reserved |
10 |
Rd only |
|
|
Total bytes |
12 |
COMMAND CODE - B0h
TYPE - Optional - SMART Feature set. If the SMART feature set is implemented, this command is optional and not recommended.
PROTOCOL - PIO data in
INPUTS - The Features register shall be set to D0h. The Cylinder Low register shall be set to 4Fh. The Cylinder High register shall be set to C2h.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
D0h |
|||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
4Fh |
|||||||
|
Cylinder High |
C2h |
|||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
B0h |
|||||||
NORMAL OUTPUTS - None
ERROR OUTPUTS - If the device does not support this command, if SMART is disabled or if the values in the Features, Cylinder Low or Cylinder High registers are invalid, an Aborted command error is posted.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
|||||||
PREREQUISITES - DRDY set equal to one. SMART enabled.
DESCRIPTION - This command returns the device’s attribute values to the host. Upon receipt of this command from the host, the device sets BSY, saves any updated attribute values to non-volitile memory, sets DRQ, clears BSY, asserts INTRQ, and then waits for the host to transfer the 512 bytes of attribute value information from the device via the Data register.
The following defines the 512 bytes that make up the attribute value information. All multi-byte fields shown in these data structures follow the byte ordering described in 3.2.5.
The number of active attributes and, therefore, number of active attribute values is determined independently by the device manufacturer for each individual device. All active attribute entries should be concatenated together directly after the data structure revsion number. If there are fewer than thirty active attributes implemented on a device, the excess locations in the data structure are reserved for future attribute implementations and are designated as blanks containing the value 0x00h. Thus the first reserved byte following the attribute entries shall be the 363rd byte in the structure, the first SMART capability byte shall be the 369th byte in the structure, etc.
The data structure revision number identifies which version of this data structure is implemented by a device. Upon initial release of this specification, the revision number will be set to 0x0004h. Later revisions, if any, will increment the revision number by one for each new revision. The revision number will be the same for both the attribute value and attribute threshold structures.
Table 20 defines the twelve bytes that make up the information for each attribute entry in the device attibutes data stucture.
Table 19 - Device attributes data structure
|
Description |
Bytes |
Format |
Type |
|
Data structure revision number = 0x0004 for this specification revision |
2 |
binary |
Rd only |
|
1st device attribute |
12 |
(see Table 20) |
Rd/Wrt |
|
... |
|||
|
... |
|||
|
... |
|||
|
30th device attribute |
12 |
(see Table 20) |
Rd/Wrt |
|
reserved (0x00) |
6 |
Rd only |
|
|
SMART capability |
2 |
Rd only |
|
|
reserved (0x00) |
16 |
Rd/Wrt |
|
|
Vendor specific |
125 |
Rd only |
|
|
Data stucture checksum |
1 |
Rd only |
|
|
Total bytes |
512 |
Table 20 - Individual attribute data structure
|
Description |
Bytes |
Format |
Type |
|
Attribute ID number (0x01 to 0xFFh) |
1 |
binary |
Rd only |
|
Status flags |
2 |
bit flags |
Rd only |
|
Pre-failure/advisory bit |
|||
|
Vendor specific (5 bits) |
|||
|
reserved (10 bits) |
|||
|
Attribute value (valid values from 0x01 to 0xFEh) |
1 |
binary |
Rd only |
|
0x00 invalid for attribute value - not to be used |
|||
|
0x01 minimum value |
|||
|
0x64 initial value for all attributes prior to any data collection |
|||
|
0xFD maximum value |
|||
|
0xFE value is not valid |
|||
|
0xFF invalid for attribute value - not to be used |
|||
|
Vendor specific |
8 |
binary |
Rd only |
|
Total bytes |
12 |
The attribute ID numbers and their definitions are vendor specific. Any non-zero value in the attribute ID number indicates an active attribute. Valid values for this byte are from 0x01 through 0xFFh.
Status flag
The range and meaning of the attribute values is described in Table 20. Prior to the monitoring and saving of attribute values, all values are set to 0x64h. The attribute values of 0x00h and 0xFFh are reserved and should not be used by the device.
SMART capability
The data structure checksum is the two’s compliment of the result of a simple eight-bit addition of the first 511 bytes in the data structure.
COMMAND CODE - B0h
TYPE - Optional - SMART Feature set. If the SMART feature set is implemented, this command shall be implemented.
PROTOCOL -Non-data command.
INPUTS - The Features register shall be set to DAh. The Cylinder Low register shall be set to 4Fh. The Cylinder High register shall be set to C2h.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
DAh |
|||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
4Fh |
|||||||
|
Cylinder High |
C2h |
|||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
B0h |
|||||||
NORMAL OUTPUTS - If the device has not detected a thrshold exceeded condition, the device sets the Cylinder Low register to 4Fh and the Cylinder High register to C2h. If the device has detected a threshold exceeded condition, the device sets the Cylinder Low register to F4h and the Cylinder High register to 2Ch.
ERROR OUTPUTS - If the device does not support this command, if SMART is disabled or if the values in the Features, Cylinder Low or Cylinder High registers are invalid, an Aborted command error is posted.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
|||||||
PREREQUISITES - DRDY set equal to one. SMART enabled.
DESCRIPTION - This command is used to communicate the reliability status of the device to the host at the host’s request. Upon receipt of this command the device sets BSY, saves any updated attribute values to non-volatile memory and compares the updated attribute values to the attribute thresholds.
If the device does not detect a threshold exceeded condition, the device loads 4Fh into the Cylinder Low register, C2h into the Cylinder High register, clears BSY and asserts INTRQ.
If the device does detect a thrshold exceeded condition, the device loads F4h into the Cylinder Low register, 2Ch into the Cylinder High register, clears BSY and asserts INTRQ.
If this command is not supported by the device, the device wil abort the command upon receipt from the host, returning an Abort command error.
COMMAND CODE - B0h
TYPE - Optional - SMART Feature set. If the SMART feature set is implemented, this command is optional and not recommended.
PROTOCOL -Non-data command
INPUTS - The Features register shall be set to D3h. The Cylinder Low register shall be set to 4Fh. The Cylinder High register shall be set to C2h.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
D3h |
|||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
4Fh |
|||||||
|
Cylinder High |
C2h |
|||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
B0h |
|||||||
NORMAL OUTPUTS - None
ERROR OUTPUTS - If the device does not support this command, if SMART is disabled or if the values in the Features, Cylinder Low or Cylinder High registers are invalid, an Aborted command error is posted.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
|||||||
PREREQUISITES - NoneDRDY set equal to one. SMART enabled.
DESCRIPTION - This command causes the device to immediately save any updated attribute values to the device’s non-volatile memory regardless of the state of the attribute autosave timer. Upon receipt of this command from the host, the device sets BSY, writes any updated attribute values to non-volatile memory, clears BSY and asserts INTRQ.
COMMAND CODE - 96h or E2h
TYPE - Optional - Power Management Feature Set.
PROTOCOL - Non-data command.
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 11.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
Time period value |
|||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
96h or E2h |
|||||||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - Aborted Command if the device does not support the Power
Management feature set.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
||||||
PREREQUISITES - DRDY set equal to one.
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.
COMMAND CODE - 94h or E0h
TYPE - Optional - Power Management Feature Set.
PROTOCOL - Non-data command.
INPUTS -
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
94h or E0h |
|||||||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - Aborted Command - The device does not support the Power Management feature set.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
||||||
PREREQUISITES - DRDY set equal to one.
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.
COMMAND CODE - E8h
TYPE - Optional.
PROTOCOL - PIO data out.
INPUTS -
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
||||||||
|
Sector Number |
||||||||
|
Cylinder Low |
||||||||
|
Cylinder High |
||||||||
|
Device/Head |
1 |
1 |
D |
|||||
|
Command |
E8h |
|||||||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - Aborted Command if the command is not supported.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
||||||
PREREQUISITES - DRDY set equal to one.
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.
COMMAND CODE - CAh (with retries) or CBh (without retries)
TYPE - Mandatory
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.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
Sector count |
|||||||
|
Sector Number |
Sector number or LBA |
|||||||
|
Cylinder Low |
Cylinder low or LBA |
|||||||
|
Cylinder High |
Cylinder high or LBA |
|||||||
|
Device/Head |
1 |
LBA |
1 |
D |
Head number or LBA |
|||
|
Command |
CAh or CBh |
|||||||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - 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. The amount of data transferred is indeterminant.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
V |
||||
PREREQUISITES - DRDY set equal to one. The host shall initialize the DMA channel.
DESCRIPTION - This command executes in a similar manner to WRITE SECTOR(S) except for the following:
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.
Error recovery performed by the device either with or without retries is vendor specific.
COMMAND CODE - 32h (with retries) or 33h (without retries)
TYPE - Optional.
PROTOCOL - PIO data out.
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 one.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
01h |
|||||||
|
Sector Number |
Sector number or LBA |
|||||||
|
Cylinder Low |
Cylinder low or LBA |
|||||||
|
Cylinder High |
Cylinder high or LBA |
|||||||
|
Device/Head |
1 |
LBA |
1 |
D |
Head number or LBA |
|||
|
Command |
32h or 33h |
|||||||
NORMAL OUTPUTS - None required.
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. The amount of data transferred is indeterminant.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
V |
||||
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 16 bit transfers with the vendor specific byte in bits 7 through 0. Bits 15 through 8 shall be ignored by the host.. BIOS and driver developers The host shall a shall use PIO mode 0 when using this command.
Error recovery performed by the device either with or without retries is vendor specific.
Note 22 - The committee is considering removing the READ LONG and WRITE LONG commands in a future versions of this ATA standard.
COMMAND CODE - C5h
TYPE - Mandatory
PROTOCOL - PIO data out.
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.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
Sector count |
|||||||
|
Sector Number |
Sector number or LBA |
|||||||
|
Cylinder Low |
Cylinder low or LBA |
|||||||
|
Cylinder High |
Cylinder high or LBA |
|||||||
|
Device/Head |
1 |
LBA |
1 |
D |
Head number or LBA |
|||
|
Command |
C5h |
|||||||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - 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. The amount of data transferred is indeterminent.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
V |
||||
PREREQUISITES - DRDY set equal to one. If bit 8 of Word 59 in the IDENTIFY DEVICE response is equal to zero, 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 or the default if no intervening SET MULTIPLE command has been issued..
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 the default or 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 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.
COMMAND CODE - 30h (with retries) or 31h (without retries)
TYPE - Mandatory.
PROTOCOL - PIO data out.
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.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
Sector count |
|||||||
|
Sector Number |
Sector number or LBA |
|||||||
|
Cylinder Low |
Cylinder low or LBA |
|||||||
|
Cylinder High |
Cylinder high or LBA |
|||||||
|
Device/Head |
1 |
LBA |
1 |
D |
Head number or LBA |
|||
|
Command |
30h or 31h |
|||||||
NORMAL OUTPUTS - None required.
ERROR OUTPUTS - 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. The amount of data transferred is indeterminant.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
V |
||||
PREREQUISITES - DRDY set equal to one.
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.
COMMAND CODE - 3Ch
TYPE - Optional.
PROTOCOL - PIO data out.
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.
|
Register |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
Features |
||||||||
|
Sector Count |
Sector count |
|||||||
|
Sector Number |
Sector number or LBA |
|||||||
|
Cylinder Low |
Cylinder low or LBA |
|||||||
|
Cylinder High |
Cylinder high or LBA |
|||||||
|
Device/Head |
1 |
LBA |
1 |
D |
Head number or LBA |
|||
|
Command |
3Ch |
|||||||
NORMAL OUTPUTS - None required.
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. The amount of data transferred is indeterminant.
|
Status register |
Error register |
||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
V |
V |
V |
V |
V |
V |
V |
V |
V |
|
PREREQUISITES - DRDY set equal to one.
DESCRIPTION - This command is similar to the WRITE SECTOR(S) command, except that each sector is verified before the command is completed.