MPC8560 PowerQUICC III Compact Flash Interface Design

Embed Size (px)

Text of MPC8560 PowerQUICC III Compact Flash Interface Design

  • Freescale SemiconductorApplication Note

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

    This document describes the implementation of a Compact Flash memory controller and interface on the local bus of a PowerQUICC MPC8560 processor. This implementation uses a user-programmable machine (UPM) to generate the required control signals and timing for the compact flash memory device. The hardware connection between the local bus and the Compact Flash device is described, and required register settings and UPM RAM array contents are provided.

    1 Compact Flash OverviewCompact Flash is a PCMCIA-compatible small, removable 16-bit storage or I/O device initially introduced in 1994 by SanDisk Corporation. The Compact Flash Association (CFA) (http://www.compactflash.org), which was started in 1995, defines the standards for Compact Flash devices. Because Compact Flash devices have only 50 pins and 11-bit address space, they are smaller than PCMCIA devices; however Compact Flash devices still conform to the PCMCIA PC Card ATA (AT attached) specifications. Additionally, Compact Flash storage devices can be designed to operate in conformance with the ATA-4 (AT attached) specification for IDE drives. Compact Flash storage devices are essentially solid-state ATA disk drives

    Contents1 Compact Flash Overview . . . . . . . . . . . . . . . . . . . . . . .1

    1.1 CF Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2 Electrical Interface . . . . . . . . . . . . . . . . . . . . . . . . .21.3 Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . 41.4 Compact Flash ATA Register Mapping Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5

    2 Example System Design Requirements . . . . . . . . . . . .63 Compact Flash Controller Design Implementation . . .6

    3.1 Endianness and Signal Naming Conventions 83.2 Hardware Connections 113.3 Compact Flash Memory Map 123.4 Compact Flash Memory Access Timing 133.5 PowerQUICC III BRx and ORx Register Settings 163.6 PowerQUICC III Local Bus Configuration Register (LBCR) Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . .173.7 PowerQUICC III Local Bus Clock Ratio Register (LCRR) Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . .173.8 PowerQUICC IIIUPMA Mode Register (MAMR) Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183.9 UPMA RAM Array Programming . . . . . . . . . . . .19

    4 Design Alternatives . . . . . . . . . . . . . . . . . . . . . . . . . . .215 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226 Documentation Revision History . . . . . . . . . . . . . . . .22

    MPC8560 PowerQUICC III Compact Flash Interface DesignJim Innis,

    DSD Systems Engineering,Freescale Semiconductor, Inc.Austin, Texas

    Document Number: AN2647Rev. 1, 12/2006

  • MPC8560 PowerQUICC III Compact Flash Interface Design, Rev. 12 Freescale Semiconductor

    Compact Flash Overview

    that are controlled through ATA task file registers defined by the ANSI T13 committee (http://www.t13.org).Compact Flash storage cards are typically designed with Flash technology, a non-volatile storage solution that does not require an active power source to retain data. Compact Flash I/O cards are available as modems, Ethernet, serial, BlueTooth wireless, IEEE 802.11b WiFi LAN, and so on. Applications that use Compact Flash devices include digital cameras, digital audio and music devices, portable data collection devices, PDAs, home entertainment set-top services, laptop and desktop computers, networking equipment, and embedded systems.

    1.1 CF ClassesThe Compact Flash Association developed the CF+ specification to expand the CF concept beyond flash data storage and include I/O devices and magnetic disk data storage. CF classes are:

    Type I (3.3 mm thick) card and newer type II (5 mm thick) cards. Type II (5 mm thick) cards enable higher capacity CompactFlash cards, magnetic disk cards, and

    many additional I/O cards.Note that CF+ and Compact Flash cards can be used with passive adapters in a PC-card type II or type III socket. The CompactFlash storage cards on-card intelligent controller manages interface protocols, data storage and retrieval, error-correcting code (ECC), defect handling and diagnostics, power management, and clock control. When the host has configured the Compact Flash storage card, it appears to the host as a standard ATA (IDE) disk drive (see Figure 1).

    Figure 1. Configured Compact Flash Storage Card

    1.2 Electrical InterfaceAccording to the CF+ and CompactFlash Specification, Revision 1.4, the host is connected to the Compact Flash Storage Card or CF+ Card using a standard 50-pin connector. The connector in the host consists of two rows of 25 male contacts, each on 50 mil (1.27 mm) centers. Table 1 lists the signals of the CF interface for the various modes of operation.

    Compact Flash Storage Device

    Flash Memory

    Datain/out

    Control

    ControllerHost Interface Module

  • MPC8560 PowerQUICC III Compact Flash Interface Design, Rev. 1Freescale Semiconductor 3

    Compact Flash Overview

    Table 1. CF Interface Signals

    PC Card Memory Mode PC Card I/O Mode True IDE Mode 4

    PinNo.

    SignalName

    PinType

    In, OutType

    PinNo.

    SignalName

    PinType

    In, OutType

    PinNo.

    SignalName

    PinType

    In, OutType

    1 GND Ground 1 GND Ground 1 GND Ground

    2 D03 I/O I1Z,OZ3 2 D03 I/O I1Z,OZ3 2 D03 I/O I1Z,OZ3

    3 D04 I/O I1Z,OZ3 3 D04 I/O I1Z,OZ3 3 D04 I/O I1Z,OZ3

    4 D05 I/O I1Z,OZ3 4 D05 I/O I1Z,OZ3 4 D05 I/O I1Z,OZ3

    5 D06 I/O I1Z,OZ3 5 D06 I/O I1Z,OZ3 5 D06 I/O I1Z,OZ3

    6 D07 I/O I1Z,OZ3 6 D07 I/O I1Z,OZ3 6 D07 I/O I1Z,OZ3

    7 -CE1 I I3U 7 -CE1 I I3U 7 -CS0 I I3Z

    8 A10 I I1Z 8 A10 I I1Z 8 A10 I I1Z

    9 -OE I I3U 9 -OE I I3U 9 -ATA SEL I I3U

    10 A09 I I1Z 10 A09 I I1Z 10 A09 I I1Z

    11 A08 I I1Z 11 A08 I I1Z 11 A08 I I1Z

    12 A07 I I1Z 12 A07 I I1Z 12 A07 I I1Z

    13 VCC Power 13 VCC Power 13 VCC Power

    14 A06 I I1Z 14 A06 I I1Z 14 A06 I I1Z

    15 A05 I I1Z 15 A05 I I1Z 15 A05 I I1Z

    16 A04 I I1Z 16 A04 I I1Z 16 A04 I I1Z

    17 A03 I I1Z 17 A03 I I1Z 17 A03 I I1Z

    18 A02 I I1Z 18 A02 I I1Z 18 A02 I I1Z

    19 A01 I I1Z 19 A01 I I1Z 19 A01 I I1Z

    20 A00 I I1Z 20 A00 I I1Z 20 A00 I I1Z

    21 D00 I/O I1Z,OZ3 21 D00 I/O I1Z,OZ3 21 D00 I/O I1Z,OZ3

    22 D01 I/O I1Z,OZ3 22 D01 I/O I1Z,OZ3 22 D01 I/O I1Z,OZ3

    23 D02 I/O I1Z,OZ3 23 D02 I/O I1Z,OZ3 23 D02 I/O I1Z,OZ3

    24 WP O OT3 24 -IOIS16 O OT3 24 -IOIS16 O ON3

    25 -CD2 O Ground 25 -CD2 O Ground 25 -CD2 O Ground

    26 -CD1 O Ground 26 -CD2 O Ground 26 -CD2 O Ground

    27 D11 I/O I1Z,OZ3 27 D11 I/O I1Z,OZ3 27 D11 I/O I1Z,OZ3

    28 D12 I/O I1Z,OZ3 28 D12 I/O I1Z,OZ3 28 D12 I/O I1Z,OZ3

    29 D13 I/O I1Z,OZ3 29 D13 I/O I1Z,OZ3 29 D13 I/O I1Z,OZ3

    30 D14 I/O I1Z,OZ3 30 D14 I/O I1Z,OZ3 30 D14 I/O I1Z,OZ3

    31 D15 I/O I1Z,OZ3 31 D15 I/O I1Z,OZ3 31 D15 I/O I1Z,OZ3

  • MPC8560 PowerQUICC III Compact Flash Interface Design, Rev. 14 Freescale Semiconductor

    Compact Flash Overview

    1.3 Operating ModesCompact Flash storage devices operate in three basic modes:

    PCMCIA-compatible PC card ATA using memory mode PCMCIA-compatible PC card ATA using I/O Mode IDE disk drive-compatible true IDE mode that is electrically compatible with IDE disk drive

    Although Compact Flash devices must support operation in all three modes, they operate only in a single mode at any given time. The operating mode is configured using either the standard PCMCIA configuration registers for PCMCIA-compatible modes or grounding pin 9 for true IDE mode.

    32 -CE2 I I3U 32 -CE2 I I3U 32 -CS1 I I1Z

    33 -VS1 O Ground 33 -VS1 O Ground 33 -VS1 O Ground

    34 -IORD I I3U 34 -IORD I I3U 34 -IORD I I3Z

    35 -IOWR I I3U 35 -IOWR I I3U 35 -IOWR I I3Z

    36 -WE I I3U 36 -WE I I3U 36 -WE I I3U

    37 RDY/BSY O OT1 37 IREQ O OT1 37 INTRQ O OZ1

    38 VCC Power 38 VCC Power 38 VCC Power

    39 -CSEL I I2Z 39 -CSEL I I2Z 39 -CSEL I I2U

    40 -VS2 O OPEN 40 -VS2 O OPEN 40 -VS2 O OPEN

    41 RESET I I2Z 41 RESET I I2Z 41 -RESET I I2Z

    42 -WAIT O OT1 42 -WAIT O OT1 42 IORDY O ON1

    43 -INPACK O OT1 43 -INPACK O OT1 43 -INPACK O OZ1

    44 -REG I I3U 44 -REG I3U 44 -REG I I3U

    45 BVD2 I/O I1Z,OZ3 45 -SPKR I/O I1Z,OZ3 45 -DASP I/O I1U,ON1

    46 BVD1 I/O I1Z,OZ3 46 -STSCHG I/O I1Z,OZ3 46 -PDIAG I/O I1U,ON1

    47 D08 I/O I1Z,OZ3 47 D08 I/O I1Z,OZ3 47 D08 I/O I1Z,OZ3

    48 D09 I/O I1Z,OZ3 48 D09 I/O I1Z,OZ3 48 D09 I/O I1Z,OZ3

    49 D10 I/O I1Z,OZ3 49 D10 I/O I1Z,OZ3 49 D10 I/O I1Z,OZ3

    50 GND Ground 50 GND Ground 50 GND Ground

    Table 1. CF Interface Signals (continued)PC Card Memory Mode PC Card I/O Mode True IDE Mode 4

    PinNo.

    SignalName

    PinType

    In, OutType

    PinNo.

    SignalName

    PinType

    In, OutType

    PinNo.

    SignalName

    PinType

    In, OutType

  • MPC8560 PowerQUICC III Compact Flash Interface Design, Rev. 1Freescale Semiconductor 5

    Compact Flash Overview

    1.4 Compact Flash ATA Register Mapping ConfigurationThe Compact Flash ATA task file registers can be mapped in one of four possible ways:

    Memory-mapped using addresses 0h-Fh and 400h-7FFh; corresponds to general memory space I/O-mapped 16 contiguous registers using addresses XX0h-XXFh; corresponds to a

    system-decoded 16 byte I/O block Primary I/O-mapped using addresses 1F0h-1F7h and 3F6h-3F7h Secondary I/O-mapped using addresses 170h-177h and 376h-377h; primary and secondary I/O

    mappings correspond to the standard PC-AT disk I/O address spaces

    1.4.1 PC Card ATA using Memory ModeCompact