⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 at91sam9rlek.h

📁 AT91Bootstrap framework
💻 H
字号:
/* ---------------------------------------------------------------------------- *         ATMEL Microcontroller Software Support  -  ROUSSET  - * ---------------------------------------------------------------------------- * Copyright (c) 2006, Atmel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the disclaimer below. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the disclaimer below in the documentation and/or * other materials provided with the distribution. * * Atmel's name may not be used to endorse or promote products derived from * this software without specific prior written permission. * * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ---------------------------------------------------------------------------- * File Name           : at91sam9261ek.h * Object              : * Creation            : NLe Jul 12th 2006 *----------------------------------------------------------------------------- */#ifndef _AT91SAM9RLEK_H#define _AT91SAM9RLEK_H/* ******************************************************************* *//* PMC Settings                                                        *//*                                                                     *//* The main oscillator is enabled as soon as possible in the c_startup *//* and MCK is switched on the main oscillator.                         *//* PLL initialization is done later in the hw_init() function          *//* ******************************************************************* */#define	MCK_100#ifdef MCK_100#define MASTER_CLOCK		(100000000)#define PLL_LOCK_TIMEOUT	1000000#define PLL_SETTINGS		0x2031BF03/* AC characteristics *//* DLYBS = tCSS= 250ns min and DLYBCT = tCSH = 250ns */#define DATAFLASH_TCSS		(0x1a << 16)	/* 250ns min (tCSS) <=> 12/48000000 = 250ns */#define DATAFLASH_TCHS		(0x1 << 24)	/* 250ns min (tCSH) <=> (64*1+SCBR)/(2*48000000) */#else	/* 133 MHz */#define MASTER_CLOCK		(266000000/2)#define PLL_LOCK_TIMEOUT	1000000#define PLL_SETTINGS		0x2109BF0C#endif/* Switch MCK on PLLA output PCK = PLLA = 2 * MCK */#define MCKR_SETTINGS	(AT91C_PMC_CSS_PLLA_CLK | AT91C_PMC_PRES_CLK | AT91C_PMC_MDIV_2)/* ******************************************************************* *//* NandFlash Settings                                                  *//*                                                                     *//* ******************************************************************* */#define AT91C_SMARTMEDIA_BASE	0x40000000#define AT91_SMART_MEDIA_ALE    (1 << 21)	/* our ALE is AD21 */#define AT91_SMART_MEDIA_CLE    (1 << 22)	/* our CLE is AD22 */#define NAND_DISABLE_CE() do { *(volatile unsigned int *)AT91C_PIOB_SODR = AT91C_PIO_PB6;} while(0)#define NAND_ENABLE_CE() do { *(volatile unsigned int *)AT91C_PIOB_CODR = AT91C_PIO_PB6;} while(0)#define NAND_WAIT_READY() while (!(*(volatile unsigned int *)AT91C_PIOD_PDSR & AT91C_PIO_PD17))/* ******************************************************************** *//* SMC Chip Select 3 Timings for NandFlash for MASTER_CLOCK = 100000000.*//* Micron 16bits 256Mb for MASTER_CLOCK = 100000000.			*//* Please refer to SMC section in AT91SAM9RL datasheet to learn how 	*//* to generate these values. 						*//* ******************************************************************** */#define AT91C_SM_NWE_SETUP	(0 << 0)#define AT91C_SM_NCS_WR_SETUP	(0 << 8)#define AT91C_SM_NRD_SETUP	(0 << 16)#define AT91C_SM_NCS_RD_SETUP	(0 << 24)  #define AT91C_SM_NWE_PULSE 	(4 << 0)#define AT91C_SM_NCS_WR_PULSE	(6 << 8)#define AT91C_SM_NRD_PULSE	(3 << 16)#define AT91C_SM_NCS_RD_PULSE	(5 << 24)  #define AT91C_SM_NWE_CYCLE 	(6 << 0)#define AT91C_SM_NRD_CYCLE	(5 << 16)#define AT91C_SM_TDF	        (1 << 16)/* ******************************************************************* *//* BootStrap Settings                                                  *//*                                                                     *//* ******************************************************************* */#define IMG_ADDRESS 		0x20000		/* Image Address in NandFlash */#define	IMG_SIZE		0x30000		/* Image Size in NandFlash    */#define MACH_TYPE       1326       		/* AT91SAM9RL-EK */#define JUMP_ADDR		0x23F00000	/* Final Jump Address 	      *//* ******************************************************************* *//* Application Settings                                                *//* ******************************************************************* */#undef CFG_DEBUG#define CFG_NANDFLASH#undef	NANDFLASH_SMALL_BLOCKS	/* NANDFLASH_LARGE_BLOCKS used instead */#define CFG_HW_INIT#define CFG_SDRAM#endif	/* _AT91SAM9RLEK_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -