Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
elijahorr
Date:
Thu Apr 14 07:28:54 2016 +0000
Revision:
121:672067c3ada4
Parent:
112:6f327212ef96
.

Who changed what in which revision?

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