2 * @brief EMC Registers and control functions
\r
5 * Copyright(C) NXP Semiconductors, 2012
\r
6 * All rights reserved.
\r
9 * Software that is described herein is for illustrative purposes only
\r
10 * which provides customers with programming information regarding the
\r
11 * LPC products. This software is supplied "AS IS" without any warranties of
\r
12 * any kind, and NXP Semiconductors and its licensor disclaim any and
\r
13 * all warranties, express or implied, including all implied warranties of
\r
14 * merchantability, fitness for a particular purpose and non-infringement of
\r
15 * intellectual property rights. NXP Semiconductors assumes no responsibility
\r
16 * or liability for the use of the software, conveys no license or rights under any
\r
17 * patent, copyright, mask work right, or any other intellectual property rights in
\r
18 * or to any products. NXP Semiconductors reserves the right to make changes
\r
19 * in the software without notification. NXP Semiconductors also makes no
\r
20 * representation or warranty that such application will be suitable for the
\r
21 * specified use without further testing or modification.
\r
24 * Permission to use, copy, modify, and distribute this software and its
\r
25 * documentation is hereby granted, under NXP Semiconductors' and its
\r
26 * licensor's relevant copyrights in the software, without fee, provided that it
\r
27 * is used in conjunction with NXP Semiconductors microcontrollers. This
\r
28 * copyright, permission, and disclaimer notice must appear in all copies of
\r
32 #ifndef __EMC_001_H_
\r
33 #define __EMC_001_H_
\r
35 #include "sys_config.h"
\r
42 /** @defgroup IP_EMC_001 IP: EMC register block and driver
\r
43 * @ingroup IP_Drivers
\r
44 * External Memory Controller
\r
49 * @brief External Memory Controller (EMC) register block structure
\r
51 typedef struct { /*!< EMC Structure */
\r
52 __IO uint32_t CONTROL; /*!< Controls operation of the memory controller. */
\r
53 __I uint32_t STATUS; /*!< Provides EMC status information. */
\r
54 __IO uint32_t CONFIG; /*!< Configures operation of the memory controller. */
\r
55 __I uint32_t RESERVED0[5];
\r
56 __IO uint32_t DYNAMICCONTROL; /*!< Controls dynamic memory operation. */
\r
57 __IO uint32_t DYNAMICREFRESH; /*!< Configures dynamic memory refresh operation. */
\r
58 __IO uint32_t DYNAMICREADCONFIG; /*!< Configures the dynamic memory read strategy. */
\r
59 __I uint32_t RESERVED1;
\r
60 __IO uint32_t DYNAMICRP; /*!< Selects the precharge command period. */
\r
61 __IO uint32_t DYNAMICRAS; /*!< Selects the active to precharge command period. */
\r
62 __IO uint32_t DYNAMICSREX; /*!< Selects the self-refresh exit time. */
\r
63 __IO uint32_t DYNAMICAPR; /*!< Selects the last-data-out to active command time. */
\r
64 __IO uint32_t DYNAMICDAL; /*!< Selects the data-in to active command time. */
\r
65 __IO uint32_t DYNAMICWR; /*!< Selects the write recovery time. */
\r
66 __IO uint32_t DYNAMICRC; /*!< Selects the active to active command period. */
\r
67 __IO uint32_t DYNAMICRFC; /*!< Selects the auto-refresh period. */
\r
68 __IO uint32_t DYNAMICXSR; /*!< Selects the exit self-refresh to active command time. */
\r
69 __IO uint32_t DYNAMICRRD; /*!< Selects the active bank A to active bank B latency. */
\r
70 __IO uint32_t DYNAMICMRD; /*!< Selects the load mode register to active command time. */
\r
71 __I uint32_t RESERVED2[9];
\r
72 __IO uint32_t STATICEXTENDEDWAIT; /*!< Selects time for long static memory read and write transfers. */
\r
73 __I uint32_t RESERVED3[31];
\r
74 __IO uint32_t DYNAMICCONFIG0; /*!< Selects the configuration information for dynamic memory chip select n. */
\r
75 __IO uint32_t DYNAMICRASCAS0; /*!< Selects the RAS and CAS latencies for dynamic memory chip select n. */
\r
76 __I uint32_t RESERVED4[6];
\r
77 __IO uint32_t DYNAMICCONFIG1; /*!< Selects the configuration information for dynamic memory chip select n. */
\r
78 __IO uint32_t DYNAMICRASCAS1; /*!< Selects the RAS and CAS latencies for dynamic memory chip select n. */
\r
79 __I uint32_t RESERVED5[6];
\r
80 __IO uint32_t DYNAMICCONFIG2; /*!< Selects the configuration information for dynamic memory chip select n. */
\r
81 __IO uint32_t DYNAMICRASCAS2; /*!< Selects the RAS and CAS latencies for dynamic memory chip select n. */
\r
82 __I uint32_t RESERVED6[6];
\r
83 __IO uint32_t DYNAMICCONFIG3; /*!< Selects the configuration information for dynamic memory chip select n. */
\r
84 __IO uint32_t DYNAMICRASCAS3; /*!< Selects the RAS and CAS latencies for dynamic memory chip select n. */
\r
85 __I uint32_t RESERVED7[38];
\r
86 __IO uint32_t STATICCONFIG0; /*!< Selects the memory configuration for static chip select n. */
\r
87 __IO uint32_t STATICWAITWEN0; /*!< Selects the delay from chip select n to write enable. */
\r
88 __IO uint32_t STATICWAITOEN0; /*!< Selects the delay from chip select n or address change, whichever is later, to output enable. */
\r
89 __IO uint32_t STATICWAITRD0; /*!< Selects the delay from chip select n to a read access. */
\r
90 __IO uint32_t STATICWAITPAG0; /*!< Selects the delay for asynchronous page mode sequential accesses for chip select n. */
\r
91 __IO uint32_t STATICWAITWR0; /*!< Selects the delay from chip select n to a write access. */
\r
92 __IO uint32_t STATICWAITTURN0; /*!< Selects bus turnaround cycles */
\r
93 __I uint32_t RESERVED8;
\r
94 __IO uint32_t STATICCONFIG1; /*!< Selects the memory configuration for static chip select n. */
\r
95 __IO uint32_t STATICWAITWEN1; /*!< Selects the delay from chip select n to write enable. */
\r
96 __IO uint32_t STATICWAITOEN1; /*!< Selects the delay from chip select n or address change, whichever is later, to output enable. */
\r
97 __IO uint32_t STATICWAITRD1; /*!< Selects the delay from chip select n to a read access. */
\r
98 __IO uint32_t STATICWAITPAG1; /*!< Selects the delay for asynchronous page mode sequential accesses for chip select n. */
\r
99 __IO uint32_t STATICWAITWR1; /*!< Selects the delay from chip select n to a write access. */
\r
100 __IO uint32_t STATICWAITTURN1; /*!< Selects bus turnaround cycles */
\r
101 __I uint32_t RESERVED9;
\r
102 __IO uint32_t STATICCONFIG2; /*!< Selects the memory configuration for static chip select n. */
\r
103 __IO uint32_t STATICWAITWEN2; /*!< Selects the delay from chip select n to write enable. */
\r
104 __IO uint32_t STATICWAITOEN2; /*!< Selects the delay from chip select n or address change, whichever is later, to output enable. */
\r
105 __IO uint32_t STATICWAITRD2; /*!< Selects the delay from chip select n to a read access. */
\r
106 __IO uint32_t STATICWAITPAG2; /*!< Selects the delay for asynchronous page mode sequential accesses for chip select n. */
\r
107 __IO uint32_t STATICWAITWR2; /*!< Selects the delay from chip select n to a write access. */
\r
108 __IO uint32_t STATICWAITTURN2; /*!< Selects bus turnaround cycles */
\r
109 __I uint32_t RESERVED10;
\r
110 __IO uint32_t STATICCONFIG3; /*!< Selects the memory configuration for static chip select n. */
\r
111 __IO uint32_t STATICWAITWEN3; /*!< Selects the delay from chip select n to write enable. */
\r
112 __IO uint32_t STATICWAITOEN3; /*!< Selects the delay from chip select n or address change, whichever is later, to output enable. */
\r
113 __IO uint32_t STATICWAITRD3; /*!< Selects the delay from chip select n to a read access. */
\r
114 __IO uint32_t STATICWAITPAG3; /*!< Selects the delay for asynchronous page mode sequential accesses for chip select n. */
\r
115 __IO uint32_t STATICWAITWR3; /*!< Selects the delay from chip select n to a write access. */
\r
116 __IO uint32_t STATICWAITTURN3; /*!< Selects bus turnaround cycles */
\r
120 * @brief EMC register support bitfields and mask
\r
122 /* Reserve for extending support to ARM9 or nextgen LPC */
\r
123 #define EMC_SUPPORT_ONLY_PL172 /*!< Reserve for extending support to ARM9 or nextgen LPC */
\r
125 #define EMC_CONFIG_ENDIAN_LITTLE (0) /*!< Value for EMC to operate in Little Endian Mode */
\r
126 #define EMC_CONFIG_ENDIAN_BIG (1) /*!< Value for EMC to operate in Big Endian Mode */
\r
128 #define EMC_CONFIG_BUFFER_ENABLE (1 << 19) /*!< EMC Buffer enable bit in EMC Dynamic Configuration register */
\r
129 #define EMC_CONFIG_WRITE_PROTECT (1 << 20) /*!< EMC Write protect bit in EMC Dynamic Configuration register */
\r
131 /* Dynamic Memory Configuration Register Bit Definitions */
\r
132 #define EMC_DYN_CONFIG_MD_BIT (3) /*!< Memory device bit in EMC Dynamic Configuration register */
\r
133 #define EMC_DYN_CONFIG_MD_SDRAM (0 << EMC_DYN_CONFIG_MD_BIT) /*!< Select device as SDRAM in EMC Dynamic Configuration register */
\r
134 #define EMC_DYN_CONFIG_MD_LPSDRAM (1 << EMC_DYN_CONFIG_MD_BIT) /*!< Select device as LPSDRAM in EMC Dynamic Configuration register */
\r
136 #define EMC_DYN_CONFIG_LPSDRAM_BIT (12) /*!< LPSDRAM bit in EMC Dynamic Configuration register */
\r
137 #define EMC_DYN_CONFIG_LPSDRAM (1 << EMC_DYN_CONFIG_LPSDRAM_BIT) /*!< LPSDRAM value in EMC Dynamic Configuration register */
\r
139 #define EMC_DYN_CONFIG_DEV_SIZE_BIT (9) /*!< Device Size starting bit in EMC Dynamic Configuration register */
\r
140 #define EMC_DYN_CONFIG_DEV_SIZE_16Mb (0x00 << EMC_DYN_CONFIG_DEV_SIZE_BIT) /*!< 16Mb Device Size value in EMC Dynamic Configuration register */
\r
141 #define EMC_DYN_CONFIG_DEV_SIZE_64Mb (0x01 << EMC_DYN_CONFIG_DEV_SIZE_BIT) /*!< 64Mb Device Size value in EMC Dynamic Configuration register */
\r
142 #define EMC_DYN_CONFIG_DEV_SIZE_128Mb (0x02 << EMC_DYN_CONFIG_DEV_SIZE_BIT) /*!< 128Mb Device Size value in EMC Dynamic Configuration register */
\r
143 #define EMC_DYN_CONFIG_DEV_SIZE_256Mb (0x03 << EMC_DYN_CONFIG_DEV_SIZE_BIT) /*!< 256Mb Device Size value in EMC Dynamic Configuration register */
\r
144 #define EMC_DYN_CONFIG_DEV_SIZE_512Mb (0x04 << EMC_DYN_CONFIG_DEV_SIZE_BIT) /*!< 512Mb Device Size value in EMC Dynamic Configuration register */
\r
146 #define EMC_DYN_CONFIG_DEV_BUS_BIT (7) /*!< Device bus width starting bit in EMC Dynamic Configuration register */
\r
147 #define EMC_DYN_CONFIG_DEV_BUS_8 (0x00 << EMC_DYN_CONFIG_DEV_BUS_BIT) /*!< Device 8-bit bus width value in EMC Dynamic Configuration register */
\r
148 #define EMC_DYN_CONFIG_DEV_BUS_16 (0x01 << EMC_DYN_CONFIG_DEV_BUS_BIT) /*!< Device 16-bit bus width value in EMC Dynamic Configuration register */
\r
149 #define EMC_DYN_CONFIG_DEV_BUS_32 (0x02 << EMC_DYN_CONFIG_DEV_BUS_BIT) /*!< Device 32-bit bus width value in EMC Dynamic Configuration register */
\r
151 #define EMC_DYN_CONFIG_DATA_BUS_WIDTH_BIT (14) /*!< Device data bus width starting bit in EMC Dynamic Configuration register */
\r
152 #define EMC_DYN_CONFIG_DATA_BUS_16 (0x00 << EMC_DYN_CONFIG_DATA_BUS_WIDTH_BIT) /*!< Device 16-bit data bus width value in EMC Dynamic Configuration register */
\r
153 #define EMC_DYN_CONFIG_DATA_BUS_32 (0x01 << EMC_DYN_CONFIG_DATA_BUS_WIDTH_BIT) /*!< Device 32-bit bus width value in EMC Dynamic Configuration register */
\r
155 /*!< Memory configuration values in EMC Dynamic Configuration Register */
\r
156 #define EMC_DYN_CONFIG_2Mx8_2BANKS_11ROWS_9COLS ((0x0 << 9) | (0x0 << 7)) /*!< Value for Memory configuration - 2Mx8 2 Banks 11 Rows 9 Columns */
\r
157 #define EMC_DYN_CONFIG_1Mx16_2BANKS_11ROWS_8COLS ((0x0 << 9) | (0x1 << 7)) /*!< Value for Memory configuration - 1Mx16 2 Banks 11 Rows 8 Columns */
\r
158 #define EMC_DYN_CONFIG_8Mx8_4BANKS_12ROWS_9COLS ((0x1 << 9) | (0x0 << 7)) /*!< Value for Memory configuration - 8Mx8 4 Banks 12 Rows 9 Columns */
\r
159 #define EMC_DYN_CONFIG_4Mx16_4BANKS_12ROWS_8COLS ((0x1 << 9) | (0x1 << 7)) /*!< Value for Memory configuration - 4Mx16 4 Banks 12 Rows 8 Columns */
\r
160 #define EMC_DYN_CONFIG_2Mx32_4BANKS_11ROWS_8COLS ((0x1 << 9) | (0x2 << 7)) /*!< Value for Memory configuration - 2Mx32 4 Banks 11 Rows 8 Columns */
\r
161 #define EMC_DYN_CONFIG_16Mx8_4BANKS_12ROWS_10COLS ((0x2 << 9) | (0x0 << 7)) /*!< Value for Memory configuration - 16Mx8 4 Banks 12 Rows 10 Columns */
\r
162 #define EMC_DYN_CONFIG_8Mx16_4BANKS_12ROWS_9COLS ((0x2 << 9) | (0x1 << 7)) /*!< Value for Memory configuration - 8Mx16 4 Banks 12 Rows 9 Columns */
\r
163 #define EMC_DYN_CONFIG_4Mx32_4BANKS_12ROWS_8COLS ((0x2 << 9) | (0x2 << 7)) /*!< Value for Memory configuration - 4Mx32 4 Banks 12 Rows 8 Columns */
\r
164 #define EMC_DYN_CONFIG_32Mx8_4BANKS_13ROWS_10COLS ((0x3 << 9) | (0x0 << 7)) /*!< Value for Memory configuration - 32Mx8 4 Banks 13 Rows 10 Columns */
\r
165 #define EMC_DYN_CONFIG_16Mx16_4BANKS_13ROWS_9COLS ((0x3 << 9) | (0x1 << 7)) /*!< Value for Memory configuration - 16Mx16 4 Banks 13 Rows 8 Columns */
\r
166 #define EMC_DYN_CONFIG_8Mx32_4BANKS_13ROWS_8COLS ((0x3 << 9) | (0x2 << 7)) /*!< Value for Memory configuration - 8Mx32 4 Banks 13 Rows 8 Columns */
\r
167 #define EMC_DYN_CONFIG_64Mx8_4BANKS_13ROWS_11COLS ((0x4 << 9) | (0x0 << 7)) /*!< Value for Memory configuration - 64Mx8 4 Banks 13 Rows 11 Columns */
\r
168 #define EMC_DYN_CONFIG_32Mx16_4BANKS_13ROWS_10COLS ((0x4 << 9) | (0x1 << 7)) /*!< Value for Memory configuration - 32Mx16 4 Banks 13 Rows 10 Columns */
\r
170 /*!< Dynamic Memory Mode Register Bit Definition */
\r
171 #define EMC_DYN_MODE_BURST_LEN_BIT (0) /*!< Starting bit No. of Burst Length in Dynamic Memory Mode Register */
\r
172 #define EMC_DYN_MODE_BURST_LEN_1 (0) /*!< Value to set Burst Length to 1 in Dynamic Memory Mode Register */
\r
173 #define EMC_DYN_MODE_BURST_LEN_2 (1) /*!< Value to set Burst Length to 2 in Dynamic Memory Mode Register */
\r
174 #define EMC_DYN_MODE_BURST_LEN_4 (2) /*!< Value to set Burst Length to 4 in Dynamic Memory Mode Register */
\r
175 #define EMC_DYN_MODE_BURST_LEN_8 (3) /*!< Value to set Burst Length to 8 in Dynamic Memory Mode Register */
\r
176 #define EMC_DYN_MODE_BURST_LEN_FULL (7) /*!< Value to set Burst Length to Full in Dynamic Memory Mode Register */
\r
178 #define EMC_DYN_MODE_BURST_TYPE_BIT (3) /*!< Burst Type bit in Dynamic Memory Mode Register */
\r
179 #define EMC_DYN_MODE_BURST_TYPE_SEQUENTIAL (0 << EMC_DYN_MODE_BURST_TYPE_BIT) /*!< Burst Type Sequential in Dynamic Memory Mode Register */
\r
180 #define EMC_DYN_MODE_BURST_TYPE_INTERLEAVE (1 << EMC_DYN_MODE_BURST_TYPE_BIT) /*!< Burst Type Interleaved in Dynamic Memory Mode Register */
\r
182 /*!< CAS Latency in Dynamic Mode Register */
\r
183 #define EMC_DYN_MODE_CAS_BIT (4) /*!< CAS latency starting bit in Dynamic Memory Mode register */
\r
184 #define EMC_DYN_MODE_CAS_1 (1 << EMC_DYN_MODE_CAS_BIT) /*!< value for CAS latency of 1 cycle */
\r
185 #define EMC_DYN_MODE_CAS_2 (2 << EMC_DYN_MODE_CAS_BIT) /*!< value for CAS latency of 2 cycle */
\r
186 #define EMC_DYN_MODE_CAS_3 (3 << EMC_DYN_MODE_CAS_BIT) /*!< value for CAS latency of 3 cycle */
\r
188 /*!< Operation Mode in Dynamic Mode register */
\r
189 #define EMC_DYN_MODE_OPMODE_BIT (7) /*!< Dynamic Mode Operation bit */
\r
190 #define EMC_DYN_MODE_OPMODE_STANDARD (0 << EMC_DYN_MODE_OPMODE_BIT) /*!< Value for Dynamic standard operation Mode */
\r
192 /*!< Write Burst Mode in Dynamic Mode register */
\r
193 #define EMC_DYN_MODE_WBMODE_BIT (9) /*!< Write Burst Mode bit */
\r
194 #define EMC_DYN_MODE_WBMODE_PROGRAMMED (0 << EMC_DYN_MODE_WBMODE_BIT) /*!< Write Burst Mode programmed */
\r
195 #define EMC_DYN_MODE_WBMODE_SINGLE_LOC (1 << EMC_DYN_MODE_WBMODE_BIT) /*!< Write Burst Mode Single LOC */
\r
197 /*!< Dynamic Memory Control Register Bit Definitions */
\r
198 #define EMC_DYN_CONTROL_ENABLE (0x03) /*!< Control Enable value */
\r
200 /*!< Static Memory Configuration Register Bit Definitions */
\r
201 #define EMC_STATIC_CONFIG_MEM_WIDTH_8 (0) /*!< Static Memory Configuration - 8-bit width */
\r
202 #define EMC_STATIC_CONFIG_MEM_WIDTH_16 (1) /*!< Static Memory Configuration - 16-bit width */
\r
203 #define EMC_STATIC_CONFIG_MEM_WIDTH_32 (2) /*!< Static Memory Configuration - 32-bit width */
\r
205 #define EMC_STATIC_CONFIG_PAGE_MODE_BIT (3) /*!< Page Mode bit No */
\r
206 #define EMC_STATIC_CONFIG_PAGE_MODE_ENABLE (1 << EMC_STATIC_CONFIG_PAGE_MODE_BIT) /*!< Value to enable Page Mode */
\r
208 #define EMC_STATIC_CONFIG_CS_POL_BIT (6) /*!< Chip Select bit No */
\r
209 #define EMC_STATIC_CONFIG_CS_POL_ACTIVE_HIGH (1 << EMC_STATIC_CONFIG_CS_POL_BIT) /*!< Chip Select polarity - Active High */
\r
210 #define EMC_STATIC_CONFIG_CS_POL_ACTIVE_LOW (0 << EMC_STATIC_CONFIG_CS_POL_BIT) /*!< Chip Select polarity - Active Low */
\r
212 #define EMC_STATIC_CONFIG_BLS_BIT (7) /*!< BLS Configuration bit No */
\r
213 #define EMC_STATIC_CONFIG_BLS_HIGH (1 << EMC_STATIC_CONFIG_BLS_BIT) /*!< BLS High Configuration value */
\r
214 #define EMC_STATIC_CONFIG_BLS_LOW (0 << EMC_STATIC_CONFIG_BLS_BIT) /*!< BLS Low Configuration value */
\r
216 #define EMC_STATIC_CONFIG_EW_BIT (8) /*!< Ext Wait bit No */
\r
217 #define EMC_STATIC_CONFIG_EW_ENABLE (1 << EMC_STATIC_CONFIG_EW_BIT) /*!< Ext Wait Enabled value */
\r
218 #define EMC_STATIC_CONFIG_EW_DISABLE (0 << EMC_STATIC_CONFIG_EW_BIT) /*!< Ext Wait Diabled value */
\r
220 /*!< Q24.8 Fixed Point Helper */
\r
221 #define Q24_8_FP(x) ((x) * 256)
\r
222 #define EMC_NANOSECOND(x) Q24_8_FP(x)
\r
223 #define EMC_CLOCK(x) Q24_8_FP(-(x))
\r
226 * @brief EMC Dynamic Device Configuration structure used for IP drivers
\r
229 uint32_t BaseAddr; /*!< Base Address */
\r
230 uint8_t RAS; /*!< RAS value */
\r
231 uint32_t ModeRegister; /*!< Mode Register value */
\r
232 uint32_t DynConfig; /*!< Dynamic Configuration value */
\r
233 } IP_EMC_DYN_DEVICE_CONFIG_T;
\r
236 * @brief EMC Dynamic Configure Struct
\r
239 int32_t RefreshPeriod; /*!< Refresh period */
\r
240 uint32_t ReadConfig; /*!< Clock*/
\r
241 int32_t tRP; /*!< Precharge Command Period */
\r
242 int32_t tRAS; /*!< Active to Precharge Command Period */
\r
243 int32_t tSREX; /*!< Self Refresh Exit Time */
\r
244 int32_t tAPR; /*!< Last Data Out to Active Time */
\r
245 int32_t tDAL; /*!< Data In to Active Command Time */
\r
246 int32_t tWR; /*!< Write Recovery Time */
\r
247 int32_t tRC; /*!< Active to Active Command Period */
\r
248 int32_t tRFC; /*!< Auto-refresh Period */
\r
249 int32_t tXSR; /*!< Exit Selt Refresh */
\r
250 int32_t tRRD; /*!< Active Bank A to Active Bank B Time */
\r
251 int32_t tMRD; /*!< Load Mode register command to Active Command */
\r
252 IP_EMC_DYN_DEVICE_CONFIG_T DevConfig[4]; /*!< Device Configuration array */
\r
253 } IP_EMC_DYN_CONFIG_T;
\r
256 * @brief EMC Static Configure Structure
\r
259 uint8_t ChipSelect; /*!< Chip select */
\r
260 uint32_t Config; /*!< Configuration value */
\r
261 int32_t WaitWen; /*!< Write Enable Wait */
\r
262 int32_t WaitOen; /*!< Output Enable Wait */
\r
263 int32_t WaitRd; /*!< Read Wait */
\r
264 int32_t WaitPage; /*!< Page Access Wait */
\r
265 int32_t WaitWr; /*!< Write Wait */
\r
266 int32_t WaitTurn; /*!< Turn around wait */
\r
267 } IP_EMC_STATIC_CONFIG_T;
\r
270 * @brief Initializes the Dynamic Controller
\r
271 * @param pEMC : Pointer to EMC peripheral
\r
272 * @param Dynamic_Config : Dynamic Memory Configure Struct
\r
273 * @param EMC_Clock : Frequency of EMC Clock Out
\r
275 * @note Initializes the Dynamic Controller according to the specified parameters
\r
276 * in the IP_EMC_DYN_CONFIG_T
\r
278 void IP_EMC_Dynamic_Init(IP_EMC_001_T *pEMC, IP_EMC_DYN_CONFIG_T *Dynamic_Config, uint32_t EMC_Clock);
\r
281 * @brief Enable Dynamic Memory Controller
\r
282 * @param pEMC : Pointer to EMC peripheral
\r
283 * @param Enable : 1 = Enable Dynamic Memory Controller, 0 = Disable
\r
286 void IP_EMC_Dynamic_Enable(IP_EMC_001_T *pEMC, uint8_t Enable);
\r
289 * @brief Initializes the Static Controller according to the specified
\r
290 * parameters in the IP_EMC_STATIC_CONFIG_T
\r
291 * @param pEMC : Pointer to EMC peripheral
\r
292 * @param Static_Config : Static Memory Configure Struct
\r
293 * @param EMC_Clock : Frequency of EMC Clock Out
\r
296 void IP_EMC_Static_Init(IP_EMC_001_T *pEMC, IP_EMC_STATIC_CONFIG_T *Static_Config, uint32_t EMC_Clock);
\r
299 * @brief Mirror CS1 to CS0 and DYCS0
\r
300 * @param pEMC : Pointer to EMC peripheral
\r
301 * @param Enable : 1 = Mirror, 0 = Normal Memory Map
\r
304 void IP_EMC_Mirror(IP_EMC_001_T *pEMC, uint32_t Enable);
\r
307 * @brief Enable EMC
\r
308 * @param pEMC : Pointer to EMC peripheral
\r
309 * @param Enable : 1 = Enable, 0 = Disable
\r
312 void IP_EMC_Enable(IP_EMC_001_T *pEMC, uint32_t Enable);
\r
315 * @brief Set EMC LowPower Mode
\r
316 * @param pEMC : Pointer to EMC peripheral
\r
317 * @param Enable : 1 = Enable, 0 = Disable
\r
319 * @note This function should only be called when the memory
\r
320 * controller is not busy (bit 0 of the status register is not set).
\r
322 void IP_EMC_LowPowerMode(IP_EMC_001_T *pEMC, uint32_t Enable);
\r
325 * @brief Initialize EMC
\r
326 * @param pEMC : Pointer to EMC peripheral
\r
327 * @param Enable : 1 = Enable, 0 = Disable
\r
328 * @param ClockRatio : clock out ratio, 0 = 1:1, 1 = 1:2
\r
329 * @param EndianMode : Endian Mode, 0 = Little, 1 = Big
\r
332 void IP_EMC_Init(IP_EMC_001_T *pEMC, uint32_t Enable, uint32_t ClockRatio, uint32_t EndianMode);
\r
335 * @brief Set Static Memory Extended Wait in Clock
\r
336 * @param pEMC : Pointer to EMC peripheral
\r
337 * @param Wait16Clks : Number of '16 clock' delay cycles
\r
340 void IP_EMC_SetStaticExtendedWait(IP_EMC_001_T *pEMC, uint32_t Wait16Clks);
\r
350 #endif /* __EMC_001_H_ */
\r