2 ******************************************************************************
3 * @file stm32f10x_fsmc.c
4 * @author MCD Application Team
7 * @brief This file provides all the FSMC firmware functions.
8 ******************************************************************************
11 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 * <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2>
19 ******************************************************************************
22 /* Includes ------------------------------------------------------------------*/
23 #include "stm32f10x_fsmc.h"
24 #include "stm32f10x_rcc.h"
26 /** @addtogroup STM32F10x_StdPeriph_Driver
31 * @brief FSMC driver modules
35 /** @defgroup FSMC_Private_TypesDefinitions
42 /** @defgroup FSMC_Private_Defines
46 /* --------------------- FSMC registers bit mask ---------------------------- */
49 #define BCR_MBKEN_Set ((uint32_t)0x00000001)
50 #define BCR_MBKEN_Reset ((uint32_t)0x000FFFFE)
51 #define BCR_FACCEN_Set ((uint32_t)0x00000040)
54 #define PCR_PBKEN_Set ((uint32_t)0x00000004)
55 #define PCR_PBKEN_Reset ((uint32_t)0x000FFFFB)
56 #define PCR_ECCEN_Set ((uint32_t)0x00000040)
57 #define PCR_ECCEN_Reset ((uint32_t)0x000FFFBF)
58 #define PCR_MemoryType_NAND ((uint32_t)0x00000008)
63 /** @defgroup FSMC_Private_Macros
71 /** @defgroup FSMC_Private_Variables
79 /** @defgroup FSMC_Private_FunctionPrototypes
87 /** @defgroup FSMC_Private_Functions
92 * @brief Deinitializes the FSMC NOR/SRAM Banks registers to their default
94 * @param FSMC_Bank: specifies the FSMC Bank to be used
95 * This parameter can be one of the following values:
96 * @arg FSMC_Bank1_NORSRAM1: FSMC Bank1 NOR/SRAM1
97 * @arg FSMC_Bank1_NORSRAM2: FSMC Bank1 NOR/SRAM2
98 * @arg FSMC_Bank1_NORSRAM3: FSMC Bank1 NOR/SRAM3
99 * @arg FSMC_Bank1_NORSRAM4: FSMC Bank1 NOR/SRAM4
102 void FSMC_NORSRAMDeInit(uint32_t FSMC_Bank
)
104 /* Check the parameter */
105 assert_param(IS_FSMC_NORSRAM_BANK(FSMC_Bank
));
107 /* FSMC_Bank1_NORSRAM1 */
108 if(FSMC_Bank
== FSMC_Bank1_NORSRAM1
)
110 FSMC_Bank1
->BTCR
[FSMC_Bank
] = 0x000030DB;
112 /* FSMC_Bank1_NORSRAM2, FSMC_Bank1_NORSRAM3 or FSMC_Bank1_NORSRAM4 */
115 FSMC_Bank1
->BTCR
[FSMC_Bank
] = 0x000030D2;
117 FSMC_Bank1
->BTCR
[FSMC_Bank
+ 1] = 0x0FFFFFFF;
118 FSMC_Bank1E
->BWTR
[FSMC_Bank
] = 0x0FFFFFFF;
122 * @brief Deinitializes the FSMC NAND Banks registers to their default reset values.
123 * @param FSMC_Bank: specifies the FSMC Bank to be used
124 * This parameter can be one of the following values:
125 * @arg FSMC_Bank2_NAND: FSMC Bank2 NAND
126 * @arg FSMC_Bank3_NAND: FSMC Bank3 NAND
129 void FSMC_NANDDeInit(uint32_t FSMC_Bank
)
131 /* Check the parameter */
132 assert_param(IS_FSMC_NAND_BANK(FSMC_Bank
));
134 if(FSMC_Bank
== FSMC_Bank2_NAND
)
136 /* Set the FSMC_Bank2 registers to their reset values */
137 FSMC_Bank2
->PCR2
= 0x00000018;
138 FSMC_Bank2
->SR2
= 0x00000040;
139 FSMC_Bank2
->PMEM2
= 0xFCFCFCFC;
140 FSMC_Bank2
->PATT2
= 0xFCFCFCFC;
142 /* FSMC_Bank3_NAND */
145 /* Set the FSMC_Bank3 registers to their reset values */
146 FSMC_Bank3
->PCR3
= 0x00000018;
147 FSMC_Bank3
->SR3
= 0x00000040;
148 FSMC_Bank3
->PMEM3
= 0xFCFCFCFC;
149 FSMC_Bank3
->PATT3
= 0xFCFCFCFC;
154 * @brief Deinitializes the FSMC PCCARD Bank registers to their default reset values.
158 void FSMC_PCCARDDeInit(void)
160 /* Set the FSMC_Bank4 registers to their reset values */
161 FSMC_Bank4
->PCR4
= 0x00000018;
162 FSMC_Bank4
->SR4
= 0x00000000;
163 FSMC_Bank4
->PMEM4
= 0xFCFCFCFC;
164 FSMC_Bank4
->PATT4
= 0xFCFCFCFC;
165 FSMC_Bank4
->PIO4
= 0xFCFCFCFC;
169 * @brief Initializes the FSMC NOR/SRAM Banks according to the specified
170 * parameters in the FSMC_NORSRAMInitStruct.
171 * @param FSMC_NORSRAMInitStruct : pointer to a FSMC_NORSRAMInitTypeDef
172 * structure that contains the configuration information for
173 * the FSMC NOR/SRAM specified Banks.
176 void FSMC_NORSRAMInit(FSMC_NORSRAMInitTypeDef
* FSMC_NORSRAMInitStruct
)
178 /* Check the parameters */
179 assert_param(IS_FSMC_NORSRAM_BANK(FSMC_NORSRAMInitStruct
->FSMC_Bank
));
180 assert_param(IS_FSMC_MUX(FSMC_NORSRAMInitStruct
->FSMC_DataAddressMux
));
181 assert_param(IS_FSMC_MEMORY(FSMC_NORSRAMInitStruct
->FSMC_MemoryType
));
182 assert_param(IS_FSMC_MEMORY_WIDTH(FSMC_NORSRAMInitStruct
->FSMC_MemoryDataWidth
));
183 assert_param(IS_FSMC_BURSTMODE(FSMC_NORSRAMInitStruct
->FSMC_BurstAccessMode
));
184 assert_param(IS_FSMC_ASYNWAIT(FSMC_NORSRAMInitStruct
->FSMC_AsynchronousWait
));
185 assert_param(IS_FSMC_WAIT_POLARITY(FSMC_NORSRAMInitStruct
->FSMC_WaitSignalPolarity
));
186 assert_param(IS_FSMC_WRAP_MODE(FSMC_NORSRAMInitStruct
->FSMC_WrapMode
));
187 assert_param(IS_FSMC_WAIT_SIGNAL_ACTIVE(FSMC_NORSRAMInitStruct
->FSMC_WaitSignalActive
));
188 assert_param(IS_FSMC_WRITE_OPERATION(FSMC_NORSRAMInitStruct
->FSMC_WriteOperation
));
189 assert_param(IS_FSMC_WAITE_SIGNAL(FSMC_NORSRAMInitStruct
->FSMC_WaitSignal
));
190 assert_param(IS_FSMC_EXTENDED_MODE(FSMC_NORSRAMInitStruct
->FSMC_ExtendedMode
));
191 assert_param(IS_FSMC_WRITE_BURST(FSMC_NORSRAMInitStruct
->FSMC_WriteBurst
));
192 assert_param(IS_FSMC_ADDRESS_SETUP_TIME(FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_AddressSetupTime
));
193 assert_param(IS_FSMC_ADDRESS_HOLD_TIME(FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_AddressHoldTime
));
194 assert_param(IS_FSMC_DATASETUP_TIME(FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_DataSetupTime
));
195 assert_param(IS_FSMC_TURNAROUND_TIME(FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_BusTurnAroundDuration
));
196 assert_param(IS_FSMC_CLK_DIV(FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_CLKDivision
));
197 assert_param(IS_FSMC_DATA_LATENCY(FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_DataLatency
));
198 assert_param(IS_FSMC_ACCESS_MODE(FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_AccessMode
));
200 /* Bank1 NOR/SRAM control register configuration */
201 FSMC_Bank1
->BTCR
[FSMC_NORSRAMInitStruct
->FSMC_Bank
] =
202 (uint32_t)FSMC_NORSRAMInitStruct
->FSMC_DataAddressMux
|
203 FSMC_NORSRAMInitStruct
->FSMC_MemoryType
|
204 FSMC_NORSRAMInitStruct
->FSMC_MemoryDataWidth
|
205 FSMC_NORSRAMInitStruct
->FSMC_BurstAccessMode
|
206 FSMC_NORSRAMInitStruct
->FSMC_AsynchronousWait
|
207 FSMC_NORSRAMInitStruct
->FSMC_WaitSignalPolarity
|
208 FSMC_NORSRAMInitStruct
->FSMC_WrapMode
|
209 FSMC_NORSRAMInitStruct
->FSMC_WaitSignalActive
|
210 FSMC_NORSRAMInitStruct
->FSMC_WriteOperation
|
211 FSMC_NORSRAMInitStruct
->FSMC_WaitSignal
|
212 FSMC_NORSRAMInitStruct
->FSMC_ExtendedMode
|
213 FSMC_NORSRAMInitStruct
->FSMC_WriteBurst
;
215 if(FSMC_NORSRAMInitStruct
->FSMC_MemoryType
== FSMC_MemoryType_NOR
)
217 FSMC_Bank1
->BTCR
[FSMC_NORSRAMInitStruct
->FSMC_Bank
] |= (uint32_t)BCR_FACCEN_Set
;
220 /* Bank1 NOR/SRAM timing register configuration */
221 FSMC_Bank1
->BTCR
[FSMC_NORSRAMInitStruct
->FSMC_Bank
+1] =
222 (uint32_t)FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_AddressSetupTime
|
223 (FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_AddressHoldTime
<< 4) |
224 (FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_DataSetupTime
<< 8) |
225 (FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_BusTurnAroundDuration
<< 16) |
226 (FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_CLKDivision
<< 20) |
227 (FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_DataLatency
<< 24) |
228 FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_AccessMode
;
231 /* Bank1 NOR/SRAM timing register for write configuration, if extended mode is used */
232 if(FSMC_NORSRAMInitStruct
->FSMC_ExtendedMode
== FSMC_ExtendedMode_Enable
)
234 assert_param(IS_FSMC_ADDRESS_SETUP_TIME(FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_AddressSetupTime
));
235 assert_param(IS_FSMC_ADDRESS_HOLD_TIME(FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_AddressHoldTime
));
236 assert_param(IS_FSMC_DATASETUP_TIME(FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_DataSetupTime
));
237 assert_param(IS_FSMC_CLK_DIV(FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_CLKDivision
));
238 assert_param(IS_FSMC_DATA_LATENCY(FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_DataLatency
));
239 assert_param(IS_FSMC_ACCESS_MODE(FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_AccessMode
));
240 FSMC_Bank1E
->BWTR
[FSMC_NORSRAMInitStruct
->FSMC_Bank
] =
241 (uint32_t)FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_AddressSetupTime
|
242 (FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_AddressHoldTime
<< 4 )|
243 (FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_DataSetupTime
<< 8) |
244 (FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_CLKDivision
<< 20) |
245 (FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_DataLatency
<< 24) |
246 FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_AccessMode
;
250 FSMC_Bank1E
->BWTR
[FSMC_NORSRAMInitStruct
->FSMC_Bank
] = 0x0FFFFFFF;
255 * @brief Initializes the FSMC NAND Banks according to the specified
256 * parameters in the FSMC_NANDInitStruct.
257 * @param FSMC_NANDInitStruct : pointer to a FSMC_NANDInitTypeDef
258 * structure that contains the configuration information for the FSMC
259 * NAND specified Banks.
262 void FSMC_NANDInit(FSMC_NANDInitTypeDef
* FSMC_NANDInitStruct
)
264 uint32_t tmppcr
= 0x00000000, tmppmem
= 0x00000000, tmppatt
= 0x00000000;
266 /* Check the parameters */
267 assert_param( IS_FSMC_NAND_BANK(FSMC_NANDInitStruct
->FSMC_Bank
));
268 assert_param( IS_FSMC_WAIT_FEATURE(FSMC_NANDInitStruct
->FSMC_Waitfeature
));
269 assert_param( IS_FSMC_MEMORY_WIDTH(FSMC_NANDInitStruct
->FSMC_MemoryDataWidth
));
270 assert_param( IS_FSMC_ECC_STATE(FSMC_NANDInitStruct
->FSMC_ECC
));
271 assert_param( IS_FSMC_ECCPAGE_SIZE(FSMC_NANDInitStruct
->FSMC_ECCPageSize
));
272 assert_param( IS_FSMC_TCLR_TIME(FSMC_NANDInitStruct
->FSMC_TCLRSetupTime
));
273 assert_param( IS_FSMC_TAR_TIME(FSMC_NANDInitStruct
->FSMC_TARSetupTime
));
274 assert_param(IS_FSMC_SETUP_TIME(FSMC_NANDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_SetupTime
));
275 assert_param(IS_FSMC_WAIT_TIME(FSMC_NANDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_WaitSetupTime
));
276 assert_param(IS_FSMC_HOLD_TIME(FSMC_NANDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_HoldSetupTime
));
277 assert_param(IS_FSMC_HIZ_TIME(FSMC_NANDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_HiZSetupTime
));
278 assert_param(IS_FSMC_SETUP_TIME(FSMC_NANDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_SetupTime
));
279 assert_param(IS_FSMC_WAIT_TIME(FSMC_NANDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_WaitSetupTime
));
280 assert_param(IS_FSMC_HOLD_TIME(FSMC_NANDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_HoldSetupTime
));
281 assert_param(IS_FSMC_HIZ_TIME(FSMC_NANDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_HiZSetupTime
));
283 /* Set the tmppcr value according to FSMC_NANDInitStruct parameters */
284 tmppcr
= (uint32_t)FSMC_NANDInitStruct
->FSMC_Waitfeature
|
285 PCR_MemoryType_NAND
|
286 FSMC_NANDInitStruct
->FSMC_MemoryDataWidth
|
287 FSMC_NANDInitStruct
->FSMC_ECC
|
288 FSMC_NANDInitStruct
->FSMC_ECCPageSize
|
289 (FSMC_NANDInitStruct
->FSMC_TCLRSetupTime
<< 9 )|
290 (FSMC_NANDInitStruct
->FSMC_TARSetupTime
<< 13);
292 /* Set tmppmem value according to FSMC_CommonSpaceTimingStructure parameters */
293 tmppmem
= (uint32_t)FSMC_NANDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_SetupTime
|
294 (FSMC_NANDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_WaitSetupTime
<< 8) |
295 (FSMC_NANDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_HoldSetupTime
<< 16)|
296 (FSMC_NANDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_HiZSetupTime
<< 24);
298 /* Set tmppatt value according to FSMC_AttributeSpaceTimingStructure parameters */
299 tmppatt
= (uint32_t)FSMC_NANDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_SetupTime
|
300 (FSMC_NANDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_WaitSetupTime
<< 8) |
301 (FSMC_NANDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_HoldSetupTime
<< 16)|
302 (FSMC_NANDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_HiZSetupTime
<< 24);
304 if(FSMC_NANDInitStruct
->FSMC_Bank
== FSMC_Bank2_NAND
)
306 /* FSMC_Bank2_NAND registers configuration */
307 FSMC_Bank2
->PCR2
= tmppcr
;
308 FSMC_Bank2
->PMEM2
= tmppmem
;
309 FSMC_Bank2
->PATT2
= tmppatt
;
313 /* FSMC_Bank3_NAND registers configuration */
314 FSMC_Bank3
->PCR3
= tmppcr
;
315 FSMC_Bank3
->PMEM3
= tmppmem
;
316 FSMC_Bank3
->PATT3
= tmppatt
;
321 * @brief Initializes the FSMC PCCARD Bank according to the specified
322 * parameters in the FSMC_PCCARDInitStruct.
323 * @param FSMC_PCCARDInitStruct : pointer to a FSMC_PCCARDInitTypeDef
324 * structure that contains the configuration information for the FSMC
328 void FSMC_PCCARDInit(FSMC_PCCARDInitTypeDef
* FSMC_PCCARDInitStruct
)
330 /* Check the parameters */
331 assert_param(IS_FSMC_WAIT_FEATURE(FSMC_PCCARDInitStruct
->FSMC_Waitfeature
));
332 assert_param(IS_FSMC_TCLR_TIME(FSMC_PCCARDInitStruct
->FSMC_TCLRSetupTime
));
333 assert_param(IS_FSMC_TAR_TIME(FSMC_PCCARDInitStruct
->FSMC_TARSetupTime
));
335 assert_param(IS_FSMC_SETUP_TIME(FSMC_PCCARDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_SetupTime
));
336 assert_param(IS_FSMC_WAIT_TIME(FSMC_PCCARDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_WaitSetupTime
));
337 assert_param(IS_FSMC_HOLD_TIME(FSMC_PCCARDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_HoldSetupTime
));
338 assert_param(IS_FSMC_HIZ_TIME(FSMC_PCCARDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_HiZSetupTime
));
340 assert_param(IS_FSMC_SETUP_TIME(FSMC_PCCARDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_SetupTime
));
341 assert_param(IS_FSMC_WAIT_TIME(FSMC_PCCARDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_WaitSetupTime
));
342 assert_param(IS_FSMC_HOLD_TIME(FSMC_PCCARDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_HoldSetupTime
));
343 assert_param(IS_FSMC_HIZ_TIME(FSMC_PCCARDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_HiZSetupTime
));
344 assert_param(IS_FSMC_SETUP_TIME(FSMC_PCCARDInitStruct
->FSMC_IOSpaceTimingStruct
->FSMC_SetupTime
));
345 assert_param(IS_FSMC_WAIT_TIME(FSMC_PCCARDInitStruct
->FSMC_IOSpaceTimingStruct
->FSMC_WaitSetupTime
));
346 assert_param(IS_FSMC_HOLD_TIME(FSMC_PCCARDInitStruct
->FSMC_IOSpaceTimingStruct
->FSMC_HoldSetupTime
));
347 assert_param(IS_FSMC_HIZ_TIME(FSMC_PCCARDInitStruct
->FSMC_IOSpaceTimingStruct
->FSMC_HiZSetupTime
));
349 /* Set the PCR4 register value according to FSMC_PCCARDInitStruct parameters */
350 FSMC_Bank4
->PCR4
= (uint32_t)FSMC_PCCARDInitStruct
->FSMC_Waitfeature
|
351 FSMC_MemoryDataWidth_16b
|
352 (FSMC_PCCARDInitStruct
->FSMC_TCLRSetupTime
<< 9) |
353 (FSMC_PCCARDInitStruct
->FSMC_TARSetupTime
<< 13);
355 /* Set PMEM4 register value according to FSMC_CommonSpaceTimingStructure parameters */
356 FSMC_Bank4
->PMEM4
= (uint32_t)FSMC_PCCARDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_SetupTime
|
357 (FSMC_PCCARDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_WaitSetupTime
<< 8) |
358 (FSMC_PCCARDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_HoldSetupTime
<< 16)|
359 (FSMC_PCCARDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_HiZSetupTime
<< 24);
361 /* Set PATT4 register value according to FSMC_AttributeSpaceTimingStructure parameters */
362 FSMC_Bank4
->PATT4
= (uint32_t)FSMC_PCCARDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_SetupTime
|
363 (FSMC_PCCARDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_WaitSetupTime
<< 8) |
364 (FSMC_PCCARDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_HoldSetupTime
<< 16)|
365 (FSMC_PCCARDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_HiZSetupTime
<< 24);
367 /* Set PIO4 register value according to FSMC_IOSpaceTimingStructure parameters */
368 FSMC_Bank4
->PIO4
= (uint32_t)FSMC_PCCARDInitStruct
->FSMC_IOSpaceTimingStruct
->FSMC_SetupTime
|
369 (FSMC_PCCARDInitStruct
->FSMC_IOSpaceTimingStruct
->FSMC_WaitSetupTime
<< 8) |
370 (FSMC_PCCARDInitStruct
->FSMC_IOSpaceTimingStruct
->FSMC_HoldSetupTime
<< 16)|
371 (FSMC_PCCARDInitStruct
->FSMC_IOSpaceTimingStruct
->FSMC_HiZSetupTime
<< 24);
375 * @brief Fills each FSMC_NORSRAMInitStruct member with its default value.
376 * @param FSMC_NORSRAMInitStruct: pointer to a FSMC_NORSRAMInitTypeDef
377 * structure which will be initialized.
380 void FSMC_NORSRAMStructInit(FSMC_NORSRAMInitTypeDef
* FSMC_NORSRAMInitStruct
)
382 /* Reset NOR/SRAM Init structure parameters values */
383 FSMC_NORSRAMInitStruct
->FSMC_Bank
= FSMC_Bank1_NORSRAM1
;
384 FSMC_NORSRAMInitStruct
->FSMC_DataAddressMux
= FSMC_DataAddressMux_Enable
;
385 FSMC_NORSRAMInitStruct
->FSMC_MemoryType
= FSMC_MemoryType_SRAM
;
386 FSMC_NORSRAMInitStruct
->FSMC_MemoryDataWidth
= FSMC_MemoryDataWidth_8b
;
387 FSMC_NORSRAMInitStruct
->FSMC_BurstAccessMode
= FSMC_BurstAccessMode_Disable
;
388 FSMC_NORSRAMInitStruct
->FSMC_AsynchronousWait
= FSMC_AsynchronousWait_Disable
;
389 FSMC_NORSRAMInitStruct
->FSMC_WaitSignalPolarity
= FSMC_WaitSignalPolarity_Low
;
390 FSMC_NORSRAMInitStruct
->FSMC_WrapMode
= FSMC_WrapMode_Disable
;
391 FSMC_NORSRAMInitStruct
->FSMC_WaitSignalActive
= FSMC_WaitSignalActive_BeforeWaitState
;
392 FSMC_NORSRAMInitStruct
->FSMC_WriteOperation
= FSMC_WriteOperation_Enable
;
393 FSMC_NORSRAMInitStruct
->FSMC_WaitSignal
= FSMC_WaitSignal_Enable
;
394 FSMC_NORSRAMInitStruct
->FSMC_ExtendedMode
= FSMC_ExtendedMode_Disable
;
395 FSMC_NORSRAMInitStruct
->FSMC_WriteBurst
= FSMC_WriteBurst_Disable
;
396 FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_AddressSetupTime
= 0xF;
397 FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_AddressHoldTime
= 0xF;
398 FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_DataSetupTime
= 0xFF;
399 FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_BusTurnAroundDuration
= 0xF;
400 FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_CLKDivision
= 0xF;
401 FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_DataLatency
= 0xF;
402 FSMC_NORSRAMInitStruct
->FSMC_ReadWriteTimingStruct
->FSMC_AccessMode
= FSMC_AccessMode_A
;
403 FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_AddressSetupTime
= 0xF;
404 FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_AddressHoldTime
= 0xF;
405 FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_DataSetupTime
= 0xFF;
406 FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_BusTurnAroundDuration
= 0xF;
407 FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_CLKDivision
= 0xF;
408 FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_DataLatency
= 0xF;
409 FSMC_NORSRAMInitStruct
->FSMC_WriteTimingStruct
->FSMC_AccessMode
= FSMC_AccessMode_A
;
413 * @brief Fills each FSMC_NANDInitStruct member with its default value.
414 * @param FSMC_NANDInitStruct: pointer to a FSMC_NANDInitTypeDef
415 * structure which will be initialized.
418 void FSMC_NANDStructInit(FSMC_NANDInitTypeDef
* FSMC_NANDInitStruct
)
420 /* Reset NAND Init structure parameters values */
421 FSMC_NANDInitStruct
->FSMC_Bank
= FSMC_Bank2_NAND
;
422 FSMC_NANDInitStruct
->FSMC_Waitfeature
= FSMC_Waitfeature_Disable
;
423 FSMC_NANDInitStruct
->FSMC_MemoryDataWidth
= FSMC_MemoryDataWidth_8b
;
424 FSMC_NANDInitStruct
->FSMC_ECC
= FSMC_ECC_Disable
;
425 FSMC_NANDInitStruct
->FSMC_ECCPageSize
= FSMC_ECCPageSize_256Bytes
;
426 FSMC_NANDInitStruct
->FSMC_TCLRSetupTime
= 0x0;
427 FSMC_NANDInitStruct
->FSMC_TARSetupTime
= 0x0;
428 FSMC_NANDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_SetupTime
= 0xFC;
429 FSMC_NANDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_WaitSetupTime
= 0xFC;
430 FSMC_NANDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_HoldSetupTime
= 0xFC;
431 FSMC_NANDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_HiZSetupTime
= 0xFC;
432 FSMC_NANDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_SetupTime
= 0xFC;
433 FSMC_NANDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_WaitSetupTime
= 0xFC;
434 FSMC_NANDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_HoldSetupTime
= 0xFC;
435 FSMC_NANDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_HiZSetupTime
= 0xFC;
439 * @brief Fills each FSMC_PCCARDInitStruct member with its default value.
440 * @param FSMC_PCCARDInitStruct: pointer to a FSMC_PCCARDInitTypeDef
441 * structure which will be initialized.
444 void FSMC_PCCARDStructInit(FSMC_PCCARDInitTypeDef
* FSMC_PCCARDInitStruct
)
446 /* Reset PCCARD Init structure parameters values */
447 FSMC_PCCARDInitStruct
->FSMC_Waitfeature
= FSMC_Waitfeature_Disable
;
448 FSMC_PCCARDInitStruct
->FSMC_TCLRSetupTime
= 0x0;
449 FSMC_PCCARDInitStruct
->FSMC_TARSetupTime
= 0x0;
450 FSMC_PCCARDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_SetupTime
= 0xFC;
451 FSMC_PCCARDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_WaitSetupTime
= 0xFC;
452 FSMC_PCCARDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_HoldSetupTime
= 0xFC;
453 FSMC_PCCARDInitStruct
->FSMC_CommonSpaceTimingStruct
->FSMC_HiZSetupTime
= 0xFC;
454 FSMC_PCCARDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_SetupTime
= 0xFC;
455 FSMC_PCCARDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_WaitSetupTime
= 0xFC;
456 FSMC_PCCARDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_HoldSetupTime
= 0xFC;
457 FSMC_PCCARDInitStruct
->FSMC_AttributeSpaceTimingStruct
->FSMC_HiZSetupTime
= 0xFC;
458 FSMC_PCCARDInitStruct
->FSMC_IOSpaceTimingStruct
->FSMC_SetupTime
= 0xFC;
459 FSMC_PCCARDInitStruct
->FSMC_IOSpaceTimingStruct
->FSMC_WaitSetupTime
= 0xFC;
460 FSMC_PCCARDInitStruct
->FSMC_IOSpaceTimingStruct
->FSMC_HoldSetupTime
= 0xFC;
461 FSMC_PCCARDInitStruct
->FSMC_IOSpaceTimingStruct
->FSMC_HiZSetupTime
= 0xFC;
465 * @brief Enables or disables the specified NOR/SRAM Memory Bank.
466 * @param FSMC_Bank: specifies the FSMC Bank to be used
467 * This parameter can be one of the following values:
468 * @arg FSMC_Bank1_NORSRAM1: FSMC Bank1 NOR/SRAM1
469 * @arg FSMC_Bank1_NORSRAM2: FSMC Bank1 NOR/SRAM2
470 * @arg FSMC_Bank1_NORSRAM3: FSMC Bank1 NOR/SRAM3
471 * @arg FSMC_Bank1_NORSRAM4: FSMC Bank1 NOR/SRAM4
472 * @param NewState: new state of the FSMC_Bank. This parameter can be: ENABLE or DISABLE.
475 void FSMC_NORSRAMCmd(uint32_t FSMC_Bank
, FunctionalState NewState
)
477 assert_param(IS_FSMC_NORSRAM_BANK(FSMC_Bank
));
478 assert_param(IS_FUNCTIONAL_STATE(NewState
));
480 if (NewState
!= DISABLE
)
482 /* Enable the selected NOR/SRAM Bank by setting the PBKEN bit in the BCRx register */
483 FSMC_Bank1
->BTCR
[FSMC_Bank
] |= BCR_MBKEN_Set
;
487 /* Disable the selected NOR/SRAM Bank by clearing the PBKEN bit in the BCRx register */
488 FSMC_Bank1
->BTCR
[FSMC_Bank
] &= BCR_MBKEN_Reset
;
493 * @brief Enables or disables the specified NAND Memory Bank.
494 * @param FSMC_Bank: specifies the FSMC Bank to be used
495 * This parameter can be one of the following values:
496 * @arg FSMC_Bank2_NAND: FSMC Bank2 NAND
497 * @arg FSMC_Bank3_NAND: FSMC Bank3 NAND
498 * @param NewState: new state of the FSMC_Bank. This parameter can be: ENABLE or DISABLE.
501 void FSMC_NANDCmd(uint32_t FSMC_Bank
, FunctionalState NewState
)
503 assert_param(IS_FSMC_NAND_BANK(FSMC_Bank
));
504 assert_param(IS_FUNCTIONAL_STATE(NewState
));
506 if (NewState
!= DISABLE
)
508 /* Enable the selected NAND Bank by setting the PBKEN bit in the PCRx register */
509 if(FSMC_Bank
== FSMC_Bank2_NAND
)
511 FSMC_Bank2
->PCR2
|= PCR_PBKEN_Set
;
515 FSMC_Bank3
->PCR3
|= PCR_PBKEN_Set
;
520 /* Disable the selected NAND Bank by clearing the PBKEN bit in the PCRx register */
521 if(FSMC_Bank
== FSMC_Bank2_NAND
)
523 FSMC_Bank2
->PCR2
&= PCR_PBKEN_Reset
;
527 FSMC_Bank3
->PCR3
&= PCR_PBKEN_Reset
;
533 * @brief Enables or disables the PCCARD Memory Bank.
534 * @param NewState: new state of the PCCARD Memory Bank.
535 * This parameter can be: ENABLE or DISABLE.
538 void FSMC_PCCARDCmd(FunctionalState NewState
)
540 assert_param(IS_FUNCTIONAL_STATE(NewState
));
542 if (NewState
!= DISABLE
)
544 /* Enable the PCCARD Bank by setting the PBKEN bit in the PCR4 register */
545 FSMC_Bank4
->PCR4
|= PCR_PBKEN_Set
;
549 /* Disable the PCCARD Bank by clearing the PBKEN bit in the PCR4 register */
550 FSMC_Bank4
->PCR4
&= PCR_PBKEN_Reset
;
555 * @brief Enables or disables the FSMC NAND ECC feature.
556 * @param FSMC_Bank: specifies the FSMC Bank to be used
557 * This parameter can be one of the following values:
558 * @arg FSMC_Bank2_NAND: FSMC Bank2 NAND
559 * @arg FSMC_Bank3_NAND: FSMC Bank3 NAND
560 * @param NewState: new state of the FSMC NAND ECC feature.
561 * This parameter can be: ENABLE or DISABLE.
564 void FSMC_NANDECCCmd(uint32_t FSMC_Bank
, FunctionalState NewState
)
566 assert_param(IS_FSMC_NAND_BANK(FSMC_Bank
));
567 assert_param(IS_FUNCTIONAL_STATE(NewState
));
569 if (NewState
!= DISABLE
)
571 /* Enable the selected NAND Bank ECC function by setting the ECCEN bit in the PCRx register */
572 if(FSMC_Bank
== FSMC_Bank2_NAND
)
574 FSMC_Bank2
->PCR2
|= PCR_ECCEN_Set
;
578 FSMC_Bank3
->PCR3
|= PCR_ECCEN_Set
;
583 /* Disable the selected NAND Bank ECC function by clearing the ECCEN bit in the PCRx register */
584 if(FSMC_Bank
== FSMC_Bank2_NAND
)
586 FSMC_Bank2
->PCR2
&= PCR_ECCEN_Reset
;
590 FSMC_Bank3
->PCR3
&= PCR_ECCEN_Reset
;
596 * @brief Returns the error correction code register value.
597 * @param FSMC_Bank: specifies the FSMC Bank to be used
598 * This parameter can be one of the following values:
599 * @arg FSMC_Bank2_NAND: FSMC Bank2 NAND
600 * @arg FSMC_Bank3_NAND: FSMC Bank3 NAND
601 * @retval The Error Correction Code (ECC) value.
603 uint32_t FSMC_GetECC(uint32_t FSMC_Bank
)
605 uint32_t eccval
= 0x00000000;
607 if(FSMC_Bank
== FSMC_Bank2_NAND
)
609 /* Get the ECCR2 register value */
610 eccval
= FSMC_Bank2
->ECCR2
;
614 /* Get the ECCR3 register value */
615 eccval
= FSMC_Bank3
->ECCR3
;
617 /* Return the error correction code value */
622 * @brief Enables or disables the specified FSMC interrupts.
623 * @param FSMC_Bank: specifies the FSMC Bank to be used
624 * This parameter can be one of the following values:
625 * @arg FSMC_Bank2_NAND: FSMC Bank2 NAND
626 * @arg FSMC_Bank3_NAND: FSMC Bank3 NAND
627 * @arg FSMC_Bank4_PCCARD: FSMC Bank4 PCCARD
628 * @param FSMC_IT: specifies the FSMC interrupt sources to be enabled or disabled.
629 * This parameter can be any combination of the following values:
630 * @arg FSMC_IT_RisingEdge: Rising edge detection interrupt.
631 * @arg FSMC_IT_Level: Level edge detection interrupt.
632 * @arg FSMC_IT_FallingEdge: Falling edge detection interrupt.
633 * @param NewState: new state of the specified FSMC interrupts.
634 * This parameter can be: ENABLE or DISABLE.
637 void FSMC_ITConfig(uint32_t FSMC_Bank
, uint32_t FSMC_IT
, FunctionalState NewState
)
639 assert_param(IS_FSMC_IT_BANK(FSMC_Bank
));
640 assert_param(IS_FSMC_IT(FSMC_IT
));
641 assert_param(IS_FUNCTIONAL_STATE(NewState
));
643 if (NewState
!= DISABLE
)
645 /* Enable the selected FSMC_Bank2 interrupts */
646 if(FSMC_Bank
== FSMC_Bank2_NAND
)
648 FSMC_Bank2
->SR2
|= FSMC_IT
;
650 /* Enable the selected FSMC_Bank3 interrupts */
651 else if (FSMC_Bank
== FSMC_Bank3_NAND
)
653 FSMC_Bank3
->SR3
|= FSMC_IT
;
655 /* Enable the selected FSMC_Bank4 interrupts */
658 FSMC_Bank4
->SR4
|= FSMC_IT
;
663 /* Disable the selected FSMC_Bank2 interrupts */
664 if(FSMC_Bank
== FSMC_Bank2_NAND
)
667 FSMC_Bank2
->SR2
&= (uint32_t)~FSMC_IT
;
669 /* Disable the selected FSMC_Bank3 interrupts */
670 else if (FSMC_Bank
== FSMC_Bank3_NAND
)
672 FSMC_Bank3
->SR3
&= (uint32_t)~FSMC_IT
;
674 /* Disable the selected FSMC_Bank4 interrupts */
677 FSMC_Bank4
->SR4
&= (uint32_t)~FSMC_IT
;
683 * @brief Checks whether the specified FSMC flag is set or not.
684 * @param FSMC_Bank: specifies the FSMC Bank to be used
685 * This parameter can be one of the following values:
686 * @arg FSMC_Bank2_NAND: FSMC Bank2 NAND
687 * @arg FSMC_Bank3_NAND: FSMC Bank3 NAND
688 * @arg FSMC_Bank4_PCCARD: FSMC Bank4 PCCARD
689 * @param FSMC_FLAG: specifies the flag to check.
690 * This parameter can be one of the following values:
691 * @arg FSMC_FLAG_RisingEdge: Rising egde detection Flag.
692 * @arg FSMC_FLAG_Level: Level detection Flag.
693 * @arg FSMC_FLAG_FallingEdge: Falling egde detection Flag.
694 * @arg FSMC_FLAG_FEMPT: Fifo empty Flag.
695 * @retval The new state of FSMC_FLAG (SET or RESET).
697 FlagStatus
FSMC_GetFlagStatus(uint32_t FSMC_Bank
, uint32_t FSMC_FLAG
)
699 FlagStatus bitstatus
= RESET
;
700 uint32_t tmpsr
= 0x00000000;
702 /* Check the parameters */
703 assert_param(IS_FSMC_GETFLAG_BANK(FSMC_Bank
));
704 assert_param(IS_FSMC_GET_FLAG(FSMC_FLAG
));
706 if(FSMC_Bank
== FSMC_Bank2_NAND
)
708 tmpsr
= FSMC_Bank2
->SR2
;
710 else if(FSMC_Bank
== FSMC_Bank3_NAND
)
712 tmpsr
= FSMC_Bank3
->SR3
;
714 /* FSMC_Bank4_PCCARD*/
717 tmpsr
= FSMC_Bank4
->SR4
;
720 /* Get the flag status */
721 if ((tmpsr
& FSMC_FLAG
) != (uint16_t)RESET
)
729 /* Return the flag status */
734 * @brief Clears the FSMC's pending flags.
735 * @param FSMC_Bank: specifies the FSMC Bank to be used
736 * This parameter can be one of the following values:
737 * @arg FSMC_Bank2_NAND: FSMC Bank2 NAND
738 * @arg FSMC_Bank3_NAND: FSMC Bank3 NAND
739 * @arg FSMC_Bank4_PCCARD: FSMC Bank4 PCCARD
740 * @param FSMC_FLAG: specifies the flag to clear.
741 * This parameter can be any combination of the following values:
742 * @arg FSMC_FLAG_RisingEdge: Rising egde detection Flag.
743 * @arg FSMC_FLAG_Level: Level detection Flag.
744 * @arg FSMC_FLAG_FallingEdge: Falling egde detection Flag.
747 void FSMC_ClearFlag(uint32_t FSMC_Bank
, uint32_t FSMC_FLAG
)
749 /* Check the parameters */
750 assert_param(IS_FSMC_GETFLAG_BANK(FSMC_Bank
));
751 assert_param(IS_FSMC_CLEAR_FLAG(FSMC_FLAG
)) ;
753 if(FSMC_Bank
== FSMC_Bank2_NAND
)
755 FSMC_Bank2
->SR2
&= ~FSMC_FLAG
;
757 else if(FSMC_Bank
== FSMC_Bank3_NAND
)
759 FSMC_Bank3
->SR3
&= ~FSMC_FLAG
;
761 /* FSMC_Bank4_PCCARD*/
764 FSMC_Bank4
->SR4
&= ~FSMC_FLAG
;
769 * @brief Checks whether the specified FSMC interrupt has occurred or not.
770 * @param FSMC_Bank: specifies the FSMC Bank to be used
771 * This parameter can be one of the following values:
772 * @arg FSMC_Bank2_NAND: FSMC Bank2 NAND
773 * @arg FSMC_Bank3_NAND: FSMC Bank3 NAND
774 * @arg FSMC_Bank4_PCCARD: FSMC Bank4 PCCARD
775 * @param FSMC_IT: specifies the FSMC interrupt source to check.
776 * This parameter can be one of the following values:
777 * @arg FSMC_IT_RisingEdge: Rising edge detection interrupt.
778 * @arg FSMC_IT_Level: Level edge detection interrupt.
779 * @arg FSMC_IT_FallingEdge: Falling edge detection interrupt.
780 * @retval The new state of FSMC_IT (SET or RESET).
782 ITStatus
FSMC_GetITStatus(uint32_t FSMC_Bank
, uint32_t FSMC_IT
)
784 ITStatus bitstatus
= RESET
;
785 uint32_t tmpsr
= 0x0, itstatus
= 0x0, itenable
= 0x0;
787 /* Check the parameters */
788 assert_param(IS_FSMC_IT_BANK(FSMC_Bank
));
789 assert_param(IS_FSMC_GET_IT(FSMC_IT
));
791 if(FSMC_Bank
== FSMC_Bank2_NAND
)
793 tmpsr
= FSMC_Bank2
->SR2
;
795 else if(FSMC_Bank
== FSMC_Bank3_NAND
)
797 tmpsr
= FSMC_Bank3
->SR3
;
799 /* FSMC_Bank4_PCCARD*/
802 tmpsr
= FSMC_Bank4
->SR4
;
805 itstatus
= tmpsr
& FSMC_IT
;
807 itenable
= tmpsr
& (FSMC_IT
>> 3);
808 if ((itstatus
!= (uint32_t)RESET
) && (itenable
!= (uint32_t)RESET
))
820 * @brief Clears the FSMC's interrupt pending bits.
821 * @param FSMC_Bank: specifies the FSMC Bank to be used
822 * This parameter can be one of the following values:
823 * @arg FSMC_Bank2_NAND: FSMC Bank2 NAND
824 * @arg FSMC_Bank3_NAND: FSMC Bank3 NAND
825 * @arg FSMC_Bank4_PCCARD: FSMC Bank4 PCCARD
826 * @param FSMC_IT: specifies the interrupt pending bit to clear.
827 * This parameter can be any combination of the following values:
828 * @arg FSMC_IT_RisingEdge: Rising edge detection interrupt.
829 * @arg FSMC_IT_Level: Level edge detection interrupt.
830 * @arg FSMC_IT_FallingEdge: Falling edge detection interrupt.
833 void FSMC_ClearITPendingBit(uint32_t FSMC_Bank
, uint32_t FSMC_IT
)
835 /* Check the parameters */
836 assert_param(IS_FSMC_IT_BANK(FSMC_Bank
));
837 assert_param(IS_FSMC_IT(FSMC_IT
));
839 if(FSMC_Bank
== FSMC_Bank2_NAND
)
841 FSMC_Bank2
->SR2
&= ~(FSMC_IT
>> 3);
843 else if(FSMC_Bank
== FSMC_Bank3_NAND
)
845 FSMC_Bank3
->SR3
&= ~(FSMC_IT
>> 3);
847 /* FSMC_Bank4_PCCARD*/
850 FSMC_Bank4
->SR4
&= ~(FSMC_IT
>> 3);
866 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/