Freescale Semiconductor MPC5200 Application Note Download Page 20

AN3223
Rev. 0, 2/2006

How to Reach Us:

Home Page:

www.freescale.com

E-mail:

[email protected]

USA/Europe or Locations Not Listed:

Freescale Semiconductor
Technical Information Center, CH370
1300 N. Alma School Road
Chandler, Arizona 85224
+1-800-521-6274 or +1-480-768-2130
[email protected]

Europe, Middle East, and Africa:

Freescale Halbleiter Deutschland GmbH
Technical Information Center
Schatzbogen 7
81829 Muenchen, Germany
+44 1296 380 456 (English)
+46 8 52200080 (English)
+49 89 92103 559 (German)
+33 1 69 35 48 48 (French)
[email protected]

Japan:

Freescale Semiconductor Japan Ltd.
Headquarters
ARCO Tower 15F
1-8-1, Shimo-Meguro, Meguro-ku,
Tokyo 153-0064
Japan
0120 191014 or +81 3 5437 9125
[email protected]

Asia/Pacific:

Freescale Semiconductor Hong Kong Ltd.
Technical Information Center
2 Dai King Street
Tai Po Industrial Estate
Tai Po, N.T., Hong Kong
+800 2666 8080
[email protected]

For Literature Requests Only:

Freescale Semiconductor Literature Distribution Center
P.O. Box 5405
Denver, Colorado 80217
1-800-441-2447 or 303-675-2140
Fax: 303-675-2150
[email protected]

Information in this document is provided solely to enable system and software 
implementers to use Freescale Semiconductor products. There are no express or 
implied copyright licenses granted hereunder to design or fabricate any integrated 
circuits or integrated circuits based on the information in this document.

Freescale Semiconductor reserves the right to make changes without further notice to 
any products herein. Freescale Semiconductor makes no warranty, representation or 
guarantee regarding the suitability of its products for any particular purpose, nor does 
Freescale Semiconductor assume any liability arising out of the application or use of any 
product or circuit, and specifically disclaims any and all liability, including without 
limitation consequential or incidental damages. “Typical” parameters that may be 
provided in Freescale Semiconductor data sheets and/or specifications can and do vary 
in different applications and actual performance may vary over time. All operating 
parameters, including “Typicals”, must be validated for each customer application by 
customer’s technical experts. Freescale Semiconductor does not convey any license 
under its patent rights nor the rights of others. Freescale Semiconductor products are 
not designed, intended, or authorized for use as components in systems intended for 
surgical implant into the body, or other applications intended to support or sustain life, 
or for any other application in which the failure of the Freescale Semiconductor product 
could create a situation where personal injury or death may occur. Should Buyer 
purchase or use Freescale Semiconductor products for any such unintended or 
unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor and 
its officers, employees, subsidiaries, affiliates, and distributors harmless against all 
claims, costs, damages, and expenses, and reasonable attorney fees arising out of, 
directly or indirectly, any claim of personal injury or death associated with such 
unintended or unauthorized use, even if such claim alleges that Freescale 
Semiconductor was negligent regarding the design or manufacture of the part. 

Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc.
 The described product is a PowerPC microprocessor core. The PowerPC name is a 
trademark of IBM Corp. and is used under license. All other product or service names 
are the property of their respective owners.

© Freescale Semiconductor, Inc. 2006. All rights reserved.

Summary of Contents for MPC5200

Page 1: ...roller is based on an e3001 core using the PowerPCTM instruction set The ATA interface is used to connect Hard disks CD ROMs DVDs Flash storage devices The MPC5200 ATA interface is fully compatible wi...

Page 2: ...ransfer is driven either by MPC5200 core PIO or by the BestComm DMA engine MDMA UDMA BestComm is designed to offload the MPC5200 core and can transfer data to from different peripherals simultaneously...

Page 3: ...2 0 Vdc ViL Voltage input low logical zero 0 8 Vdc VoH Voltage output high IoH 400 A logical one 2 4 Vdc VoL Voltage output low IoL 12 mA logical zero 0 5 Vdc Table 2 ATA Signals ATA Signal ATA Acron...

Page 4: ...5 18 Device active or slave Device 1 present DASP 39 Device address bit 0 DA0 ATA_SA_0 35 Device address bit 1 DA1 ATA_SA_1 33 Device address bit 2 DA2 ATA_SA_2 36 DMA acknowledge DMACK ATA_DACK_B 29...

Page 5: ...DD 4 DD 3 DD 2 DD 1 DD 0 First transfer Byte 1 Byte 0 Second transfer Byte 3 Byte 2 Last transfer Byte n 1 Byte n 2 Table 4 ATA Register Address Chip Select Decoding Addresses Functions MPC5200 regis...

Page 6: ...by using the LBA bit in the ATA drive device head register The LBA bit must be set if the host uses LBA addressing mode The MPC5200 allows 27 bit LBA addressing per device 2 7 ATA Programming Model F...

Page 7: ...start with the software examples published on the sample code CD These software examples include a set of already pre cooked BestComm tasks that handle all required peripherals via the BestComm C API...

Page 8: ...rdized function calls ATA device e g DVD drive ATA cable MDMA UDMA data ATA data buffers ATA software driver ATA level shifters ATA host interface MPC5200 Embedded computer Peripheral FIFOs Set of pre...

Page 9: ...le ATA clock in CDM clock enable register Install ATA interrupt handler and BestComm interrupt handler for MDMA UDMA modes Enable ATA BestComm interrupt 2 PIO initialization BestComm not needed for PI...

Page 10: ...AD 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 SECURI...

Page 11: ...Initialization Protocol Steps 1 Select drive according to device selection protocol in ATA ATAPI 4 spec a Wait for BSY 0 and DRQ 0 in ATA drive alternate status register b Write ATA drive device head...

Page 12: ...tcomm In the case of Bestcomm when snooping is not used cache needs to be invalidated first 2 9 3 PIO Data Write 2 9 3 1 PIO Data Out Command Protocol Steps 1 Select drive according to device selectio...

Page 13: ...READ in ATA drive device command register 8 If UDMA set UDMA bit UDAMA in ATA drive device command register Clear it for MDMA 9 Set Drive Interrupt bit IE in ATA drive device command register NOTE Thi...

Page 14: ...ive device command register by writing a logical zero bits HUT FR FE IE UDAMA READ WRITE The pending ATA drive interrupt is cleared by reading of the ATA drive device sstatus register as it is specifi...

Page 15: ...look ahead write cache etc First they need to be checked in the identify table to see if supported and then enabled by the SET FEATURES command Using IPBI 132 MHz as described above Utilizing Bestcom...

Page 16: ...d in Figure 4 is not as expected The answer is simple it is writing reading the same LBA address with the look ahead write cache feature disabled The time needed to read data from the interface is muc...

Page 17: ...E32B Programming Environments Manual for 32 Bit Implementations of the PowerPC Architecture www freescale com G2CORERM G2 Core Reference Manual www freescale com ATA ATAPI 4 AT Attachment with Packet...

Page 18: ...ata_dma1 MBAR 0x3A10 32 ATA multiword DMA timing 2 ata_dma2 MBAR 0x3A14 32 ATA ultra DMA timing 1 ata_udma1 MBAR 0x3A18 32 ATA ultra DMA timing 2 ata_udma2 MBAR 0x3A1C 32 ATA ultra DMA timing 3 ata_ud...

Page 19: ...res ata_drive_ftr MBAR 0x3A64 8 write only ATA drive error 8 read only ATA drive sector count ata_drive_sc MBAR 0x3A68 8 R W ATA drive sector number ata_drive_sn MBAR 0x3A6C 8 R W ATA drive cylinder l...

Page 20: ...emiconductor assume any liability arising out of the application or use of any product or circuit and specifically disclaims any and all liability including without limitation consequential or inciden...

Reviews: