sdram.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 _SDRAM_H_
00037 #define _SDRAM_H_
00038 
00039 #ifdef __GNUC__
00040     #include <avr32/io.h>
00041 #elif __ICCAVR32__
00042     #include <avr32/ioap7000.h>
00043 #else
00044     #error No known compiler used
00045 #endif
00046 
00050 #define MODE_NORMAL     0
00051 
00055 #define MODE_NOP        1
00056 
00060 #define MODE_PRECHARGE      2
00061 
00065 #define MODE_LOAD_MR        3
00066 
00070 #define MODE_AUTOREFRESH    4
00071 
00075 #define MODE_EXT_LOAD_MR    5
00076 
00080 #define MODE_POWER_DOWN     6
00081 
00082 typedef struct sdram_info
00083 {
00085   unsigned long physical_address;
00086 
00088   unsigned int rows;
00089 
00091   int cols;
00092 
00094   int banks;
00095 
00097   unsigned int cas;
00098 
00100   unsigned int twr;
00101 
00103   unsigned int trc;
00104 
00106   unsigned int trp;
00107 
00109   unsigned int trcd;
00110 
00112   unsigned int tras;
00113 
00115   unsigned int txsr;
00116 
00117 }sdram_info;
00118 
00119 
00125 void sdramc_init(const sdram_info *info);
00126 
00127 #endif

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