mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Thu Jul 02 16:30:08 2015 +0100
Revision:
581:39197bcd20f2
Parent:
532:fe11edbda85c
Child:
613:bc40b8d2aec4
Synchronized with git revision ae2d3cdffe70184eb8736d94f76c45c93f4b7724

Full URL: https://github.com/mbedmicro/mbed/commit/ae2d3cdffe70184eb8736d94f76c45c93f4b7724/

Make it possible to build the core mbed library with yotta

Who changed what in which revision?

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