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:
Kojto
Date:
Tue Jun 09 14:29:26 2015 +0100
Revision:
101:7cff1c4259d7
Child:
106:ba1f97679dad
Release 101 of the mbed library

Changes:
- new platform: APPNEARME_MICRONFCBOARD, MTS_DRAGONFLY_F411RE, MAX32600MBED, WIZwiki_W7500
- Silabs memory optimization in gpio, pwm fixes
- SPI - ssel documentation fixes and its use

Who changed what in which revision?

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