DatasheetDirect.com. Visit to get your free datasheets. This datasheet has been downloaded by

Similar documents
Terminology nc. Table 1. Terminology Terms CPU LCDC SDCE Description The 68K core in the DragonBall processor LCD Controller module in the DragonBall

2005: 0.5 PQ-MDS-PCIEXP

Performance Factors nc. 2 Performance Factors The following sections discuss performance factors. 2.1 MPX vs. 60x Bus Mode One of the main factors tha

Mask Set Errata. Introduction. MCU Device Mask Set Identification. MCU Device Date Codes. MCU Device Part Number Prefixes MSE08AZ32_0J66D 12/2002

However, if an event comes in when the new value is being written to the pulse accumulator counter, that event could be missed. One solution to this p

1.3 General Parameters

Freescale Semiconductor, I

PQ-MDS-QOC3 Module. HW Getting Started Guide. Contents. About This Document. Required Reading. Definitions, Acronyms, and Abbreviations

Freescale Semiconductor, I

MC68VZ328. MC68VZ328 (DragonBall VZ) Integrated Portable System Processor Product Brief

Figure 1. Power Barrel Connector Requirements

PAS08QF80 User s Manual

PAS08QF5264 User s Manual

PQ-MDS-PIB. HW Getting Started Guide 12,13. January 2006: Rev Check kit contents

Upgrade the Solution With No Changes 2 Upgrade the Solution With No Changes If a Codebase does not contain updates to its properties, it is possible t

Freescale Semiconductor, I

Suite56 Command Converter Server User s Guide

MPC8349E-mITX-GP Board Errata

MC68VZ328 Integrated Processor

PCB Layout Guidelines for the MC1321x

Engineering Bulletin. Introduction and Background. Definition of Early TOF EB389/D 11/2001

Freescale Semiconductor, I

EB366. In-Circuit Programming of FLASH Memory Using the Monitor Mode for the MC68HC908GP32. Introduction

Freescale Semiconductor, I. How to Use the Table Lookup and Interpolate Instruction on the CPU32

Device Errata MPC860ADS Application Development System Board Versions ENG, PILOT, REV A

MPC8260 IDMA Timing Diagrams

DSP5630x FSRAM Module Interfacing

Mechanical Differences Between the 196-pin MAP-BGA and 196-pin PBGA Packages

Using the PowerQUICC II Auto-Load Feature

DEMO9S08AC60E. User s Guide. Freescale Semiconductor User s Guide. DEMO9S08AC60EUG Rev. 0.1, 11/2007

MCF5216 Device Errata

Electrode Graphing Tool IIC Driver Errata Microcontroller Division

SDRAM Support on the StarCore - Based MSC8122 DSP

USB Bootloader GUI User s Guide

etpu General Function Set (Set 1) David Paterson MCD Applications Engineer

MC33696MODxxx Kit. 1 Overview. Freescale Semiconductor Quick Start Guide. Document Number: MC33696MODUG Rev. 0, 05/2007

Using the Multi-Axis g-select Evaluation Boards

ColdFire Convert 1.0 Users Manual by: Ernest Holloway

EchoRemote Evaluation Software for Windows

Mask Set Errata. Introduction. MCU Device Mask Set Identification. MCU Device Date Codes. MCU Device Part Number Prefixes

MPC8349EA MDS Processor Board

MC56F825x/MC56F824x (2M53V) Chip Errata

Component Development Environment Installation Guide

Using IIC to Read ADC Values on MC9S08QG8

MCF5445x Configuration and Boot Options Michael Norman Microcontroller Division

Using the Project Board LCD Display at 3.3 volts

Functional Differences Between the DSP56307 and DSP56L307

Freescale Semiconductor, I. Example Using the Queued Serial Peripheral Interface on Modular MCUs

Interfacing HCS12 Microcontrollers to the MFR4200 FlexRay Controller

Freescale Semiconductor, I

Clock Mode Selection for MSC8122 Mask Set K98M

56F8300 BLDC Motor Control Application

Interfacing MPC5xx Microcontrollers to the MFR4310 FlexRay Controller David Paterson MCD Applications, East Kilbride

Migrating from the MPC852T to the MPC875

Advance Information 24-BIT GENERAL PURPOSE DIGITAL SIGNAL PROCESSOR

Power Cycling Algorithm using the MMA73x0L 3-Axis Linear Accelerometer

HC912D60A / HC912Dx128A 0.5µ Microcontrollers Mask sets 2K38K, 1L02H/2L02H/3L02H & K91D, 0L05H/1L05H/2L05H

Freescale Semiconductor, I. How to Write to the 64-Cycle Time-Protected Registers on M68HC11 Development Tools

Application Note Using the SDRAM Controller on the MCF5307 ColdFire Integrated Microprocessor

Freescale Semiconductor, I

MPC8360E MDS Processor Board

MPC8260 SDRAM Timing Diagrams

Pad Configuration and GPIO Driver for MPC5500 Martin Kaspar, EMEAGTM, Roznov Daniel McKenna, MSG Applications, East Kilbride

56F805. BLDC Motor Control Application with Quadrature Encoder using Processor Expert TM Targeting Document. 56F bit Digital Signal Controllers

SRAM SRAM SRAM SCLK khz

MPR083 Proximity Evaluation Kit User s Guide

Updating the Firmware on USB SPI Boards (KITUSBSPIEVME, KITUSBSPIDGLEVME)

Functional Differences Between DSP56302 and DSP56309 (formerly DSP56302A)

MC33897 Single-Wire CAN Transceiver Reliability and Quality Documents

Freescale Semiconductor, I

NOVPEK NetLeap User Guide

MPC5200(b) ATA MDMA, UDMA Functionality BestComm Setup Recommendations

MCF54451, MCF54452, MCF54453, MCF54454,

SRAM SRAM SRAM. Data Bus EXTAL ESSI KHz MHz. In Headphone CS MHz. Figure 1 DSP56302EVM Functional Block Diagram

MC74F620 MC74F623 OCTAL BUS TRANSCEIVER WITH 3-STATE OUTPUTS (INVERTING AND NONINVERTING)

Configuring the MCF5445x Family for PCI Host Operation

Design Recommendations to Implement Compatibility Between the MC13783VK and the MC13783VK5

DSP56F827 Digital Signal Controller

How to Interface the PowerQUICC II Pro and. Local Bus Controller to NAND Flash

EB180. Motorola Semiconductor Engineering Bulletin. Differences between the MC68HC705B16 and the MC68HC705B16N. Freescale Semiconductor, I

M68HC705E24PGMR PROGRAMMER USER'S MANUAL

PowerQUICC II Parity and ECC Capability

56F805. Digital Power Factor Correction using Processor Expert TM Targeting Document. 56F bit Digital Signal Controllers. freescale.

SGTL5000 I 2 S DSP Mode

Optically-Isolated Multilink BDM Interface for the S08/S12 Microcontrollers by Michael A. Steffen

Technical support for MCUez development tools is available through your regional. For More Information On This Product, Go to:

Gallium Arsenide PHEMT RF Power Field Effect Transistor

Differences Between the DSP56301, DSP56311, and DSP56321

EB380. Migrating from the MC68HC811E2 to the MC68HC711E9. Freescale Semiconductor, I. Introduction. Migrating to the MC68HC711E9

Altimus X3B Evaluation Board Errata

Errata to MPC8569E PowerQUICC III Integrated Processor Reference Manual, Rev. 2

MC33794 Touch Panel System Using E-Field Sensor Setup Instructions

MTIM Driver for the MC9S08GW64

Introduction to LIN 2.0 Connectivity Using Volcano LTP

M68CPA08QF Programming Adapter. User s Manual. Freescale Semiconductor, I. User s Manual. M68CPA08QF324448UM/D Version 1.

Tuning an Application to Prevent M1 Memory Contention

for ColdFire Architectures V7.2 Quick Start

EB301. Motorola Semiconductor Engineering Bulletin. Programming EEPROM on the MC68HC811E2 during Program Execution. Freescale Semiconductor, I

M68CPA08W1628T20. Programming Adapter. User s Manual. Freescale Semiconductor, I. User s Manual. M68CPA08W1628T20UM/D Version 1.

Freescale Semiconductor, I

Transcription:

DatasheetDirect.com Your dedicated source for free downloadable datasheets. Over one million datasheets Optimized search function Rapid quote option Free unlimited downloads Visit www.datasheetdirect.com to get your free datasheets. This datasheet has been downloaded by http://www.datasheetdirect.com/

nc. Application Note AN2148/D Rev. 1, 6/2002 Design Considerations for Interfacing SDRAM with MC68VZ328 By Bryan C. Chan Contents 1 Introduction.......... 1 2 Physical Interface Between SDRAM and MC68VZ328 2 3 SDRAM Control Registers 4 4 SDRAM Initialization Sequences 13 5 SDRAM Power Control Features 14 6 SDRAM Logic Analyzer Screen Captures 15 The MC68VZ328 (DragonBall VZ) adds support for Synchronous DRAM (SDRAM) directly in its DRAM controller. This application note provided information to setup and use the DragonBall VZ to access SDRAM. This application note discusses all aspects of the DragonBall VZ operation as it relates to the SDRAM. 1 Introduction This application note provides information to users who are preparing to use Synchronous DRAM (SDRAM) with the MC68VZ328. The following topics are discussed: 1. Physical interface between SDRAM and MC68VZ328 2. Relevant control registers for SDRAM operation in the MC68VZ328 memory controller 3. SDRAM initialization sequences 4. SDRAM power control features 5. SDRAM logic analyzer screen captures It is assumed that users have a basic understanding of the DragonBall processors and SDRAM operation. A large amount of abbreviations are used throughout this application note. Please refer to MC68VZ328 User s Manual (order number MC68VZ328UM/D) for details if needed. 1.1 Terminology Unless otherwise specified within the document, the following terms and abbreviation are as defined in Table 1. This document contains information on a new product. Specifications and information herein are subject to change without notice. Motorola, Inc., 2002. All rights reserved.

Terminology nc. Table 1. Terminology Terms CPU LCDC SDCE Description The 68K core in the DragonBall processor LCD Controller module in the DragonBall processor Upper Data Strobe signal from the 68K core, muxed with Port K3 (PK3/) SDRAM Chip-select 0, muxed with Port B4 (PB4/CSD0/CAS0/) SDRAM CAS signal, muxed with Port B3 (PB3/CSC1/RAS1/) SDRAM RAS signal, muxed with Port B2 (PB2/CSC0/RAS0/) SDRAM Enable signal, muxed with Port B1 (PB1/CSB1/) SDRAM Clock signal, muxed with Port M0 (PM0/) SDRAM Clock Enable signal, muxed with Port M1 (PM1/SDCE) SDRAM Address Line 10 signal, muxed with Port M4 (PM4/) 2 Physical Interface Between SDRAM and MC68VZ328 The recommended pin connections between the DragonBall VZ to SDRAM are shown Figure 1. MC68VZ328 PB5/CSD1/CAS1/SDCS1 PB4/CSD0/CAS0/ PM1/SDCE PM0/ PB2/CSC0/RAS0/ PB3/CSC1/RAS1/ PM2/DQMH PM3/DQML PB1/CSB1/ VCC VCC CS CKE CLK RAS CAS UDQM LDQM WE 64 Mbit (4Meg x 16-Bit) SDRAM CS SDRAM0 SDRAM1 64 Mbit (4Meg x 16-Bit) SDRAM D[0:15] D[0:15] A[1:10] PM4/ A12 A13 A14 A[0:9] A10 A11 BS0 BS1 Figure 1. Pin Connection from MC68VZ328 to SDRAM 2 Physical Interface Between SDRAM and MC68VZ328 MOTOROLA

nc. Address Lines The configuration shown in Figure 1 was derived from the DragonBall VZ Application Development System (ADS) which provides for two 64 Mbit SDRAM (4 M 16-bit). Each chip-select line can address up to 16 Mbytes of memory. Chip-select D0 can be configured to use the address space of chip-select D1 for a total address space of 32 Mbytes. See Section 3.1.2, Chip-Select Register D (CSD) and Chip-Select Control Register 1 (CSCTRL1) on page 5 for details on using 32 Mbyte SDRAM. 2.1 Address Lines One of the more intricate steps in the MC68VZ328 to SDRAM interface is connecting the SDRAM to the address lines. Most importantly, the address line PM4/ must always be connected to A10 on the SDRAM memory chip to ensure proper SDRAM operation. NOTE: can be kept high during the precharge command to direct the SDRAM to precharged all banks. Table 2 provides examples of address line configurations for different sizes of SDRAM. Table 2. Address Line Configurations (8-Bit or 16-Bit) MC68VZ328 Pins SDRAM Pins 16 Mbit 64 Mbit 128 Mbit 256 Mbit A[0:9] A[1:10] A[1:10] A[1:10] A[1:10] A10 A11 1 A12 X 2 A12 A12 A13 A12 X X A13 BS0 X A13 A12 A15 BS1 X A14 A15 A16 1. For 16Mbit SDRAM, A11 is used for Bank Select and maybe labeled as such. 2. X = "No Connect" These configurations apply to both 8-bit and 16-bit SDRAM, the differences of which, can be configured by setting the DRAM Memory Configuration Register (DRAMMC). Section 7.3 of the DragonBall VZ user s manual provides the details to configure this register. For details on address bus signals, see Section 2.4 of the DragonBall VZ user s manual. 2.2 Data Lines The data bus for 8-bit SDRAMs must have the data signals connected to D[15:8]. For details on data bus signals, see Section 2.5 of the DragonBall VZ user s manual. 2.3 Interface Lines For details on SDRAM interface signals, see Section 2.15 of the DragonBall VZ user s manual. MOTOROLA Design Considerations for Interfacing SDRAM with MC68VZ328 3

Chip-Select Registers nc. 3 SDRAM Control Registers This section discusses the relevant registers used in SDRAM operations. The following registers have an effect on SDRAM operation. Table 3. SDRAM Registers Name Address Description DragonBall VZ Manual CSGBD 0x(FF)FFF106 Chip-Select Group D Base Address Table 6-5 CSD 0x(FF)FFF116 Chip-Select Register D Table 6-10 CSCTRL1 0x(FF)FFF10A Chip-Select Control Register 1 Table 6-12 CSCTRL2 0x(FF)FFF10C Chip-Select Control Register 2 Table 6-13 DRAMMC 0x(FF)FFFC00 DRAM Memory Configuration Register Table 7-6 DRAMC 0x(FF)FFFC02 DRAM Control Register Table 7-7 SDCTRL 0x(FF)FFFC04 SDRAM Control Register Table 7-8 SDPWDN 0x(FF)FFFC06 SDRAM Power-down Register Table 7-10 For certain registers, only some of the fields are relevant to SDRAM operation. Table 4 lists the relevant fields for each register. 3.1 Chip-Select Registers Table 4. SDRAM Registers Relevant Fields Name Description Relevant Fields CSD Chip-Select Register D COMB, DRAM, BSW, WS3-1, SIZ, EN CSCTRL1 Chip-Select Control Register 1 DSIZ3 CSCTRL2 Chip-Select Control Register 2 ECDD, ECDT DRAMC DRAM Control Register EN, RM, CLK, PGSZ, LSP, RST When the DragonBall VZ is configured to use SDRAM, chip-select group D[1:0] is used for SDRAM chip-selects. At the same time, chip-select group C[1:0] becomes the and signals. During this time, all chip-select group C registers are ignored. 3.1.1 Chip-Select Group D Base Address Register (CSGBD) This register holds the base address for SDRAM. The value in this register represents A[28:14] of the address bus. A value of 0x0800 puts the SDRAM at 0x01000000. 4 SDRAM Control Registers MOTOROLA

nc. Chip-Select Registers 0x00000000 CSGBD = 0x0800 0x01000000 0x017FFFFF 64 Mbit (4M x 16-bit) SDRAM SDRAM Starting Address = 0x01000000 0xFFFFFFFF Figure 2. Chip-Select Base Address Register 3.1.2 Chip-Select Register D (CSD) and Chip-Select Control Register 1 (CSCTRL1) The CSD register is used to determine three things: If chip-select group C will be used as CAS and RAS Bus width of the SDRAM Size for each SDRAM chip-select (With the influence of CSCTRL1) By default, CSD register is set to use the CAS[1:0] and RAS[1:0] functions muxed to PB[5:4] and PB[3:2], respectively. This is determined by the DRAM bit (bit 9) of the CSD register. The BSW bit (bit7) is 0 for 8-bit SDRAM and 1 for 16-bit SDRAM. The size of each SDRAM chip-select determines the SIZ field (bits[3:1]). The values represented by these bits need to be combined with the DSIZ3 bit of the CSCTRL1 register to configure the chip-select size. Table 5. SDRAM Chip-Select Size DSIZ3 1 SIZ [3:1] SDRAM Size 0 0 0 0 32 kbyte 0 0 0 1 64 kbyte 0 0 1 0 128 kbyte 0 0 1 1 256 kbyte 0 1 0 0 512 kbyte 0 1 0 1 1 Mbyte 0 1 1 0 2 Mbyte MOTOROLA Design Considerations for Interfacing SDRAM with MC68VZ328 5

Chip-Select Registers nc. Table 5. SDRAM Chip-Select Size (Continued) DSIZ3 1 SIZ [3:1] SDRAM Size 0 1 1 1 4 Mbyte 1 0 0 0 8 Mbyte 1 0 0 1 16 Mbyte 2 1) This bit resides in the CSCTRL1 register. 2) Use this setting for 32 Mbyte SDRAM as well. 0x00000000 0x01000000 0x01FFFFFF 0x02000000 0x02FFFFFF 0xFFFFFFFF NOTE: For 32 Mbyte SDRAM, first set the chip-select size to 16 Mbyte and then set the COMB bit (bit10) of the CSD register to 1. The COMB bit effectively combines the memory space of CSD1 to that of CSD0 allowing CSD0 to address a full 32 Mbyte. CSD0 CSD1 16Mbyte 16Mbyte CSD Register: COMB bit = 1 0x00000000 0x01000000 0x02FFFFFF 0xFFFFFFFF CSD0 Figure 3. Combining CSD0 and CSD1 for 32 Mbyte SDRAM 32Mbyte The EN bit of the CSD register should be set to one to enable this chip-select. Also, the WS3-1 bits can be used to introduce a number of wait states if required. 3.1.3 Chip-Select Control Register 2 (CSCTRL2) The DragonBall VZ chip-select module incorporates an Early Cycle Detect (ECD) feature for dynamic memory. In a normal chip-select scenario (without ECD), the chip-select signal is proceeded by an internal address strobe (ASB) signal from the 68K core. The ECD feature works from the fact that the ASB is itself proceeded by an "early" ASB signal from the 68K core. By using the early ASB signal to derive the chip-select signal, both read and write cycles to SDRAM can be shortened by one clock cycle. 6 SDRAM Control Registers MOTOROLA

nc. DRAM Controller Registers Sample ASB Sample ASB PreC. Act PreC. Act Refer to Table 1 for signal description Sample Early ASB Figure 4. Normal SDRAM / PreC. Act Sample Early ASB PreC. Act Figure 5. SDRAM / with ECD Using the PK3/ signal as a reference, as shown in Figure 4 and Figure 5, setting the ECDD bit can improve SDRAM operation during CPU access to the SDRAM by asserting SDCSx early. LCDC DMA access is not affected by the ECD feature because the CPU is not involved during the access. For more information on ECD settings, see Section 6.3.6 in the DragonBall VZ user s manual Refer to Table 1 for signal description 3.2 DRAM Controller Registers The DragonBall VZ DRAM controller is designed to support SDRAM up to 32 Mbytes. Four registers are used for the configuration and operation of SDRAM. 3.2.1 DRAM Memory Configuration Register (DRAMMC) The DRAM controller uses address multiplexing to support different types of SDRAM. For recommendations on how address lines must be configured with the SDRAM, use Tables 7-1 through 7-5 in the DragonBall VZ user s manual. MOTOROLA Design Considerations for Interfacing SDRAM with MC68VZ328 7

DRAM Controller Registers nc. The DRAMMC register also controls the refresh cycle timing, see Section 7.2.3 in the DragonBall VZ user s manual for details. For typical applications, the default value for the REF bits is sufficient. 3.2.2 DRAM Control Register (DRAMC) The DRAMC contains the following features that apply to SDRAM operations: Master DRAM controller enable Page size of SDRAM SDRAM refresh mode Light sleep option Reset burst refresh option Of these features, the first two options require consideration before the SDRAM is initialized. After the DRAM controller is enabled through the EN bit (bit15) of the DRAMC register, the page size of the SDRAM should be set in the PGSZ field (bits 9-8). The page size of a particular SDRAM can be found by the number of column addresses for each bank. The amount of memory space covered by the column addresses is the page size. For 8-bit SDRAM, the number must be divided by two before applying it to the PGSZ field. Example: 12 Row Address 64 Mbit SDRAM 8 Column Address 8 column address = 256 memory space 16-bit For 16-bit SDRAM, PGSZ = 00 (256 words) 12 Row Address 64 Mbit SDRAM 9 Column Address 9 column address = 512 memory space 8-bit For 8-bit SDRAM, PGSZ = 00 (256 words) Figure 6. Calculating Page Size The RM bit controls the SDRAM refresh mode between auto-refresh and self-refresh modes. See Section 7.3.2 in the DragonBall VZ user s manual for details on other options. 3.2.3 SDRAM Control Register (SDCTRL) The SDRAM control register provides features specific to SDRAM operation. This section discusses those features in detail. 8 SDRAM Control Registers MOTOROLA

nc. DRAM Controller Registers The first register bit in the SDCTRL register is the SDEN bit (bit 15). This bit must be set for SDRAM to be used and it must be set before the EN bit is set in the DRAMC to ensure SDRAM support after the controller is enabled. In addition to the SDEN bit, other settings must be checked as well. These settings include the CAS latency, or CL bit, and the bank address line settings (BNKADDH and BNKADDL). The CAS latency of a SDRAM should always be set in the SDRAM s mode register before using the SDRAM. The DragonBall VZ supports CAS latency of 1 or 2 cycles. NOTE: Although most SDRAM does not specify support for CAS latency below 2 clock counts, testing shows that a number of those SDRAM have no problem running in CAS latency 1 mode. The number of SDRAM banks is defined using the BNKADDH and BNKADDL bits. This "bank" refers to the internal arrangement of the SDRAM chip. Figure 7 depicts the internal structure of the logic. Two multiplexors derive the bank address based on the setting of the SDCTRL register bits BNKADDH[1:0] and BNKADDL[1:0]. The controller supports 4 banks, therefore there are two lines of bank addresses. However, bnkaddh and bnkaddl signals are used by the internal bank register and the page hit detection logic to track whether the current access is on the same page of the previous access in the same bank. Each individual bank has its own logic. SDCTRL BNKADDH[1:0] PA20 PA22 PA24 0 SDCTRL BNKADDL[1:0] PA19 PA21 PA23 0 00 01 10 11 00 01 10 11 bnkaddh (high bank address) bnkaddl (low bank address) Figure 7. BNKADDH and BNKADDL Model For a 2 bank device, only one mux from the pair is used. The other mux is programmed to 11 (output 0). This results in the appearance of only two possible bank registers present. For a 4 bank device, two muxes are used to form a two line bank address (bnkaddh and bnkaddl) therefore all four bank registers are used. Users may want to treat a multibank device as a 1 bank device. In this case the user should program both BNKADDH and BNKADDL to 11 (output 0). The logic sees only a one bank register. Table 7-9 in the DragonBall VZ user s manual provides information on how to set these bits. MOTOROLA Design Considerations for Interfacing SDRAM with MC68VZ328 9

DRAM Controller Registers nc. NOTE: It is recommended that all BNKADDH/L bits be set to 1 for SDRAM to appear as one single bank. This is because of a silicon bug documented in the DragonBall VZ design. Multibank settings under CAS latency 2 can cause the DragonBall VZ to stop responding to commands if the LCD and the CPU are accessing separate banks. The erratum is listed in an errata document available at: www.motorola.com/dragonball The continuous page mode, or CPM bit, in the SDCTRL register can also be enabled at this time. The CPM feature can accelerate SDRAM read/write cycles by eliminating unneeded precharge cycles. With CPM enabled, access to a page for the first time generates a page-miss flag which sends a precharge and then a read/write command. Subsequent access to the page generates a page-hit flag which is followed immediately by the read/write command. Setting CPM is another method in circumventing the multibank issue mentioned above. 64Mbit SDRAM 64Mbit SDRAM 1 First Access -Precharged -Row Activated - Command 1 Page 2 Page-Hit! Second Access - Command Figure 8. Continuous Page Mode Before the SDRAM is fully operational, its has to go through the following initialization sequence: 1. Initiate an all bank precharge with the IP bit IP = 1, RE = 0, MR = 0 2. Start SDRAM refresh cycles using the RE bit in the SDCTRL register IP = 0, RE = 1, MR = 0 3. Set the mode register of the SDRAM with the MR bit IP = 0, RE = 1, MR = 1 1 First Access -Precharged -Row Activated - Command 1 Page 2 Page-Miss! Second Access -Precharge -Row Activate - Command The MR bit passes the CAS latency setting to the mode register of the SDRAM. The load mode register command programs the SDRAM to CAS latency 1 or 2 depending on the CL bit. The CL bit should be set to the proper latency period prior to setting the MR bit. The steps above must be completed in sequence followed by a number of no-ops to allow the SDRAM to initialize properly. See the Section 4, SDRAM Initialization Sequences on page 13 for example code on SDRAM initialization. 10 SDRAM Control Registers MOTOROLA

3.2.4 SDRAM Power-Down Register (SDPWDN) DRAM Controller Registers The SDPWDN register controls how the SDRAM enters power-down mode. The power-down mode can reduce SDRAM power consumption by negating the SDCE signal when SDRAM is not being accessed. During power-down mode, refresh cycles continue to be issued to the SDRAM by the DRAM controller. 3.2.4.1 Active Power-Down Mode When the APEN bit is set, the SDCE is negated after every access to the SDRAM. SDCE nc. 3.2.4.2 Precharge Power-Down Mode Figure 9. Active Power-Down Mode When the PDEN bit is set, the SDCE signal is negated when the SDRAM has been precharged and the PDTOUT time-out condition has been met. SDCE Figure 10. Precharge Power-Down Mode MOTOROLA Design Considerations for Interfacing SDRAM with MC68VZ328 11

DRAM Controller Registers nc. SDCE Figure 11. Power-Down Mode Disabled 12 SDRAM Control Registers MOTOROLA

nc. 4 SDRAM Initialization Sequences DRAM Controller Registers Code Listing 1 provides the initialization sequences used by the DragonBall VZ ADS board. Code Listing 1. SDRAM Initialization Sequences ;*************************************** ; SDRAM 64M-bit, Single Band, Latency 2 ;*************************************** move.w #$0000,GRPBASED ; Set SDRAM base address to 0x0 move.w #$0281,CSD move.w #$0040,CSCR ; Chip Sel Control Reg move.w #$0000,DRAMC ; Disable DRAM Controller move.w #$C03F,SDCTRL ; Set CPM, CL1, Single Bank move.w #$4020,DRAMMC ; Multiplexing for 64Mbyte SDRAM move.w #$8000,DRAMC ; Enable DRAM Controller clr.w d0 ; Delay period for SDRAM delay addi.w #1,d0 cmp.w #$FFFF,d0 bne delay move.w #$C83F,SDCTRL ; Issue precharge comm move.w #$D03F,SDCTRL ; Enable refresh move.w #$D43F,SDCTRL ; Issue mode command MOTOROLA Design Considerations for Interfacing SDRAM with MC68VZ328 13

DRAM Controller Registers 5 SDRAM Power Control Features The DRAM controller can initiate the following two types of power control features: Self-refresh mode Power-down mode SDRAM self-refresh mode is controlled by the RE bit in the DRAMC register. By setting the RE bit to 1, the DRAM controller issues a self-refresh mode command. SDCE nc. Figure 12. Self-Refresh Event The SDRAM draws the minimum amount of power when it is in self-refresh mode. The DRAM controller can also be disabled after the SDRAM enters self-refresh mode. Power-down modes allows the SDRAM to be suspended when not in use. It differs from self-refresh mode in that it does not require a wake-up period when access occurs. See Section 3.2.4 of this document for details on power-down modes. 14 SDRAM Power Control Features MOTOROLA

6 SDRAM Logic Analyzer Screen Captures DRAM Controller Registers The logic analyzer screen captures in this section show the SDRAM read and write cycles generated by the DragonBall VZ ADS. nc. Sample ASB Sample ASB PreC. Act PreC. Act Figure 13. SDRAM /; CAS Latency = 1; Page-Miss Condition Act Figure 14. SDRAM ; CAS Latency = 1; Page-Hit Condition MOTOROLA Design Considerations for Interfacing SDRAM with MC68VZ328 15

DRAM Controller Registers nc. Act Figure 15. SDRAM ; CAS Latency = 1; Page-Hit Condition Sample ASB PreC. Act Sample ASB PreC. Act Figure 16. SDRAM /; CAS Latency = 2; Page-Miss Condition 16 SDRAM Logic Analyzer Screen Captures MOTOROLA

nc. DRAM Controller Registers Act Figure 17. SDRAM ; CAS Latency = 2; Page-Hit Condition Figure 18. SDRAM ; CAS Latency = 2; Page-Hit Condition MOTOROLA Design Considerations for Interfacing SDRAM with MC68VZ328 17

DRAM Controller Registers nc. Sample Early ASB Sample Early ASB PreC. Act PreC. Act Figure 19. SDRAM /; CAS Latency = 1; Page-Miss Condition; with ECD Act Figure 20. SDRAM ; CAS Latency = 1; Page-Hit Condition; with ECD 18 SDRAM Logic Analyzer Screen Captures MOTOROLA

nc. DRAM Controller Registers Act Figure 21. SDRAM ; CAS Latency = 1; Page-Hit Condition; with ECD Figure 22. LCD DMA ; CAS Latency = 2; Burst Length = 4 MOTOROLA Design Considerations for Interfacing SDRAM with MC68VZ328 19

nc. HOW TO REACH US: USA/EUROPE/LOCATIONS NOT LISTED: Motorola Literature Distribution; P.O. Box 5405, Denver, Colorado 80217 1-303-675-2140 or 1-800-441-2447 JAPAN: Motorola Japan Ltd.; SPS, Technical Information Center, 3-20-1, Minami-Azabu Minato-ku, Tokyo 106-8573 Japan 81-3-3440-3569 ASIA/PACIFIC: Motorola Semiconductors H.K. Ltd.; Silicon Harbour Centre, 2 Dai King Street, Tai Po Industrial Estate, Tai Po, N.T., Hong Kong 852-26668334 TECHNICAL INFORMATION CENTER: 1-800-521-6274 HOME PAGE: http://www.motorola.com/semiconductors Information in this document is provided solely to enable system and software implementers to use Motorola 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. Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Motorola 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 which may be provided in Motorola 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. Motorola does not convey any license under its patent rights nor the rights of others. Motorola 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 Motorola product could create a situation where personal injury or death may occur. Should Buyer purchase or use Motorola products for any such unintended or unauthorized application, Buyer shall indemnify and hold Motorola 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 Motorola was negligent regarding the design or manufacture of the part. Motorola and the Stylized M Logo are registered in the U.S. Patent and Trademark Office. All other product or service names are the property of their respective owners. Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer. Motorola, Inc. 2002 AN2148/D