5. IDE Command Descriptions
32
If the drive is not on the desired track, an implied seek is performed. Once on the
desired track, the drive searches for the appropriate ID field. If the ID is read correctly,
data loaded in the buffer, followed by the ECC bytes, is written to the sector's data field.
Upon command completion, the command block registers contain the cylinder, head,
and sector number of the last sector read. The sector count is zero after successful
execution of the command.
Multiple sector writes set DRQ and generate an interrupt each time the buffer is ready to
be filled. DRQ is reset and BSY is set immediately when the host fills the sector buffer.
If an error occurs during a multiple sector write, the write will terminate at the sector
where the error occurs. The command block indicates the error's sector location. The
host then reads the command block to determine what error has occurred, and on which
sector. If no error is detected, the cylinder, head, and sector registers are updated to
point to the next sequential sector.
A write long is executed by setting the long bit in the command code. The write long
command writes the data and the ECC bytes directly from the sector buffer. The drive
itself will not generate the ECC bytes for the write long command. Data byte transfers
are 16 bits. ECC bytes are 8-bit transfers.
Verify Sectors (4xh)
This command works the same as the read sectors command except that no data is
transferred. Up to 256 sectors are read into the sector buffer, and ECC bytes verified,
beginning at the location specified by the command block.
When each sector is verified the command block is updated, but no data request or
interrupt is set to indicate that the sector has been verified. When all sectors are
verified, an interrupt is generated to indicate that all sectors have been transferred. A
value of 00 in the sector count register indicates that 256 sectors are to be verified.
Read look-aheads are enabled for this command.
Format Track (50h)
The format command's purpose is to provide a means by which defective sectors may
be either marked bad or reassigned. This command has been used on other drives to
perform the low level formatting job of placing the header and creating data fields for all
tracks on the drive. You do not need to execute a format command prior to operating
the drive because all required low level formatting for this hard sectored drive is done
during factory certification.
IDE drives support the format command only to allow any sectors that become defective
to be handled as required by different operating systems. The format command
operates on one logical track at a time. All sectors on that track are filled with zeros.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com