
MPC5200 ATA Interface, Rev. 0
ATA Interface
Freescale Semiconductor
10
intended to help software engineers understand how to initialize the MPC5200 ATA interface and how to
execute standard commands.
NOTE
Flash storage media require a different set of commands that are not
described in this application note. It is recommended to first read the
identify table for each ATA device found on the ATA bus. It contains
specific information needed to handle the device properly. For protocol and
identification information details, see
Attachment with Packet Interface
Extension,
ANSI NCITS 317-1998.
.
2.9.1
Drive Initialization
2.9.1.1
PIO Initialization Protocol Steps
1. Select drive according to device selection protocol in ATA/ATAPI-4 spec:
a) Wait for BSY
6
=0 and DRQ
7
= 0 in ATA drive alternate status register
Table 5. ATA Protocols
Protocol
Commands
Device reset protocol
—
Execute device diagnostic
protocol
—
Device selection protocol
—
PIO data-in command protocol
CFA
TRANSLATE
SECTOR
,
IDENTIFY
DEVICE
,
IDENTIFY
PACKET
DEVICE
,
READ
BUFFER
,
READ
MULTIPLE
,
READ
SECTOR
(
S
),
SMART
READ
DATA
PIO data-out command protocol
CFA
WRITE
MULTIPLE
WITHOUT
ERASE
,
CFA
WRITE
SECTORS
WITHOUT
ERASE
,
DOWNLOAD
MICROCODE
,
SECURITY
DISABLE
PASSWORD
,
SECURITY
ERASE
UNIT
,
SECURITY
SET
PASSWORD
,
SECURITY
UNLOCK
,
WRITE
BUFFER
,
WRITE
MULTIPLE
,
WRITE
SECTOR
(
S
)
Non-data command protocol
CFA
ERASE
SECTORS
,
CFA
REQUEST
EXTENDED
ERROR
CODE
,
CHECK
POWER
MODE
,
FLUSH
CACHE
,
GET
MEDIA
STATUS
IDLE
,
IDLE
IMMEDIATE
,
INITIALIZE
DEVICE
PARAMETERS
,
MEDIA
EJECT
,
MEDIA
LOCK
,
MEDIA
UNLOCK
,
NOP
,
READ
NATIVE
MAX
ADDRESS
,
READ
VERIFY
SECTOR
(
S
,
SECURITY
ERASE
PREPARE
,
SECURITY
FREEZE
LOCK
SEEK
,
SET
FEATURES
,
SET
MAX
ADDRESS
,
SET
MULTIPLE
MODE
SLEEP
,
SMART
DISABLE
OPERATION
,
SMART
ENABLE
/
DISABLE
AUTOSAVE
,
SMART
ENABLE
OPERATION
,
SMART
EXECUTE
OFFLINE
IMMEDIATE
,
SMART
RETURN
STATUS
,
STANDBY
,
STANDBY
IMMEDIATE
DMA command protocol
READ
DMA
,
WRITE
DMA
Packet non-data and PIO data
command protocol
PACKET
,
SERVICE
Packet DMA command protocol
PACKET
,
SERVICE
Read/write DMA queued
command protocol
READ
DMA
QUEUED
,
SERVICE
,
WRITE
DMA
QUEUED
6. BSY - The Drive Busy bit indicates that the device is busy.
7. DRQ - The Data Request bit indicates that the device is ready to transfer a word of data between the host and the device.