You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1049 lines
42 KiB

  1. /**
  2. ******************************************************************************
  3. * @file stm32f4xx_ll_fsmc.h
  4. * @author MCD Application Team
  5. * @version V1.1.0
  6. * @date 19-June-2014
  7. * @brief Header file of FSMC HAL module.
  8. ******************************************************************************
  9. * @attention
  10. *
  11. * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
  12. *
  13. * Redistribution and use in source and binary forms, with or without modification,
  14. * are permitted provided that the following conditions are met:
  15. * 1. Redistributions of source code must retain the above copyright notice,
  16. * this list of conditions and the following disclaimer.
  17. * 2. Redistributions in binary form must reproduce the above copyright notice,
  18. * this list of conditions and the following disclaimer in the documentation
  19. * and/or other materials provided with the distribution.
  20. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  21. * may be used to endorse or promote products derived from this software
  22. * without specific prior written permission.
  23. *
  24. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  25. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  26. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  27. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  28. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  29. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  30. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  31. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  32. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  33. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  34. *
  35. ******************************************************************************
  36. */
  37. /* Define to prevent recursive inclusion -------------------------------------*/
  38. #ifndef __STM32F4xx_LL_FSMC_H
  39. #define __STM32F4xx_LL_FSMC_H
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43. #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)
  44. /* Includes ------------------------------------------------------------------*/
  45. #include "stm32f4xx_hal_def.h"
  46. /** @addtogroup STM32F4xx_HAL_Driver
  47. * @{
  48. */
  49. /** @addtogroup FSMC
  50. * @{
  51. */
  52. /* Exported typedef ----------------------------------------------------------*/
  53. #define FSMC_NORSRAM_TypeDef FSMC_Bank1_TypeDef
  54. #define FSMC_NORSRAM_EXTENDED_TypeDef FSMC_Bank1E_TypeDef
  55. #define FSMC_NAND_TypeDef FSMC_Bank2_3_TypeDef
  56. #define FSMC_PCCARD_TypeDef FSMC_Bank4_TypeDef
  57. #define FSMC_NORSRAM_DEVICE FSMC_Bank1
  58. #define FSMC_NORSRAM_EXTENDED_DEVICE FSMC_Bank1E
  59. #define FSMC_NAND_DEVICE FSMC_Bank2_3
  60. #define FSMC_PCCARD_DEVICE FSMC_Bank4
  61. /**
  62. * @brief FSMC_NORSRAM Configuration Structure definition
  63. */
  64. typedef struct
  65. {
  66. uint32_t NSBank; /*!< Specifies the NORSRAM memory device that will be used.
  67. This parameter can be a value of @ref FSMC_NORSRAM_Bank */
  68. uint32_t DataAddressMux; /*!< Specifies whether the address and data values are
  69. multiplexed on the data bus or not.
  70. This parameter can be a value of @ref FSMC_Data_Address_Bus_Multiplexing */
  71. uint32_t MemoryType; /*!< Specifies the type of external memory attached to
  72. the corresponding memory device.
  73. This parameter can be a value of @ref FSMC_Memory_Type */
  74. uint32_t MemoryDataWidth; /*!< Specifies the external memory device width.
  75. This parameter can be a value of @ref FSMC_NORSRAM_Data_Width */
  76. uint32_t BurstAccessMode; /*!< Enables or disables the burst access mode for Flash memory,
  77. valid only with synchronous burst Flash memories.
  78. This parameter can be a value of @ref FSMC_Burst_Access_Mode */
  79. uint32_t WaitSignalPolarity; /*!< Specifies the wait signal polarity, valid only when accessing
  80. the Flash memory in burst mode.
  81. This parameter can be a value of @ref FSMC_Wait_Signal_Polarity */
  82. uint32_t WrapMode; /*!< Enables or disables the Wrapped burst access mode for Flash
  83. memory, valid only when accessing Flash memories in burst mode.
  84. This parameter can be a value of @ref FSMC_Wrap_Mode */
  85. uint32_t WaitSignalActive; /*!< Specifies if the wait signal is asserted by the memory one
  86. clock cycle before the wait state or during the wait state,
  87. valid only when accessing memories in burst mode.
  88. This parameter can be a value of @ref FSMC_Wait_Timing */
  89. uint32_t WriteOperation; /*!< Enables or disables the write operation in the selected device by the FSMC.
  90. This parameter can be a value of @ref FSMC_Write_Operation */
  91. uint32_t WaitSignal; /*!< Enables or disables the wait state insertion via wait
  92. signal, valid for Flash memory access in burst mode.
  93. This parameter can be a value of @ref FSMC_Wait_Signal */
  94. uint32_t ExtendedMode; /*!< Enables or disables the extended mode.
  95. This parameter can be a value of @ref FSMC_Extended_Mode */
  96. uint32_t AsynchronousWait; /*!< Enables or disables wait signal during asynchronous transfers,
  97. valid only with asynchronous Flash memories.
  98. This parameter can be a value of @ref FSMC_AsynchronousWait */
  99. uint32_t WriteBurst; /*!< Enables or disables the write burst operation.
  100. This parameter can be a value of @ref FSMC_Write_Burst */
  101. }FSMC_NORSRAM_InitTypeDef;
  102. /**
  103. * @brief FSMC_NORSRAM Timing parameters structure definition
  104. */
  105. typedef struct
  106. {
  107. uint32_t AddressSetupTime; /*!< Defines the number of HCLK cycles to configure
  108. the duration of the address setup time.
  109. This parameter can be a value between Min_Data = 0 and Max_Data = 15.
  110. @note This parameter is not used with synchronous NOR Flash memories. */
  111. uint32_t AddressHoldTime; /*!< Defines the number of HCLK cycles to configure
  112. the duration of the address hold time.
  113. This parameter can be a value between Min_Data = 1 and Max_Data = 15.
  114. @note This parameter is not used with synchronous NOR Flash memories. */
  115. uint32_t DataSetupTime; /*!< Defines the number of HCLK cycles to configure
  116. the duration of the data setup time.
  117. This parameter can be a value between Min_Data = 1 and Max_Data = 255.
  118. @note This parameter is used for SRAMs, ROMs and asynchronous multiplexed
  119. NOR Flash memories. */
  120. uint32_t BusTurnAroundDuration; /*!< Defines the number of HCLK cycles to configure
  121. the duration of the bus turnaround.
  122. This parameter can be a value between Min_Data = 0 and Max_Data = 15.
  123. @note This parameter is only used for multiplexed NOR Flash memories. */
  124. uint32_t CLKDivision; /*!< Defines the period of CLK clock output signal, expressed in number of
  125. HCLK cycles. This parameter can be a value between Min_Data = 2 and Max_Data = 16.
  126. @note This parameter is not used for asynchronous NOR Flash, SRAM or ROM
  127. accesses. */
  128. uint32_t DataLatency; /*!< Defines the number of memory clock cycles to issue
  129. to the memory before getting the first data.
  130. The parameter value depends on the memory type as shown below:
  131. - It must be set to 0 in case of a CRAM
  132. - It is don't care in asynchronous NOR, SRAM or ROM accesses
  133. - It may assume a value between Min_Data = 2 and Max_Data = 17 in NOR Flash memories
  134. with synchronous burst mode enable */
  135. uint32_t AccessMode; /*!< Specifies the asynchronous access mode.
  136. This parameter can be a value of @ref FSMC_Access_Mode */
  137. }FSMC_NORSRAM_TimingTypeDef;
  138. /**
  139. * @brief FSMC_NAND Configuration Structure definition
  140. */
  141. typedef struct
  142. {
  143. uint32_t NandBank; /*!< Specifies the NAND memory device that will be used.
  144. This parameter can be a value of @ref FSMC_NAND_Bank */
  145. uint32_t Waitfeature; /*!< Enables or disables the Wait feature for the NAND Memory device.
  146. This parameter can be any value of @ref FSMC_Wait_feature */
  147. uint32_t MemoryDataWidth; /*!< Specifies the external memory device width.
  148. This parameter can be any value of @ref FSMC_NAND_Data_Width */
  149. uint32_t EccComputation; /*!< Enables or disables the ECC computation.
  150. This parameter can be any value of @ref FSMC_ECC */
  151. uint32_t ECCPageSize; /*!< Defines the page size for the extended ECC.
  152. This parameter can be any value of @ref FSMC_ECC_Page_Size */
  153. uint32_t TCLRSetupTime; /*!< Defines the number of HCLK cycles to configure the
  154. delay between CLE low and RE low.
  155. This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
  156. uint32_t TARSetupTime; /*!< Defines the number of HCLK cycles to configure the
  157. delay between ALE low and RE low.
  158. This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
  159. }FSMC_NAND_InitTypeDef;
  160. /**
  161. * @brief FSMC_NAND_PCCARD Timing parameters structure definition
  162. */
  163. typedef struct
  164. {
  165. uint32_t SetupTime; /*!< Defines the number of HCLK cycles to setup address before
  166. the command assertion for NAND-Flash read or write access
  167. to common/Attribute or I/O memory space (depending on
  168. the memory space timing to be configured).
  169. This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
  170. uint32_t WaitSetupTime; /*!< Defines the minimum number of HCLK cycles to assert the
  171. command for NAND-Flash read or write access to
  172. common/Attribute or I/O memory space (depending on the
  173. memory space timing to be configured).
  174. This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
  175. uint32_t HoldSetupTime; /*!< Defines the number of HCLK clock cycles to hold address
  176. (and data for write access) after the command de-assertion
  177. for NAND-Flash read or write access to common/Attribute
  178. or I/O memory space (depending on the memory space timing
  179. to be configured).
  180. This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
  181. uint32_t HiZSetupTime; /*!< Defines the number of HCLK clock cycles during which the
  182. data bus is kept in HiZ after the start of a NAND-Flash
  183. write access to common/Attribute or I/O memory space (depending
  184. on the memory space timing to be configured).
  185. This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
  186. }FSMC_NAND_PCC_TimingTypeDef;
  187. /**
  188. * @brief FSMC_NAND Configuration Structure definition
  189. */
  190. typedef struct
  191. {
  192. uint32_t Waitfeature; /*!< Enables or disables the Wait feature for the PCCARD Memory device.
  193. This parameter can be any value of @ref FSMC_Wait_feature */
  194. uint32_t TCLRSetupTime; /*!< Defines the number of HCLK cycles to configure the
  195. delay between CLE low and RE low.
  196. This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
  197. uint32_t TARSetupTime; /*!< Defines the number of HCLK cycles to configure the
  198. delay between ALE low and RE low.
  199. This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
  200. }FSMC_PCCARD_InitTypeDef;
  201. /* Exported constants --------------------------------------------------------*/
  202. /** @defgroup FSMC_NOR_SRAM_Controller
  203. * @{
  204. */
  205. /** @defgroup FSMC_NORSRAM_Bank
  206. * @{
  207. */
  208. #define FSMC_NORSRAM_BANK1 ((uint32_t)0x00000000)
  209. #define FSMC_NORSRAM_BANK2 ((uint32_t)0x00000002)
  210. #define FSMC_NORSRAM_BANK3 ((uint32_t)0x00000004)
  211. #define FSMC_NORSRAM_BANK4 ((uint32_t)0x00000006)
  212. #define IS_FSMC_NORSRAM_BANK(BANK) (((BANK) == FSMC_NORSRAM_BANK1) || \
  213. ((BANK) == FSMC_NORSRAM_BANK2) || \
  214. ((BANK) == FSMC_NORSRAM_BANK3) || \
  215. ((BANK) == FSMC_NORSRAM_BANK4))
  216. /**
  217. * @}
  218. */
  219. /** @defgroup FSMC_Data_Address_Bus_Multiplexing
  220. * @{
  221. */
  222. #define FSMC_DATA_ADDRESS_MUX_DISABLE ((uint32_t)0x00000000)
  223. #define FSMC_DATA_ADDRESS_MUX_ENABLE ((uint32_t)0x00000002)
  224. #define IS_FSMC_MUX(MUX) (((MUX) == FSMC_DATA_ADDRESS_MUX_DISABLE) || \
  225. ((MUX) == FSMC_DATA_ADDRESS_MUX_ENABLE))
  226. /**
  227. * @}
  228. */
  229. /** @defgroup FSMC_Memory_Type
  230. * @{
  231. */
  232. #define FSMC_MEMORY_TYPE_SRAM ((uint32_t)0x00000000)
  233. #define FSMC_MEMORY_TYPE_PSRAM ((uint32_t)0x00000004)
  234. #define FSMC_MEMORY_TYPE_NOR ((uint32_t)0x00000008)
  235. #define IS_FSMC_MEMORY(MEMORY) (((MEMORY) == FSMC_MEMORY_TYPE_SRAM) || \
  236. ((MEMORY) == FSMC_MEMORY_TYPE_PSRAM)|| \
  237. ((MEMORY) == FSMC_MEMORY_TYPE_NOR))
  238. /**
  239. * @}
  240. */
  241. /** @defgroup FSMC_NORSRAM_Data_Width
  242. * @{
  243. */
  244. #define FSMC_NORSRAM_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000)
  245. #define FSMC_NORSRAM_MEM_BUS_WIDTH_16 ((uint32_t)0x00000010)
  246. #define FSMC_NORSRAM_MEM_BUS_WIDTH_32 ((uint32_t)0x00000020)
  247. #define IS_FSMC_NORSRAM_MEMORY_WIDTH(WIDTH) (((WIDTH) == FSMC_NORSRAM_MEM_BUS_WIDTH_8) || \
  248. ((WIDTH) == FSMC_NORSRAM_MEM_BUS_WIDTH_16) || \
  249. ((WIDTH) == FSMC_NORSRAM_MEM_BUS_WIDTH_32))
  250. /**
  251. * @}
  252. */
  253. /** @defgroup FSMC_NORSRAM_Flash_Access
  254. * @{
  255. */
  256. #define FSMC_NORSRAM_FLASH_ACCESS_ENABLE ((uint32_t)0x00000040)
  257. #define FSMC_NORSRAM_FLASH_ACCESS_DISABLE ((uint32_t)0x00000000)
  258. /**
  259. * @}
  260. */
  261. /** @defgroup FSMC_Burst_Access_Mode
  262. * @{
  263. */
  264. #define FSMC_BURST_ACCESS_MODE_DISABLE ((uint32_t)0x00000000)
  265. #define FSMC_BURST_ACCESS_MODE_ENABLE ((uint32_t)0x00000100)
  266. #define IS_FSMC_BURSTMODE(STATE) (((STATE) == FSMC_BURST_ACCESS_MODE_DISABLE) || \
  267. ((STATE) == FSMC_BURST_ACCESS_MODE_ENABLE))
  268. /**
  269. * @}
  270. */
  271. /** @defgroup FSMC_Wait_Signal_Polarity
  272. * @{
  273. */
  274. #define FSMC_WAIT_SIGNAL_POLARITY_LOW ((uint32_t)0x00000000)
  275. #define FSMC_WAIT_SIGNAL_POLARITY_HIGH ((uint32_t)0x00000200)
  276. #define IS_FSMC_WAIT_POLARITY(POLARITY) (((POLARITY) == FSMC_WAIT_SIGNAL_POLARITY_LOW) || \
  277. ((POLARITY) == FSMC_WAIT_SIGNAL_POLARITY_HIGH))
  278. /**
  279. * @}
  280. */
  281. /** @defgroup FSMC_Wrap_Mode
  282. * @{
  283. */
  284. #define FSMC_WRAP_MODE_DISABLE ((uint32_t)0x00000000)
  285. #define FSMC_WRAP_MODE_ENABLE ((uint32_t)0x00000400)
  286. #define IS_FSMC_WRAP_MODE(MODE) (((MODE) == FSMC_WRAP_MODE_DISABLE) || \
  287. ((MODE) == FSMC_WRAP_MODE_ENABLE))
  288. /**
  289. * @}
  290. */
  291. /** @defgroup FSMC_Wait_Timing
  292. * @{
  293. */
  294. #define FSMC_WAIT_TIMING_BEFORE_WS ((uint32_t)0x00000000)
  295. #define FSMC_WAIT_TIMING_DURING_WS ((uint32_t)0x00000800)
  296. #define IS_FSMC_WAIT_SIGNAL_ACTIVE(ACTIVE) (((ACTIVE) == FSMC_WAIT_TIMING_BEFORE_WS) || \
  297. ((ACTIVE) == FSMC_WAIT_TIMING_DURING_WS))
  298. /**
  299. * @}
  300. */
  301. /** @defgroup FSMC_Write_Operation
  302. * @{
  303. */
  304. #define FSMC_WRITE_OPERATION_DISABLE ((uint32_t)0x00000000)
  305. #define FSMC_WRITE_OPERATION_ENABLE ((uint32_t)0x00001000)
  306. #define IS_FSMC_WRITE_OPERATION(OPERATION) (((OPERATION) == FSMC_WRITE_OPERATION_DISABLE) || \
  307. ((OPERATION) == FSMC_WRITE_OPERATION_ENABLE))
  308. /**
  309. * @}
  310. */
  311. /** @defgroup FSMC_Wait_Signal
  312. * @{
  313. */
  314. #define FSMC_WAIT_SIGNAL_DISABLE ((uint32_t)0x00000000)
  315. #define FSMC_WAIT_SIGNAL_ENABLE ((uint32_t)0x00002000)
  316. #define IS_FSMC_WAITE_SIGNAL(SIGNAL) (((SIGNAL) == FSMC_WAIT_SIGNAL_DISABLE) || \
  317. ((SIGNAL) == FSMC_WAIT_SIGNAL_ENABLE))
  318. /**
  319. * @}
  320. */
  321. /** @defgroup FSMC_Extended_Mode
  322. * @{
  323. */
  324. #define FSMC_EXTENDED_MODE_DISABLE ((uint32_t)0x00000000)
  325. #define FSMC_EXTENDED_MODE_ENABLE ((uint32_t)0x00004000)
  326. #define IS_FSMC_EXTENDED_MODE(MODE) (((MODE) == FSMC_EXTENDED_MODE_DISABLE) || \
  327. ((MODE) == FSMC_EXTENDED_MODE_ENABLE))
  328. /**
  329. * @}
  330. */
  331. /** @defgroup FSMC_AsynchronousWait
  332. * @{
  333. */
  334. #define FSMC_ASYNCHRONOUS_WAIT_DISABLE ((uint32_t)0x00000000)
  335. #define FSMC_ASYNCHRONOUS_WAIT_ENABLE ((uint32_t)0x00008000)
  336. #define IS_FSMC_ASYNWAIT(STATE) (((STATE) == FSMC_ASYNCHRONOUS_WAIT_DISABLE) || \
  337. ((STATE) == FSMC_ASYNCHRONOUS_WAIT_ENABLE))
  338. /**
  339. * @}
  340. */
  341. /** @defgroup FSMC_Write_Burst
  342. * @{
  343. */
  344. #define FSMC_WRITE_BURST_DISABLE ((uint32_t)0x00000000)
  345. #define FSMC_WRITE_BURST_ENABLE ((uint32_t)0x00080000)
  346. #define IS_FSMC_WRITE_BURST(BURST) (((BURST) == FSMC_WRITE_BURST_DISABLE) || \
  347. ((BURST) == FSMC_WRITE_BURST_ENABLE))
  348. /**
  349. * @}
  350. */
  351. /** @defgroup FSMC_Continous_Clock
  352. * @{
  353. */
  354. #define FSMC_CONTINUOUS_CLOCK_SYNC_ONLY ((uint32_t)0x00000000)
  355. #define FSMC_CONTINUOUS_CLOCK_SYNC_ASYNC ((uint32_t)0x00100000)
  356. #define IS_FSMC_CONTINOUS_CLOCK(CCLOCK) (((CCLOCK) == FSMC_CONTINUOUS_CLOCK_SYNC_ONLY) || \
  357. ((CCLOCK) == FSMC_CONTINUOUS_CLOCK_SYNC_ASYNC))
  358. /**
  359. * @}
  360. */
  361. /** @defgroup FSMC_Address_Setup_Time
  362. * @{
  363. */
  364. #define IS_FSMC_ADDRESS_SETUP_TIME(TIME) ((TIME) <= 15)
  365. /**
  366. * @}
  367. */
  368. /** @defgroup FSMC_Address_Hold_Time
  369. * @{
  370. */
  371. #define IS_FSMC_ADDRESS_HOLD_TIME(TIME) (((TIME) > 0) && ((TIME) <= 15))
  372. /**
  373. * @}
  374. */
  375. /** @defgroup FSMC_Data_Setup_Time
  376. * @{
  377. */
  378. #define IS_FSMC_DATASETUP_TIME(TIME) (((TIME) > 0) && ((TIME) <= 255))
  379. /**
  380. * @}
  381. */
  382. /** @defgroup FSMC_Bus_Turn_around_Duration
  383. * @{
  384. */
  385. #define IS_FSMC_TURNAROUND_TIME(TIME) ((TIME) <= 15)
  386. /**
  387. * @}
  388. */
  389. /** @defgroup FSMC_CLK_Division
  390. * @{
  391. */
  392. #define IS_FSMC_CLK_DIV(DIV) (((DIV) > 1) && ((DIV) <= 16))
  393. /**
  394. * @}
  395. */
  396. /** @defgroup FSMC_Data_Latency
  397. * @{
  398. */
  399. #define IS_FSMC_DATA_LATENCY(LATENCY) (((LATENCY) > 1) && ((LATENCY) <= 17))
  400. /**
  401. * @}
  402. */
  403. /** @defgroup FSMC_Access_Mode
  404. * @{
  405. */
  406. #define FSMC_ACCESS_MODE_A ((uint32_t)0x00000000)
  407. #define FSMC_ACCESS_MODE_B ((uint32_t)0x10000000)
  408. #define FSMC_ACCESS_MODE_C ((uint32_t)0x20000000)
  409. #define FSMC_ACCESS_MODE_D ((uint32_t)0x30000000)
  410. #define IS_FSMC_ACCESS_MODE(MODE) (((MODE) == FSMC_ACCESS_MODE_A) || \
  411. ((MODE) == FSMC_ACCESS_MODE_B) || \
  412. ((MODE) == FSMC_ACCESS_MODE_C) || \
  413. ((MODE) == FSMC_ACCESS_MODE_D))
  414. /**
  415. * @}
  416. */
  417. /**
  418. * @}
  419. */
  420. /** @defgroup FSMC_NAND_Controller
  421. * @{
  422. */
  423. /** @defgroup FSMC_NAND_Bank
  424. * @{
  425. */
  426. #define FSMC_NAND_BANK2 ((uint32_t)0x00000010)
  427. #define FSMC_NAND_BANK3 ((uint32_t)0x00000100)
  428. #define IS_FSMC_NAND_BANK(BANK) (((BANK) == FSMC_NAND_BANK2) || \
  429. ((BANK) == FSMC_NAND_BANK3))
  430. /**
  431. * @}
  432. */
  433. /** @defgroup FSMC_Wait_feature
  434. * @{
  435. */
  436. #define FSMC_NAND_PCC_WAIT_FEATURE_DISABLE ((uint32_t)0x00000000)
  437. #define FSMC_NAND_PCC_WAIT_FEATURE_ENABLE ((uint32_t)0x00000002)
  438. #define IS_FSMC_WAIT_FEATURE(FEATURE) (((FEATURE) == FSMC_NAND_PCC_WAIT_FEATURE_DISABLE) || \
  439. ((FEATURE) == FSMC_NAND_PCC_WAIT_FEATURE_ENABLE))
  440. /**
  441. * @}
  442. */
  443. /** @defgroup FSMC_PCR_Memory_Type
  444. * @{
  445. */
  446. #define FSMC_PCR_MEMORY_TYPE_PCCARD ((uint32_t)0x00000000)
  447. #define FSMC_PCR_MEMORY_TYPE_NAND ((uint32_t)0x00000008)
  448. /**
  449. * @}
  450. */
  451. /** @defgroup FSMC_NAND_Data_Width
  452. * @{
  453. */
  454. #define FSMC_NAND_PCC_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000)
  455. #define FSMC_NAND_PCC_MEM_BUS_WIDTH_16 ((uint32_t)0x00000010)
  456. #define IS_FSMC_NAND_MEMORY_WIDTH(WIDTH) (((WIDTH) == FSMC_NAND_PCC_MEM_BUS_WIDTH_8) || \
  457. ((WIDTH) == FSMC_NAND_PCC_MEM_BUS_WIDTH_16))
  458. /**
  459. * @}
  460. */
  461. /** @defgroup FSMC_ECC
  462. * @{
  463. */
  464. #define FSMC_NAND_ECC_DISABLE ((uint32_t)0x00000000)
  465. #define FSMC_NAND_ECC_ENABLE ((uint32_t)0x00000040)
  466. #define IS_FSMC_ECC_STATE(STATE) (((STATE) == FSMC_NAND_ECC_DISABLE) || \
  467. ((STATE) == FSMC_NAND_ECC_ENABLE))
  468. /**
  469. * @}
  470. */
  471. /** @defgroup FSMC_ECC_Page_Size
  472. * @{
  473. */
  474. #define FSMC_NAND_ECC_PAGE_SIZE_256BYTE ((uint32_t)0x00000000)
  475. #define FSMC_NAND_ECC_PAGE_SIZE_512BYTE ((uint32_t)0x00020000)
  476. #define FSMC_NAND_ECC_PAGE_SIZE_1024BYTE ((uint32_t)0x00040000)
  477. #define FSMC_NAND_ECC_PAGE_SIZE_2048BYTE ((uint32_t)0x00060000)
  478. #define FSMC_NAND_ECC_PAGE_SIZE_4096BYTE ((uint32_t)0x00080000)
  479. #define FSMC_NAND_ECC_PAGE_SIZE_8192BYTE ((uint32_t)0x000A0000)
  480. #define IS_FSMC_ECCPAGE_SIZE(SIZE) (((SIZE) == FSMC_NAND_ECC_PAGE_SIZE_256BYTE) || \
  481. ((SIZE) == FSMC_NAND_ECC_PAGE_SIZE_512BYTE) || \
  482. ((SIZE) == FSMC_NAND_ECC_PAGE_SIZE_1024BYTE) || \
  483. ((SIZE) == FSMC_NAND_ECC_PAGE_SIZE_2048BYTE) || \
  484. ((SIZE) == FSMC_NAND_ECC_PAGE_SIZE_4096BYTE) || \
  485. ((SIZE) == FSMC_NAND_ECC_PAGE_SIZE_8192BYTE))
  486. /**
  487. * @}
  488. */
  489. /** @defgroup FSMC_TCLR_Setup_Time
  490. * @{
  491. */
  492. #define IS_FSMC_TCLR_TIME(TIME) ((TIME) <= 255)
  493. /**
  494. * @}
  495. */
  496. /** @defgroup FSMC_TAR_Setup_Time
  497. * @{
  498. */
  499. #define IS_FSMC_TAR_TIME(TIME) ((TIME) <= 255)
  500. /**
  501. * @}
  502. */
  503. /** @defgroup FSMC_Setup_Time
  504. * @{
  505. */
  506. #define IS_FSMC_SETUP_TIME(TIME) ((TIME) <= 255)
  507. /**
  508. * @}
  509. */
  510. /** @defgroup FSMC_Wait_Setup_Time
  511. * @{
  512. */
  513. #define IS_FSMC_WAIT_TIME(TIME) ((TIME) <= 255)
  514. /**
  515. * @}
  516. */
  517. /** @defgroup FSMC_Hold_Setup_Time
  518. * @{
  519. */
  520. #define IS_FSMC_HOLD_TIME(TIME) ((TIME) <= 255)
  521. /**
  522. * @}
  523. */
  524. /** @defgroup FSMC_HiZ_Setup_Time
  525. * @{
  526. */
  527. #define IS_FSMC_HIZ_TIME(TIME) ((TIME) <= 255)
  528. /**
  529. * @}
  530. */
  531. /**
  532. * @}
  533. */
  534. /** @defgroup FSMC_NORSRAM_Device_Instance
  535. * @{
  536. */
  537. #define IS_FSMC_NORSRAM_DEVICE(INSTANCE) ((INSTANCE) == FSMC_NORSRAM_DEVICE)
  538. /**
  539. * @}
  540. */
  541. /** @defgroup FSMC_NORSRAM_EXTENDED_Device_Instance
  542. * @{
  543. */
  544. #define IS_FSMC_NORSRAM_EXTENDED_DEVICE(INSTANCE) ((INSTANCE) == FSMC_NORSRAM_EXTENDED_DEVICE)
  545. /**
  546. * @}
  547. */
  548. /** @defgroup FSMC_NAND_Device_Instance
  549. * @{
  550. */
  551. #define IS_FSMC_NAND_DEVICE(INSTANCE) ((INSTANCE) == FSMC_NAND_DEVICE)
  552. /**
  553. * @}
  554. */
  555. /** @defgroup FSMC_PCCARD_Device_Instance
  556. * @{
  557. */
  558. #define IS_FSMC_PCCARD_DEVICE(INSTANCE) ((INSTANCE) == FSMC_PCCARD_DEVICE)
  559. /**
  560. * @}
  561. */
  562. /** @defgroup FSMC_Interrupt_definition
  563. * @brief FSMC Interrupt definition
  564. * @{
  565. */
  566. #define FSMC_IT_RISING_EDGE ((uint32_t)0x00000008)
  567. #define FSMC_IT_LEVEL ((uint32_t)0x00000010)
  568. #define FSMC_IT_FALLING_EDGE ((uint32_t)0x00000020)
  569. #define FSMC_IT_REFRESH_ERROR ((uint32_t)0x00004000)
  570. #define IS_FSMC_IT(IT) ((((IT) & (uint32_t)0xFFFFBFC7) == 0x00000000) && ((IT) != 0x00000000))
  571. #define IS_FSMC_GET_IT(IT) (((IT) == FSMC_IT_RISING_EDGE) || \
  572. ((IT) == FSMC_IT_LEVEL) || \
  573. ((IT) == FSMC_IT_FALLING_EDGE) || \
  574. ((IT) == FSMC_IT_REFRESH_ERROR))
  575. /**
  576. * @}
  577. */
  578. /** @defgroup FSMC_Flag_definition
  579. * @brief FSMC Flag definition
  580. * @{
  581. */
  582. #define FSMC_FLAG_RISING_EDGE ((uint32_t)0x00000001)
  583. #define FSMC_FLAG_LEVEL ((uint32_t)0x00000002)
  584. #define FSMC_FLAG_FALLING_EDGE ((uint32_t)0x00000004)
  585. #define FSMC_FLAG_FEMPT ((uint32_t)0x00000040)
  586. #define IS_FSMC_GET_FLAG(FLAG) (((FLAG) == FSMC_FLAG_RISING_EDGE) || \
  587. ((FLAG) == FSMC_FLAG_LEVEL) || \
  588. ((FLAG) == FSMC_FLAG_FALLING_EDGE) || \
  589. ((FLAG) == FSMC_FLAG_FEMPT))
  590. #define IS_FSMC_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFFFFFFF8) == 0x00000000) && ((FLAG) != 0x00000000))
  591. /**
  592. * @}
  593. */
  594. /* Exported macro ------------------------------------------------------------*/
  595. /** @defgroup FSMC_NOR_Macros
  596. * @brief macros to handle NOR device enable/disable and read/write operations
  597. * @{
  598. */
  599. /**
  600. * @brief Enable the NORSRAM device access.
  601. * @param __INSTANCE__: FSMC_NORSRAM Instance
  602. * @param __BANK__: FSMC_NORSRAM Bank
  603. * @retval none
  604. */
  605. #define __FSMC_NORSRAM_ENABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->BTCR[(__BANK__)] |= FSMC_BCR1_MBKEN)
  606. /**
  607. * @brief Disable the NORSRAM device access.
  608. * @param __INSTANCE__: FSMC_NORSRAM Instance
  609. * @param __BANK__: FSMC_NORSRAM Bank
  610. * @retval none
  611. */
  612. #define __FSMC_NORSRAM_DISABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->BTCR[(__BANK__)] &= ~FSMC_BCR1_MBKEN)
  613. /**
  614. * @}
  615. */
  616. /** @defgroup FSMC_NAND_Macros
  617. * @brief macros to handle NAND device enable/disable
  618. * @{
  619. */
  620. /**
  621. * @brief Enable the NAND device access.
  622. * @param __INSTANCE__: FSMC_NAND Instance
  623. * @param __BANK__: FSMC_NAND Bank
  624. * @retval none
  625. */
  626. #define __FSMC_NAND_ENABLE(__INSTANCE__, __BANK__) (((__BANK__) == FSMC_NAND_BANK2)? ((__INSTANCE__)->PCR2 |= FSMC_PCR2_PBKEN): \
  627. ((__INSTANCE__)->PCR3 |= FSMC_PCR3_PBKEN))
  628. /**
  629. * @brief Disable the NAND device access.
  630. * @param __INSTANCE__: FSMC_NAND Instance
  631. * @param __BANK__: FSMC_NAND Bank
  632. * @retval none
  633. */
  634. #define __FSMC_NAND_DISABLE(__INSTANCE__, __BANK__) (((__BANK__) == FSMC_NAND_BANK2)? ((__INSTANCE__)->PCR2 &= ~FSMC_PCR2_PBKEN): \
  635. ((__INSTANCE__)->PCR3 &= ~FSMC_PCR3_PBKEN))
  636. /**
  637. * @}
  638. */
  639. /** @defgroup FSMC_PCCARD_Macros
  640. * @brief macros to handle SRAM read/write operations
  641. * @{
  642. */
  643. /**
  644. * @brief Enable the PCCARD device access.
  645. * @param __INSTANCE__: FSMC_PCCARD Instance
  646. * @retval none
  647. */
  648. #define __FSMC_PCCARD_ENABLE(__INSTANCE__) ((__INSTANCE__)->PCR4 |= FSMC_PCR4_PBKEN)
  649. /**
  650. * @brief Disable the PCCARD device access.
  651. * @param __INSTANCE__: FSMC_PCCARD Instance
  652. * @retval none
  653. */
  654. #define __FSMC_PCCARD_DISABLE(__INSTANCE__) ((__INSTANCE__)->PCR4 &= ~FSMC_PCR4_PBKEN)
  655. /**
  656. * @}
  657. */
  658. /** @defgroup FSMC_Interrupt
  659. * @brief macros to handle FSMC interrupts
  660. * @{
  661. */
  662. /**
  663. * @brief Enable the NAND device interrupt.
  664. * @param __INSTANCE__: FSMC_NAND Instance
  665. * @param __BANK__: FSMC_NAND Bank
  666. * @param __INTERRUPT__: FSMC_NAND interrupt
  667. * This parameter can be any combination of the following values:
  668. * @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
  669. * @arg FSMC_IT_LEVEL: Interrupt level.
  670. * @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
  671. * @retval None
  672. */
  673. #define __FSMC_NAND_ENABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) (((__BANK__) == FSMC_NAND_BANK2)? ((__INSTANCE__)->SR2 |= (__INTERRUPT__)): \
  674. ((__INSTANCE__)->SR3 |= (__INTERRUPT__)))
  675. /**
  676. * @brief Disable the NAND device interrupt.
  677. * @param __INSTANCE__: FSMC_NAND Instance
  678. * @param __BANK__: FSMC_NAND Bank
  679. * @param __INTERRUPT__: FSMC_NAND interrupt
  680. * This parameter can be any combination of the following values:
  681. * @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
  682. * @arg FSMC_IT_LEVEL: Interrupt level.
  683. * @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
  684. * @retval None
  685. */
  686. #define __FSMC_NAND_DISABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) (((__BANK__) == FSMC_NAND_BANK2)? ((__INSTANCE__)->SR2 &= ~(__INTERRUPT__)): \
  687. ((__INSTANCE__)->SR3 &= ~(__INTERRUPT__)))
  688. /**
  689. * @brief Get flag status of the NAND device.
  690. * @param __INSTANCE__: FSMC_NAND Instance
  691. * @param __BANK__: FSMC_NAND Bank
  692. * @param __FLAG__: FSMC_NAND flag
  693. * This parameter can be any combination of the following values:
  694. * @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
  695. * @arg FSMC_FLAG_LEVEL: Interrupt level edge flag.
  696. * @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
  697. * @arg FSMC_FLAG_FEMPT: FIFO empty flag.
  698. * @retval The state of FLAG (SET or RESET).
  699. */
  700. #define __FSMC_NAND_GET_FLAG(__INSTANCE__, __BANK__, __FLAG__) (((__BANK__) == FSMC_NAND_BANK2)? (((__INSTANCE__)->SR2 &(__FLAG__)) == (__FLAG__)): \
  701. (((__INSTANCE__)->SR3 &(__FLAG__)) == (__FLAG__)))
  702. /**
  703. * @brief Clear flag status of the NAND device.
  704. * @param __INSTANCE__: FSMC_NAND Instance
  705. * @param __BANK__: FSMC_NAND Bank
  706. * @param __FLAG__: FSMC_NAND flag
  707. * This parameter can be any combination of the following values:
  708. * @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
  709. * @arg FSMC_FLAG_LEVEL: Interrupt level edge flag.
  710. * @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
  711. * @arg FSMC_FLAG_FEMPT: FIFO empty flag.
  712. * @retval None
  713. */
  714. #define __FSMC_NAND_CLEAR_FLAG(__INSTANCE__, __BANK__, __FLAG__) (((__BANK__) == FSMC_NAND_BANK2)? ((__INSTANCE__)->SR2 &= ~(__FLAG__)): \
  715. ((__INSTANCE__)->SR3 &= ~(__FLAG__)))
  716. /**
  717. * @brief Enable the PCCARD device interrupt.
  718. * @param __INSTANCE__: FSMC_PCCARD Instance
  719. * @param __INTERRUPT__: FSMC_PCCARD interrupt
  720. * This parameter can be any combination of the following values:
  721. * @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
  722. * @arg FSMC_IT_LEVEL: Interrupt level.
  723. * @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
  724. * @retval None
  725. */
  726. #define __FSMC_PCCARD_ENABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->SR4 |= (__INTERRUPT__))
  727. /**
  728. * @brief Disable the PCCARD device interrupt.
  729. * @param __INSTANCE__: FSMC_PCCARD Instance
  730. * @param __INTERRUPT__: FSMC_PCCARD interrupt
  731. * This parameter can be any combination of the following values:
  732. * @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
  733. * @arg FSMC_IT_LEVEL: Interrupt level.
  734. * @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
  735. * @retval None
  736. */
  737. #define __FSMC_PCCARD_DISABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->SR4 &= ~(__INTERRUPT__))
  738. /**
  739. * @brief Get flag status of the PCCARD device.
  740. * @param __INSTANCE__: FSMC_PCCARD Instance
  741. * @param __FLAG__: FSMC_PCCARD flag
  742. * This parameter can be any combination of the following values:
  743. * @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
  744. * @arg FSMC_FLAG_LEVEL: Interrupt level edge flag.
  745. * @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
  746. * @arg FSMC_FLAG_FEMPT: FIFO empty flag.
  747. * @retval The state of FLAG (SET or RESET).
  748. */
  749. #define __FSMC_PCCARD_GET_FLAG(__INSTANCE__, __FLAG__) (((__INSTANCE__)->SR4 &(__FLAG__)) == (__FLAG__))
  750. /**
  751. * @brief Clear flag status of the PCCARD device.
  752. * @param __INSTANCE__: FSMC_PCCARD Instance
  753. * @param __FLAG__: FSMC_PCCARD flag
  754. * This parameter can be any combination of the following values:
  755. * @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
  756. * @arg FSMC_FLAG_LEVEL: Interrupt level edge flag.
  757. * @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
  758. * @arg FSMC_FLAG_FEMPT: FIFO empty flag.
  759. * @retval None
  760. */
  761. #define __FSMC_PCCARD_CLEAR_FLAG(__INSTANCE__, __FLAG__) ((__INSTANCE__)->SR4 &= ~(__FLAG__))
  762. /**
  763. * @}
  764. */
  765. /* Exported functions --------------------------------------------------------*/
  766. /* FSMC_NORSRAM Controller functions ******************************************/
  767. /* Initialization/de-initialization functions */
  768. HAL_StatusTypeDef FSMC_NORSRAM_Init(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_InitTypeDef *Init);
  769. HAL_StatusTypeDef FSMC_NORSRAM_Timing_Init(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank);
  770. HAL_StatusTypeDef FSMC_NORSRAM_Extended_Timing_Init(FSMC_NORSRAM_EXTENDED_TypeDef *Device, FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode);
  771. HAL_StatusTypeDef FSMC_NORSRAM_DeInit(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank);
  772. /* FSMC_NORSRAM Control functions */
  773. HAL_StatusTypeDef FSMC_NORSRAM_WriteOperation_Enable(FSMC_NORSRAM_TypeDef *Device, uint32_t Bank);
  774. HAL_StatusTypeDef FSMC_NORSRAM_WriteOperation_Disable(FSMC_NORSRAM_TypeDef *Device, uint32_t Bank);
  775. /* FSMC_NAND Controller functions *********************************************/
  776. /* Initialization/de-initialization functions */
  777. HAL_StatusTypeDef FSMC_NAND_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_InitTypeDef *Init);
  778. HAL_StatusTypeDef FSMC_NAND_CommonSpace_Timing_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
  779. HAL_StatusTypeDef FSMC_NAND_AttributeSpace_Timing_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
  780. HAL_StatusTypeDef FSMC_NAND_DeInit(FSMC_NAND_TypeDef *Device, uint32_t Bank);
  781. /* FSMC_NAND Control functions */
  782. HAL_StatusTypeDef FSMC_NAND_ECC_Enable(FSMC_NAND_TypeDef *Device, uint32_t Bank);
  783. HAL_StatusTypeDef FSMC_NAND_ECC_Disable(FSMC_NAND_TypeDef *Device, uint32_t Bank);
  784. HAL_StatusTypeDef FSMC_NAND_GetECC(FSMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank, uint32_t Timeout);
  785. /* FSMC_PCCARD Controller functions *******************************************/
  786. /* Initialization/de-initialization functions */
  787. HAL_StatusTypeDef FSMC_PCCARD_Init(FSMC_PCCARD_TypeDef *Device, FSMC_PCCARD_InitTypeDef *Init);
  788. HAL_StatusTypeDef FSMC_PCCARD_CommonSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing);
  789. HAL_StatusTypeDef FSMC_PCCARD_AttributeSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing);
  790. HAL_StatusTypeDef FSMC_PCCARD_IOSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing);
  791. HAL_StatusTypeDef FSMC_PCCARD_DeInit(FSMC_PCCARD_TypeDef *Device);
  792. /* FSMC APIs, macros and typedefs redefinition */
  793. #define FMC_NORSRAM_TypeDef FSMC_NORSRAM_TypeDef
  794. #define FMC_NORSRAM_EXTENDED_TypeDef FSMC_NORSRAM_EXTENDED_TypeDef
  795. #define FMC_NORSRAM_InitTypeDef FSMC_NORSRAM_InitTypeDef
  796. #define FMC_NORSRAM_TimingTypeDef FSMC_NORSRAM_TimingTypeDef
  797. #define FMC_NORSRAM_Init FSMC_NORSRAM_Init
  798. #define FMC_NORSRAM_Timing_Init FSMC_NORSRAM_Timing_Init
  799. #define FMC_NORSRAM_Extended_Timing_Init FSMC_NORSRAM_Extended_Timing_Init
  800. #define FMC_NORSRAM_DeInit FSMC_NORSRAM_DeInit
  801. #define FMC_NORSRAM_WriteOperation_Enable FSMC_NORSRAM_WriteOperation_Enable
  802. #define FMC_NORSRAM_WriteOperation_Disable FSMC_NORSRAM_WriteOperation_Disable
  803. #define __FMC_NORSRAM_ENABLE __FSMC_NORSRAM_ENABLE
  804. #define __FMC_NORSRAM_DISABLE __FSMC_NORSRAM_DISABLE
  805. #define FMC_NAND_InitTypeDef FSMC_NAND_InitTypeDef
  806. #define FMC_PCCARD_InitTypeDef FSMC_PCCARD_InitTypeDef
  807. #define FMC_NAND_PCC_TimingTypeDef FSMC_NAND_PCC_TimingTypeDef
  808. #define FMC_NAND_Init FSMC_NAND_Init
  809. #define FMC_NAND_CommonSpace_Timing_Init FSMC_NAND_CommonSpace_Timing_Init
  810. #define FMC_NAND_AttributeSpace_Timing_Init FSMC_NAND_AttributeSpace_Timing_Init
  811. #define FMC_NAND_DeInit FSMC_NAND_DeInit
  812. #define FMC_NAND_ECC_Enable FSMC_NAND_ECC_Enable
  813. #define FMC_NAND_ECC_Disable FSMC_NAND_ECC_Disable
  814. #define FMC_NAND_GetECC FSMC_NAND_GetECC
  815. #define FMC_PCCARD_Init FSMC_PCCARD_Init
  816. #define FMC_PCCARD_CommonSpace_Timing_Init FSMC_PCCARD_CommonSpace_Timing_Init
  817. #define FMC_PCCARD_AttributeSpace_Timing_Init FSMC_PCCARD_AttributeSpace_Timing_Init
  818. #define FMC_PCCARD_IOSpace_Timing_Init FSMC_PCCARD_IOSpace_Timing_Init
  819. #define FMC_PCCARD_DeInit FSMC_PCCARD_DeInit
  820. #define __FMC_NAND_ENABLE __FSMC_NAND_ENABLE
  821. #define __FMC_NAND_DISABLE __FSMC_NAND_DISABLE
  822. #define __FMC_PCCARD_ENABLE __FSMC_PCCARD_ENABLE
  823. #define __FMC_PCCARD_DISABLE __FSMC_PCCARD_DISABLE
  824. #define __FMC_NAND_ENABLE_IT __FSMC_NAND_ENABLE_IT
  825. #define __FMC_NAND_DISABLE_IT __FSMC_NAND_DISABLE_IT
  826. #define __FMC_NAND_GET_FLAG __FSMC_NAND_GET_FLAG
  827. #define __FMC_NAND_CLEAR_FLAG __FSMC_NAND_CLEAR_FLAG
  828. #define __FMC_PCCARD_ENABLE_IT __FSMC_PCCARD_ENABLE_IT
  829. #define __FMC_PCCARD_DISABLE_IT __FSMC_PCCARD_DISABLE_IT
  830. #define __FMC_PCCARD_GET_FLAG __FSMC_PCCARD_GET_FLAG
  831. #define __FMC_PCCARD_CLEAR_FLAG __FSMC_PCCARD_CLEAR_FLAG
  832. #define FMC_NORSRAM_TypeDef FSMC_NORSRAM_TypeDef
  833. #define FMC_NORSRAM_EXTENDED_TypeDef FSMC_NORSRAM_EXTENDED_TypeDef
  834. #define FMC_NAND_TypeDef FSMC_NAND_TypeDef
  835. #define FMC_PCCARD_TypeDef FSMC_PCCARD_TypeDef
  836. #define FMC_NORSRAM_DEVICE FSMC_NORSRAM_DEVICE
  837. #define FMC_NORSRAM_EXTENDED_DEVICE FSMC_NORSRAM_EXTENDED_DEVICE
  838. #define FMC_NAND_DEVICE FSMC_NAND_DEVICE
  839. #define FMC_PCCARD_DEVICE FSMC_PCCARD_DEVICE
  840. #define FMC_NAND_BANK2 FSMC_NAND_BANK2
  841. #define FMC_NORSRAM_BANK1 FSMC_NORSRAM_BANK1
  842. #define FMC_NORSRAM_BANK2 FSMC_NORSRAM_BANK2
  843. #define FMC_NORSRAM_BANK3 FSMC_NORSRAM_BANK3
  844. #define FMC_IT_RISING_EDGE FSMC_IT_RISING_EDGE
  845. #define FMC_IT_LEVEL FSMC_IT_LEVEL
  846. #define FMC_IT_FALLING_EDGE FSMC_IT_FALLING_EDGE
  847. #define FMC_IT_REFRESH_ERROR FSMC_IT_REFRESH_ERROR
  848. #define FMC_FLAG_RISING_EDGE FSMC_FLAG_RISING_EDGE
  849. #define FMC_FLAG_LEVEL FSMC_FLAG_LEVEL
  850. #define FMC_FLAG_FALLING_EDGE FSMC_FLAG_FALLING_EDGE
  851. #define FMC_FLAG_FEMPT FSMC_FLAG_FEMPT
  852. #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
  853. /**
  854. * @}
  855. */
  856. /**
  857. * @}
  858. */
  859. #ifdef __cplusplus
  860. }
  861. #endif
  862. #endif /* __STM32F4xx_LL_FSMC_H */
  863. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/