mt481c2m32b2tg.h

Go to the documentation of this file.
00001 /* ************************************************************************
00002 
00003 Copyright (c) 2006, Atmel Corporation All rights reserved.
00004 
00005 Redistribution and use in source and binary forms, with or without
00006 modification, are permitted provided that the following conditions are met:
00007 
00008 1. Redistributions of source code must retain the above copyright notice,
00009 this list of conditions and the
00010 following disclaimer.
00011 
00012 2. Redistributions in binary form must reproduce the above copyright notice,
00013 this list of conditions and the following disclaimer in the documentation
00014 and/or other materials provided with the distribution.
00015 
00016 3. The name of ATMEL may not be used to endorse or promote products
00017 derived from this software without specific prior written permission.
00018 
00019 THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS
00020 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00021 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
00022 PARTICULAR PURPOSE ARE EXPRESSLY AND SPECIFICALLY
00023 DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
00024 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00025 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00026 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00027 OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00028 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00029 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
00030 WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00031 
00032 POSSIBILITY OF SUCH DAMAGE.
00033 
00034 ************************************************************************ */
00035 
00036 #ifndef _MT481C2M32B2TG_H_
00037 #define _MT481C2M32B2TG_H_
00038 
00039 #include "sdram.h"
00040 
00041 /*
00042 These values are device specific. Consult the datasheet for
00043 the given device for more information
00044 */
00045 
00049 // number of cols = 256  ->  8 col bits
00050 #define mt481c2m32b2tg_cols  8
00051 
00055 // number of rows = 2048 -> 11 row bits
00056 #define mt481c2m32b2tg_rows  11
00057 
00061 // number of banks = 4   ->  2 bank bits
00062 #define mt481c2m32b2tg_banks 2
00063 
00064 
00068 // Refresh rate
00069 // Use 15.6 uS = 15600 ns.
00070 // With cpu hz 20 MHz = 50 ns clock cycle : 
00071 // Refresh rate = 15600 ns / 50 ns = 312 clock cycles
00072 // Generic formula for chip (156 * (CPU_HZ / 1000) ) / 10000
00073 #define  mt481c2m32b2tg_tr 312
00074 
00075 
00079 // CAS Latency: 3
00080 // Should be 3 for Speed grade -5 part (up to 200Mhz)
00081 #define mt481c2m32b2tg_cas 3
00082 
00086 // Min: 2ck
00087 #define mt481c2m32b2tg_twr 2
00088 
00093 // Min 55 ns -> 55 / 50 ~=  2
00094 #define mt481c2m32b2tg_trc 7
00095 
00099 // 15 ns -> 15 / 50 ~= 1
00100 #define mt481c2m32b2tg_trp 2
00101 
00104 //15 ns -> 15 / 50 ~= 1
00105 #define mt481c2m32b2tg_trcd 2
00106 
00110 // 42 ns -> 42 / 50 ~= 1
00111 #define mt481c2m32b2tg_tras 5
00112 
00116 // 55 ns -> 55 / 50 ~= 2
00117 #define mt481c2m32b2tg_txsr 5
00118 
00124 void mt481c2m32b2tg_init( const sdram_info *info );
00125 
00126 #endif

Generated on Thu May 10 13:52:44 2007 for AVR32102 - Using the AVR32 SDRAM controller by  doxygen 1.5.1