/********************************************************************** * $Id$ lpc_emc.h 2011-06-02 *//** * @file lpc_emc.h * @brief Contains all macro definitions and function prototypes * support for EMC firmware library on LPC * @version 1.0 * @date 02. June. 2011 * @author NXP MCU SW Application Team * * Copyright(C) 2011, NXP Semiconductor * All rights reserved. * *********************************************************************** * Software that is described herein is for illustrative purposes only * which provides customers with programming information regarding the * products. This software is supplied "AS IS" without any warranties. * NXP Semiconductors assumes no responsibility or liability for the * use of the software, conveys no license or title under any patent, * copyright, or mask work right to the product. NXP Semiconductors * reserves the right to make changes in the software without * notification. NXP Semiconductors also make no representation or * warranty that such application will be suitable for the specified * use without further testing or modification. * Permission to use, copy, modify, and distribute this software and its * documentation is hereby granted, under NXP Semiconductors' * relevant copyright in the software, without fee, provided that it * is used in conjunction with NXP Semiconductors microcontrollers. This * copyright, permission, and disclaimer notice must appear in all copies of * this code. **********************************************************************/ /* Peripheral group ----------------------------------------------------------- */ /** @defgroup EMC EMC (External Memory Controller) * @ingroup LPC_CMSIS_FwLib_Drivers * @{ */ #ifndef __LPC_EMC_H_ #define __LPC_EMC_H_ #include "lpc_types.h" #include "LPC407x_8x_177x_8x.h" /** @defgroup EMC_Private_Macros EMC Private Macros * @{ */ /*********************************************************************** * EMC Control Register (EMCControl) **********************************************************************/ /* Control register mask */ #define EMC_Control_MASK ((uint32_t )0x07) /* Control register EMC: Enable control. */ #define EMC_Control_E ((uint32_t )(1<<0)) /* Control register EMC: Address mirror control. */ #define EMC_Control_M ((uint32_t )(1<<1)) /* Control register EMC: Low-power mode control. */ #define EMC_Control_L ((uint32_t )(1<<2)) /*********************************************************************** * EMC Status Register (EMCStatus) **********************************************************************/ /* Status register mask */ #define EMC_Status_MASK ((uint32_t )0x07) /* Status register EMC: Busy. */ #define EMC_Status_B ((uint32_t )(1<<0)) /* Status register EMC: Write buffer status. */ #define EMC_Status_S ((uint32_t )(1<<1)) /* Status register EMC: Self-refresh acknowledge.. */ #define EMC_Status_SA ((uint32_t )(1<<2)) /*********************************************************************** * EMC Configuration register (EMCConfig) **********************************************************************/ /* EMC Configuration register : Little Endian. */ #define EMC_Config_Little_Endian_Mode ((uint32_t )(0<<0)) /* EMC Configuration register : Big Endian. */ #define EMC_Config_Big_Endian_Mode ((uint32_t )(1<<0)) /* EMC Configuration: Endian Mask */ #define EMC_Config_Endian_Mask (0x01<<0) /* EMC Configuration register: CLKOUT ratio 1:1. */ #define EMC_Config_CCLK_1_1 ((uinr32_t)(0<<8)) /* EMC Configuration register: CLKOUT ratio 1:1. */ #define EMC_Config_CCLK_1_2 ((uinr32_t)(1<<8)) /* EMC Configuration register mask */ #define EMC_Config_MASK ((uint32_t)(0x101)) /*********************************************************************** * Dynamic Memory Control register (EMCDynamicControl) **********************************************************************/ /* Dynamic Memory Control register EMC: Dynamic memory clock enable. */ #define EMC_DYNAMIC_CTRL_MEMCLK_EN_POS (0) #define EMC_DYNAMIC_CTRL_MEMCLK_EN_BMASK (1<