Mangue Baja Box

Dependencies:   mbed

Committer:
einsteingustavo
Date:
Mon Jul 29 20:38:00 2019 +0000
Revision:
0:0dee8840a1c0
Mangue Baja Box

Who changed what in which revision?

UserRevisionLine numberNew contents of line
einsteingustavo 0:0dee8840a1c0 1 /**
einsteingustavo 0:0dee8840a1c0 2 ******************************************************************************
einsteingustavo 0:0dee8840a1c0 3 * @file stm32f10x_fsmc.h
einsteingustavo 0:0dee8840a1c0 4 * @author MCD Application Team
einsteingustavo 0:0dee8840a1c0 5 * @version V3.6.1
einsteingustavo 0:0dee8840a1c0 6 * @date 05-March-2012
einsteingustavo 0:0dee8840a1c0 7 * @brief This file contains all the functions prototypes for the FSMC firmware
einsteingustavo 0:0dee8840a1c0 8 * library.
einsteingustavo 0:0dee8840a1c0 9 *******************************************************************************
einsteingustavo 0:0dee8840a1c0 10 * Copyright (c) 2014, STMicroelectronics
einsteingustavo 0:0dee8840a1c0 11 * All rights reserved.
einsteingustavo 0:0dee8840a1c0 12 *
einsteingustavo 0:0dee8840a1c0 13 * Redistribution and use in source and binary forms, with or without
einsteingustavo 0:0dee8840a1c0 14 * modification, are permitted provided that the following conditions are met:
einsteingustavo 0:0dee8840a1c0 15 *
einsteingustavo 0:0dee8840a1c0 16 * 1. Redistributions of source code must retain the above copyright notice,
einsteingustavo 0:0dee8840a1c0 17 * this list of conditions and the following disclaimer.
einsteingustavo 0:0dee8840a1c0 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
einsteingustavo 0:0dee8840a1c0 19 * this list of conditions and the following disclaimer in the documentation
einsteingustavo 0:0dee8840a1c0 20 * and/or other materials provided with the distribution.
einsteingustavo 0:0dee8840a1c0 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
einsteingustavo 0:0dee8840a1c0 22 * may be used to endorse or promote products derived from this software
einsteingustavo 0:0dee8840a1c0 23 * without specific prior written permission.
einsteingustavo 0:0dee8840a1c0 24 *
einsteingustavo 0:0dee8840a1c0 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
einsteingustavo 0:0dee8840a1c0 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
einsteingustavo 0:0dee8840a1c0 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
einsteingustavo 0:0dee8840a1c0 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
einsteingustavo 0:0dee8840a1c0 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
einsteingustavo 0:0dee8840a1c0 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
einsteingustavo 0:0dee8840a1c0 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
einsteingustavo 0:0dee8840a1c0 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
einsteingustavo 0:0dee8840a1c0 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
einsteingustavo 0:0dee8840a1c0 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
einsteingustavo 0:0dee8840a1c0 35 *******************************************************************************
einsteingustavo 0:0dee8840a1c0 36 */
einsteingustavo 0:0dee8840a1c0 37
einsteingustavo 0:0dee8840a1c0 38 /* Define to prevent recursive inclusion -------------------------------------*/
einsteingustavo 0:0dee8840a1c0 39 #ifndef __STM32F10x_FSMC_H
einsteingustavo 0:0dee8840a1c0 40 #define __STM32F10x_FSMC_H
einsteingustavo 0:0dee8840a1c0 41
einsteingustavo 0:0dee8840a1c0 42 #ifdef __cplusplus
einsteingustavo 0:0dee8840a1c0 43 extern "C" {
einsteingustavo 0:0dee8840a1c0 44 #endif
einsteingustavo 0:0dee8840a1c0 45
einsteingustavo 0:0dee8840a1c0 46 /* Includes ------------------------------------------------------------------*/
einsteingustavo 0:0dee8840a1c0 47 #include "stm32f10x.h"
einsteingustavo 0:0dee8840a1c0 48
einsteingustavo 0:0dee8840a1c0 49 /** @addtogroup STM32F10x_StdPeriph_Driver
einsteingustavo 0:0dee8840a1c0 50 * @{
einsteingustavo 0:0dee8840a1c0 51 */
einsteingustavo 0:0dee8840a1c0 52
einsteingustavo 0:0dee8840a1c0 53 /** @addtogroup FSMC
einsteingustavo 0:0dee8840a1c0 54 * @{
einsteingustavo 0:0dee8840a1c0 55 */
einsteingustavo 0:0dee8840a1c0 56
einsteingustavo 0:0dee8840a1c0 57 /** @defgroup FSMC_Exported_Types
einsteingustavo 0:0dee8840a1c0 58 * @{
einsteingustavo 0:0dee8840a1c0 59 */
einsteingustavo 0:0dee8840a1c0 60
einsteingustavo 0:0dee8840a1c0 61 /**
einsteingustavo 0:0dee8840a1c0 62 * @brief Timing parameters For NOR/SRAM Banks
einsteingustavo 0:0dee8840a1c0 63 */
einsteingustavo 0:0dee8840a1c0 64
einsteingustavo 0:0dee8840a1c0 65 typedef struct
einsteingustavo 0:0dee8840a1c0 66 {
einsteingustavo 0:0dee8840a1c0 67 uint32_t FSMC_AddressSetupTime; /*!< Defines the number of HCLK cycles to configure
einsteingustavo 0:0dee8840a1c0 68 the duration of the address setup time.
einsteingustavo 0:0dee8840a1c0 69 This parameter can be a value between 0 and 0xF.
einsteingustavo 0:0dee8840a1c0 70 @note: It is not used with synchronous NOR Flash memories. */
einsteingustavo 0:0dee8840a1c0 71
einsteingustavo 0:0dee8840a1c0 72 uint32_t FSMC_AddressHoldTime; /*!< Defines the number of HCLK cycles to configure
einsteingustavo 0:0dee8840a1c0 73 the duration of the address hold time.
einsteingustavo 0:0dee8840a1c0 74 This parameter can be a value between 0 and 0xF.
einsteingustavo 0:0dee8840a1c0 75 @note: It is not used with synchronous NOR Flash memories.*/
einsteingustavo 0:0dee8840a1c0 76
einsteingustavo 0:0dee8840a1c0 77 uint32_t FSMC_DataSetupTime; /*!< Defines the number of HCLK cycles to configure
einsteingustavo 0:0dee8840a1c0 78 the duration of the data setup time.
einsteingustavo 0:0dee8840a1c0 79 This parameter can be a value between 0 and 0xFF.
einsteingustavo 0:0dee8840a1c0 80 @note: It is used for SRAMs, ROMs and asynchronous multiplexed NOR Flash memories. */
einsteingustavo 0:0dee8840a1c0 81
einsteingustavo 0:0dee8840a1c0 82 uint32_t FSMC_BusTurnAroundDuration; /*!< Defines the number of HCLK cycles to configure
einsteingustavo 0:0dee8840a1c0 83 the duration of the bus turnaround.
einsteingustavo 0:0dee8840a1c0 84 This parameter can be a value between 0 and 0xF.
einsteingustavo 0:0dee8840a1c0 85 @note: It is only used for multiplexed NOR Flash memories. */
einsteingustavo 0:0dee8840a1c0 86
einsteingustavo 0:0dee8840a1c0 87 uint32_t FSMC_CLKDivision; /*!< Defines the period of CLK clock output signal, expressed in number of HCLK cycles.
einsteingustavo 0:0dee8840a1c0 88 This parameter can be a value between 1 and 0xF.
einsteingustavo 0:0dee8840a1c0 89 @note: This parameter is not used for asynchronous NOR Flash, SRAM or ROM accesses. */
einsteingustavo 0:0dee8840a1c0 90
einsteingustavo 0:0dee8840a1c0 91 uint32_t FSMC_DataLatency; /*!< Defines the number of memory clock cycles to issue
einsteingustavo 0:0dee8840a1c0 92 to the memory before getting the first data.
einsteingustavo 0:0dee8840a1c0 93 The value of this parameter depends on the memory type as shown below:
einsteingustavo 0:0dee8840a1c0 94 - It must be set to 0 in case of a CRAM
einsteingustavo 0:0dee8840a1c0 95 - It is don't care in asynchronous NOR, SRAM or ROM accesses
einsteingustavo 0:0dee8840a1c0 96 - It may assume a value between 0 and 0xF in NOR Flash memories
einsteingustavo 0:0dee8840a1c0 97 with synchronous burst mode enable */
einsteingustavo 0:0dee8840a1c0 98
einsteingustavo 0:0dee8840a1c0 99 uint32_t FSMC_AccessMode; /*!< Specifies the asynchronous access mode.
einsteingustavo 0:0dee8840a1c0 100 This parameter can be a value of @ref FSMC_Access_Mode */
einsteingustavo 0:0dee8840a1c0 101 }FSMC_NORSRAMTimingInitTypeDef;
einsteingustavo 0:0dee8840a1c0 102
einsteingustavo 0:0dee8840a1c0 103 /**
einsteingustavo 0:0dee8840a1c0 104 * @brief FSMC NOR/SRAM Init structure definition
einsteingustavo 0:0dee8840a1c0 105 */
einsteingustavo 0:0dee8840a1c0 106
einsteingustavo 0:0dee8840a1c0 107 typedef struct
einsteingustavo 0:0dee8840a1c0 108 {
einsteingustavo 0:0dee8840a1c0 109 uint32_t FSMC_Bank; /*!< Specifies the NOR/SRAM memory bank that will be used.
einsteingustavo 0:0dee8840a1c0 110 This parameter can be a value of @ref FSMC_NORSRAM_Bank */
einsteingustavo 0:0dee8840a1c0 111
einsteingustavo 0:0dee8840a1c0 112 uint32_t FSMC_DataAddressMux; /*!< Specifies whether the address and data values are
einsteingustavo 0:0dee8840a1c0 113 multiplexed on the databus or not.
einsteingustavo 0:0dee8840a1c0 114 This parameter can be a value of @ref FSMC_Data_Address_Bus_Multiplexing */
einsteingustavo 0:0dee8840a1c0 115
einsteingustavo 0:0dee8840a1c0 116 uint32_t FSMC_MemoryType; /*!< Specifies the type of external memory attached to
einsteingustavo 0:0dee8840a1c0 117 the corresponding memory bank.
einsteingustavo 0:0dee8840a1c0 118 This parameter can be a value of @ref FSMC_Memory_Type */
einsteingustavo 0:0dee8840a1c0 119
einsteingustavo 0:0dee8840a1c0 120 uint32_t FSMC_MemoryDataWidth; /*!< Specifies the external memory device width.
einsteingustavo 0:0dee8840a1c0 121 This parameter can be a value of @ref FSMC_Data_Width */
einsteingustavo 0:0dee8840a1c0 122
einsteingustavo 0:0dee8840a1c0 123 uint32_t FSMC_BurstAccessMode; /*!< Enables or disables the burst access mode for Flash memory,
einsteingustavo 0:0dee8840a1c0 124 valid only with synchronous burst Flash memories.
einsteingustavo 0:0dee8840a1c0 125 This parameter can be a value of @ref FSMC_Burst_Access_Mode */
einsteingustavo 0:0dee8840a1c0 126
einsteingustavo 0:0dee8840a1c0 127 uint32_t FSMC_AsynchronousWait; /*!< Enables or disables wait signal during asynchronous transfers,
einsteingustavo 0:0dee8840a1c0 128 valid only with asynchronous Flash memories.
einsteingustavo 0:0dee8840a1c0 129 This parameter can be a value of @ref FSMC_AsynchronousWait */
einsteingustavo 0:0dee8840a1c0 130
einsteingustavo 0:0dee8840a1c0 131 uint32_t FSMC_WaitSignalPolarity; /*!< Specifies the wait signal polarity, valid only when accessing
einsteingustavo 0:0dee8840a1c0 132 the Flash memory in burst mode.
einsteingustavo 0:0dee8840a1c0 133 This parameter can be a value of @ref FSMC_Wait_Signal_Polarity */
einsteingustavo 0:0dee8840a1c0 134
einsteingustavo 0:0dee8840a1c0 135 uint32_t FSMC_WrapMode; /*!< Enables or disables the Wrapped burst access mode for Flash
einsteingustavo 0:0dee8840a1c0 136 memory, valid only when accessing Flash memories in burst mode.
einsteingustavo 0:0dee8840a1c0 137 This parameter can be a value of @ref FSMC_Wrap_Mode */
einsteingustavo 0:0dee8840a1c0 138
einsteingustavo 0:0dee8840a1c0 139 uint32_t FSMC_WaitSignalActive; /*!< Specifies if the wait signal is asserted by the memory one
einsteingustavo 0:0dee8840a1c0 140 clock cycle before the wait state or during the wait state,
einsteingustavo 0:0dee8840a1c0 141 valid only when accessing memories in burst mode.
einsteingustavo 0:0dee8840a1c0 142 This parameter can be a value of @ref FSMC_Wait_Timing */
einsteingustavo 0:0dee8840a1c0 143
einsteingustavo 0:0dee8840a1c0 144 uint32_t FSMC_WriteOperation; /*!< Enables or disables the write operation in the selected bank by the FSMC.
einsteingustavo 0:0dee8840a1c0 145 This parameter can be a value of @ref FSMC_Write_Operation */
einsteingustavo 0:0dee8840a1c0 146
einsteingustavo 0:0dee8840a1c0 147 uint32_t FSMC_WaitSignal; /*!< Enables or disables the wait-state insertion via wait
einsteingustavo 0:0dee8840a1c0 148 signal, valid for Flash memory access in burst mode.
einsteingustavo 0:0dee8840a1c0 149 This parameter can be a value of @ref FSMC_Wait_Signal */
einsteingustavo 0:0dee8840a1c0 150
einsteingustavo 0:0dee8840a1c0 151 uint32_t FSMC_ExtendedMode; /*!< Enables or disables the extended mode.
einsteingustavo 0:0dee8840a1c0 152 This parameter can be a value of @ref FSMC_Extended_Mode */
einsteingustavo 0:0dee8840a1c0 153
einsteingustavo 0:0dee8840a1c0 154 uint32_t FSMC_WriteBurst; /*!< Enables or disables the write burst operation.
einsteingustavo 0:0dee8840a1c0 155 This parameter can be a value of @ref FSMC_Write_Burst */
einsteingustavo 0:0dee8840a1c0 156
einsteingustavo 0:0dee8840a1c0 157 FSMC_NORSRAMTimingInitTypeDef* FSMC_ReadWriteTimingStruct; /*!< Timing Parameters for write and read access if the ExtendedMode is not used*/
einsteingustavo 0:0dee8840a1c0 158
einsteingustavo 0:0dee8840a1c0 159 FSMC_NORSRAMTimingInitTypeDef* FSMC_WriteTimingStruct; /*!< Timing Parameters for write access if the ExtendedMode is used*/
einsteingustavo 0:0dee8840a1c0 160 }FSMC_NORSRAMInitTypeDef;
einsteingustavo 0:0dee8840a1c0 161
einsteingustavo 0:0dee8840a1c0 162 /**
einsteingustavo 0:0dee8840a1c0 163 * @brief Timing parameters For FSMC NAND and PCCARD Banks
einsteingustavo 0:0dee8840a1c0 164 */
einsteingustavo 0:0dee8840a1c0 165
einsteingustavo 0:0dee8840a1c0 166 typedef struct
einsteingustavo 0:0dee8840a1c0 167 {
einsteingustavo 0:0dee8840a1c0 168 uint32_t FSMC_SetupTime; /*!< Defines the number of HCLK cycles to setup address before
einsteingustavo 0:0dee8840a1c0 169 the command assertion for NAND-Flash read or write access
einsteingustavo 0:0dee8840a1c0 170 to common/Attribute or I/O memory space (depending on
einsteingustavo 0:0dee8840a1c0 171 the memory space timing to be configured).
einsteingustavo 0:0dee8840a1c0 172 This parameter can be a value between 0 and 0xFF.*/
einsteingustavo 0:0dee8840a1c0 173
einsteingustavo 0:0dee8840a1c0 174 uint32_t FSMC_WaitSetupTime; /*!< Defines the minimum number of HCLK cycles to assert the
einsteingustavo 0:0dee8840a1c0 175 command for NAND-Flash read or write access to
einsteingustavo 0:0dee8840a1c0 176 common/Attribute or I/O memory space (depending on the
einsteingustavo 0:0dee8840a1c0 177 memory space timing to be configured).
einsteingustavo 0:0dee8840a1c0 178 This parameter can be a number between 0x00 and 0xFF */
einsteingustavo 0:0dee8840a1c0 179
einsteingustavo 0:0dee8840a1c0 180 uint32_t FSMC_HoldSetupTime; /*!< Defines the number of HCLK clock cycles to hold address
einsteingustavo 0:0dee8840a1c0 181 (and data for write access) after the command deassertion
einsteingustavo 0:0dee8840a1c0 182 for NAND-Flash read or write access to common/Attribute
einsteingustavo 0:0dee8840a1c0 183 or I/O memory space (depending on the memory space timing
einsteingustavo 0:0dee8840a1c0 184 to be configured).
einsteingustavo 0:0dee8840a1c0 185 This parameter can be a number between 0x00 and 0xFF */
einsteingustavo 0:0dee8840a1c0 186
einsteingustavo 0:0dee8840a1c0 187 uint32_t FSMC_HiZSetupTime; /*!< Defines the number of HCLK clock cycles during which the
einsteingustavo 0:0dee8840a1c0 188 databus is kept in HiZ after the start of a NAND-Flash
einsteingustavo 0:0dee8840a1c0 189 write access to common/Attribute or I/O memory space (depending
einsteingustavo 0:0dee8840a1c0 190 on the memory space timing to be configured).
einsteingustavo 0:0dee8840a1c0 191 This parameter can be a number between 0x00 and 0xFF */
einsteingustavo 0:0dee8840a1c0 192 }FSMC_NAND_PCCARDTimingInitTypeDef;
einsteingustavo 0:0dee8840a1c0 193
einsteingustavo 0:0dee8840a1c0 194 /**
einsteingustavo 0:0dee8840a1c0 195 * @brief FSMC NAND Init structure definition
einsteingustavo 0:0dee8840a1c0 196 */
einsteingustavo 0:0dee8840a1c0 197
einsteingustavo 0:0dee8840a1c0 198 typedef struct
einsteingustavo 0:0dee8840a1c0 199 {
einsteingustavo 0:0dee8840a1c0 200 uint32_t FSMC_Bank; /*!< Specifies the NAND memory bank that will be used.
einsteingustavo 0:0dee8840a1c0 201 This parameter can be a value of @ref FSMC_NAND_Bank */
einsteingustavo 0:0dee8840a1c0 202
einsteingustavo 0:0dee8840a1c0 203 uint32_t FSMC_Waitfeature; /*!< Enables or disables the Wait feature for the NAND Memory Bank.
einsteingustavo 0:0dee8840a1c0 204 This parameter can be any value of @ref FSMC_Wait_feature */
einsteingustavo 0:0dee8840a1c0 205
einsteingustavo 0:0dee8840a1c0 206 uint32_t FSMC_MemoryDataWidth; /*!< Specifies the external memory device width.
einsteingustavo 0:0dee8840a1c0 207 This parameter can be any value of @ref FSMC_Data_Width */
einsteingustavo 0:0dee8840a1c0 208
einsteingustavo 0:0dee8840a1c0 209 uint32_t FSMC_ECC; /*!< Enables or disables the ECC computation.
einsteingustavo 0:0dee8840a1c0 210 This parameter can be any value of @ref FSMC_ECC */
einsteingustavo 0:0dee8840a1c0 211
einsteingustavo 0:0dee8840a1c0 212 uint32_t FSMC_ECCPageSize; /*!< Defines the page size for the extended ECC.
einsteingustavo 0:0dee8840a1c0 213 This parameter can be any value of @ref FSMC_ECC_Page_Size */
einsteingustavo 0:0dee8840a1c0 214
einsteingustavo 0:0dee8840a1c0 215 uint32_t FSMC_TCLRSetupTime; /*!< Defines the number of HCLK cycles to configure the
einsteingustavo 0:0dee8840a1c0 216 delay between CLE low and RE low.
einsteingustavo 0:0dee8840a1c0 217 This parameter can be a value between 0 and 0xFF. */
einsteingustavo 0:0dee8840a1c0 218
einsteingustavo 0:0dee8840a1c0 219 uint32_t FSMC_TARSetupTime; /*!< Defines the number of HCLK cycles to configure the
einsteingustavo 0:0dee8840a1c0 220 delay between ALE low and RE low.
einsteingustavo 0:0dee8840a1c0 221 This parameter can be a number between 0x0 and 0xFF */
einsteingustavo 0:0dee8840a1c0 222
einsteingustavo 0:0dee8840a1c0 223 FSMC_NAND_PCCARDTimingInitTypeDef* FSMC_CommonSpaceTimingStruct; /*!< FSMC Common Space Timing */
einsteingustavo 0:0dee8840a1c0 224
einsteingustavo 0:0dee8840a1c0 225 FSMC_NAND_PCCARDTimingInitTypeDef* FSMC_AttributeSpaceTimingStruct; /*!< FSMC Attribute Space Timing */
einsteingustavo 0:0dee8840a1c0 226 }FSMC_NANDInitTypeDef;
einsteingustavo 0:0dee8840a1c0 227
einsteingustavo 0:0dee8840a1c0 228 /**
einsteingustavo 0:0dee8840a1c0 229 * @brief FSMC PCCARD Init structure definition
einsteingustavo 0:0dee8840a1c0 230 */
einsteingustavo 0:0dee8840a1c0 231
einsteingustavo 0:0dee8840a1c0 232 typedef struct
einsteingustavo 0:0dee8840a1c0 233 {
einsteingustavo 0:0dee8840a1c0 234 uint32_t FSMC_Waitfeature; /*!< Enables or disables the Wait feature for the Memory Bank.
einsteingustavo 0:0dee8840a1c0 235 This parameter can be any value of @ref FSMC_Wait_feature */
einsteingustavo 0:0dee8840a1c0 236
einsteingustavo 0:0dee8840a1c0 237 uint32_t FSMC_TCLRSetupTime; /*!< Defines the number of HCLK cycles to configure the
einsteingustavo 0:0dee8840a1c0 238 delay between CLE low and RE low.
einsteingustavo 0:0dee8840a1c0 239 This parameter can be a value between 0 and 0xFF. */
einsteingustavo 0:0dee8840a1c0 240
einsteingustavo 0:0dee8840a1c0 241 uint32_t FSMC_TARSetupTime; /*!< Defines the number of HCLK cycles to configure the
einsteingustavo 0:0dee8840a1c0 242 delay between ALE low and RE low.
einsteingustavo 0:0dee8840a1c0 243 This parameter can be a number between 0x0 and 0xFF */
einsteingustavo 0:0dee8840a1c0 244
einsteingustavo 0:0dee8840a1c0 245
einsteingustavo 0:0dee8840a1c0 246 FSMC_NAND_PCCARDTimingInitTypeDef* FSMC_CommonSpaceTimingStruct; /*!< FSMC Common Space Timing */
einsteingustavo 0:0dee8840a1c0 247
einsteingustavo 0:0dee8840a1c0 248 FSMC_NAND_PCCARDTimingInitTypeDef* FSMC_AttributeSpaceTimingStruct; /*!< FSMC Attribute Space Timing */
einsteingustavo 0:0dee8840a1c0 249
einsteingustavo 0:0dee8840a1c0 250 FSMC_NAND_PCCARDTimingInitTypeDef* FSMC_IOSpaceTimingStruct; /*!< FSMC IO Space Timing */
einsteingustavo 0:0dee8840a1c0 251 }FSMC_PCCARDInitTypeDef;
einsteingustavo 0:0dee8840a1c0 252
einsteingustavo 0:0dee8840a1c0 253 /**
einsteingustavo 0:0dee8840a1c0 254 * @}
einsteingustavo 0:0dee8840a1c0 255 */
einsteingustavo 0:0dee8840a1c0 256
einsteingustavo 0:0dee8840a1c0 257 /** @defgroup FSMC_Exported_Constants
einsteingustavo 0:0dee8840a1c0 258 * @{
einsteingustavo 0:0dee8840a1c0 259 */
einsteingustavo 0:0dee8840a1c0 260
einsteingustavo 0:0dee8840a1c0 261 /** @defgroup FSMC_NORSRAM_Bank
einsteingustavo 0:0dee8840a1c0 262 * @{
einsteingustavo 0:0dee8840a1c0 263 */
einsteingustavo 0:0dee8840a1c0 264 #define FSMC_Bank1_NORSRAM1 ((uint32_t)0x00000000)
einsteingustavo 0:0dee8840a1c0 265 #define FSMC_Bank1_NORSRAM2 ((uint32_t)0x00000002)
einsteingustavo 0:0dee8840a1c0 266 #define FSMC_Bank1_NORSRAM3 ((uint32_t)0x00000004)
einsteingustavo 0:0dee8840a1c0 267 #define FSMC_Bank1_NORSRAM4 ((uint32_t)0x00000006)
einsteingustavo 0:0dee8840a1c0 268 /**
einsteingustavo 0:0dee8840a1c0 269 * @}
einsteingustavo 0:0dee8840a1c0 270 */
einsteingustavo 0:0dee8840a1c0 271
einsteingustavo 0:0dee8840a1c0 272 /** @defgroup FSMC_NAND_Bank
einsteingustavo 0:0dee8840a1c0 273 * @{
einsteingustavo 0:0dee8840a1c0 274 */
einsteingustavo 0:0dee8840a1c0 275 #define FSMC_Bank2_NAND ((uint32_t)0x00000010)
einsteingustavo 0:0dee8840a1c0 276 #define FSMC_Bank3_NAND ((uint32_t)0x00000100)
einsteingustavo 0:0dee8840a1c0 277 /**
einsteingustavo 0:0dee8840a1c0 278 * @}
einsteingustavo 0:0dee8840a1c0 279 */
einsteingustavo 0:0dee8840a1c0 280
einsteingustavo 0:0dee8840a1c0 281 /** @defgroup FSMC_PCCARD_Bank
einsteingustavo 0:0dee8840a1c0 282 * @{
einsteingustavo 0:0dee8840a1c0 283 */
einsteingustavo 0:0dee8840a1c0 284 #define FSMC_Bank4_PCCARD ((uint32_t)0x00001000)
einsteingustavo 0:0dee8840a1c0 285 /**
einsteingustavo 0:0dee8840a1c0 286 * @}
einsteingustavo 0:0dee8840a1c0 287 */
einsteingustavo 0:0dee8840a1c0 288
einsteingustavo 0:0dee8840a1c0 289 #define IS_FSMC_NORSRAM_BANK(BANK) (((BANK) == FSMC_Bank1_NORSRAM1) || \
einsteingustavo 0:0dee8840a1c0 290 ((BANK) == FSMC_Bank1_NORSRAM2) || \
einsteingustavo 0:0dee8840a1c0 291 ((BANK) == FSMC_Bank1_NORSRAM3) || \
einsteingustavo 0:0dee8840a1c0 292 ((BANK) == FSMC_Bank1_NORSRAM4))
einsteingustavo 0:0dee8840a1c0 293
einsteingustavo 0:0dee8840a1c0 294 #define IS_FSMC_NAND_BANK(BANK) (((BANK) == FSMC_Bank2_NAND) || \
einsteingustavo 0:0dee8840a1c0 295 ((BANK) == FSMC_Bank3_NAND))
einsteingustavo 0:0dee8840a1c0 296
einsteingustavo 0:0dee8840a1c0 297 #define IS_FSMC_GETFLAG_BANK(BANK) (((BANK) == FSMC_Bank2_NAND) || \
einsteingustavo 0:0dee8840a1c0 298 ((BANK) == FSMC_Bank3_NAND) || \
einsteingustavo 0:0dee8840a1c0 299 ((BANK) == FSMC_Bank4_PCCARD))
einsteingustavo 0:0dee8840a1c0 300
einsteingustavo 0:0dee8840a1c0 301 #define IS_FSMC_IT_BANK(BANK) (((BANK) == FSMC_Bank2_NAND) || \
einsteingustavo 0:0dee8840a1c0 302 ((BANK) == FSMC_Bank3_NAND) || \
einsteingustavo 0:0dee8840a1c0 303 ((BANK) == FSMC_Bank4_PCCARD))
einsteingustavo 0:0dee8840a1c0 304
einsteingustavo 0:0dee8840a1c0 305 /** @defgroup NOR_SRAM_Controller
einsteingustavo 0:0dee8840a1c0 306 * @{
einsteingustavo 0:0dee8840a1c0 307 */
einsteingustavo 0:0dee8840a1c0 308
einsteingustavo 0:0dee8840a1c0 309 /** @defgroup FSMC_Data_Address_Bus_Multiplexing
einsteingustavo 0:0dee8840a1c0 310 * @{
einsteingustavo 0:0dee8840a1c0 311 */
einsteingustavo 0:0dee8840a1c0 312
einsteingustavo 0:0dee8840a1c0 313 #define FSMC_DataAddressMux_Disable ((uint32_t)0x00000000)
einsteingustavo 0:0dee8840a1c0 314 #define FSMC_DataAddressMux_Enable ((uint32_t)0x00000002)
einsteingustavo 0:0dee8840a1c0 315 #define IS_FSMC_MUX(MUX) (((MUX) == FSMC_DataAddressMux_Disable) || \
einsteingustavo 0:0dee8840a1c0 316 ((MUX) == FSMC_DataAddressMux_Enable))
einsteingustavo 0:0dee8840a1c0 317
einsteingustavo 0:0dee8840a1c0 318 /**
einsteingustavo 0:0dee8840a1c0 319 * @}
einsteingustavo 0:0dee8840a1c0 320 */
einsteingustavo 0:0dee8840a1c0 321
einsteingustavo 0:0dee8840a1c0 322 /** @defgroup FSMC_Memory_Type
einsteingustavo 0:0dee8840a1c0 323 * @{
einsteingustavo 0:0dee8840a1c0 324 */
einsteingustavo 0:0dee8840a1c0 325
einsteingustavo 0:0dee8840a1c0 326 #define FSMC_MemoryType_SRAM ((uint32_t)0x00000000)
einsteingustavo 0:0dee8840a1c0 327 #define FSMC_MemoryType_PSRAM ((uint32_t)0x00000004)
einsteingustavo 0:0dee8840a1c0 328 #define FSMC_MemoryType_NOR ((uint32_t)0x00000008)
einsteingustavo 0:0dee8840a1c0 329 #define IS_FSMC_MEMORY(MEMORY) (((MEMORY) == FSMC_MemoryType_SRAM) || \
einsteingustavo 0:0dee8840a1c0 330 ((MEMORY) == FSMC_MemoryType_PSRAM)|| \
einsteingustavo 0:0dee8840a1c0 331 ((MEMORY) == FSMC_MemoryType_NOR))
einsteingustavo 0:0dee8840a1c0 332
einsteingustavo 0:0dee8840a1c0 333 /**
einsteingustavo 0:0dee8840a1c0 334 * @}
einsteingustavo 0:0dee8840a1c0 335 */
einsteingustavo 0:0dee8840a1c0 336
einsteingustavo 0:0dee8840a1c0 337 /** @defgroup FSMC_Data_Width
einsteingustavo 0:0dee8840a1c0 338 * @{
einsteingustavo 0:0dee8840a1c0 339 */
einsteingustavo 0:0dee8840a1c0 340
einsteingustavo 0:0dee8840a1c0 341 #define FSMC_MemoryDataWidth_8b ((uint32_t)0x00000000)
einsteingustavo 0:0dee8840a1c0 342 #define FSMC_MemoryDataWidth_16b ((uint32_t)0x00000010)
einsteingustavo 0:0dee8840a1c0 343 #define IS_FSMC_MEMORY_WIDTH(WIDTH) (((WIDTH) == FSMC_MemoryDataWidth_8b) || \
einsteingustavo 0:0dee8840a1c0 344 ((WIDTH) == FSMC_MemoryDataWidth_16b))
einsteingustavo 0:0dee8840a1c0 345
einsteingustavo 0:0dee8840a1c0 346 /**
einsteingustavo 0:0dee8840a1c0 347 * @}
einsteingustavo 0:0dee8840a1c0 348 */
einsteingustavo 0:0dee8840a1c0 349
einsteingustavo 0:0dee8840a1c0 350 /** @defgroup FSMC_Burst_Access_Mode
einsteingustavo 0:0dee8840a1c0 351 * @{
einsteingustavo 0:0dee8840a1c0 352 */
einsteingustavo 0:0dee8840a1c0 353
einsteingustavo 0:0dee8840a1c0 354 #define FSMC_BurstAccessMode_Disable ((uint32_t)0x00000000)
einsteingustavo 0:0dee8840a1c0 355 #define FSMC_BurstAccessMode_Enable ((uint32_t)0x00000100)
einsteingustavo 0:0dee8840a1c0 356 #define IS_FSMC_BURSTMODE(STATE) (((STATE) == FSMC_BurstAccessMode_Disable) || \
einsteingustavo 0:0dee8840a1c0 357 ((STATE) == FSMC_BurstAccessMode_Enable))
einsteingustavo 0:0dee8840a1c0 358 /**
einsteingustavo 0:0dee8840a1c0 359 * @}
einsteingustavo 0:0dee8840a1c0 360 */
einsteingustavo 0:0dee8840a1c0 361
einsteingustavo 0:0dee8840a1c0 362 /** @defgroup FSMC_AsynchronousWait
einsteingustavo 0:0dee8840a1c0 363 * @{
einsteingustavo 0:0dee8840a1c0 364 */
einsteingustavo 0:0dee8840a1c0 365 #define FSMC_AsynchronousWait_Disable ((uint32_t)0x00000000)
einsteingustavo 0:0dee8840a1c0 366 #define FSMC_AsynchronousWait_Enable ((uint32_t)0x00008000)
einsteingustavo 0:0dee8840a1c0 367 #define IS_FSMC_ASYNWAIT(STATE) (((STATE) == FSMC_AsynchronousWait_Disable) || \
einsteingustavo 0:0dee8840a1c0 368 ((STATE) == FSMC_AsynchronousWait_Enable))
einsteingustavo 0:0dee8840a1c0 369
einsteingustavo 0:0dee8840a1c0 370 /**
einsteingustavo 0:0dee8840a1c0 371 * @}
einsteingustavo 0:0dee8840a1c0 372 */
einsteingustavo 0:0dee8840a1c0 373
einsteingustavo 0:0dee8840a1c0 374 /** @defgroup FSMC_Wait_Signal_Polarity
einsteingustavo 0:0dee8840a1c0 375 * @{
einsteingustavo 0:0dee8840a1c0 376 */
einsteingustavo 0:0dee8840a1c0 377
einsteingustavo 0:0dee8840a1c0 378 #define FSMC_WaitSignalPolarity_Low ((uint32_t)0x00000000)
einsteingustavo 0:0dee8840a1c0 379 #define FSMC_WaitSignalPolarity_High ((uint32_t)0x00000200)
einsteingustavo 0:0dee8840a1c0 380 #define IS_FSMC_WAIT_POLARITY(POLARITY) (((POLARITY) == FSMC_WaitSignalPolarity_Low) || \
einsteingustavo 0:0dee8840a1c0 381 ((POLARITY) == FSMC_WaitSignalPolarity_High))
einsteingustavo 0:0dee8840a1c0 382
einsteingustavo 0:0dee8840a1c0 383 /**
einsteingustavo 0:0dee8840a1c0 384 * @}
einsteingustavo 0:0dee8840a1c0 385 */
einsteingustavo 0:0dee8840a1c0 386
einsteingustavo 0:0dee8840a1c0 387 /** @defgroup FSMC_Wrap_Mode
einsteingustavo 0:0dee8840a1c0 388 * @{
einsteingustavo 0:0dee8840a1c0 389 */
einsteingustavo 0:0dee8840a1c0 390
einsteingustavo 0:0dee8840a1c0 391 #define FSMC_WrapMode_Disable ((uint32_t)0x00000000)
einsteingustavo 0:0dee8840a1c0 392 #define FSMC_WrapMode_Enable ((uint32_t)0x00000400)
einsteingustavo 0:0dee8840a1c0 393 #define IS_FSMC_WRAP_MODE(MODE) (((MODE) == FSMC_WrapMode_Disable) || \
einsteingustavo 0:0dee8840a1c0 394 ((MODE) == FSMC_WrapMode_Enable))
einsteingustavo 0:0dee8840a1c0 395
einsteingustavo 0:0dee8840a1c0 396 /**
einsteingustavo 0:0dee8840a1c0 397 * @}
einsteingustavo 0:0dee8840a1c0 398 */
einsteingustavo 0:0dee8840a1c0 399
einsteingustavo 0:0dee8840a1c0 400 /** @defgroup FSMC_Wait_Timing
einsteingustavo 0:0dee8840a1c0 401 * @{
einsteingustavo 0:0dee8840a1c0 402 */
einsteingustavo 0:0dee8840a1c0 403
einsteingustavo 0:0dee8840a1c0 404 #define FSMC_WaitSignalActive_BeforeWaitState ((uint32_t)0x00000000)
einsteingustavo 0:0dee8840a1c0 405 #define FSMC_WaitSignalActive_DuringWaitState ((uint32_t)0x00000800)
einsteingustavo 0:0dee8840a1c0 406 #define IS_FSMC_WAIT_SIGNAL_ACTIVE(ACTIVE) (((ACTIVE) == FSMC_WaitSignalActive_BeforeWaitState) || \
einsteingustavo 0:0dee8840a1c0 407 ((ACTIVE) == FSMC_WaitSignalActive_DuringWaitState))
einsteingustavo 0:0dee8840a1c0 408
einsteingustavo 0:0dee8840a1c0 409 /**
einsteingustavo 0:0dee8840a1c0 410 * @}
einsteingustavo 0:0dee8840a1c0 411 */
einsteingustavo 0:0dee8840a1c0 412
einsteingustavo 0:0dee8840a1c0 413 /** @defgroup FSMC_Write_Operation
einsteingustavo 0:0dee8840a1c0 414 * @{
einsteingustavo 0:0dee8840a1c0 415 */
einsteingustavo 0:0dee8840a1c0 416
einsteingustavo 0:0dee8840a1c0 417 #define FSMC_WriteOperation_Disable ((uint32_t)0x00000000)
einsteingustavo 0:0dee8840a1c0 418 #define FSMC_WriteOperation_Enable ((uint32_t)0x00001000)
einsteingustavo 0:0dee8840a1c0 419 #define IS_FSMC_WRITE_OPERATION(OPERATION) (((OPERATION) == FSMC_WriteOperation_Disable) || \
einsteingustavo 0:0dee8840a1c0 420 ((OPERATION) == FSMC_WriteOperation_Enable))
einsteingustavo 0:0dee8840a1c0 421
einsteingustavo 0:0dee8840a1c0 422 /**
einsteingustavo 0:0dee8840a1c0 423 * @}
einsteingustavo 0:0dee8840a1c0 424 */
einsteingustavo 0:0dee8840a1c0 425
einsteingustavo 0:0dee8840a1c0 426 /** @defgroup FSMC_Wait_Signal
einsteingustavo 0:0dee8840a1c0 427 * @{
einsteingustavo 0:0dee8840a1c0 428 */
einsteingustavo 0:0dee8840a1c0 429
einsteingustavo 0:0dee8840a1c0 430 #define FSMC_WaitSignal_Disable ((uint32_t)0x00000000)
einsteingustavo 0:0dee8840a1c0 431 #define FSMC_WaitSignal_Enable ((uint32_t)0x00002000)
einsteingustavo 0:0dee8840a1c0 432 #define IS_FSMC_WAITE_SIGNAL(SIGNAL) (((SIGNAL) == FSMC_WaitSignal_Disable) || \
einsteingustavo 0:0dee8840a1c0 433 ((SIGNAL) == FSMC_WaitSignal_Enable))
einsteingustavo 0:0dee8840a1c0 434 /**
einsteingustavo 0:0dee8840a1c0 435 * @}
einsteingustavo 0:0dee8840a1c0 436 */
einsteingustavo 0:0dee8840a1c0 437
einsteingustavo 0:0dee8840a1c0 438 /** @defgroup FSMC_Extended_Mode
einsteingustavo 0:0dee8840a1c0 439 * @{
einsteingustavo 0:0dee8840a1c0 440 */
einsteingustavo 0:0dee8840a1c0 441
einsteingustavo 0:0dee8840a1c0 442 #define FSMC_ExtendedMode_Disable ((uint32_t)0x00000000)
einsteingustavo 0:0dee8840a1c0 443 #define FSMC_ExtendedMode_Enable ((uint32_t)0x00004000)
einsteingustavo 0:0dee8840a1c0 444
einsteingustavo 0:0dee8840a1c0 445 #define IS_FSMC_EXTENDED_MODE(MODE) (((MODE) == FSMC_ExtendedMode_Disable) || \
einsteingustavo 0:0dee8840a1c0 446 ((MODE) == FSMC_ExtendedMode_Enable))
einsteingustavo 0:0dee8840a1c0 447
einsteingustavo 0:0dee8840a1c0 448 /**
einsteingustavo 0:0dee8840a1c0 449 * @}
einsteingustavo 0:0dee8840a1c0 450 */
einsteingustavo 0:0dee8840a1c0 451
einsteingustavo 0:0dee8840a1c0 452 /** @defgroup FSMC_Write_Burst
einsteingustavo 0:0dee8840a1c0 453 * @{
einsteingustavo 0:0dee8840a1c0 454 */
einsteingustavo 0:0dee8840a1c0 455
einsteingustavo 0:0dee8840a1c0 456 #define FSMC_WriteBurst_Disable ((uint32_t)0x00000000)
einsteingustavo 0:0dee8840a1c0 457 #define FSMC_WriteBurst_Enable ((uint32_t)0x00080000)
einsteingustavo 0:0dee8840a1c0 458 #define IS_FSMC_WRITE_BURST(BURST) (((BURST) == FSMC_WriteBurst_Disable) || \
einsteingustavo 0:0dee8840a1c0 459 ((BURST) == FSMC_WriteBurst_Enable))
einsteingustavo 0:0dee8840a1c0 460 /**
einsteingustavo 0:0dee8840a1c0 461 * @}
einsteingustavo 0:0dee8840a1c0 462 */
einsteingustavo 0:0dee8840a1c0 463
einsteingustavo 0:0dee8840a1c0 464 /** @defgroup FSMC_Address_Setup_Time
einsteingustavo 0:0dee8840a1c0 465 * @{
einsteingustavo 0:0dee8840a1c0 466 */
einsteingustavo 0:0dee8840a1c0 467
einsteingustavo 0:0dee8840a1c0 468 #define IS_FSMC_ADDRESS_SETUP_TIME(TIME) ((TIME) <= 0xF)
einsteingustavo 0:0dee8840a1c0 469
einsteingustavo 0:0dee8840a1c0 470 /**
einsteingustavo 0:0dee8840a1c0 471 * @}
einsteingustavo 0:0dee8840a1c0 472 */
einsteingustavo 0:0dee8840a1c0 473
einsteingustavo 0:0dee8840a1c0 474 /** @defgroup FSMC_Address_Hold_Time
einsteingustavo 0:0dee8840a1c0 475 * @{
einsteingustavo 0:0dee8840a1c0 476 */
einsteingustavo 0:0dee8840a1c0 477
einsteingustavo 0:0dee8840a1c0 478 #define IS_FSMC_ADDRESS_HOLD_TIME(TIME) ((TIME) <= 0xF)
einsteingustavo 0:0dee8840a1c0 479
einsteingustavo 0:0dee8840a1c0 480 /**
einsteingustavo 0:0dee8840a1c0 481 * @}
einsteingustavo 0:0dee8840a1c0 482 */
einsteingustavo 0:0dee8840a1c0 483
einsteingustavo 0:0dee8840a1c0 484 /** @defgroup FSMC_Data_Setup_Time
einsteingustavo 0:0dee8840a1c0 485 * @{
einsteingustavo 0:0dee8840a1c0 486 */
einsteingustavo 0:0dee8840a1c0 487
einsteingustavo 0:0dee8840a1c0 488 #define IS_FSMC_DATASETUP_TIME(TIME) (((TIME) > 0) && ((TIME) <= 0xFF))
einsteingustavo 0:0dee8840a1c0 489
einsteingustavo 0:0dee8840a1c0 490 /**
einsteingustavo 0:0dee8840a1c0 491 * @}
einsteingustavo 0:0dee8840a1c0 492 */
einsteingustavo 0:0dee8840a1c0 493
einsteingustavo 0:0dee8840a1c0 494 /** @defgroup FSMC_Bus_Turn_around_Duration
einsteingustavo 0:0dee8840a1c0 495 * @{
einsteingustavo 0:0dee8840a1c0 496 */
einsteingustavo 0:0dee8840a1c0 497
einsteingustavo 0:0dee8840a1c0 498 #define IS_FSMC_TURNAROUND_TIME(TIME) ((TIME) <= 0xF)
einsteingustavo 0:0dee8840a1c0 499
einsteingustavo 0:0dee8840a1c0 500 /**
einsteingustavo 0:0dee8840a1c0 501 * @}
einsteingustavo 0:0dee8840a1c0 502 */
einsteingustavo 0:0dee8840a1c0 503
einsteingustavo 0:0dee8840a1c0 504 /** @defgroup FSMC_CLK_Division
einsteingustavo 0:0dee8840a1c0 505 * @{
einsteingustavo 0:0dee8840a1c0 506 */
einsteingustavo 0:0dee8840a1c0 507
einsteingustavo 0:0dee8840a1c0 508 #define IS_FSMC_CLK_DIV(DIV) ((DIV) <= 0xF)
einsteingustavo 0:0dee8840a1c0 509
einsteingustavo 0:0dee8840a1c0 510 /**
einsteingustavo 0:0dee8840a1c0 511 * @}
einsteingustavo 0:0dee8840a1c0 512 */
einsteingustavo 0:0dee8840a1c0 513
einsteingustavo 0:0dee8840a1c0 514 /** @defgroup FSMC_Data_Latency
einsteingustavo 0:0dee8840a1c0 515 * @{
einsteingustavo 0:0dee8840a1c0 516 */
einsteingustavo 0:0dee8840a1c0 517
einsteingustavo 0:0dee8840a1c0 518 #define IS_FSMC_DATA_LATENCY(LATENCY) ((LATENCY) <= 0xF)
einsteingustavo 0:0dee8840a1c0 519
einsteingustavo 0:0dee8840a1c0 520 /**
einsteingustavo 0:0dee8840a1c0 521 * @}
einsteingustavo 0:0dee8840a1c0 522 */
einsteingustavo 0:0dee8840a1c0 523
einsteingustavo 0:0dee8840a1c0 524 /** @defgroup FSMC_Access_Mode
einsteingustavo 0:0dee8840a1c0 525 * @{
einsteingustavo 0:0dee8840a1c0 526 */
einsteingustavo 0:0dee8840a1c0 527
einsteingustavo 0:0dee8840a1c0 528 #define FSMC_AccessMode_A ((uint32_t)0x00000000)
einsteingustavo 0:0dee8840a1c0 529 #define FSMC_AccessMode_B ((uint32_t)0x10000000)
einsteingustavo 0:0dee8840a1c0 530 #define FSMC_AccessMode_C ((uint32_t)0x20000000)
einsteingustavo 0:0dee8840a1c0 531 #define FSMC_AccessMode_D ((uint32_t)0x30000000)
einsteingustavo 0:0dee8840a1c0 532 #define IS_FSMC_ACCESS_MODE(MODE) (((MODE) == FSMC_AccessMode_A) || \
einsteingustavo 0:0dee8840a1c0 533 ((MODE) == FSMC_AccessMode_B) || \
einsteingustavo 0:0dee8840a1c0 534 ((MODE) == FSMC_AccessMode_C) || \
einsteingustavo 0:0dee8840a1c0 535 ((MODE) == FSMC_AccessMode_D))
einsteingustavo 0:0dee8840a1c0 536
einsteingustavo 0:0dee8840a1c0 537 /**
einsteingustavo 0:0dee8840a1c0 538 * @}
einsteingustavo 0:0dee8840a1c0 539 */
einsteingustavo 0:0dee8840a1c0 540
einsteingustavo 0:0dee8840a1c0 541 /**
einsteingustavo 0:0dee8840a1c0 542 * @}
einsteingustavo 0:0dee8840a1c0 543 */
einsteingustavo 0:0dee8840a1c0 544
einsteingustavo 0:0dee8840a1c0 545 /** @defgroup NAND_PCCARD_Controller
einsteingustavo 0:0dee8840a1c0 546 * @{
einsteingustavo 0:0dee8840a1c0 547 */
einsteingustavo 0:0dee8840a1c0 548
einsteingustavo 0:0dee8840a1c0 549 /** @defgroup FSMC_Wait_feature
einsteingustavo 0:0dee8840a1c0 550 * @{
einsteingustavo 0:0dee8840a1c0 551 */
einsteingustavo 0:0dee8840a1c0 552
einsteingustavo 0:0dee8840a1c0 553 #define FSMC_Waitfeature_Disable ((uint32_t)0x00000000)
einsteingustavo 0:0dee8840a1c0 554 #define FSMC_Waitfeature_Enable ((uint32_t)0x00000002)
einsteingustavo 0:0dee8840a1c0 555 #define IS_FSMC_WAIT_FEATURE(FEATURE) (((FEATURE) == FSMC_Waitfeature_Disable) || \
einsteingustavo 0:0dee8840a1c0 556 ((FEATURE) == FSMC_Waitfeature_Enable))
einsteingustavo 0:0dee8840a1c0 557
einsteingustavo 0:0dee8840a1c0 558 /**
einsteingustavo 0:0dee8840a1c0 559 * @}
einsteingustavo 0:0dee8840a1c0 560 */
einsteingustavo 0:0dee8840a1c0 561
einsteingustavo 0:0dee8840a1c0 562
einsteingustavo 0:0dee8840a1c0 563 /** @defgroup FSMC_ECC
einsteingustavo 0:0dee8840a1c0 564 * @{
einsteingustavo 0:0dee8840a1c0 565 */
einsteingustavo 0:0dee8840a1c0 566
einsteingustavo 0:0dee8840a1c0 567 #define FSMC_ECC_Disable ((uint32_t)0x00000000)
einsteingustavo 0:0dee8840a1c0 568 #define FSMC_ECC_Enable ((uint32_t)0x00000040)
einsteingustavo 0:0dee8840a1c0 569 #define IS_FSMC_ECC_STATE(STATE) (((STATE) == FSMC_ECC_Disable) || \
einsteingustavo 0:0dee8840a1c0 570 ((STATE) == FSMC_ECC_Enable))
einsteingustavo 0:0dee8840a1c0 571
einsteingustavo 0:0dee8840a1c0 572 /**
einsteingustavo 0:0dee8840a1c0 573 * @}
einsteingustavo 0:0dee8840a1c0 574 */
einsteingustavo 0:0dee8840a1c0 575
einsteingustavo 0:0dee8840a1c0 576 /** @defgroup FSMC_ECC_Page_Size
einsteingustavo 0:0dee8840a1c0 577 * @{
einsteingustavo 0:0dee8840a1c0 578 */
einsteingustavo 0:0dee8840a1c0 579
einsteingustavo 0:0dee8840a1c0 580 #define FSMC_ECCPageSize_256Bytes ((uint32_t)0x00000000)
einsteingustavo 0:0dee8840a1c0 581 #define FSMC_ECCPageSize_512Bytes ((uint32_t)0x00020000)
einsteingustavo 0:0dee8840a1c0 582 #define FSMC_ECCPageSize_1024Bytes ((uint32_t)0x00040000)
einsteingustavo 0:0dee8840a1c0 583 #define FSMC_ECCPageSize_2048Bytes ((uint32_t)0x00060000)
einsteingustavo 0:0dee8840a1c0 584 #define FSMC_ECCPageSize_4096Bytes ((uint32_t)0x00080000)
einsteingustavo 0:0dee8840a1c0 585 #define FSMC_ECCPageSize_8192Bytes ((uint32_t)0x000A0000)
einsteingustavo 0:0dee8840a1c0 586 #define IS_FSMC_ECCPAGE_SIZE(SIZE) (((SIZE) == FSMC_ECCPageSize_256Bytes) || \
einsteingustavo 0:0dee8840a1c0 587 ((SIZE) == FSMC_ECCPageSize_512Bytes) || \
einsteingustavo 0:0dee8840a1c0 588 ((SIZE) == FSMC_ECCPageSize_1024Bytes) || \
einsteingustavo 0:0dee8840a1c0 589 ((SIZE) == FSMC_ECCPageSize_2048Bytes) || \
einsteingustavo 0:0dee8840a1c0 590 ((SIZE) == FSMC_ECCPageSize_4096Bytes) || \
einsteingustavo 0:0dee8840a1c0 591 ((SIZE) == FSMC_ECCPageSize_8192Bytes))
einsteingustavo 0:0dee8840a1c0 592
einsteingustavo 0:0dee8840a1c0 593 /**
einsteingustavo 0:0dee8840a1c0 594 * @}
einsteingustavo 0:0dee8840a1c0 595 */
einsteingustavo 0:0dee8840a1c0 596
einsteingustavo 0:0dee8840a1c0 597 /** @defgroup FSMC_TCLR_Setup_Time
einsteingustavo 0:0dee8840a1c0 598 * @{
einsteingustavo 0:0dee8840a1c0 599 */
einsteingustavo 0:0dee8840a1c0 600
einsteingustavo 0:0dee8840a1c0 601 #define IS_FSMC_TCLR_TIME(TIME) ((TIME) <= 0xFF)
einsteingustavo 0:0dee8840a1c0 602
einsteingustavo 0:0dee8840a1c0 603 /**
einsteingustavo 0:0dee8840a1c0 604 * @}
einsteingustavo 0:0dee8840a1c0 605 */
einsteingustavo 0:0dee8840a1c0 606
einsteingustavo 0:0dee8840a1c0 607 /** @defgroup FSMC_TAR_Setup_Time
einsteingustavo 0:0dee8840a1c0 608 * @{
einsteingustavo 0:0dee8840a1c0 609 */
einsteingustavo 0:0dee8840a1c0 610
einsteingustavo 0:0dee8840a1c0 611 #define IS_FSMC_TAR_TIME(TIME) ((TIME) <= 0xFF)
einsteingustavo 0:0dee8840a1c0 612
einsteingustavo 0:0dee8840a1c0 613 /**
einsteingustavo 0:0dee8840a1c0 614 * @}
einsteingustavo 0:0dee8840a1c0 615 */
einsteingustavo 0:0dee8840a1c0 616
einsteingustavo 0:0dee8840a1c0 617 /** @defgroup FSMC_Setup_Time
einsteingustavo 0:0dee8840a1c0 618 * @{
einsteingustavo 0:0dee8840a1c0 619 */
einsteingustavo 0:0dee8840a1c0 620
einsteingustavo 0:0dee8840a1c0 621 #define IS_FSMC_SETUP_TIME(TIME) ((TIME) <= 0xFF)
einsteingustavo 0:0dee8840a1c0 622
einsteingustavo 0:0dee8840a1c0 623 /**
einsteingustavo 0:0dee8840a1c0 624 * @}
einsteingustavo 0:0dee8840a1c0 625 */
einsteingustavo 0:0dee8840a1c0 626
einsteingustavo 0:0dee8840a1c0 627 /** @defgroup FSMC_Wait_Setup_Time
einsteingustavo 0:0dee8840a1c0 628 * @{
einsteingustavo 0:0dee8840a1c0 629 */
einsteingustavo 0:0dee8840a1c0 630
einsteingustavo 0:0dee8840a1c0 631 #define IS_FSMC_WAIT_TIME(TIME) ((TIME) <= 0xFF)
einsteingustavo 0:0dee8840a1c0 632
einsteingustavo 0:0dee8840a1c0 633 /**
einsteingustavo 0:0dee8840a1c0 634 * @}
einsteingustavo 0:0dee8840a1c0 635 */
einsteingustavo 0:0dee8840a1c0 636
einsteingustavo 0:0dee8840a1c0 637 /** @defgroup FSMC_Hold_Setup_Time
einsteingustavo 0:0dee8840a1c0 638 * @{
einsteingustavo 0:0dee8840a1c0 639 */
einsteingustavo 0:0dee8840a1c0 640
einsteingustavo 0:0dee8840a1c0 641 #define IS_FSMC_HOLD_TIME(TIME) ((TIME) <= 0xFF)
einsteingustavo 0:0dee8840a1c0 642
einsteingustavo 0:0dee8840a1c0 643 /**
einsteingustavo 0:0dee8840a1c0 644 * @}
einsteingustavo 0:0dee8840a1c0 645 */
einsteingustavo 0:0dee8840a1c0 646
einsteingustavo 0:0dee8840a1c0 647 /** @defgroup FSMC_HiZ_Setup_Time
einsteingustavo 0:0dee8840a1c0 648 * @{
einsteingustavo 0:0dee8840a1c0 649 */
einsteingustavo 0:0dee8840a1c0 650
einsteingustavo 0:0dee8840a1c0 651 #define IS_FSMC_HIZ_TIME(TIME) ((TIME) <= 0xFF)
einsteingustavo 0:0dee8840a1c0 652
einsteingustavo 0:0dee8840a1c0 653 /**
einsteingustavo 0:0dee8840a1c0 654 * @}
einsteingustavo 0:0dee8840a1c0 655 */
einsteingustavo 0:0dee8840a1c0 656
einsteingustavo 0:0dee8840a1c0 657 /** @defgroup FSMC_Interrupt_sources
einsteingustavo 0:0dee8840a1c0 658 * @{
einsteingustavo 0:0dee8840a1c0 659 */
einsteingustavo 0:0dee8840a1c0 660
einsteingustavo 0:0dee8840a1c0 661 #define FSMC_IT_RisingEdge ((uint32_t)0x00000008)
einsteingustavo 0:0dee8840a1c0 662 #define FSMC_IT_Level ((uint32_t)0x00000010)
einsteingustavo 0:0dee8840a1c0 663 #define FSMC_IT_FallingEdge ((uint32_t)0x00000020)
einsteingustavo 0:0dee8840a1c0 664 #define IS_FSMC_IT(IT) ((((IT) & (uint32_t)0xFFFFFFC7) == 0x00000000) && ((IT) != 0x00000000))
einsteingustavo 0:0dee8840a1c0 665 #define IS_FSMC_GET_IT(IT) (((IT) == FSMC_IT_RisingEdge) || \
einsteingustavo 0:0dee8840a1c0 666 ((IT) == FSMC_IT_Level) || \
einsteingustavo 0:0dee8840a1c0 667 ((IT) == FSMC_IT_FallingEdge))
einsteingustavo 0:0dee8840a1c0 668 /**
einsteingustavo 0:0dee8840a1c0 669 * @}
einsteingustavo 0:0dee8840a1c0 670 */
einsteingustavo 0:0dee8840a1c0 671
einsteingustavo 0:0dee8840a1c0 672 /** @defgroup FSMC_Flags
einsteingustavo 0:0dee8840a1c0 673 * @{
einsteingustavo 0:0dee8840a1c0 674 */
einsteingustavo 0:0dee8840a1c0 675
einsteingustavo 0:0dee8840a1c0 676 #define FSMC_FLAG_RisingEdge ((uint32_t)0x00000001)
einsteingustavo 0:0dee8840a1c0 677 #define FSMC_FLAG_Level ((uint32_t)0x00000002)
einsteingustavo 0:0dee8840a1c0 678 #define FSMC_FLAG_FallingEdge ((uint32_t)0x00000004)
einsteingustavo 0:0dee8840a1c0 679 #define FSMC_FLAG_FEMPT ((uint32_t)0x00000040)
einsteingustavo 0:0dee8840a1c0 680 #define IS_FSMC_GET_FLAG(FLAG) (((FLAG) == FSMC_FLAG_RisingEdge) || \
einsteingustavo 0:0dee8840a1c0 681 ((FLAG) == FSMC_FLAG_Level) || \
einsteingustavo 0:0dee8840a1c0 682 ((FLAG) == FSMC_FLAG_FallingEdge) || \
einsteingustavo 0:0dee8840a1c0 683 ((FLAG) == FSMC_FLAG_FEMPT))
einsteingustavo 0:0dee8840a1c0 684
einsteingustavo 0:0dee8840a1c0 685 #define IS_FSMC_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFFFFFFF8) == 0x00000000) && ((FLAG) != 0x00000000))
einsteingustavo 0:0dee8840a1c0 686
einsteingustavo 0:0dee8840a1c0 687 /**
einsteingustavo 0:0dee8840a1c0 688 * @}
einsteingustavo 0:0dee8840a1c0 689 */
einsteingustavo 0:0dee8840a1c0 690
einsteingustavo 0:0dee8840a1c0 691 /**
einsteingustavo 0:0dee8840a1c0 692 * @}
einsteingustavo 0:0dee8840a1c0 693 */
einsteingustavo 0:0dee8840a1c0 694
einsteingustavo 0:0dee8840a1c0 695 /**
einsteingustavo 0:0dee8840a1c0 696 * @}
einsteingustavo 0:0dee8840a1c0 697 */
einsteingustavo 0:0dee8840a1c0 698
einsteingustavo 0:0dee8840a1c0 699 /** @defgroup FSMC_Exported_Macros
einsteingustavo 0:0dee8840a1c0 700 * @{
einsteingustavo 0:0dee8840a1c0 701 */
einsteingustavo 0:0dee8840a1c0 702
einsteingustavo 0:0dee8840a1c0 703 /**
einsteingustavo 0:0dee8840a1c0 704 * @}
einsteingustavo 0:0dee8840a1c0 705 */
einsteingustavo 0:0dee8840a1c0 706
einsteingustavo 0:0dee8840a1c0 707 /** @defgroup FSMC_Exported_Functions
einsteingustavo 0:0dee8840a1c0 708 * @{
einsteingustavo 0:0dee8840a1c0 709 */
einsteingustavo 0:0dee8840a1c0 710
einsteingustavo 0:0dee8840a1c0 711 void FSMC_NORSRAMDeInit(uint32_t FSMC_Bank);
einsteingustavo 0:0dee8840a1c0 712 void FSMC_NANDDeInit(uint32_t FSMC_Bank);
einsteingustavo 0:0dee8840a1c0 713 void FSMC_PCCARDDeInit(void);
einsteingustavo 0:0dee8840a1c0 714 void FSMC_NORSRAMInit(FSMC_NORSRAMInitTypeDef* FSMC_NORSRAMInitStruct);
einsteingustavo 0:0dee8840a1c0 715 void FSMC_NANDInit(FSMC_NANDInitTypeDef* FSMC_NANDInitStruct);
einsteingustavo 0:0dee8840a1c0 716 void FSMC_PCCARDInit(FSMC_PCCARDInitTypeDef* FSMC_PCCARDInitStruct);
einsteingustavo 0:0dee8840a1c0 717 void FSMC_NORSRAMStructInit(FSMC_NORSRAMInitTypeDef* FSMC_NORSRAMInitStruct);
einsteingustavo 0:0dee8840a1c0 718 void FSMC_NANDStructInit(FSMC_NANDInitTypeDef* FSMC_NANDInitStruct);
einsteingustavo 0:0dee8840a1c0 719 void FSMC_PCCARDStructInit(FSMC_PCCARDInitTypeDef* FSMC_PCCARDInitStruct);
einsteingustavo 0:0dee8840a1c0 720 void FSMC_NORSRAMCmd(uint32_t FSMC_Bank, FunctionalState NewState);
einsteingustavo 0:0dee8840a1c0 721 void FSMC_NANDCmd(uint32_t FSMC_Bank, FunctionalState NewState);
einsteingustavo 0:0dee8840a1c0 722 void FSMC_PCCARDCmd(FunctionalState NewState);
einsteingustavo 0:0dee8840a1c0 723 void FSMC_NANDECCCmd(uint32_t FSMC_Bank, FunctionalState NewState);
einsteingustavo 0:0dee8840a1c0 724 uint32_t FSMC_GetECC(uint32_t FSMC_Bank);
einsteingustavo 0:0dee8840a1c0 725 void FSMC_ITConfig(uint32_t FSMC_Bank, uint32_t FSMC_IT, FunctionalState NewState);
einsteingustavo 0:0dee8840a1c0 726 FlagStatus FSMC_GetFlagStatus(uint32_t FSMC_Bank, uint32_t FSMC_FLAG);
einsteingustavo 0:0dee8840a1c0 727 void FSMC_ClearFlag(uint32_t FSMC_Bank, uint32_t FSMC_FLAG);
einsteingustavo 0:0dee8840a1c0 728 ITStatus FSMC_GetITStatus(uint32_t FSMC_Bank, uint32_t FSMC_IT);
einsteingustavo 0:0dee8840a1c0 729 void FSMC_ClearITPendingBit(uint32_t FSMC_Bank, uint32_t FSMC_IT);
einsteingustavo 0:0dee8840a1c0 730
einsteingustavo 0:0dee8840a1c0 731 #ifdef __cplusplus
einsteingustavo 0:0dee8840a1c0 732 }
einsteingustavo 0:0dee8840a1c0 733 #endif
einsteingustavo 0:0dee8840a1c0 734
einsteingustavo 0:0dee8840a1c0 735 #endif /*__STM32F10x_FSMC_H */
einsteingustavo 0:0dee8840a1c0 736 /**
einsteingustavo 0:0dee8840a1c0 737 * @}
einsteingustavo 0:0dee8840a1c0 738 */
einsteingustavo 0:0dee8840a1c0 739
einsteingustavo 0:0dee8840a1c0 740 /**
einsteingustavo 0:0dee8840a1c0 741 * @}
einsteingustavo 0:0dee8840a1c0 742 */
einsteingustavo 0:0dee8840a1c0 743
einsteingustavo 0:0dee8840a1c0 744 /**
einsteingustavo 0:0dee8840a1c0 745 * @}
einsteingustavo 0:0dee8840a1c0 746 */
einsteingustavo 0:0dee8840a1c0 747
einsteingustavo 0:0dee8840a1c0 748 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
einsteingustavo 0:0dee8840a1c0 749