stm32f1xx_ll_fsmc.h 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962
  1. /**
  2. ******************************************************************************
  3. * @file stm32f1xx_ll_fsmc.h
  4. * @author MCD Application Team
  5. * @brief Header file of FSMC HAL module.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * Copyright (c) 2016 STMicroelectronics.
  10. * All rights reserved.
  11. *
  12. * This software is licensed under terms that can be found in the LICENSE file
  13. * in the root directory of this software component.
  14. * If no LICENSE file comes with this software, it is provided AS-IS.
  15. *
  16. ******************************************************************************
  17. */
  18. /* Define to prevent recursive inclusion -------------------------------------*/
  19. #ifndef STM32F1xx_LL_FSMC_H
  20. #define STM32F1xx_LL_FSMC_H
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. /* Includes ------------------------------------------------------------------*/
  25. #include "stm32f1xx_hal_def.h"
  26. /** @addtogroup STM32F1xx_HAL_Driver
  27. * @{
  28. */
  29. /** @addtogroup FSMC_LL
  30. * @{
  31. */
  32. /** @addtogroup FSMC_LL_Private_Macros
  33. * @{
  34. */
  35. #if defined(FSMC_BANK1)
  36. #define IS_FSMC_NORSRAM_BANK(__BANK__) (((__BANK__) == FSMC_NORSRAM_BANK1) || \
  37. ((__BANK__) == FSMC_NORSRAM_BANK2) || \
  38. ((__BANK__) == FSMC_NORSRAM_BANK3) || \
  39. ((__BANK__) == FSMC_NORSRAM_BANK4))
  40. #define IS_FSMC_MUX(__MUX__) (((__MUX__) == FSMC_DATA_ADDRESS_MUX_DISABLE) || \
  41. ((__MUX__) == FSMC_DATA_ADDRESS_MUX_ENABLE))
  42. #define IS_FSMC_MEMORY(__MEMORY__) (((__MEMORY__) == FSMC_MEMORY_TYPE_SRAM) || \
  43. ((__MEMORY__) == FSMC_MEMORY_TYPE_PSRAM)|| \
  44. ((__MEMORY__) == FSMC_MEMORY_TYPE_NOR))
  45. #define IS_FSMC_NORSRAM_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FSMC_NORSRAM_MEM_BUS_WIDTH_8) || \
  46. ((__WIDTH__) == FSMC_NORSRAM_MEM_BUS_WIDTH_16) || \
  47. ((__WIDTH__) == FSMC_NORSRAM_MEM_BUS_WIDTH_32))
  48. #define IS_FSMC_PAGESIZE(__SIZE__) (((__SIZE__) == FSMC_PAGE_SIZE_NONE) || \
  49. ((__SIZE__) == FSMC_PAGE_SIZE_128) || \
  50. ((__SIZE__) == FSMC_PAGE_SIZE_256) || \
  51. ((__SIZE__) == FSMC_PAGE_SIZE_512) || \
  52. ((__SIZE__) == FSMC_PAGE_SIZE_1024))
  53. #define IS_FSMC_ACCESS_MODE(__MODE__) (((__MODE__) == FSMC_ACCESS_MODE_A) || \
  54. ((__MODE__) == FSMC_ACCESS_MODE_B) || \
  55. ((__MODE__) == FSMC_ACCESS_MODE_C) || \
  56. ((__MODE__) == FSMC_ACCESS_MODE_D))
  57. #define IS_FSMC_BURSTMODE(__STATE__) (((__STATE__) == FSMC_BURST_ACCESS_MODE_DISABLE) || \
  58. ((__STATE__) == FSMC_BURST_ACCESS_MODE_ENABLE))
  59. #define IS_FSMC_WAIT_POLARITY(__POLARITY__) (((__POLARITY__) == FSMC_WAIT_SIGNAL_POLARITY_LOW) || \
  60. ((__POLARITY__) == FSMC_WAIT_SIGNAL_POLARITY_HIGH))
  61. #define IS_FSMC_WRAP_MODE(__MODE__) (((__MODE__) == FSMC_WRAP_MODE_DISABLE) || \
  62. ((__MODE__) == FSMC_WRAP_MODE_ENABLE))
  63. #define IS_FSMC_WAIT_SIGNAL_ACTIVE(__ACTIVE__) (((__ACTIVE__) == FSMC_WAIT_TIMING_BEFORE_WS) || \
  64. ((__ACTIVE__) == FSMC_WAIT_TIMING_DURING_WS))
  65. #define IS_FSMC_WRITE_OPERATION(__OPERATION__) (((__OPERATION__) == FSMC_WRITE_OPERATION_DISABLE) || \
  66. ((__OPERATION__) == FSMC_WRITE_OPERATION_ENABLE))
  67. #define IS_FSMC_WAITE_SIGNAL(__SIGNAL__) (((__SIGNAL__) == FSMC_WAIT_SIGNAL_DISABLE) || \
  68. ((__SIGNAL__) == FSMC_WAIT_SIGNAL_ENABLE))
  69. #define IS_FSMC_EXTENDED_MODE(__MODE__) (((__MODE__) == FSMC_EXTENDED_MODE_DISABLE) || \
  70. ((__MODE__) == FSMC_EXTENDED_MODE_ENABLE))
  71. #define IS_FSMC_ASYNWAIT(__STATE__) (((__STATE__) == FSMC_ASYNCHRONOUS_WAIT_DISABLE) || \
  72. ((__STATE__) == FSMC_ASYNCHRONOUS_WAIT_ENABLE))
  73. #define IS_FSMC_DATA_LATENCY(__LATENCY__) (((__LATENCY__) > 1U) && ((__LATENCY__) <= 17U))
  74. #define IS_FSMC_WRITE_BURST(__BURST__) (((__BURST__) == FSMC_WRITE_BURST_DISABLE) || \
  75. ((__BURST__) == FSMC_WRITE_BURST_ENABLE))
  76. #define IS_FSMC_CONTINOUS_CLOCK(__CCLOCK__) (((__CCLOCK__) == FSMC_CONTINUOUS_CLOCK_SYNC_ONLY) || \
  77. ((__CCLOCK__) == FSMC_CONTINUOUS_CLOCK_SYNC_ASYNC))
  78. #define IS_FSMC_ADDRESS_SETUP_TIME(__TIME__) ((__TIME__) <= 15U)
  79. #define IS_FSMC_ADDRESS_HOLD_TIME(__TIME__) (((__TIME__) > 0U) && ((__TIME__) <= 15U))
  80. #define IS_FSMC_DATASETUP_TIME(__TIME__) (((__TIME__) > 0U) && ((__TIME__) <= 255U))
  81. #define IS_FSMC_DATAHOLD_DURATION(__DATAHOLD__) ((__DATAHOLD__) <= 3U)
  82. #define IS_FSMC_TURNAROUND_TIME(__TIME__) ((__TIME__) <= 15U)
  83. #define IS_FSMC_CLK_DIV(__DIV__) (((__DIV__) > 1U) && ((__DIV__) <= 16U))
  84. #define IS_FSMC_NORSRAM_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_NORSRAM_DEVICE)
  85. #define IS_FSMC_NORSRAM_EXTENDED_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_NORSRAM_EXTENDED_DEVICE)
  86. #endif /* FSMC_BANK1 */
  87. #if defined(FSMC_BANK3)
  88. #define IS_FSMC_NAND_BANK(__BANK__) ((__BANK__) == FSMC_NAND_BANK3)
  89. #define IS_FSMC_WAIT_FEATURE(__FEATURE__) (((__FEATURE__) == FSMC_NAND_PCC_WAIT_FEATURE_DISABLE) || \
  90. ((__FEATURE__) == FSMC_NAND_PCC_WAIT_FEATURE_ENABLE))
  91. #define IS_FSMC_NAND_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FSMC_NAND_PCC_MEM_BUS_WIDTH_8) || \
  92. ((__WIDTH__) == FSMC_NAND_PCC_MEM_BUS_WIDTH_16))
  93. #define IS_FSMC_ECC_STATE(__STATE__) (((__STATE__) == FSMC_NAND_ECC_DISABLE) || \
  94. ((__STATE__) == FSMC_NAND_ECC_ENABLE))
  95. #define IS_FSMC_ECCPAGE_SIZE(__SIZE__) (((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_256BYTE) || \
  96. ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_512BYTE) || \
  97. ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_1024BYTE) || \
  98. ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_2048BYTE) || \
  99. ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_4096BYTE) || \
  100. ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_8192BYTE))
  101. #define IS_FSMC_TCLR_TIME(__TIME__) ((__TIME__) <= 255U)
  102. #define IS_FSMC_TAR_TIME(__TIME__) ((__TIME__) <= 255U)
  103. #define IS_FSMC_SETUP_TIME(__TIME__) ((__TIME__) <= 254U)
  104. #define IS_FSMC_WAIT_TIME(__TIME__) ((__TIME__) <= 254U)
  105. #define IS_FSMC_HOLD_TIME(__TIME__) ((__TIME__) <= 254U)
  106. #define IS_FSMC_HIZ_TIME(__TIME__) ((__TIME__) <= 254U)
  107. #define IS_FSMC_NAND_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_NAND_DEVICE)
  108. #endif /* FSMC_BANK3 */
  109. #if defined(FSMC_BANK4)
  110. #define IS_FSMC_PCCARD_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_PCCARD_DEVICE)
  111. #endif /* FSMC_BANK4 */
  112. /**
  113. * @}
  114. */
  115. /* Exported typedef ----------------------------------------------------------*/
  116. /** @defgroup FSMC_LL_Exported_typedef FSMC Low Layer Exported Types
  117. * @{
  118. */
  119. #if defined(FSMC_BANK1)
  120. #define FSMC_NORSRAM_TypeDef FSMC_Bank1_TypeDef
  121. #define FSMC_NORSRAM_EXTENDED_TypeDef FSMC_Bank1E_TypeDef
  122. #endif /* FSMC_BANK1 */
  123. #if defined(FSMC_BANK3)
  124. #define FSMC_NAND_TypeDef FSMC_Bank2_3_TypeDef
  125. #endif /* FSMC_BANK3 */
  126. #if defined(FSMC_BANK4)
  127. #define FSMC_PCCARD_TypeDef FSMC_Bank4_TypeDef
  128. #endif /* FSMC_BANK4 */
  129. #if defined(FSMC_BANK1)
  130. #define FSMC_NORSRAM_DEVICE FSMC_Bank1
  131. #define FSMC_NORSRAM_EXTENDED_DEVICE FSMC_Bank1E
  132. #endif /* FSMC_BANK1 */
  133. #if defined(FSMC_BANK3)
  134. #define FSMC_NAND_DEVICE FSMC_Bank2_3
  135. #endif /* FSMC_BANK3 */
  136. #if defined(FSMC_BANK4)
  137. #define FSMC_PCCARD_DEVICE FSMC_Bank4
  138. #endif /* FSMC_BANK4 */
  139. #if defined(FSMC_BANK1)
  140. /**
  141. * @brief FSMC NORSRAM Configuration Structure definition
  142. */
  143. typedef struct
  144. {
  145. uint32_t NSBank; /*!< Specifies the NORSRAM memory device that will be used.
  146. This parameter can be a value of @ref FSMC_NORSRAM_Bank */
  147. uint32_t DataAddressMux; /*!< Specifies whether the address and data values are
  148. multiplexed on the data bus or not.
  149. This parameter can be a value of @ref FSMC_Data_Address_Bus_Multiplexing */
  150. uint32_t MemoryType; /*!< Specifies the type of external memory attached to
  151. the corresponding memory device.
  152. This parameter can be a value of @ref FSMC_Memory_Type */
  153. uint32_t MemoryDataWidth; /*!< Specifies the external memory device width.
  154. This parameter can be a value of @ref FSMC_NORSRAM_Data_Width */
  155. uint32_t BurstAccessMode; /*!< Enables or disables the burst access mode for Flash memory,
  156. valid only with synchronous burst Flash memories.
  157. This parameter can be a value of @ref FSMC_Burst_Access_Mode */
  158. uint32_t WaitSignalPolarity; /*!< Specifies the wait signal polarity, valid only when accessing
  159. the Flash memory in burst mode.
  160. This parameter can be a value of @ref FSMC_Wait_Signal_Polarity */
  161. uint32_t WrapMode; /*!< Enables or disables the Wrapped burst access mode for Flash
  162. memory, valid only when accessing Flash memories in burst mode.
  163. This parameter can be a value of @ref FSMC_Wrap_Mode */
  164. uint32_t WaitSignalActive; /*!< Specifies if the wait signal is asserted by the memory one
  165. clock cycle before the wait state or during the wait state,
  166. valid only when accessing memories in burst mode.
  167. This parameter can be a value of @ref FSMC_Wait_Timing */
  168. uint32_t WriteOperation; /*!< Enables or disables the write operation in the selected device by the FSMC.
  169. This parameter can be a value of @ref FSMC_Write_Operation */
  170. uint32_t WaitSignal; /*!< Enables or disables the wait state insertion via wait
  171. signal, valid for Flash memory access in burst mode.
  172. This parameter can be a value of @ref FSMC_Wait_Signal */
  173. uint32_t ExtendedMode; /*!< Enables or disables the extended mode.
  174. This parameter can be a value of @ref FSMC_Extended_Mode */
  175. uint32_t AsynchronousWait; /*!< Enables or disables wait signal during asynchronous transfers,
  176. valid only with asynchronous Flash memories.
  177. This parameter can be a value of @ref FSMC_AsynchronousWait */
  178. uint32_t WriteBurst; /*!< Enables or disables the write burst operation.
  179. This parameter can be a value of @ref FSMC_Write_Burst */
  180. uint32_t PageSize; /*!< Specifies the memory page size.
  181. This parameter can be a value of @ref FSMC_Page_Size */
  182. } FSMC_NORSRAM_InitTypeDef;
  183. /**
  184. * @brief FSMC NORSRAM Timing parameters structure definition
  185. */
  186. typedef struct
  187. {
  188. uint32_t AddressSetupTime; /*!< Defines the number of HCLK cycles to configure
  189. the duration of the address setup time.
  190. This parameter can be a value between Min_Data = 0 and Max_Data = 15.
  191. @note This parameter is not used with synchronous NOR Flash memories. */
  192. uint32_t AddressHoldTime; /*!< Defines the number of HCLK cycles to configure
  193. the duration of the address hold time.
  194. This parameter can be a value between Min_Data = 1 and Max_Data = 15.
  195. @note This parameter is not used with synchronous NOR Flash memories. */
  196. uint32_t DataSetupTime; /*!< Defines the number of HCLK cycles to configure
  197. the duration of the data setup time.
  198. This parameter can be a value between Min_Data = 1 and Max_Data = 255.
  199. @note This parameter is used for SRAMs, ROMs and asynchronous multiplexed
  200. NOR Flash memories. */
  201. uint32_t BusTurnAroundDuration; /*!< Defines the number of HCLK cycles to configure
  202. the duration of the bus turnaround.
  203. This parameter can be a value between Min_Data = 0 and Max_Data = 15.
  204. @note This parameter is only used for multiplexed NOR Flash memories. */
  205. uint32_t CLKDivision; /*!< Defines the period of CLK clock output signal, expressed in number of
  206. HCLK cycles. This parameter can be a value between Min_Data = 2 and
  207. Max_Data = 16.
  208. @note This parameter is not used for asynchronous NOR Flash, SRAM or ROM
  209. accesses. */
  210. uint32_t DataLatency; /*!< Defines the number of memory clock cycles to issue
  211. to the memory before getting the first data.
  212. The parameter value depends on the memory type as shown below:
  213. - It must be set to 0 in case of a CRAM
  214. - It is don't care in asynchronous NOR, SRAM or ROM accesses
  215. - It may assume a value between Min_Data = 2 and Max_Data = 17
  216. in NOR Flash memories with synchronous burst mode enable */
  217. uint32_t AccessMode; /*!< Specifies the asynchronous access mode.
  218. This parameter can be a value of @ref FSMC_Access_Mode */
  219. } FSMC_NORSRAM_TimingTypeDef;
  220. #endif /* FSMC_BANK1 */
  221. #if defined(FSMC_BANK3)
  222. /**
  223. * @brief FSMC NAND Configuration Structure definition
  224. */
  225. typedef struct
  226. {
  227. uint32_t NandBank; /*!< Specifies the NAND memory device that will be used.
  228. This parameter can be a value of @ref FSMC_NAND_Bank */
  229. uint32_t Waitfeature; /*!< Enables or disables the Wait feature for the NAND Memory device.
  230. This parameter can be any value of @ref FSMC_Wait_feature */
  231. uint32_t MemoryDataWidth; /*!< Specifies the external memory device width.
  232. This parameter can be any value of @ref FSMC_NAND_Data_Width */
  233. uint32_t EccComputation; /*!< Enables or disables the ECC computation.
  234. This parameter can be any value of @ref FSMC_ECC */
  235. uint32_t ECCPageSize; /*!< Defines the page size for the extended ECC.
  236. This parameter can be any value of @ref FSMC_ECC_Page_Size */
  237. uint32_t TCLRSetupTime; /*!< Defines the number of HCLK cycles to configure the
  238. delay between CLE low and RE low.
  239. This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
  240. uint32_t TARSetupTime; /*!< Defines the number of HCLK cycles to configure the
  241. delay between ALE low and RE low.
  242. This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
  243. } FSMC_NAND_InitTypeDef;
  244. #endif /* FSMC_BANK3 */
  245. #if defined(FSMC_BANK3) || defined(FSMC_BANK4)
  246. /**
  247. * @brief FSMC NAND Timing parameters structure definition
  248. */
  249. typedef struct
  250. {
  251. uint32_t SetupTime; /*!< Defines the number of HCLK cycles to setup address before
  252. the command assertion for NAND-Flash read or write access
  253. to common/Attribute or I/O memory space (depending on
  254. the memory space timing to be configured).
  255. This parameter can be a value between Min_Data = 0 and Max_Data = 254 */
  256. uint32_t WaitSetupTime; /*!< Defines the minimum number of HCLK cycles to assert the
  257. command for NAND-Flash read or write access to
  258. common/Attribute or I/O memory space (depending on the
  259. memory space timing to be configured).
  260. This parameter can be a number between Min_Data = 0 and Max_Data = 254 */
  261. uint32_t HoldSetupTime; /*!< Defines the number of HCLK clock cycles to hold address
  262. (and data for write access) after the command de-assertion
  263. for NAND-Flash read or write access to common/Attribute
  264. or I/O memory space (depending on the memory space timing
  265. to be configured).
  266. This parameter can be a number between Min_Data = 0 and Max_Data = 254 */
  267. uint32_t HiZSetupTime; /*!< Defines the number of HCLK clock cycles during which the
  268. data bus is kept in HiZ after the start of a NAND-Flash
  269. write access to common/Attribute or I/O memory space (depending
  270. on the memory space timing to be configured).
  271. This parameter can be a number between Min_Data = 0 and Max_Data = 254 */
  272. } FSMC_NAND_PCC_TimingTypeDef;
  273. #endif /* FSMC_BANK3 */
  274. #if defined(FSMC_BANK4)
  275. /**
  276. * @brief FSMC PCCARD Configuration Structure definition
  277. */
  278. typedef struct
  279. {
  280. uint32_t Waitfeature; /*!< Enables or disables the Wait feature for the PCCARD Memory device.
  281. This parameter can be any value of @ref FSMC_Wait_feature */
  282. uint32_t TCLRSetupTime; /*!< Defines the number of HCLK cycles to configure the
  283. delay between CLE low and RE low.
  284. This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
  285. uint32_t TARSetupTime; /*!< Defines the number of HCLK cycles to configure the
  286. delay between ALE low and RE low.
  287. This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
  288. }FSMC_PCCARD_InitTypeDef;
  289. #endif /* FSMC_BANK4 */
  290. /**
  291. * @}
  292. */
  293. /* Exported constants --------------------------------------------------------*/
  294. /** @addtogroup FSMC_LL_Exported_Constants FSMC Low Layer Exported Constants
  295. * @{
  296. */
  297. #if defined(FSMC_BANK1)
  298. /** @defgroup FSMC_LL_NOR_SRAM_Controller FSMC NOR/SRAM Controller
  299. * @{
  300. */
  301. /** @defgroup FSMC_NORSRAM_Bank FSMC NOR/SRAM Bank
  302. * @{
  303. */
  304. #define FSMC_NORSRAM_BANK1 (0x00000000U)
  305. #define FSMC_NORSRAM_BANK2 (0x00000002U)
  306. #define FSMC_NORSRAM_BANK3 (0x00000004U)
  307. #define FSMC_NORSRAM_BANK4 (0x00000006U)
  308. /**
  309. * @}
  310. */
  311. /** @defgroup FSMC_Data_Address_Bus_Multiplexing FSMC Data Address Bus Multiplexing
  312. * @{
  313. */
  314. #define FSMC_DATA_ADDRESS_MUX_DISABLE (0x00000000U)
  315. #define FSMC_DATA_ADDRESS_MUX_ENABLE (0x00000002U)
  316. /**
  317. * @}
  318. */
  319. /** @defgroup FSMC_Memory_Type FSMC Memory Type
  320. * @{
  321. */
  322. #define FSMC_MEMORY_TYPE_SRAM (0x00000000U)
  323. #define FSMC_MEMORY_TYPE_PSRAM (0x00000004U)
  324. #define FSMC_MEMORY_TYPE_NOR (0x00000008U)
  325. /**
  326. * @}
  327. */
  328. /** @defgroup FSMC_NORSRAM_Data_Width FSMC NORSRAM Data Width
  329. * @{
  330. */
  331. #define FSMC_NORSRAM_MEM_BUS_WIDTH_8 (0x00000000U)
  332. #define FSMC_NORSRAM_MEM_BUS_WIDTH_16 (0x00000010U)
  333. #define FSMC_NORSRAM_MEM_BUS_WIDTH_32 (0x00000020U)
  334. /**
  335. * @}
  336. */
  337. /** @defgroup FSMC_NORSRAM_Flash_Access FSMC NOR/SRAM Flash Access
  338. * @{
  339. */
  340. #define FSMC_NORSRAM_FLASH_ACCESS_ENABLE (0x00000040U)
  341. #define FSMC_NORSRAM_FLASH_ACCESS_DISABLE (0x00000000U)
  342. /**
  343. * @}
  344. */
  345. /** @defgroup FSMC_Burst_Access_Mode FSMC Burst Access Mode
  346. * @{
  347. */
  348. #define FSMC_BURST_ACCESS_MODE_DISABLE (0x00000000U)
  349. #define FSMC_BURST_ACCESS_MODE_ENABLE (0x00000100U)
  350. /**
  351. * @}
  352. */
  353. /** @defgroup FSMC_Wait_Signal_Polarity FSMC Wait Signal Polarity
  354. * @{
  355. */
  356. #define FSMC_WAIT_SIGNAL_POLARITY_LOW (0x00000000U)
  357. #define FSMC_WAIT_SIGNAL_POLARITY_HIGH (0x00000200U)
  358. /**
  359. * @}
  360. */
  361. /** @defgroup FSMC_Wrap_Mode FSMC Wrap Mode
  362. * @{
  363. */
  364. #define FSMC_WRAP_MODE_DISABLE (0x00000000U)
  365. #define FSMC_WRAP_MODE_ENABLE (0x00000400U)
  366. /**
  367. * @}
  368. */
  369. /** @defgroup FSMC_Wait_Timing FSMC Wait Timing
  370. * @{
  371. */
  372. #define FSMC_WAIT_TIMING_BEFORE_WS (0x00000000U)
  373. #define FSMC_WAIT_TIMING_DURING_WS (0x00000800U)
  374. /**
  375. * @}
  376. */
  377. /** @defgroup FSMC_Write_Operation FSMC Write Operation
  378. * @{
  379. */
  380. #define FSMC_WRITE_OPERATION_DISABLE (0x00000000U)
  381. #define FSMC_WRITE_OPERATION_ENABLE (0x00001000U)
  382. /**
  383. * @}
  384. */
  385. /** @defgroup FSMC_Wait_Signal FSMC Wait Signal
  386. * @{
  387. */
  388. #define FSMC_WAIT_SIGNAL_DISABLE (0x00000000U)
  389. #define FSMC_WAIT_SIGNAL_ENABLE (0x00002000U)
  390. /**
  391. * @}
  392. */
  393. /** @defgroup FSMC_Extended_Mode FSMC Extended Mode
  394. * @{
  395. */
  396. #define FSMC_EXTENDED_MODE_DISABLE (0x00000000U)
  397. #define FSMC_EXTENDED_MODE_ENABLE (0x00004000U)
  398. /**
  399. * @}
  400. */
  401. /** @defgroup FSMC_AsynchronousWait FSMC Asynchronous Wait
  402. * @{
  403. */
  404. #define FSMC_ASYNCHRONOUS_WAIT_DISABLE (0x00000000U)
  405. #define FSMC_ASYNCHRONOUS_WAIT_ENABLE (0x00008000U)
  406. /**
  407. * @}
  408. */
  409. /** @defgroup FSMC_Page_Size FSMC Page Size
  410. * @{
  411. */
  412. #define FSMC_PAGE_SIZE_NONE (0x00000000U)
  413. #define FSMC_PAGE_SIZE_128 (0x00010000U)
  414. #define FSMC_PAGE_SIZE_256 (0x00020000U)
  415. #define FSMC_PAGE_SIZE_512 (0x00030000U)
  416. #define FSMC_PAGE_SIZE_1024 (0x00040000U)
  417. /**
  418. * @}
  419. */
  420. /** @defgroup FSMC_Write_Burst FSMC Write Burst
  421. * @{
  422. */
  423. #define FSMC_WRITE_BURST_DISABLE (0x00000000U)
  424. #define FSMC_WRITE_BURST_ENABLE (0x00080000U)
  425. /**
  426. * @}
  427. */
  428. /** @defgroup FSMC_Continous_Clock FSMC Continuous Clock
  429. * @{
  430. */
  431. #define FSMC_CONTINUOUS_CLOCK_SYNC_ONLY (0x00000000U)
  432. #define FSMC_CONTINUOUS_CLOCK_SYNC_ASYNC (0x00100000U)
  433. /**
  434. * @}
  435. */
  436. /** @defgroup FSMC_Access_Mode FSMC Access Mode
  437. * @{
  438. */
  439. #define FSMC_ACCESS_MODE_A (0x00000000U)
  440. #define FSMC_ACCESS_MODE_B (0x10000000U)
  441. #define FSMC_ACCESS_MODE_C (0x20000000U)
  442. #define FSMC_ACCESS_MODE_D (0x30000000U)
  443. /**
  444. * @}
  445. */
  446. /**
  447. * @}
  448. */
  449. #endif /* FSMC_BANK1 */
  450. #if defined(FSMC_BANK3) || defined(FSMC_BANK4)
  451. /** @defgroup FSMC_LL_NAND_Controller FSMC NAND Controller
  452. * @{
  453. */
  454. /** @defgroup FSMC_NAND_Bank FSMC NAND Bank
  455. * @{
  456. */
  457. #define FSMC_NAND_BANK2 (0x00000010U)
  458. #define FSMC_NAND_BANK3 (0x00000100U)
  459. /**
  460. * @}
  461. */
  462. /** @defgroup FSMC_Wait_feature FSMC Wait feature
  463. * @{
  464. */
  465. #define FSMC_NAND_PCC_WAIT_FEATURE_DISABLE (0x00000000U)
  466. #define FSMC_NAND_PCC_WAIT_FEATURE_ENABLE (0x00000002U)
  467. /**
  468. * @}
  469. */
  470. /** @defgroup FSMC_PCR_Memory_Type FSMC PCR Memory Type
  471. * @{
  472. */
  473. #if defined(FSMC_BANK4)
  474. #define FSMC_PCR_MEMORY_TYPE_PCCARD (0x00000000U)
  475. #endif /* FSMC_BANK4 */
  476. #define FSMC_PCR_MEMORY_TYPE_NAND (0x00000008U)
  477. /**
  478. * @}
  479. */
  480. /** @defgroup FSMC_NAND_Data_Width FSMC NAND Data Width
  481. * @{
  482. */
  483. #define FSMC_NAND_PCC_MEM_BUS_WIDTH_8 (0x00000000U)
  484. #define FSMC_NAND_PCC_MEM_BUS_WIDTH_16 (0x00000010U)
  485. /**
  486. * @}
  487. */
  488. /** @defgroup FSMC_ECC FSMC ECC
  489. * @{
  490. */
  491. #define FSMC_NAND_ECC_DISABLE (0x00000000U)
  492. #define FSMC_NAND_ECC_ENABLE (0x00000040U)
  493. /**
  494. * @}
  495. */
  496. /** @defgroup FSMC_ECC_Page_Size FSMC ECC Page Size
  497. * @{
  498. */
  499. #define FSMC_NAND_ECC_PAGE_SIZE_256BYTE (0x00000000U)
  500. #define FSMC_NAND_ECC_PAGE_SIZE_512BYTE (0x00020000U)
  501. #define FSMC_NAND_ECC_PAGE_SIZE_1024BYTE (0x00040000U)
  502. #define FSMC_NAND_ECC_PAGE_SIZE_2048BYTE (0x00060000U)
  503. #define FSMC_NAND_ECC_PAGE_SIZE_4096BYTE (0x00080000U)
  504. #define FSMC_NAND_ECC_PAGE_SIZE_8192BYTE (0x000A0000U)
  505. /**
  506. * @}
  507. */
  508. /**
  509. * @}
  510. */
  511. #endif /* FSMC_BANK3 || FSMC_Bank4 */
  512. /** @defgroup FSMC_LL_Interrupt_definition FSMC Low Layer Interrupt definition
  513. * @{
  514. */
  515. #if defined(FSMC_BANK3) || defined(FSMC_BANK4)
  516. #define FSMC_IT_RISING_EDGE (0x00000008U)
  517. #define FSMC_IT_LEVEL (0x00000010U)
  518. #define FSMC_IT_FALLING_EDGE (0x00000020U)
  519. #endif /* FSMC_BANK3 || FSMC_Bank4 */
  520. /**
  521. * @}
  522. */
  523. /** @defgroup FSMC_LL_Flag_definition FSMC Low Layer Flag definition
  524. * @{
  525. */
  526. #if defined(FSMC_BANK3) || defined(FSMC_BANK4)
  527. #define FSMC_FLAG_RISING_EDGE (0x00000001U)
  528. #define FSMC_FLAG_LEVEL (0x00000002U)
  529. #define FSMC_FLAG_FALLING_EDGE (0x00000004U)
  530. #define FSMC_FLAG_FEMPT (0x00000040U)
  531. #endif /* FSMC_BANK3 || FSMC_Bank4 */
  532. /**
  533. * @}
  534. */
  535. /**
  536. * @}
  537. */
  538. /**
  539. * @}
  540. */
  541. /* Private macro -------------------------------------------------------------*/
  542. /** @defgroup FSMC_LL_Private_Macros FSMC_LL Private Macros
  543. * @{
  544. */
  545. #if defined(FSMC_BANK1)
  546. /** @defgroup FSMC_LL_NOR_Macros FSMC NOR/SRAM Macros
  547. * @brief macros to handle NOR device enable/disable and read/write operations
  548. * @{
  549. */
  550. /**
  551. * @brief Enable the NORSRAM device access.
  552. * @param __INSTANCE__ FSMC_NORSRAM Instance
  553. * @param __BANK__ FSMC_NORSRAM Bank
  554. * @retval None
  555. */
  556. #define __FSMC_NORSRAM_ENABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->BTCR[(__BANK__)]\
  557. |= FSMC_BCRx_MBKEN)
  558. /**
  559. * @brief Disable the NORSRAM device access.
  560. * @param __INSTANCE__ FSMC_NORSRAM Instance
  561. * @param __BANK__ FSMC_NORSRAM Bank
  562. * @retval None
  563. */
  564. #define __FSMC_NORSRAM_DISABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->BTCR[(__BANK__)]\
  565. &= ~FSMC_BCRx_MBKEN)
  566. /**
  567. * @}
  568. */
  569. #endif /* FSMC_BANK1 */
  570. #if defined(FSMC_BANK3)
  571. /** @defgroup FSMC_LL_NAND_Macros FSMC NAND Macros
  572. * @brief macros to handle NAND device enable/disable
  573. * @{
  574. */
  575. /**
  576. * @brief Enable the NAND device access.
  577. * @param __INSTANCE__ FSMC_NAND Instance
  578. * @param __BANK__ FSMC_NAND Bank
  579. * @retval None
  580. */
  581. #define __FSMC_NAND_ENABLE(__INSTANCE__, __BANK__) (((__BANK__) == FSMC_NAND_BANK2)? ((__INSTANCE__)->PCR2 |= FSMC_PCRx_PBKEN): \
  582. ((__INSTANCE__)->PCR3 |= FSMC_PCRx_PBKEN))
  583. /**
  584. * @brief Disable the NAND device access.
  585. * @param __INSTANCE__ FSMC_NAND Instance
  586. * @param __BANK__ FSMC_NAND Bank
  587. * @retval None
  588. */
  589. #define __FSMC_NAND_DISABLE(__INSTANCE__, __BANK__) (((__BANK__) == FSMC_NAND_BANK2)? CLEAR_BIT((__INSTANCE__)->PCR2, FSMC_PCRx_PBKEN): \
  590. CLEAR_BIT((__INSTANCE__)->PCR3, FSMC_PCRx_PBKEN))
  591. /**
  592. * @}
  593. */
  594. #endif /* FSMC_BANK3 */
  595. #if defined(FSMC_BANK4)
  596. /** @defgroup FSMC_LL_PCCARD_Macros FMC PCCARD Macros
  597. * @brief macros to handle PCCARD read/write operations
  598. * @{
  599. */
  600. /**
  601. * @brief Enable the PCCARD device access.
  602. * @param __INSTANCE__ FSMC_PCCARD Instance
  603. * @retval None
  604. */
  605. #define __FSMC_PCCARD_ENABLE(__INSTANCE__) ((__INSTANCE__)->PCR4 |= FSMC_PCRx_PBKEN)
  606. /**
  607. * @brief Disable the PCCARD device access.
  608. * @param __INSTANCE__ FSMC_PCCARD Instance
  609. * @retval None
  610. */
  611. #define __FSMC_PCCARD_DISABLE(__INSTANCE__) ((__INSTANCE__)->PCR4 &= ~FSMC_PCRx_PBKEN)
  612. /**
  613. * @}
  614. */
  615. #endif
  616. #if defined(FSMC_BANK3)
  617. /** @defgroup FSMC_LL_NAND_Interrupt FSMC NAND Interrupt
  618. * @brief macros to handle NAND interrupts
  619. * @{
  620. */
  621. /**
  622. * @brief Enable the NAND device interrupt.
  623. * @param __INSTANCE__ FSMC_NAND instance
  624. * @param __BANK__ FSMC_NAND Bank
  625. * @param __INTERRUPT__ FSMC_NAND interrupt
  626. * This parameter can be any combination of the following values:
  627. * @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
  628. * @arg FSMC_IT_LEVEL: Interrupt level.
  629. * @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
  630. * @retval None
  631. */
  632. #define __FSMC_NAND_ENABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) (((__BANK__) == FSMC_NAND_BANK2)? ((__INSTANCE__)->SR2 |= (__INTERRUPT__)): \
  633. ((__INSTANCE__)->SR3 |= (__INTERRUPT__)))
  634. /**
  635. * @brief Disable the NAND device interrupt.
  636. * @param __INSTANCE__ FSMC_NAND Instance
  637. * @param __BANK__ FSMC_NAND Bank
  638. * @param __INTERRUPT__ FSMC_NAND interrupt
  639. * This parameter can be any combination of the following values:
  640. * @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
  641. * @arg FSMC_IT_LEVEL: Interrupt level.
  642. * @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
  643. * @retval None
  644. */
  645. #define __FSMC_NAND_DISABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) (((__BANK__) == FSMC_NAND_BANK2)? ((__INSTANCE__)->SR2 &= ~(__INTERRUPT__)): \
  646. ((__INSTANCE__)->SR3 &= ~(__INTERRUPT__)))
  647. /**
  648. * @brief Get flag status of the NAND device.
  649. * @param __INSTANCE__ FSMC_NAND Instance
  650. * @param __BANK__ FSMC_NAND Bank
  651. * @param __FLAG__ FSMC_NAND flag
  652. * This parameter can be any combination of the following values:
  653. * @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
  654. * @arg FSMC_FLAG_LEVEL: Interrupt level edge flag.
  655. * @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
  656. * @arg FSMC_FLAG_FEMPT: FIFO empty flag.
  657. * @retval The state of FLAG (SET or RESET).
  658. */
  659. #define __FSMC_NAND_GET_FLAG(__INSTANCE__, __BANK__, __FLAG__) (((__BANK__) == FSMC_NAND_BANK2)? (((__INSTANCE__)->SR2 &(__FLAG__)) == (__FLAG__)): \
  660. (((__INSTANCE__)->SR3 &(__FLAG__)) == (__FLAG__)))
  661. /**
  662. * @brief Clear flag status of the NAND device.
  663. * @param __INSTANCE__ FSMC_NAND Instance
  664. * @param __BANK__ FSMC_NAND Bank
  665. * @param __FLAG__ FSMC_NAND flag
  666. * This parameter can be any combination of the following values:
  667. * @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
  668. * @arg FSMC_FLAG_LEVEL: Interrupt level edge flag.
  669. * @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
  670. * @arg FSMC_FLAG_FEMPT: FIFO empty flag.
  671. * @retval None
  672. */
  673. #define __FSMC_NAND_CLEAR_FLAG(__INSTANCE__, __BANK__, __FLAG__) (((__BANK__) == FSMC_NAND_BANK2)? ((__INSTANCE__)->SR2 &= ~(__FLAG__)): \
  674. ((__INSTANCE__)->SR3 &= ~(__FLAG__)))
  675. /**
  676. * @}
  677. */
  678. #endif /* FSMC_BANK3 */
  679. #if defined(FSMC_BANK4)
  680. /** @defgroup FSMC_LL_PCCARD_Interrupt FSMC PCCARD Interrupt
  681. * @brief macros to handle PCCARD interrupts
  682. * @{
  683. */
  684. /**
  685. * @brief Enable the PCCARD device interrupt.
  686. * @param __INSTANCE__ FSMC_PCCARD instance
  687. * @param __INTERRUPT__ FSMC_PCCARD interrupt
  688. * This parameter can be any combination of the following values:
  689. * @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
  690. * @arg FSMC_IT_LEVEL: Interrupt level.
  691. * @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
  692. * @retval None
  693. */
  694. #define __FSMC_PCCARD_ENABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->SR4 |= (__INTERRUPT__))
  695. /**
  696. * @brief Disable the PCCARD device interrupt.
  697. * @param __INSTANCE__ FSMC_PCCARD instance
  698. * @param __INTERRUPT__ FSMC_PCCARD interrupt
  699. * This parameter can be any combination of the following values:
  700. * @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
  701. * @arg FSMC_IT_LEVEL: Interrupt level.
  702. * @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
  703. * @retval None
  704. */
  705. #define __FSMC_PCCARD_DISABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->SR4 &= ~(__INTERRUPT__))
  706. /**
  707. * @brief Get flag status of the PCCARD device.
  708. * @param __INSTANCE__ FSMC_PCCARD instance
  709. * @param __FLAG__ FSMC_PCCARD flag
  710. * This parameter can be any combination of the following values:
  711. * @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
  712. * @arg FSMC_FLAG_LEVEL: Interrupt level edge flag.
  713. * @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
  714. * @arg FSMC_FLAG_FEMPT: FIFO empty flag.
  715. * @retval The state of FLAG (SET or RESET).
  716. */
  717. #define __FSMC_PCCARD_GET_FLAG(__INSTANCE__, __FLAG__) (((__INSTANCE__)->SR4 &(__FLAG__)) == (__FLAG__))
  718. /**
  719. * @brief Clear flag status of the PCCARD device.
  720. * @param __INSTANCE__ FSMC_PCCARD instance
  721. * @param __FLAG__ FSMC_PCCARD flag
  722. * This parameter can be any combination of the following values:
  723. * @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
  724. * @arg FSMC_FLAG_LEVEL: Interrupt level edge flag.
  725. * @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
  726. * @arg FSMC_FLAG_FEMPT: FIFO empty flag.
  727. * @retval None
  728. */
  729. #define __FSMC_PCCARD_CLEAR_FLAG(__INSTANCE__, __FLAG__) ((__INSTANCE__)->SR4 &= ~(__FLAG__))
  730. /**
  731. * @}
  732. */
  733. #endif
  734. /**
  735. * @}
  736. */
  737. /**
  738. * @}
  739. */
  740. /* Private functions ---------------------------------------------------------*/
  741. /** @defgroup FSMC_LL_Private_Functions FSMC LL Private Functions
  742. * @{
  743. */
  744. #if defined(FSMC_BANK1)
  745. /** @defgroup FSMC_LL_NORSRAM NOR SRAM
  746. * @{
  747. */
  748. /** @defgroup FSMC_LL_NORSRAM_Private_Functions_Group1 NOR SRAM Initialization/de-initialization functions
  749. * @{
  750. */
  751. HAL_StatusTypeDef FSMC_NORSRAM_Init(FSMC_NORSRAM_TypeDef *Device,
  752. FSMC_NORSRAM_InitTypeDef *Init);
  753. HAL_StatusTypeDef FSMC_NORSRAM_Timing_Init(FSMC_NORSRAM_TypeDef *Device,
  754. FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank);
  755. HAL_StatusTypeDef FSMC_NORSRAM_Extended_Timing_Init(FSMC_NORSRAM_EXTENDED_TypeDef *Device,
  756. FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank,
  757. uint32_t ExtendedMode);
  758. HAL_StatusTypeDef FSMC_NORSRAM_DeInit(FSMC_NORSRAM_TypeDef *Device,
  759. FSMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank);
  760. /**
  761. * @}
  762. */
  763. /** @defgroup FSMC_LL_NORSRAM_Private_Functions_Group2 NOR SRAM Control functions
  764. * @{
  765. */
  766. HAL_StatusTypeDef FSMC_NORSRAM_WriteOperation_Enable(FSMC_NORSRAM_TypeDef *Device, uint32_t Bank);
  767. HAL_StatusTypeDef FSMC_NORSRAM_WriteOperation_Disable(FSMC_NORSRAM_TypeDef *Device, uint32_t Bank);
  768. /**
  769. * @}
  770. */
  771. /**
  772. * @}
  773. */
  774. #endif /* FSMC_BANK1 */
  775. #if defined(FSMC_BANK3)
  776. /** @defgroup FSMC_LL_NAND NAND
  777. * @{
  778. */
  779. /** @defgroup FSMC_LL_NAND_Private_Functions_Group1 NAND Initialization/de-initialization functions
  780. * @{
  781. */
  782. HAL_StatusTypeDef FSMC_NAND_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_InitTypeDef *Init);
  783. HAL_StatusTypeDef FSMC_NAND_CommonSpace_Timing_Init(FSMC_NAND_TypeDef *Device,
  784. FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
  785. HAL_StatusTypeDef FSMC_NAND_AttributeSpace_Timing_Init(FSMC_NAND_TypeDef *Device,
  786. FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
  787. HAL_StatusTypeDef FSMC_NAND_DeInit(FSMC_NAND_TypeDef *Device, uint32_t Bank);
  788. /**
  789. * @}
  790. */
  791. /** @defgroup FSMC_LL_NAND_Private_Functions_Group2 NAND Control functions
  792. * @{
  793. */
  794. HAL_StatusTypeDef FSMC_NAND_ECC_Enable(FSMC_NAND_TypeDef *Device, uint32_t Bank);
  795. HAL_StatusTypeDef FSMC_NAND_ECC_Disable(FSMC_NAND_TypeDef *Device, uint32_t Bank);
  796. HAL_StatusTypeDef FSMC_NAND_GetECC(FSMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank,
  797. uint32_t Timeout);
  798. /**
  799. * @}
  800. */
  801. /**
  802. * @}
  803. */
  804. #endif /* FSMC_BANK3 */
  805. #if defined(FSMC_BANK4)
  806. /** @defgroup FSMC_LL_PCCARD PCCARD
  807. * @{
  808. */
  809. /** @defgroup FSMC_LL_PCCARD_Private_Functions_Group1 PCCARD Initialization/de-initialization functions
  810. * @{
  811. */
  812. HAL_StatusTypeDef FSMC_PCCARD_Init(FSMC_PCCARD_TypeDef *Device, FSMC_PCCARD_InitTypeDef *Init);
  813. HAL_StatusTypeDef FSMC_PCCARD_CommonSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device,
  814. FSMC_NAND_PCC_TimingTypeDef *Timing);
  815. HAL_StatusTypeDef FSMC_PCCARD_AttributeSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device,
  816. FSMC_NAND_PCC_TimingTypeDef *Timing);
  817. HAL_StatusTypeDef FSMC_PCCARD_IOSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device,
  818. FSMC_NAND_PCC_TimingTypeDef *Timing);
  819. HAL_StatusTypeDef FSMC_PCCARD_DeInit(FSMC_PCCARD_TypeDef *Device);
  820. /**
  821. * @}
  822. */
  823. /**
  824. * @}
  825. */
  826. #endif /* FSMC_BANK4 */
  827. /**
  828. * @}
  829. */
  830. /**
  831. * @}
  832. */
  833. /**
  834. * @}
  835. */
  836. #ifdef __cplusplus
  837. }
  838. #endif
  839. #endif /* STM32F1xx_LL_FSMC_H */