Travelstar 5K160 (PATA) Hard Disk Drive Specification
83
/
188
13 Command Protocol
The commands are grouped into different classes according to the protocols followed for command execution. The
command classes with their associated protocols are defined below.
For all commands, the host must first check if BSY=1, and should proceed no further unless and until BSY=0. For
all commands, the host must also wait for RDY=1 before proceeding.
A device must maintain either BSY=1 or DRQ=1 at all times until the command is completed. The INTRQ signal is
used by the device to signal most, but not all, times when the BSY bit is changed from 1 to 0 during command
execution.
A command shall only be interrupted with a hardware or software reset. The result of writing to the Command
register while BSY=1 or DRQ=1 is unpredictable and may result in data corruption. A command should only be
interrupted by a reset at times when the host thinks there may be a problem, such as a device that is no longer
responding.
Interrupts are cleared when the host reads the Status Register, issues a reset, or writes to the Command Register.
"Figure 132 Timeout Values" on page 179 shows the device timeout values.
13.1
Data In Commands
These commands are:
•
Device Configuration IDENTIFY
•
Identify Device
•
Read Buffer
•
Read Long
•
Read Multiple
•
Read Multiple EXT
•
Read Sector(s)
•
Read Sector(s) EXT
•
S.M.A.R.T. Read Attribute Values
•
S.M.A.R.T. Read Attribute Thresholds
•
S.M.A.R.T. Read log sector
Execution includes the transfer of one or more 512 byte (>512 bytes on Read Long) sectors of data from the device
to the host.
1.
The host writes any required parameters to the Features, Sector Count, LBA and Device Registers.
2.
The host writes the command code to the Command Register.
3.
For each sector (or block) of data to be transferred:
A) The device sets BSY=1 and prepares for data transfer.
B) When a sector (or block) of data is available for transfer to the host, the device sets BSY=0, sets DRQ=1,
and interrupts the host.
C) In response to the interrupt, the host reads the Status Register.
D) The device clears the interrupt in response to the Status Register being read.
E)
The host reads one sector (or block) of data via the Data Register.
F)
The device sets DRQ=0 after the sector (or block)has been transferred to the host.
4.
For the Read Long command:
A) The device sets BSY=1 and prepares for data transfer.
B) When the sector of data is available for transfer to the host, the device sets BSY=0, sets DRQ=1, and
interrupts the host.