(informative)
The following four tables are provided to facilitate the understanding of the ATA command set. Table E.1 provides information on which command codes are currently defined. Table E.2 provides a list of all of the ATA commands in order of command code. Table E.3 provides a summary of all commands with the protocol, required use, command code and registers used for each. Table E.4 shows the status and error bits used by each command.
|
x0 |
x1 |
x2 |
x3 |
x4 |
x5 |
x6 |
x7 |
x8 |
x9 |
xA |
xB |
xC |
xD |
xE |
xF |
|
|
0x |
C |
R |
R |
R |
R |
R |
R |
R |
C |
R |
R |
R |
R |
R |
R |
R |
|
1x |
C |
O |
O |
O |
O |
O |
O |
O |
O |
O |
O |
O |
O |
O |
O |
O |
|
2x |
C |
C |
C |
C |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
|
3x |
C |
C |
C |
C |
R |
R |
R |
R |
R |
R |
R |
R |
C |
R |
R |
R |
|
4x |
C |
C |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
|
5x |
C |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
|
6x |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
|
7x |
C |
O |
O |
O |
O |
O |
O |
O |
O |
O |
O |
O |
O |
O |
O |
O |
|
8x |
V |
V |
V |
V |
V |
V |
V |
V |
V |
V |
V |
V |
V |
V |
V |
V |
|
9x |
C |
C |
C |
R |
C |
C |
C |
C |
C |
C |
V |
R |
R |
R |
R |
R |
|
Ax |
C |
C |
C |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
|
Bx |
C |
R |
R |
R |
R |
R |
R |
R |
R |
R |
CR |
CR |
CR |
CR |
CR |
CR |
|
Cx |
V |
V |
V |
V |
C |
C |
C |
R |
C |
C |
C |
C |
R |
R |
R |
R |
|
Dx |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
R |
O |
O |
O |
C |
C |
|
Ex |
C |
C |
C |
C |
C |
C |
C |
R |
C |
O |
R |
R |
C |
C |
C |
C |
|
Fx |
V |
C |
C |
C |
C |
C |
C |
V |
V |
V |
V |
V |
V |
V |
V |
V |
|
Key: C = a unique command R = Reserved, undefined in current specifications V = Vender specific commands O = Obsolete |
||||||||||||||||
Table E.2 - Commands sorted by command value (continued)
|
Command name |
Command code |
|
|
NOP |
00h |
|
|
ATAPI SOFT RESET |
08h |
|
|
RECALIBRATE |
10h |
|
|
READ SECTOR(S) (w/ retry) |
20h |
|
|
READ SECTOR(S) (w/o retry) |
21h |
|
|
READ LONG (w/ retry) |
22h |
|
|
READ LONG (w/o retry) |
23h |
|
|
WRITE SECTOR(S) (w/ retry) |
30h |
|
|
WRITE SECTOR(S) (w/o retry) |
31h |
|
|
WRITE LONG (w/ retry) |
32h |
|
|
WRITE LONG (w/o retry) |
33h |
|
|
WRITE VERIFY |
3Ch |
|
|
READ VERIFY SECTOR(S) (w/ retry) |
40h |
|
|
READ VERIFY SECTOR(S) (w/o retry) |
41h |
|
|
FORMAT TRACK |
50h |
|
|
SEEK |
70h |
Table E.2 - Commands sorted by command value (concluded)
|
Command name |
Command code |
||
|
EXECUTE DEVICE DIAGNOSTIC |
90h |
||
|
INITIALIZE DEVICE PARAMETERS |
91h |
||
|
DOWNLOAD MICROCODE |
92h |
||
|
STANDBY IMMEDIATE (See note 1) |
94h E0h |
||
|
IDLE IMMEDIATE (See note 1) |
95h E1h |
||
|
STANDBY (See note 1) |
96h E2h |
||
|
IDLE (See note 1) |
97h E3h |
||
|
CHECK POWER MODE (See note 1) |
98h E5h |
||
|
SLEEP (See note 1) |
99h E6h |
||
|
ATAPI PACKET |
A0h |
||
|
ATAPI IDENTIFY DEVICE |
A1h |
||
|
ATAPI SERVICE |
A2h |
||
|
SMART |
B0h |
||
|
READ MULTIPLE |
C4h |
||
|
WRITE MULTIPLE |
C5h |
||
|
SET MULTIPLE MODE |
C6h |
||
|
READ DMA (w/ retry) |
C8h |
||
|
READ DMA (w/o retry) |
C9h |
||
|
WRITE DMA (w/ retry) |
CAh |
||
|
WRITE DMA (w/o retry) |
CBh |
||
|
DOOR LOCK |
DEh |
||
|
|
DOOR UNLOCK |
DFh |
|
|
STANDBY IMMEDIATE (See note 1) |
E0h 94h |
||
|
IDLE IMMEDIATE (See note 1) |
E1h 95h |
||
|
STANDBY (See note 1) |
E2h 96h |
||
|
IDLE (See note 1) |
E3h 97h |
||
|
READ BUFFER |
E4h |
||
|
CHECK POWER MODE (See note 1) |
E5h 98h |
||
|
SLEEP (See note 1) |
E6h 99h |
||
|
WRITE BUFFER |
E8h |
||
|
IDENTIFY DEVICE |
ECh |
||
|
MEDIA EJECT |
EDh |
||
|
IDENTIFY DEVICE DMA |
EEh |
||
|
SET FEATURES |
EFh |
||
|
SECURITY SET PASSWORD (See note 1) |
F1h-BAh |
||
|
SECURITY UNLOCK (See note 1) |
F2h-BBh |
||
|
SECURITY ERASE PREPARE (See note 1) |
F3h-BCh |
||
|
SECURITY ERASE UNIT (See note 1) |
F4h-BDh |
||
|
SECURITY FREEZE (See note 1) |
F5h-BEh |
||
|
SECURITY DISABLE PASSWORD (See note 1) |
F6h-BFh |
||
|
Note: 1 These commands have two command codes and appear in this table twice, once for each command code. |
|||
Table E.3 - Command codes and parameters (continued)
|
proto |
Command |
typ |
Command |
Parameters used |
||||
|
code |
FR |
SC |
SN |
CY |
DH |
|||
|
ND |
CHECK POWER MODE |
O |
98h E5h |
y |
D |
|||
|
ND |
DOOR LOCK |
O |
DEh |
D |
||||
|
ND |
DOOR UNLOCK |
O |
DFh |
D |
||||
|
PO |
DOWNLOAD MICROCODE |
O |
92h |
y |
y |
y |
y |
D |
|
ND |
EXECUTE DEVICE DIAGNOSTIC |
M |
90h |
D* |
||||
|
VS |
FORMAT TRACK |
V |
50h |
d |
||||
|
PI |
IDENTIFY DEVICE |
M |
ECh |
D |
||||
|
DM |
IDENTIFY DEVICE DMA |
O |
EEh |
D |
||||
|
ND |
IDLE |
O |
97h E3h |
y |
D |
|||
|
ND |
IDLE IMMEDIATE |
O |
95h E1h |
D |
||||
|
ND |
INITIALIZE DEVICE PARAMETERS |
M |
91h |
y |
y |
|||
|
ND |
MEDIA EJECT |
O |
EDh |
D |
||||
|
ND |
NOP |
O |
00h |
D |
||||
|
PI |
READ BUFFER |
O |
E4h |
D |
||||
|
DM |
READ DMA (w/ retry) |
M |
C8h |
y |
y |
y |
y |
|
|
DM |
READ DMA (w/o retry) |
M |
C9h |
y |
y |
y |
y |
|
|
PI |
READ LONG (w/ retry) |
O |
22h |
y |
y |
y |
y |
|
|
PI |
READ LONG (w/o retry) |
O |
23h |
y |
y |
y |
y |
|
|
PI |
READ MULTIPLE |
M |
C4h |
y |
y |
y |
y |
|
|
PI |
READ SECTOR(S) (w/ retry) |
M |
20h |
y |
y |
y |
y |
|
|
PI |
READ SECTOR(S) (w/o retry) |
M |
21h |
y |
y |
y |
y |
|
|
ND |
READ VERIFY SECTOR(S) (w/ retry) |
M |
40h |
y |
y |
y |
y |
|
|
ND |
READ VERIFY SECTOR(S) (w/o retry) |
M |
41h |
y |
y |
y |
y |
|
|
ND |
RECALIBRATE |
O |
10h |
D |
||||
|
PO |
SECURITY DISABLE PASSWORD |
O |
BFh-F6h |
D |
||||
|
ND |
SECURITY ERASE PREPARE |
O |
BCh-F3h |
D |
||||
|
PO |
SECURITY ERASE UNIT |
O |
BDh-F4h |
D |
||||
|
ND |
SECURITY FREEZE |
O |
BEh-F5 |
D |
||||
|
PO |
SECURITY SET PASSWORD |
O |
BAh-F1H |
D |
||||
|
PO |
SECURITY UNLOCK |
O |
BBh-F2h |
D |
||||
|
ND |
SEEK |
M |
70h |
y |
y |
y |
||
|
ND |
SET FEATURES |
M |
EFh |
y |
D |
|||
|
ND |
SET MULTIPLE MODE |
M |
C6h |
y |
D |
|||
|
ND |
SLEEP |
O |
99h E6h |
D |
||||
|
ND |
SMART DISABLE OPERATIONS |
O |
0B0h |
y |
y |
D |
||
|
ND |
SMART ENABLE/DISABLE AUTOSAV |
O |
0B0h |
y |
y |
y |
D |
|
|
ND |
SMART ENABLE OPERATIONS |
O |
0B0h |
y |
y |
D |
||
|
PI |
SMART READ THRESHOLDS |
O |
0B0h |
y |
y |
D |
||
|
PI |
SMART READ VALUES |
O |
0B0h |
y |
y |
D |
||
|
ND |
SMART RETURN STATUS |
O |
0B0h |
y |
y |
D |
||
|
ND |
SMART SAVE VALUES |
O |
0B0h |
y |
y |
D |
||
|
ND |
STANDBY |
O |
96h E2h |
y |
D |
|||
|
ND |
STANDBY IMMEDIATE |
O |
94h E0h |
D |
||||
|
PO |
WRITE BUFFER |
O |
E8h |
D |
||||
|
DM |
WRITE DMA (w/ retry) |
M |
CAh |
y |
y |
y |
y |
|
|
DM |
WRITE DMA (w/o retry) |
M |
CBh |
y |
y |
y |
y |
|
|
PO |
WRITE LONG (w/ retry) |
O |
32h |
* |
y |
y |
y |
y |
|
PO |
WRITE LONG (w/o retry) |
O |
33h |
* |
y |
y |
y |
y |
Table E.3 - Command codes and parameters (concluded)
|
proto |
Command |
typ |
Command |
Parameters used |
||||
|
code |
FR |
SC |
SN |
CY |
DH |
|||
|
PO |
WRITE MULTIPLE |
M |
C5h |
* |
y |
y |
y |
y |
|
PO |
WRITE SECTOR(S) (w/ retry) |
M |
30h |
* |
y |
y |
y |
y |
|
PO |
WRITE SECTOR(S) (w/o retry) |
M |
31h |
* |
y |
y |
y |
y |
|
PO |
WRITE VERIFY |
O |
3Ch |
* |
y |
y |
y |
y |
|
VS |
Vendor specific |
V |
9Ah,C0h-C3h,8xh, F0h-FFh |
|||||
|
- |
Reserved: all remaining codes |
R |
||||||
|
Key: DM = DMA command ND = Non-data command PI = PIO data in command PO = PIO data out command VS = Vendor specific command O = Optional M = Mandatory R = Reserved V = Vendor specific implementation CY = Cylinder registers SC = Sector Count register DH = Device/Head register SN = Sector Number register FR = Features register (see command descriptions for use) y = the register contains a valid parameter for this command. For the Device/Head register, y means both the device and head parameters are used. D = only the device parameter is valid and not the head parameter. d = the device parameter is valid, the usage of the head parameter vendor specific. D* = Addressed to device 0 but both devices execute it. * = Maintained for compatibility (see 6.2.10) |
||||||||
Table E.4 - Status and error usage (continued)
|
Status register |
Error register |
|||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
|
ACKNOWLEDGE MEDIA CHANGE |
V |
V |
V |
V |
||||||
|
BOOT - POST-BOOT |
V |
V |
V |
V |
||||||
|
BOOT - PRE-BOOT |
V |
V |
V |
V |
||||||
|
CHECK POWER MODE |
V |
V |
V |
V |
||||||
|
DOOR LOCK |
V |
V |
V |
V |
||||||
|
DOOR UNLOCK |
V |
V |
V |
V |
||||||
|
DOWNLOAD MICROCODE |
V |
V |
V |
V |
||||||
|
EXECUTE DEVICE DIAGNOSTIC |
V |
V |
V |
See 8.5 |
||||||
|
FORMAT TRACK |
V |
V |
V |
V |
V |
V |
V |
V |
V |
|
|
IDENTIFY DEVICE |
V |
|||||||||
|
IDENTIFY DEVICE DMA |
V |
|||||||||
|
IDLE |
V |
V |
V |
V |
||||||
|
IDLE IMMEDIATE |
V |
V |
V |
V |
||||||
|
INITIALIZE DEVICE PARAMETERS |
V |
V |
||||||||
|
MEDIA EJECT |
V |
V |
V |
V |
||||||
|
NOP |
V |
V |
V |
V |
||||||
|
READ BUFFER |
V |
V |
V |
V |
||||||
|
READ DMA (w/ retry) |
V |
V |
V |
V |
V |
V |
V |
V |
V |
|
|
READ DMA (w/o retry) |
V |
V |
V |
V |
V |
V |
V |
V |
V |
|
|
READ LONG (w/ retry) |
V |
V |
V |
V |
V |
V |
V |
|||
|
READ LONG (w/o retry) |
V |
V |
V |
V |
V |
V |
V |
|||
|
READ MULTIPLE |
V |
V |
V |
V |
V |
V |
V |
V |
V |
|
|
READ SECTOR(S) (w/ retry) |
V |
V |
V |
V |
V |
V |
V |
V |
V |
|
|
READ SECTOR(S) (w/o retry) |
V |
V |
V |
V |
V |
V |
V |
V |
V |
|
|
READ VERIFY SECTOR(S) (w/ retry) |
V |
V |
V |
V |
V |
V |
V |
V |
V |
|
Table E.4 - Status and error usage (concluded)
|
Status register |
Error register |
|||||||||
|
DRDY |
DF |
CORR |
ERR |
BBK |
UNC |
IDNF |
ABRT |
TK0NF |
AMNF |
|
|
READ VERIFY SECTOR(S) (w/o retry) |
V |
V |
V |
V |
V |
V |
V |
V |
V |
|
|
RECALIBRATE |
V |
V |
V |
V |
V |
|||||
|
SECURITY DIS PASSWORD |
V |
V |
V |
V |
||||||
|
SECURITY ERASE PREP |
V |
V |
V |
V |
||||||
|
SECURITY ERASE UNIT |
V |
V |
V |
V |
||||||
|
SECURITY FREEZE |
V |
V |
V |
V |
||||||
|
SECURITY SET PASSWRD |
V |
V |
V |
V |
||||||
|
SECURITY UNLOCK |
V |
V |
V |
V |
||||||
|
SEEK |
V |
V |
V |
V |
V |
|||||
|
SET FEATURES |
V |
V |
V |
V |
||||||
|
SET MULTIPLE MODE |
V |
V |
V |
V |
||||||
|
SLEEP |
V |
V |
V |
V |
||||||
|
SMART DISABLE OPS |
V |
V |
V |
|||||||
|
SMART EN/DIS AUTOSAVE |
V |
V |
V |
|||||||
|
SMART ENABLE OPS |
V |
V |
V |
|||||||
|
SMART READ THRSHOLDS |
V |
V |
V |
V |
||||||
|
SMART READ VALUES |
V |
V |
V |
V |
||||||
|
SMART RETURN STATUS |
V |
V |
V |
|||||||
|
SMART SAVE VALUES |
V |
V |
V |
V |
V |
V |
||||
|
STANDBY |
V |
V |
V |
V |
||||||
|
STANDBY IMMEDIATE |
V |
V |
V |
V |
||||||
|
WRITE BUFFER |
V |
V |
V |
V |
||||||
|
WRITE DMA (w/ retry) |
V |
V |
V |
V |
V |
V |
||||
|
WRITE DMA (w/o retry) |
V |
V |
V |
V |
V |
V |
||||
|
WRITE LONG (w/ retry) |
V |
V |
V |
V |
V |
V |
||||
|
WRITE LONG (w/o retry) |
V |
V |
V |
V |
V |
V |
||||
|
WRITE MULTIPLE |
V |
V |
V |
V |
V |
V |
||||
|
WRITE SECTOR(S) (w/ retry) |
V |
V |
V |
V |
V |
V |
||||
|
WRITE SECTOR(S) (w/o retry) |
V |
V |
V |
V |
V |
V |
||||
|
WRITE VERIFY |
V |
V |
V |
V |
V |
V |
V |
V |
V |
|
|
Invalid command code |
V |
V |
V |
V |
||||||
|
Key: V = valid on this command |
||||||||||