stm32f3xx_ll_fmc.h 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082
  1. /**
  2. ******************************************************************************
  3. * @file stm32f3xx_ll_fmc.h
  4. * @author MCD Application Team
  5. * @brief Header file of FMC HAL module.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
  10. *
  11. * Redistribution and use in source and binary forms, with or without modification,
  12. * are permitted provided that the following conditions are met:
  13. * 1. Redistributions of source code must retain the above copyright notice,
  14. * this list of conditions and the following disclaimer.
  15. * 2. Redistributions in binary form must reproduce the above copyright notice,
  16. * this list of conditions and the following disclaimer in the documentation
  17. * and/or other materials provided with the distribution.
  18. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  19. * may be used to endorse or promote products derived from this software
  20. * without specific prior written permission.
  21. *
  22. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  23. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  24. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  25. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  26. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  27. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  28. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  29. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  30. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  31. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. *
  33. ******************************************************************************
  34. */
  35. /* Define to prevent recursive inclusion -------------------------------------*/
  36. #ifndef __STM32F3xx_LL_FMC_H
  37. #define __STM32F3xx_LL_FMC_H
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41. /* Includes ------------------------------------------------------------------*/
  42. #include "stm32f3xx_hal_def.h"
  43. /** @addtogroup STM32F3xx_HAL_Driver
  44. * @{
  45. */
  46. #if defined(FMC_BANK1)
  47. /** @addtogroup FMC_LL
  48. * @{
  49. */
  50. /** @addtogroup FMC_LL_Private_Macros
  51. * @{
  52. */
  53. #define IS_FMC_NORSRAM_BANK(__BANK__) (((__BANK__) == FMC_NORSRAM_BANK1) || \
  54. ((__BANK__) == FMC_NORSRAM_BANK2) || \
  55. ((__BANK__) == FMC_NORSRAM_BANK3) || \
  56. ((__BANK__) == FMC_NORSRAM_BANK4))
  57. #define IS_FMC_MUX(__MUX__) (((__MUX__) == FMC_DATA_ADDRESS_MUX_DISABLE) || \
  58. ((__MUX__) == FMC_DATA_ADDRESS_MUX_ENABLE))
  59. #define IS_FMC_MEMORY(__MEMORY__) (((__MEMORY__) == FMC_MEMORY_TYPE_SRAM) || \
  60. ((__MEMORY__) == FMC_MEMORY_TYPE_PSRAM)|| \
  61. ((__MEMORY__) == FMC_MEMORY_TYPE_NOR))
  62. #define IS_FMC_NORSRAM_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FMC_NORSRAM_MEM_BUS_WIDTH_8) || \
  63. ((__WIDTH__) == FMC_NORSRAM_MEM_BUS_WIDTH_16) || \
  64. ((__WIDTH__) == FMC_NORSRAM_MEM_BUS_WIDTH_32))
  65. #define IS_FMC_WRITE_BURST(__BURST__) (((__BURST__) == FMC_WRITE_BURST_DISABLE) || \
  66. ((__BURST__) == FMC_WRITE_BURST_ENABLE))
  67. #define IS_FMC_CONTINOUS_CLOCK(__CCLOCK__) (((__CCLOCK__) == FMC_CONTINUOUS_CLOCK_SYNC_ONLY) || \
  68. ((__CCLOCK__) == FMC_CONTINUOUS_CLOCK_SYNC_ASYNC))
  69. #define IS_FMC_ACCESS_MODE(__MODE__) (((__MODE__) == FMC_ACCESS_MODE_A) || \
  70. ((__MODE__) == FMC_ACCESS_MODE_B) || \
  71. ((__MODE__) == FMC_ACCESS_MODE_C) || \
  72. ((__MODE__) == FMC_ACCESS_MODE_D))
  73. #define IS_FMC_NAND_BANK(__BANK__) (((__BANK__) == FMC_NAND_BANK2) || \
  74. ((__BANK__) == FMC_NAND_BANK3))
  75. #define IS_FMC_WAIT_FEATURE(__FEATURE__) (((__FEATURE__) == FMC_NAND_PCC_WAIT_FEATURE_DISABLE) || \
  76. ((__FEATURE__) == FMC_NAND_PCC_WAIT_FEATURE_ENABLE))
  77. #define IS_FMC_NAND_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FMC_NAND_PCC_MEM_BUS_WIDTH_8) || \
  78. ((__WIDTH__) == FMC_NAND_PCC_MEM_BUS_WIDTH_16))
  79. #define IS_FMC_ECC_STATE(__STATE__) (((__STATE__) == FMC_NAND_ECC_DISABLE) || \
  80. ((__STATE__) == FMC_NAND_ECC_ENABLE))
  81. #define IS_FMC_ECCPAGE_SIZE(__SIZE__) (((__SIZE__) == FMC_NAND_ECC_PAGE_SIZE_256BYTE) || \
  82. ((__SIZE__) == FMC_NAND_ECC_PAGE_SIZE_512BYTE) || \
  83. ((__SIZE__) == FMC_NAND_ECC_PAGE_SIZE_1024BYTE) || \
  84. ((__SIZE__) == FMC_NAND_ECC_PAGE_SIZE_2048BYTE) || \
  85. ((__SIZE__) == FMC_NAND_ECC_PAGE_SIZE_4096BYTE) || \
  86. ((__SIZE__) == FMC_NAND_ECC_PAGE_SIZE_8192BYTE))
  87. /** @defgroup FMC_TCLR_Setup_Time FMC_TCLR_Setup_Time
  88. * @{
  89. */
  90. #define IS_FMC_TCLR_TIME(__TIME__) ((__TIME__) <= 255)
  91. /**
  92. * @}
  93. */
  94. /** @defgroup FMC_TAR_Setup_Time FMC_TAR_Setup_Time
  95. * @{
  96. */
  97. #define IS_FMC_TAR_TIME(__TIME__) ((__TIME__) <= 255)
  98. /**
  99. * @}
  100. */
  101. /** @defgroup FMC_Setup_Time FMC_Setup_Time
  102. * @{
  103. */
  104. #define IS_FMC_SETUP_TIME(__TIME__) ((__TIME__) <= 255)
  105. /**
  106. * @}
  107. */
  108. /** @defgroup FMC_Wait_Setup_Time FMC_Wait_Setup_Time
  109. * @{
  110. */
  111. #define IS_FMC_WAIT_TIME(__TIME__) ((__TIME__) <= 255)
  112. /**
  113. * @}
  114. */
  115. /** @defgroup FMC_Hold_Setup_Time FMC_Hold_Setup_Time
  116. * @{
  117. */
  118. #define IS_FMC_HOLD_TIME(__TIME__) ((__TIME__) <= 255)
  119. /**
  120. * @}
  121. */
  122. /** @defgroup FMC_HiZ_Setup_Time FMC_HiZ_Setup_Time
  123. * @{
  124. */
  125. #define IS_FMC_HIZ_TIME(__TIME__) ((__TIME__) <= 255)
  126. /**
  127. * @}
  128. */
  129. /** @defgroup FMC_NORSRAM_Device_Instance FMC NOR/SRAM Device Instance
  130. * @{
  131. */
  132. #define IS_FMC_NORSRAM_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_NORSRAM_DEVICE)
  133. /**
  134. * @}
  135. */
  136. /** @defgroup FMC_NORSRAM_EXTENDED_Device_Instance FMC NOR/SRAM EXTENDED Device Instance
  137. * @{
  138. */
  139. #define IS_FMC_NORSRAM_EXTENDED_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_NORSRAM_EXTENDED_DEVICE)
  140. /**
  141. * @}
  142. */
  143. /** @defgroup FMC_NAND_Device_Instance FMC NAND Device Instance
  144. * @{
  145. */
  146. #define IS_FMC_NAND_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_NAND_DEVICE)
  147. /**
  148. * @}
  149. */
  150. /** @defgroup FMC_PCCARD_Device_Instance FMC PCCARD Device Instance
  151. * @{
  152. */
  153. #define IS_FMC_PCCARD_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_PCCARD_DEVICE)
  154. /**
  155. * @}
  156. */
  157. #define IS_FMC_BURSTMODE(__STATE__) (((__STATE__) == FMC_BURST_ACCESS_MODE_DISABLE) || \
  158. ((__STATE__) == FMC_BURST_ACCESS_MODE_ENABLE))
  159. #define IS_FMC_WAIT_POLARITY(__POLARITY__) (((__POLARITY__) == FMC_WAIT_SIGNAL_POLARITY_LOW) || \
  160. ((__POLARITY__) == FMC_WAIT_SIGNAL_POLARITY_HIGH))
  161. #define IS_FMC_WRAP_MODE(__MODE__) (((__MODE__) == FMC_WRAP_MODE_DISABLE) || \
  162. ((__MODE__) == FMC_WRAP_MODE_ENABLE))
  163. #define IS_FMC_WAIT_SIGNAL_ACTIVE(__ACTIVE__) (((__ACTIVE__) == FMC_WAIT_TIMING_BEFORE_WS) || \
  164. ((__ACTIVE__) == FMC_WAIT_TIMING_DURING_WS))
  165. #define IS_FMC_WRITE_OPERATION(__OPERATION__) (((__OPERATION__) == FMC_WRITE_OPERATION_DISABLE) || \
  166. ((__OPERATION__) == FMC_WRITE_OPERATION_ENABLE))
  167. #define IS_FMC_WAITE_SIGNAL(__SIGNAL__) (((__SIGNAL__) == FMC_WAIT_SIGNAL_DISABLE) || \
  168. ((__SIGNAL__) == FMC_WAIT_SIGNAL_ENABLE))
  169. #define IS_FMC_EXTENDED_MODE(__MODE__) (((__MODE__) == FMC_EXTENDED_MODE_DISABLE) || \
  170. ((__MODE__) == FMC_EXTENDED_MODE_ENABLE))
  171. #define IS_FMC_ASYNWAIT(__STATE__) (((__STATE__) == FMC_ASYNCHRONOUS_WAIT_DISABLE) || \
  172. ((__STATE__) == FMC_ASYNCHRONOUS_WAIT_ENABLE))
  173. #define IS_FMC_CLK_DIV(__DIV__) (((__DIV__) > 1) && ((__DIV__) <= 16))
  174. /** @defgroup FMC_Data_Latency FMC Data Latency
  175. * @{
  176. */
  177. #define IS_FMC_DATA_LATENCY(__LATENCY__) (((__LATENCY__) > 1) && ((__LATENCY__) <= 17))
  178. /**
  179. * @}
  180. */
  181. /** @defgroup FMC_Address_Setup_Time FMC Address Setup Time
  182. * @{
  183. */
  184. #define IS_FMC_ADDRESS_SETUP_TIME(__TIME__) ((__TIME__) <= 15)
  185. /**
  186. * @}
  187. */
  188. /** @defgroup FMC_Address_Hold_Time FMC Address Hold Time
  189. * @{
  190. */
  191. #define IS_FMC_ADDRESS_HOLD_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 15))
  192. /**
  193. * @}
  194. */
  195. /** @defgroup FMC_Data_Setup_Time FMC Data Setup Time
  196. * @{
  197. */
  198. #define IS_FMC_DATASETUP_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 255))
  199. /**
  200. * @}
  201. */
  202. /** @defgroup FMC_Bus_Turn_around_Duration FMC Bus Turn around Duration
  203. * @{
  204. */
  205. #define IS_FMC_TURNAROUND_TIME(__TIME__) ((__TIME__) <= 15)
  206. /**
  207. * @}
  208. */
  209. /**
  210. * @}
  211. */
  212. /* Exported typedef ----------------------------------------------------------*/
  213. /** @defgroup FMC_NORSRAM_Exported_typedef FMC Low Layer Exported Types
  214. * @{
  215. */
  216. #define FMC_NORSRAM_TypeDef FMC_Bank1_TypeDef
  217. #define FMC_NORSRAM_EXTENDED_TypeDef FMC_Bank1E_TypeDef
  218. #define FMC_NAND_TypeDef FMC_Bank2_3_TypeDef
  219. #define FMC_PCCARD_TypeDef FMC_Bank4_TypeDef
  220. #define FMC_NORSRAM_DEVICE FMC_Bank1
  221. #define FMC_NORSRAM_EXTENDED_DEVICE FMC_Bank1E
  222. #define FMC_NAND_DEVICE FMC_Bank2_3
  223. #define FMC_PCCARD_DEVICE FMC_Bank4
  224. /**
  225. * @brief FMC_NORSRAM Configuration Structure definition
  226. */
  227. typedef struct
  228. {
  229. uint32_t NSBank; /*!< Specifies the NORSRAM memory device that will be used.
  230. This parameter can be a value of @ref FMC_NORSRAM_Bank */
  231. uint32_t DataAddressMux; /*!< Specifies whether the address and data values are
  232. multiplexed on the data bus or not.
  233. This parameter can be a value of @ref FMC_Data_Address_Bus_Multiplexing */
  234. uint32_t MemoryType; /*!< Specifies the type of external memory attached to
  235. the corresponding memory device.
  236. This parameter can be a value of @ref FMC_Memory_Type */
  237. uint32_t MemoryDataWidth; /*!< Specifies the external memory device width.
  238. This parameter can be a value of @ref FMC_NORSRAM_Data_Width */
  239. uint32_t BurstAccessMode; /*!< Enables or disables the burst access mode for Flash memory,
  240. valid only with synchronous burst Flash memories.
  241. This parameter can be a value of @ref FMC_Burst_Access_Mode */
  242. uint32_t WaitSignalPolarity; /*!< Specifies the wait signal polarity, valid only when accessing
  243. the Flash memory in burst mode.
  244. This parameter can be a value of @ref FMC_Wait_Signal_Polarity */
  245. uint32_t WrapMode; /*!< Enables or disables the Wrapped burst access mode for Flash
  246. memory, valid only when accessing Flash memories in burst mode.
  247. This parameter can be a value of @ref FMC_Wrap_Mode */
  248. uint32_t WaitSignalActive; /*!< Specifies if the wait signal is asserted by the memory one
  249. clock cycle before the wait state or during the wait state,
  250. valid only when accessing memories in burst mode.
  251. This parameter can be a value of @ref FMC_Wait_Timing */
  252. uint32_t WriteOperation; /*!< Enables or disables the write operation in the selected device by the FMC.
  253. This parameter can be a value of @ref FMC_Write_Operation */
  254. uint32_t WaitSignal; /*!< Enables or disables the wait state insertion via wait
  255. signal, valid for Flash memory access in burst mode.
  256. This parameter can be a value of @ref FMC_Wait_Signal */
  257. uint32_t ExtendedMode; /*!< Enables or disables the extended mode.
  258. This parameter can be a value of @ref FMC_Extended_Mode */
  259. uint32_t AsynchronousWait; /*!< Enables or disables wait signal during asynchronous transfers,
  260. valid only with asynchronous Flash memories.
  261. This parameter can be a value of @ref FMC_AsynchronousWait */
  262. uint32_t WriteBurst; /*!< Enables or disables the write burst operation.
  263. This parameter can be a value of @ref FMC_Write_Burst */
  264. uint32_t ContinuousClock; /*!< Enables or disables the FMC clock output to external memory devices.
  265. This parameter is only enabled through the FMC_BCR1 register, and don't care
  266. through FMC_BCR2..4 registers.
  267. This parameter can be a value of @ref FMC_Continous_Clock */
  268. }FMC_NORSRAM_InitTypeDef;
  269. /**
  270. * @brief FMC_NORSRAM Timing parameters structure definition
  271. */
  272. typedef struct
  273. {
  274. uint32_t AddressSetupTime; /*!< Defines the number of HCLK cycles to configure
  275. the duration of the address setup time.
  276. This parameter can be a value between Min_Data = 0 and Max_Data = 15.
  277. @note This parameter is not used with synchronous NOR Flash memories. */
  278. uint32_t AddressHoldTime; /*!< Defines the number of HCLK cycles to configure
  279. the duration of the address hold time.
  280. This parameter can be a value between Min_Data = 1 and Max_Data = 15.
  281. @note This parameter is not used with synchronous NOR Flash memories. */
  282. uint32_t DataSetupTime; /*!< Defines the number of HCLK cycles to configure
  283. the duration of the data setup time.
  284. This parameter can be a value between Min_Data = 1 and Max_Data = 255.
  285. @note This parameter is used for SRAMs, ROMs and asynchronous multiplexed
  286. NOR Flash memories. */
  287. uint32_t BusTurnAroundDuration; /*!< Defines the number of HCLK cycles to configure
  288. the duration of the bus turnaround.
  289. This parameter can be a value between Min_Data = 0 and Max_Data = 15.
  290. @note This parameter is only used for multiplexed NOR Flash memories. */
  291. uint32_t CLKDivision; /*!< Defines the period of CLK clock output signal, expressed in number of
  292. HCLK cycles. This parameter can be a value between Min_Data = 2 and Max_Data = 16.
  293. @note This parameter is not used for asynchronous NOR Flash, SRAM or ROM
  294. accesses. */
  295. uint32_t DataLatency; /*!< Defines the number of memory clock cycles to issue
  296. to the memory before getting the first data.
  297. The parameter value depends on the memory type as shown below:
  298. - It must be set to 0 in case of a CRAM
  299. - It is don't care in asynchronous NOR, SRAM or ROM accesses
  300. - It may assume a value between Min_Data = 2 and Max_Data = 17 in NOR Flash memories
  301. with synchronous burst mode enable */
  302. uint32_t AccessMode; /*!< Specifies the asynchronous access mode.
  303. This parameter can be a value of @ref FMC_Access_Mode */
  304. }FMC_NORSRAM_TimingTypeDef;
  305. /**
  306. * @brief FMC_NAND Configuration Structure definition
  307. */
  308. typedef struct
  309. {
  310. uint32_t NandBank; /*!< Specifies the NAND memory device that will be used.
  311. This parameter can be a value of @ref FMC_NAND_Bank */
  312. uint32_t Waitfeature; /*!< Enables or disables the Wait feature for the NAND Memory device.
  313. This parameter can be any value of @ref FMC_Wait_feature */
  314. uint32_t MemoryDataWidth; /*!< Specifies the external memory device width.
  315. This parameter can be any value of @ref FMC_NAND_Data_Width */
  316. uint32_t EccComputation; /*!< Enables or disables the ECC computation.
  317. This parameter can be any value of @ref FMC_ECC */
  318. uint32_t ECCPageSize; /*!< Defines the page size for the extended ECC.
  319. This parameter can be any value of @ref FMC_ECC_Page_Size */
  320. uint32_t TCLRSetupTime; /*!< Defines the number of HCLK cycles to configure the
  321. delay between CLE low and RE low.
  322. This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
  323. uint32_t TARSetupTime; /*!< Defines the number of HCLK cycles to configure the
  324. delay between ALE low and RE low.
  325. This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
  326. }FMC_NAND_InitTypeDef;
  327. /**
  328. * @brief FMC_NAND_PCC Timing parameters structure definition
  329. */
  330. typedef struct
  331. {
  332. uint32_t SetupTime; /*!< Defines the number of HCLK cycles to setup address before
  333. the command assertion for NAND-Flash read or write access
  334. to common/Attribute or I/O memory space (depending on
  335. the memory space timing to be configured).
  336. This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
  337. uint32_t WaitSetupTime; /*!< Defines the minimum number of HCLK cycles to assert the
  338. command for NAND-Flash read or write access to
  339. common/Attribute or I/O memory space (depending on the
  340. memory space timing to be configured).
  341. This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
  342. uint32_t HoldSetupTime; /*!< Defines the number of HCLK clock cycles to hold address
  343. (and data for write access) after the command de-assertion
  344. for NAND-Flash read or write access to common/Attribute
  345. or I/O memory space (depending on the memory space timing
  346. to be configured).
  347. This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
  348. uint32_t HiZSetupTime; /*!< Defines the number of HCLK clock cycles during which the
  349. data bus is kept in HiZ after the start of a NAND-Flash
  350. write access to common/Attribute or I/O memory space (depending
  351. on the memory space timing to be configured).
  352. This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
  353. }FMC_NAND_PCC_TimingTypeDef;
  354. /**
  355. * @brief FMC_NAND Configuration Structure definition
  356. */
  357. typedef struct
  358. {
  359. uint32_t Waitfeature; /*!< Enables or disables the Wait feature for the PCCARD Memory device.
  360. This parameter can be any value of @ref FMC_Wait_feature */
  361. uint32_t TCLRSetupTime; /*!< Defines the number of HCLK cycles to configure the
  362. delay between CLE low and RE low.
  363. This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
  364. uint32_t TARSetupTime; /*!< Defines the number of HCLK cycles to configure the
  365. delay between ALE low and RE low.
  366. This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
  367. }FMC_PCCARD_InitTypeDef;
  368. /**
  369. * @}
  370. */
  371. /* Exported constants --------------------------------------------------------*/
  372. /** @defgroup FMC_Exported_Constants FMC Low Layer Exported Constants
  373. * @{
  374. */
  375. /** @defgroup FMC_NORSRAM_Exported_constants FMC NOR/SRAM Exported constants
  376. * @{
  377. */
  378. /** @defgroup FMC_NORSRAM_Bank FMC NOR/SRAM Bank
  379. * @{
  380. */
  381. #define FMC_NORSRAM_BANK1 ((uint32_t)0x00000000)
  382. #define FMC_NORSRAM_BANK2 ((uint32_t)0x00000002)
  383. #define FMC_NORSRAM_BANK3 ((uint32_t)0x00000004)
  384. #define FMC_NORSRAM_BANK4 ((uint32_t)0x00000006)
  385. /**
  386. * @}
  387. */
  388. /** @defgroup FMC_Data_Address_Bus_Multiplexing FMC Data Address Bus Multiplexing
  389. * @{
  390. */
  391. #define FMC_DATA_ADDRESS_MUX_DISABLE ((uint32_t)0x00000000)
  392. #define FMC_DATA_ADDRESS_MUX_ENABLE ((uint32_t)FMC_BCRx_MUXEN)
  393. /**
  394. * @}
  395. */
  396. /** @defgroup FMC_Memory_Type FMC Memory Type
  397. * @{
  398. */
  399. #define FMC_MEMORY_TYPE_SRAM ((uint32_t)0x00000000)
  400. #define FMC_MEMORY_TYPE_PSRAM ((uint32_t)FMC_BCRx_MTYP_0)
  401. #define FMC_MEMORY_TYPE_NOR ((uint32_t)FMC_BCRx_MTYP_1)
  402. /**
  403. * @}
  404. */
  405. /** @defgroup FMC_NORSRAM_Data_Width FMC NOR/SRAM Data Width
  406. * @{
  407. */
  408. #define FMC_NORSRAM_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000)
  409. #define FMC_NORSRAM_MEM_BUS_WIDTH_16 ((uint32_t)FMC_BCRx_MWID_0)
  410. #define FMC_NORSRAM_MEM_BUS_WIDTH_32 ((uint32_t)FMC_BCRx_MWID_1)
  411. /**
  412. * @}
  413. */
  414. /** @defgroup FMC_NORSRAM_Flash_Access FMC NOR/SRAM Flash Access
  415. * @{
  416. */
  417. #define FMC_NORSRAM_FLASH_ACCESS_ENABLE ((uint32_t)FMC_BCRx_FACCEN)
  418. #define FMC_NORSRAM_FLASH_ACCESS_DISABLE ((uint32_t)0x00000000)
  419. /**
  420. * @}
  421. */
  422. /** @defgroup FMC_Burst_Access_Mode FMC Burst Access Mode
  423. * @{
  424. */
  425. #define FMC_BURST_ACCESS_MODE_DISABLE ((uint32_t)0x00000000)
  426. #define FMC_BURST_ACCESS_MODE_ENABLE ((uint32_t)FMC_BCRx_BURSTEN)
  427. /**
  428. * @}
  429. */
  430. /** @defgroup FMC_Wait_Signal_Polarity FMC Wait Signal Polarity
  431. * @{
  432. */
  433. #define FMC_WAIT_SIGNAL_POLARITY_LOW ((uint32_t)0x00000000)
  434. #define FMC_WAIT_SIGNAL_POLARITY_HIGH ((uint32_t)FMC_BCRx_WAITPOL)
  435. /**
  436. * @}
  437. */
  438. /** @defgroup FMC_Wrap_Mode FMC Wrap Mode
  439. * @{
  440. */
  441. #define FMC_WRAP_MODE_DISABLE ((uint32_t)0x00000000)
  442. #define FMC_WRAP_MODE_ENABLE ((uint32_t)FMC_BCRx_WRAPMOD)
  443. /**
  444. * @}
  445. */
  446. /** @defgroup FMC_Wait_Timing FMC Wait Timing
  447. * @{
  448. */
  449. #define FMC_WAIT_TIMING_BEFORE_WS ((uint32_t)0x00000000)
  450. #define FMC_WAIT_TIMING_DURING_WS ((uint32_t)FMC_BCRx_WAITCFG)
  451. /**
  452. * @}
  453. */
  454. /** @defgroup FMC_Write_Operation FMC Write Operation
  455. * @{
  456. */
  457. #define FMC_WRITE_OPERATION_DISABLE ((uint32_t)0x00000000)
  458. #define FMC_WRITE_OPERATION_ENABLE ((uint32_t)FMC_BCRx_WREN)
  459. /**
  460. * @}
  461. */
  462. /** @defgroup FMC_Wait_Signal FMC Wait Signal
  463. * @{
  464. */
  465. #define FMC_WAIT_SIGNAL_DISABLE ((uint32_t)0x00000000)
  466. #define FMC_WAIT_SIGNAL_ENABLE ((uint32_t)FMC_BCRx_WAITEN)
  467. /**
  468. * @}
  469. */
  470. /** @defgroup FMC_Extended_Mode FMC Extended Mode
  471. * @{
  472. */
  473. #define FMC_EXTENDED_MODE_DISABLE ((uint32_t)0x00000000)
  474. #define FMC_EXTENDED_MODE_ENABLE ((uint32_t)FMC_BCRx_EXTMOD)
  475. /**
  476. * @}
  477. */
  478. /** @defgroup FMC_AsynchronousWait FMC Asynchronous Wait
  479. * @{
  480. */
  481. #define FMC_ASYNCHRONOUS_WAIT_DISABLE ((uint32_t)0x00000000)
  482. #define FMC_ASYNCHRONOUS_WAIT_ENABLE ((uint32_t)FMC_BCRx_ASYNCWAIT)
  483. /**
  484. * @}
  485. */
  486. /** @defgroup FMC_Write_Burst FMC Write Burst
  487. * @{
  488. */
  489. #define FMC_WRITE_BURST_DISABLE ((uint32_t)0x00000000)
  490. #define FMC_WRITE_BURST_ENABLE ((uint32_t)FMC_BCRx_CBURSTRW)
  491. /**
  492. * @}
  493. */
  494. /** @defgroup FMC_Continous_Clock FMC Continous Clock
  495. * @{
  496. */
  497. #define FMC_CONTINUOUS_CLOCK_SYNC_ONLY ((uint32_t)0x00000000)
  498. #define FMC_CONTINUOUS_CLOCK_SYNC_ASYNC ((uint32_t)FMC_BCR1_CCLKEN)
  499. /**
  500. * @}
  501. */
  502. /** @defgroup FMC_Access_Mode FMC Access Mode
  503. * @{
  504. */
  505. #define FMC_ACCESS_MODE_A ((uint32_t)0x00000000)
  506. #define FMC_ACCESS_MODE_B ((uint32_t)FMC_BTRx_ACCMOD_0)
  507. #define FMC_ACCESS_MODE_C ((uint32_t)FMC_BTRx_ACCMOD_1)
  508. #define FMC_ACCESS_MODE_D ((uint32_t)(FMC_BTRx_ACCMOD_0 | FMC_BTRx_ACCMOD_1))
  509. /**
  510. * @}
  511. */
  512. /**
  513. * @}
  514. */
  515. /** @defgroup FMC_NAND_Controller FMC NAND and PCCARD Controller
  516. * @{
  517. */
  518. /** @defgroup FMC_NAND_Bank FMC NAND Bank
  519. * @{
  520. */
  521. #define FMC_NAND_BANK2 ((uint32_t)0x00000010)
  522. #define FMC_NAND_BANK3 ((uint32_t)0x00000100)
  523. /**
  524. * @}
  525. */
  526. /** @defgroup FMC_Wait_feature FMC Wait feature
  527. * @{
  528. */
  529. #define FMC_NAND_PCC_WAIT_FEATURE_DISABLE ((uint32_t)0x00000000)
  530. #define FMC_NAND_PCC_WAIT_FEATURE_ENABLE ((uint32_t)FMC_PCRx_PWAITEN)
  531. /**
  532. * @}
  533. */
  534. /** @defgroup FMC_PCR_Memory_Type FMC PCR Memory Type
  535. * @{
  536. */
  537. #define FMC_PCR_MEMORY_TYPE_PCCARD ((uint32_t)0x00000000)
  538. #define FMC_PCR_MEMORY_TYPE_NAND ((uint32_t)FMC_PCRx_PTYP)
  539. /**
  540. * @}
  541. */
  542. /** @defgroup FMC_NAND_Data_Width FMC NAND Data Width
  543. * @{
  544. */
  545. #define FMC_NAND_PCC_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000)
  546. #define FMC_NAND_PCC_MEM_BUS_WIDTH_16 ((uint32_t)FMC_PCRx_PWID_0)
  547. /**
  548. * @}
  549. */
  550. /** @defgroup FMC_ECC FMC NAND ECC
  551. * @{
  552. */
  553. #define FMC_NAND_ECC_DISABLE ((uint32_t)0x00000000)
  554. #define FMC_NAND_ECC_ENABLE ((uint32_t)FMC_PCRx_ECCEN)
  555. /**
  556. * @}
  557. */
  558. /** @defgroup FMC_ECC_Page_Size FMC ECC Page Size
  559. * @{
  560. */
  561. #define FMC_NAND_ECC_PAGE_SIZE_256BYTE ((uint32_t)0x00000000)
  562. #define FMC_NAND_ECC_PAGE_SIZE_512BYTE ((uint32_t)FMC_PCRx_ECCPS_0)
  563. #define FMC_NAND_ECC_PAGE_SIZE_1024BYTE ((uint32_t)FMC_PCRx_ECCPS_1)
  564. #define FMC_NAND_ECC_PAGE_SIZE_2048BYTE ((uint32_t)FMC_PCRx_ECCPS_0|FMC_PCRx_ECCPS_1)
  565. #define FMC_NAND_ECC_PAGE_SIZE_4096BYTE ((uint32_t)FMC_PCRx_ECCPS_2)
  566. #define FMC_NAND_ECC_PAGE_SIZE_8192BYTE ((uint32_t)FMC_PCRx_ECCPS_0|FMC_PCRx_ECCPS_2)
  567. /**
  568. * @}
  569. */
  570. /** @defgroup FMC_Interrupt_definition FMC Interrupt definition
  571. * @brief FMC Interrupt definition
  572. * @{
  573. */
  574. #define FMC_IT_RISING_EDGE ((uint32_t)FMC_SRx_IREN)
  575. #define FMC_IT_LEVEL ((uint32_t)FMC_SRx_ILEN)
  576. #define FMC_IT_FALLING_EDGE ((uint32_t)FMC_SRx_IFEN)
  577. /**
  578. * @}
  579. */
  580. /** @defgroup FMC_Flag_definition FMC Flag definition
  581. * @brief FMC Flag definition
  582. * @{
  583. */
  584. #define FMC_FLAG_RISING_EDGE ((uint32_t)FMC_SRx_IRS)
  585. #define FMC_FLAG_LEVEL ((uint32_t)FMC_SRx_ILS)
  586. #define FMC_FLAG_FALLING_EDGE ((uint32_t)FMC_SRx_IFS)
  587. #define FMC_FLAG_FEMPT ((uint32_t)FMC_SRx_FEMPT)
  588. /**
  589. * @}
  590. */
  591. /**
  592. * @}
  593. */
  594. /**
  595. * @}
  596. */
  597. /* Exported macro ------------------------------------------------------------*/
  598. /** @defgroup FMC_Exported_Macros FMC Low Layer Exported Macros
  599. * @{
  600. */
  601. /** @defgroup FMC_NOR_Macros FMC NOR/SRAM Exported Macros
  602. * @brief macros to handle NOR device enable/disable and read/write operations
  603. * @{
  604. */
  605. /**
  606. * @brief Enable the NORSRAM device access.
  607. * @param __INSTANCE__ FMC_NORSRAM Instance
  608. * @param __BANK__ FMC_NORSRAM Bank
  609. * @retval none
  610. */
  611. #define __FMC_NORSRAM_ENABLE(__INSTANCE__, __BANK__) SET_BIT((__INSTANCE__)->BTCR[(__BANK__)], FMC_BCRx_MBKEN)
  612. /**
  613. * @brief Disable the NORSRAM device access.
  614. * @param __INSTANCE__ FMC_NORSRAM Instance
  615. * @param __BANK__ FMC_NORSRAM Bank
  616. * @retval none
  617. */
  618. #define __FMC_NORSRAM_DISABLE(__INSTANCE__, __BANK__) CLEAR_BIT((__INSTANCE__)->BTCR[(__BANK__)], FMC_BCRx_MBKEN)
  619. /**
  620. * @}
  621. */
  622. /** @defgroup FMC_NAND_Macros FMC NAND Macros
  623. * @brief macros to handle NAND device enable/disable
  624. * @{
  625. */
  626. /**
  627. * @brief Enable the NAND device access.
  628. * @param __INSTANCE__ FMC_NAND Instance
  629. * @param __BANK__ FMC_NAND Bank
  630. * @retval None
  631. */
  632. #define __FMC_NAND_ENABLE(__INSTANCE__, __BANK__) (((__BANK__) == FMC_NAND_BANK2)? SET_BIT((__INSTANCE__)->PCR2, FMC_PCRx_PBKEN): \
  633. SET_BIT((__INSTANCE__)->PCR3, FMC_PCRx_PBKEN))
  634. /**
  635. * @brief Disable the NAND device access.
  636. * @param __INSTANCE__ FMC_NAND Instance
  637. * @param __BANK__ FMC_NAND Bank
  638. * @retval None
  639. */
  640. #define __FMC_NAND_DISABLE(__INSTANCE__, __BANK__) (((__BANK__) == FMC_NAND_BANK2)? CLEAR_BIT((__INSTANCE__)->PCR2, FMC_PCRx_PBKEN): \
  641. CLEAR_BIT((__INSTANCE__)->PCR3, FMC_PCRx_PBKEN))
  642. /**
  643. * @}
  644. */
  645. /** @defgroup FMC_PCCARD_Macros FMC PCCARD Macros
  646. * @brief macros to handle PCCARD read/write operations
  647. * @{
  648. */
  649. /**
  650. * @brief Enable the PCCARD device access.
  651. * @param __INSTANCE__ FMC_PCCARD Instance
  652. * @retval None
  653. */
  654. #define __FMC_PCCARD_ENABLE(__INSTANCE__) SET_BIT((__INSTANCE__)->PCR4, FMC_PCRx_PBKEN)
  655. /**
  656. * @brief Disable the PCCARD device access.
  657. * @param __INSTANCE__ FMC_PCCARD Instance
  658. * @retval None
  659. */
  660. #define __FMC_PCCARD_DISABLE(__INSTANCE__) CLEAR_BIT((__INSTANCE__)->PCR4, FMC_PCRx_PBKEN)
  661. /**
  662. * @}
  663. */
  664. /** @defgroup FMC_Interrupt FMC Interrupt
  665. * @brief macros to handle FMC interrupts
  666. * @{
  667. */
  668. /**
  669. * @brief Enable the NAND device interrupt.
  670. * @param __INSTANCE__ FMC_NAND Instance
  671. * @param __BANK__ FMC_NAND Bank
  672. * @param __INTERRUPT__ FMC_NAND interrupt
  673. * This parameter can be any combination of the following values:
  674. * @arg FMC_IT_RISING_EDGE Interrupt rising edge.
  675. * @arg FMC_IT_LEVEL Interrupt level.
  676. * @arg FMC_IT_FALLING_EDGE Interrupt falling edge.
  677. * @retval None
  678. */
  679. #define __FMC_NAND_ENABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) (((__BANK__) == FMC_NAND_BANK2)? SET_BIT((__INSTANCE__)->SR2, (__INTERRUPT__)): \
  680. SET_BIT((__INSTANCE__)->SR3, (__INTERRUPT__)))
  681. /**
  682. * @brief Disable the NAND device interrupt.
  683. * @param __INSTANCE__ FMC_NAND Instance
  684. * @param __BANK__ FMC_NAND Bank
  685. * @param __INTERRUPT__ FMC_NAND interrupt
  686. * This parameter can be any combination of the following values:
  687. * @arg FMC_IT_RISING_EDGE Interrupt rising edge.
  688. * @arg FMC_IT_LEVEL Interrupt level.
  689. * @arg FMC_IT_FALLING_EDGE Interrupt falling edge.
  690. * @retval None
  691. */
  692. #define __FMC_NAND_DISABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) (((__BANK__) == FMC_NAND_BANK2)? CLEAR_BIT((__INSTANCE__)->SR2, (__INTERRUPT__)): \
  693. CLEAR_BIT((__INSTANCE__)->SR3, (__INTERRUPT__)))
  694. /**
  695. * @brief Get flag status of the NAND device.
  696. * @param __INSTANCE__ FMC_NAND Instance
  697. * @param __BANK__ FMC_NAND Bank
  698. * @param __FLAG__ FMC_NAND flag
  699. * This parameter can be any combination of the following values:
  700. * @arg FMC_FLAG_RISING_EDGE Interrupt rising edge flag.
  701. * @arg FMC_FLAG_LEVEL Interrupt level edge flag.
  702. * @arg FMC_FLAG_FALLING_EDGE Interrupt falling edge flag.
  703. * @arg FMC_FLAG_FEMPT FIFO empty flag.
  704. * @retval The state of FLAG (SET or RESET).
  705. */
  706. #define __FMC_NAND_GET_FLAG(__INSTANCE__, __BANK__, __FLAG__) (((__BANK__) == FMC_NAND_BANK2)? (((__INSTANCE__)->SR2 &(__FLAG__)) == (__FLAG__)): \
  707. (((__INSTANCE__)->SR3 &(__FLAG__)) == (__FLAG__)))
  708. /**
  709. * @brief Clear flag status of the NAND device.
  710. * @param __INSTANCE__ FMC_NAND Instance
  711. * @param __BANK__ FMC_NAND Bank
  712. * @param __FLAG__ FMC_NAND flag
  713. * This parameter can be any combination of the following values:
  714. * @arg FMC_FLAG_RISING_EDGE Interrupt rising edge flag.
  715. * @arg FMC_FLAG_LEVEL Interrupt level edge flag.
  716. * @arg FMC_FLAG_FALLING_EDGE Interrupt falling edge flag.
  717. * @arg FMC_FLAG_FEMPT FIFO empty flag.
  718. * @retval None
  719. */
  720. #define __FMC_NAND_CLEAR_FLAG(__INSTANCE__, __BANK__, __FLAG__) (((__BANK__) == FMC_NAND_BANK2)? CLEAR_BIT((__INSTANCE__)->SR2, (__FLAG__)): \
  721. CLEAR_BIT((__INSTANCE__)->SR3, (__FLAG__)))
  722. /**
  723. * @brief Enable the PCCARD device interrupt.
  724. * @param __INSTANCE__ FMC_PCCARD Instance
  725. * @param __INTERRUPT__ FMC_PCCARD interrupt
  726. * This parameter can be any combination of the following values:
  727. * @arg FMC_IT_RISING_EDGE Interrupt rising edge.
  728. * @arg FMC_IT_LEVEL Interrupt level.
  729. * @arg FMC_IT_FALLING_EDGE Interrupt falling edge.
  730. * @retval None
  731. */
  732. #define __FMC_PCCARD_ENABLE_IT(__INSTANCE__, __INTERRUPT__) SET_BIT((__INSTANCE__)->SR4, (__INTERRUPT__))
  733. /**
  734. * @brief Disable the PCCARD device interrupt.
  735. * @param __INSTANCE__ FMC_PCCARD Instance
  736. * @param __INTERRUPT__ FMC_PCCARD interrupt
  737. * This parameter can be any combination of the following values:
  738. * @arg FMC_IT_RISING_EDGE Interrupt rising edge.
  739. * @arg FMC_IT_LEVEL Interrupt level.
  740. * @arg FMC_IT_FALLING_EDGE Interrupt falling edge.
  741. * @retval None
  742. */
  743. #define __FMC_PCCARD_DISABLE_IT(__INSTANCE__, __INTERRUPT__) CLEAR_BIT((__INSTANCE__)->SR4, (__INTERRUPT__))
  744. /**
  745. * @brief Get flag status of the PCCARD device.
  746. * @param __INSTANCE__ FMC_PCCARD Instance
  747. * @param __FLAG__ FMC_PCCARD flag
  748. * This parameter can be any combination of the following values:
  749. * @arg FMC_FLAG_RISING_EDGE Interrupt rising edge flag.
  750. * @arg FMC_FLAG_LEVEL Interrupt level edge flag.
  751. * @arg FMC_FLAG_FALLING_EDGE Interrupt falling edge flag.
  752. * @arg FMC_FLAG_FEMPT FIFO empty flag.
  753. * @retval The state of FLAG (SET or RESET).
  754. */
  755. #define __FMC_PCCARD_GET_FLAG(__INSTANCE__, __FLAG__) (((__INSTANCE__)->SR4 &(__FLAG__)) == (__FLAG__))
  756. /**
  757. * @brief Clear flag status of the PCCARD device.
  758. * @param __INSTANCE__ FMC_PCCARD Instance
  759. * @param __FLAG__ FMC_PCCARD flag
  760. * This parameter can be any combination of the following values:
  761. * @arg FMC_FLAG_RISING_EDGE Interrupt rising edge flag.
  762. * @arg FMC_FLAG_LEVEL Interrupt level edge flag.
  763. * @arg FMC_FLAG_FALLING_EDGE Interrupt falling edge flag.
  764. * @arg FMC_FLAG_FEMPT FIFO empty flag.
  765. * @retval None
  766. */
  767. #define __FMC_PCCARD_CLEAR_FLAG(__INSTANCE__, __FLAG__) CLEAR_BIT((__INSTANCE__)->SR4, (__FLAG__))
  768. /**
  769. * @}
  770. */
  771. /**
  772. * @}
  773. */
  774. /* Exported functions --------------------------------------------------------*/
  775. /** @addtogroup FMC_LL_Exported_Functions
  776. * @{
  777. */
  778. /** @addtogroup FMC_NORSRAM
  779. * @{
  780. */
  781. /** @addtogroup FMC_NORSRAM_Group1
  782. * @{
  783. */
  784. /* FMC_NORSRAM Controller functions ******************************************/
  785. /* Initialization/de-initialization functions */
  786. HAL_StatusTypeDef FMC_NORSRAM_Init(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_InitTypeDef *Init);
  787. HAL_StatusTypeDef FMC_NORSRAM_Timing_Init(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank);
  788. HAL_StatusTypeDef FMC_NORSRAM_Extended_Timing_Init(FMC_NORSRAM_EXTENDED_TypeDef *Device, FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode);
  789. HAL_StatusTypeDef FMC_NORSRAM_DeInit(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank);
  790. /**
  791. * @}
  792. */
  793. /** @addtogroup FMC_NORSRAM_Group2
  794. * @{
  795. */
  796. /* FMC_NORSRAM Control functions */
  797. HAL_StatusTypeDef FMC_NORSRAM_WriteOperation_Enable(FMC_NORSRAM_TypeDef *Device, uint32_t Bank);
  798. HAL_StatusTypeDef FMC_NORSRAM_WriteOperation_Disable(FMC_NORSRAM_TypeDef *Device, uint32_t Bank);
  799. /**
  800. * @}
  801. */
  802. /**
  803. * @}
  804. */
  805. /** @addtogroup FMC_NAND
  806. * @{
  807. */
  808. /* FMC_NAND Controller functions **********************************************/
  809. /* Initialization/de-initialization functions */
  810. /** @addtogroup FMC_NAND_Exported_Functions_Group1
  811. * @{
  812. */
  813. HAL_StatusTypeDef FMC_NAND_Init(FMC_NAND_TypeDef *Device, FMC_NAND_InitTypeDef *Init);
  814. HAL_StatusTypeDef FMC_NAND_CommonSpace_Timing_Init(FMC_NAND_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
  815. HAL_StatusTypeDef FMC_NAND_AttributeSpace_Timing_Init(FMC_NAND_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
  816. HAL_StatusTypeDef FMC_NAND_DeInit(FMC_NAND_TypeDef *Device, uint32_t Bank);
  817. /**
  818. * @}
  819. */
  820. /* FMC_NAND Control functions */
  821. /** @addtogroup FMC_NAND_Exported_Functions_Group2
  822. * @{
  823. */
  824. HAL_StatusTypeDef FMC_NAND_ECC_Enable(FMC_NAND_TypeDef *Device, uint32_t Bank);
  825. HAL_StatusTypeDef FMC_NAND_ECC_Disable(FMC_NAND_TypeDef *Device, uint32_t Bank);
  826. HAL_StatusTypeDef FMC_NAND_GetECC(FMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank, uint32_t Timeout);
  827. /**
  828. * @}
  829. */
  830. /**
  831. * @}
  832. */
  833. /** @addtogroup FMC_PCCARD
  834. * @{
  835. */
  836. /* FMC_PCCARD Controller functions ********************************************/
  837. /* Initialization/de-initialization functions */
  838. /** @addtogroup FMC_PCCARD_Exported_Functions_Group1
  839. * @{
  840. */
  841. HAL_StatusTypeDef FMC_PCCARD_Init(FMC_PCCARD_TypeDef *Device, FMC_PCCARD_InitTypeDef *Init);
  842. HAL_StatusTypeDef FMC_PCCARD_CommonSpace_Timing_Init(FMC_PCCARD_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing);
  843. HAL_StatusTypeDef FMC_PCCARD_AttributeSpace_Timing_Init(FMC_PCCARD_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing);
  844. HAL_StatusTypeDef FMC_PCCARD_IOSpace_Timing_Init(FMC_PCCARD_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing);
  845. HAL_StatusTypeDef FMC_PCCARD_DeInit(FMC_PCCARD_TypeDef *Device);
  846. /**
  847. * @}
  848. */
  849. /**
  850. * @}
  851. */
  852. /**
  853. * @}
  854. */
  855. /**
  856. * @}
  857. */
  858. #endif /* FMC_BANK1 */
  859. /**
  860. * @}
  861. */
  862. #ifdef __cplusplus
  863. }
  864. #endif
  865. #endif /* __STM32F3xx_LL_FMC_H */
  866. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/