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

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

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

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 112:6f327212ef96 1 /**
Kojto 112:6f327212ef96 2 ******************************************************************************
Kojto 112:6f327212ef96 3 * @file stm32f4xx_ll_fmc.h
Kojto 112:6f327212ef96 4 * @author MCD Application Team
Kojto 112:6f327212ef96 5 * @version V1.4.1
Kojto 112:6f327212ef96 6 * @date 09-October-2015
Kojto 112:6f327212ef96 7 * @brief Header file of FMC HAL module.
Kojto 112:6f327212ef96 8 ******************************************************************************
Kojto 112:6f327212ef96 9 * @attention
Kojto 112:6f327212ef96 10 *
Kojto 112:6f327212ef96 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
Kojto 112:6f327212ef96 12 *
Kojto 112:6f327212ef96 13 * Redistribution and use in source and binary forms, with or without modification,
Kojto 112:6f327212ef96 14 * are permitted provided that the following conditions are met:
Kojto 112:6f327212ef96 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 112:6f327212ef96 16 * this list of conditions and the following disclaimer.
Kojto 112:6f327212ef96 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 112:6f327212ef96 18 * this list of conditions and the following disclaimer in the documentation
Kojto 112:6f327212ef96 19 * and/or other materials provided with the distribution.
Kojto 112:6f327212ef96 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 112:6f327212ef96 21 * may be used to endorse or promote products derived from this software
Kojto 112:6f327212ef96 22 * without specific prior written permission.
Kojto 112:6f327212ef96 23 *
Kojto 112:6f327212ef96 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 112:6f327212ef96 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 112:6f327212ef96 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 112:6f327212ef96 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 112:6f327212ef96 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 112:6f327212ef96 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 112:6f327212ef96 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 112:6f327212ef96 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 112:6f327212ef96 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 112:6f327212ef96 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 112:6f327212ef96 34 *
Kojto 112:6f327212ef96 35 ******************************************************************************
Kojto 112:6f327212ef96 36 */
Kojto 112:6f327212ef96 37
Kojto 112:6f327212ef96 38 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 112:6f327212ef96 39 #ifndef __STM32F4xx_LL_FMC_H
Kojto 112:6f327212ef96 40 #define __STM32F4xx_LL_FMC_H
Kojto 112:6f327212ef96 41
Kojto 112:6f327212ef96 42 #ifdef __cplusplus
Kojto 112:6f327212ef96 43 extern "C" {
Kojto 112:6f327212ef96 44 #endif
Kojto 112:6f327212ef96 45
Kojto 112:6f327212ef96 46 /* Includes ------------------------------------------------------------------*/
Kojto 112:6f327212ef96 47 #include "stm32f4xx_hal_def.h"
Kojto 112:6f327212ef96 48
Kojto 112:6f327212ef96 49 /** @addtogroup STM32F4xx_HAL_Driver
Kojto 112:6f327212ef96 50 * @{
Kojto 112:6f327212ef96 51 */
Kojto 112:6f327212ef96 52
Kojto 112:6f327212ef96 53 /** @addtogroup FMC_LL
Kojto 112:6f327212ef96 54 * @{
Kojto 112:6f327212ef96 55 */
Kojto 112:6f327212ef96 56 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||\
Kojto 112:6f327212ef96 57 defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
Kojto 112:6f327212ef96 58 /* Private types -------------------------------------------------------------*/
Kojto 112:6f327212ef96 59 /** @defgroup FMC_LL_Private_Types FMC Private Types
Kojto 112:6f327212ef96 60 * @{
Kojto 112:6f327212ef96 61 */
Kojto 112:6f327212ef96 62
Kojto 112:6f327212ef96 63 /**
Kojto 112:6f327212ef96 64 * @brief FMC NORSRAM Configuration Structure definition
Kojto 112:6f327212ef96 65 */
Kojto 112:6f327212ef96 66 typedef struct
Kojto 112:6f327212ef96 67 {
Kojto 112:6f327212ef96 68 uint32_t NSBank; /*!< Specifies the NORSRAM memory device that will be used.
Kojto 112:6f327212ef96 69 This parameter can be a value of @ref FMC_NORSRAM_Bank */
Kojto 112:6f327212ef96 70
Kojto 112:6f327212ef96 71 uint32_t DataAddressMux; /*!< Specifies whether the address and data values are
Kojto 112:6f327212ef96 72 multiplexed on the data bus or not.
Kojto 112:6f327212ef96 73 This parameter can be a value of @ref FMC_Data_Address_Bus_Multiplexing */
Kojto 112:6f327212ef96 74
Kojto 112:6f327212ef96 75 uint32_t MemoryType; /*!< Specifies the type of external memory attached to
Kojto 112:6f327212ef96 76 the corresponding memory device.
Kojto 112:6f327212ef96 77 This parameter can be a value of @ref FMC_Memory_Type */
Kojto 112:6f327212ef96 78
Kojto 112:6f327212ef96 79 uint32_t MemoryDataWidth; /*!< Specifies the external memory device width.
Kojto 112:6f327212ef96 80 This parameter can be a value of @ref FMC_NORSRAM_Data_Width */
Kojto 112:6f327212ef96 81
Kojto 112:6f327212ef96 82 uint32_t BurstAccessMode; /*!< Enables or disables the burst access mode for Flash memory,
Kojto 112:6f327212ef96 83 valid only with synchronous burst Flash memories.
Kojto 112:6f327212ef96 84 This parameter can be a value of @ref FMC_Burst_Access_Mode */
Kojto 112:6f327212ef96 85
Kojto 112:6f327212ef96 86 uint32_t WaitSignalPolarity; /*!< Specifies the wait signal polarity, valid only when accessing
Kojto 112:6f327212ef96 87 the Flash memory in burst mode.
Kojto 112:6f327212ef96 88 This parameter can be a value of @ref FMC_Wait_Signal_Polarity */
Kojto 112:6f327212ef96 89
Kojto 112:6f327212ef96 90 uint32_t WrapMode; /*!< Enables or disables the Wrapped burst access mode for Flash
Kojto 112:6f327212ef96 91 memory, valid only when accessing Flash memories in burst mode.
Kojto 112:6f327212ef96 92 This parameter can be a value of @ref FMC_Wrap_Mode
Kojto 112:6f327212ef96 93 This mode is not available for the STM32F446/467/479xx devices */
Kojto 112:6f327212ef96 94
Kojto 112:6f327212ef96 95 uint32_t WaitSignalActive; /*!< Specifies if the wait signal is asserted by the memory one
Kojto 112:6f327212ef96 96 clock cycle before the wait state or during the wait state,
Kojto 112:6f327212ef96 97 valid only when accessing memories in burst mode.
Kojto 112:6f327212ef96 98 This parameter can be a value of @ref FMC_Wait_Timing */
Kojto 112:6f327212ef96 99
Kojto 112:6f327212ef96 100 uint32_t WriteOperation; /*!< Enables or disables the write operation in the selected device by the FMC.
Kojto 112:6f327212ef96 101 This parameter can be a value of @ref FMC_Write_Operation */
Kojto 112:6f327212ef96 102
Kojto 112:6f327212ef96 103 uint32_t WaitSignal; /*!< Enables or disables the wait state insertion via wait
Kojto 112:6f327212ef96 104 signal, valid for Flash memory access in burst mode.
Kojto 112:6f327212ef96 105 This parameter can be a value of @ref FMC_Wait_Signal */
Kojto 112:6f327212ef96 106
Kojto 112:6f327212ef96 107 uint32_t ExtendedMode; /*!< Enables or disables the extended mode.
Kojto 112:6f327212ef96 108 This parameter can be a value of @ref FMC_Extended_Mode */
Kojto 112:6f327212ef96 109
Kojto 112:6f327212ef96 110 uint32_t AsynchronousWait; /*!< Enables or disables wait signal during asynchronous transfers,
Kojto 112:6f327212ef96 111 valid only with asynchronous Flash memories.
Kojto 112:6f327212ef96 112 This parameter can be a value of @ref FMC_AsynchronousWait */
Kojto 112:6f327212ef96 113
Kojto 112:6f327212ef96 114 uint32_t WriteBurst; /*!< Enables or disables the write burst operation.
Kojto 112:6f327212ef96 115 This parameter can be a value of @ref FMC_Write_Burst */
Kojto 112:6f327212ef96 116
Kojto 112:6f327212ef96 117 uint32_t ContinuousClock; /*!< Enables or disables the FMC clock output to external memory devices.
Kojto 112:6f327212ef96 118 This parameter is only enabled through the FMC_BCR1 register, and don't care
Kojto 112:6f327212ef96 119 through FMC_BCR2..4 registers.
Kojto 112:6f327212ef96 120 This parameter can be a value of @ref FMC_Continous_Clock */
Kojto 112:6f327212ef96 121
Kojto 112:6f327212ef96 122 uint32_t WriteFifo; /*!< Enables or disables the write FIFO used by the FMC controller.
Kojto 112:6f327212ef96 123 This parameter is only enabled through the FMC_BCR1 register, and don't care
Kojto 112:6f327212ef96 124 through FMC_BCR2..4 registers.
Kojto 112:6f327212ef96 125 This parameter can be a value of @ref FMC_Write_FIFO
Kojto 112:6f327212ef96 126 This mode is available only for the STM32F446/469/479xx devices */
Kojto 112:6f327212ef96 127
Kojto 112:6f327212ef96 128 uint32_t PageSize; /*!< Specifies the memory page size.
Kojto 112:6f327212ef96 129 This parameter can be a value of @ref FMC_Page_Size
Kojto 112:6f327212ef96 130 This mode is available only for the STM32F446xx devices */
Kojto 112:6f327212ef96 131
Kojto 112:6f327212ef96 132 }FMC_NORSRAM_InitTypeDef;
Kojto 112:6f327212ef96 133
Kojto 112:6f327212ef96 134 /**
Kojto 112:6f327212ef96 135 * @brief FMC NORSRAM Timing parameters structure definition
Kojto 112:6f327212ef96 136 */
Kojto 112:6f327212ef96 137 typedef struct
Kojto 112:6f327212ef96 138 {
Kojto 112:6f327212ef96 139 uint32_t AddressSetupTime; /*!< Defines the number of HCLK cycles to configure
Kojto 112:6f327212ef96 140 the duration of the address setup time.
Kojto 112:6f327212ef96 141 This parameter can be a value between Min_Data = 0 and Max_Data = 15.
Kojto 112:6f327212ef96 142 @note This parameter is not used with synchronous NOR Flash memories. */
Kojto 112:6f327212ef96 143
Kojto 112:6f327212ef96 144 uint32_t AddressHoldTime; /*!< Defines the number of HCLK cycles to configure
Kojto 112:6f327212ef96 145 the duration of the address hold time.
Kojto 112:6f327212ef96 146 This parameter can be a value between Min_Data = 1 and Max_Data = 15.
Kojto 112:6f327212ef96 147 @note This parameter is not used with synchronous NOR Flash memories. */
Kojto 112:6f327212ef96 148
Kojto 112:6f327212ef96 149 uint32_t DataSetupTime; /*!< Defines the number of HCLK cycles to configure
Kojto 112:6f327212ef96 150 the duration of the data setup time.
Kojto 112:6f327212ef96 151 This parameter can be a value between Min_Data = 1 and Max_Data = 255.
Kojto 112:6f327212ef96 152 @note This parameter is used for SRAMs, ROMs and asynchronous multiplexed
Kojto 112:6f327212ef96 153 NOR Flash memories. */
Kojto 112:6f327212ef96 154
Kojto 112:6f327212ef96 155 uint32_t BusTurnAroundDuration; /*!< Defines the number of HCLK cycles to configure
Kojto 112:6f327212ef96 156 the duration of the bus turnaround.
Kojto 112:6f327212ef96 157 This parameter can be a value between Min_Data = 0 and Max_Data = 15.
Kojto 112:6f327212ef96 158 @note This parameter is only used for multiplexed NOR Flash memories. */
Kojto 112:6f327212ef96 159
Kojto 112:6f327212ef96 160 uint32_t CLKDivision; /*!< Defines the period of CLK clock output signal, expressed in number of
Kojto 112:6f327212ef96 161 HCLK cycles. This parameter can be a value between Min_Data = 2 and Max_Data = 16.
Kojto 112:6f327212ef96 162 @note This parameter is not used for asynchronous NOR Flash, SRAM or ROM
Kojto 112:6f327212ef96 163 accesses. */
Kojto 112:6f327212ef96 164
Kojto 112:6f327212ef96 165 uint32_t DataLatency; /*!< Defines the number of memory clock cycles to issue
Kojto 112:6f327212ef96 166 to the memory before getting the first data.
Kojto 112:6f327212ef96 167 The parameter value depends on the memory type as shown below:
Kojto 112:6f327212ef96 168 - It must be set to 0 in case of a CRAM
Kojto 112:6f327212ef96 169 - It is don't care in asynchronous NOR, SRAM or ROM accesses
Kojto 112:6f327212ef96 170 - It may assume a value between Min_Data = 2 and Max_Data = 17 in NOR Flash memories
Kojto 112:6f327212ef96 171 with synchronous burst mode enable */
Kojto 112:6f327212ef96 172
Kojto 112:6f327212ef96 173 uint32_t AccessMode; /*!< Specifies the asynchronous access mode.
Kojto 112:6f327212ef96 174 This parameter can be a value of @ref FMC_Access_Mode */
Kojto 112:6f327212ef96 175 }FMC_NORSRAM_TimingTypeDef;
Kojto 112:6f327212ef96 176
Kojto 112:6f327212ef96 177 /**
Kojto 112:6f327212ef96 178 * @brief FMC NAND Configuration Structure definition
Kojto 112:6f327212ef96 179 */
Kojto 112:6f327212ef96 180 typedef struct
Kojto 112:6f327212ef96 181 {
Kojto 112:6f327212ef96 182 uint32_t NandBank; /*!< Specifies the NAND memory device that will be used.
Kojto 112:6f327212ef96 183 This parameter can be a value of @ref FMC_NAND_Bank */
Kojto 112:6f327212ef96 184
Kojto 112:6f327212ef96 185 uint32_t Waitfeature; /*!< Enables or disables the Wait feature for the NAND Memory device.
Kojto 112:6f327212ef96 186 This parameter can be any value of @ref FMC_Wait_feature */
Kojto 112:6f327212ef96 187
Kojto 112:6f327212ef96 188 uint32_t MemoryDataWidth; /*!< Specifies the external memory device width.
Kojto 112:6f327212ef96 189 This parameter can be any value of @ref FMC_NAND_Data_Width */
Kojto 112:6f327212ef96 190
Kojto 112:6f327212ef96 191 uint32_t EccComputation; /*!< Enables or disables the ECC computation.
Kojto 112:6f327212ef96 192 This parameter can be any value of @ref FMC_ECC */
Kojto 112:6f327212ef96 193
Kojto 112:6f327212ef96 194 uint32_t ECCPageSize; /*!< Defines the page size for the extended ECC.
Kojto 112:6f327212ef96 195 This parameter can be any value of @ref FMC_ECC_Page_Size */
Kojto 112:6f327212ef96 196
Kojto 112:6f327212ef96 197 uint32_t TCLRSetupTime; /*!< Defines the number of HCLK cycles to configure the
Kojto 112:6f327212ef96 198 delay between CLE low and RE low.
Kojto 112:6f327212ef96 199 This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
Kojto 112:6f327212ef96 200
Kojto 112:6f327212ef96 201 uint32_t TARSetupTime; /*!< Defines the number of HCLK cycles to configure the
Kojto 112:6f327212ef96 202 delay between ALE low and RE low.
Kojto 112:6f327212ef96 203 This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
Kojto 112:6f327212ef96 204 }FMC_NAND_InitTypeDef;
Kojto 112:6f327212ef96 205
Kojto 112:6f327212ef96 206 /**
Kojto 112:6f327212ef96 207 * @brief FMC NAND/PCCARD Timing parameters structure definition
Kojto 112:6f327212ef96 208 */
Kojto 112:6f327212ef96 209 typedef struct
Kojto 112:6f327212ef96 210 {
Kojto 112:6f327212ef96 211 uint32_t SetupTime; /*!< Defines the number of HCLK cycles to setup address before
Kojto 112:6f327212ef96 212 the command assertion for NAND-Flash read or write access
Kojto 112:6f327212ef96 213 to common/Attribute or I/O memory space (depending on
Kojto 112:6f327212ef96 214 the memory space timing to be configured).
Kojto 112:6f327212ef96 215 This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
Kojto 112:6f327212ef96 216
Kojto 112:6f327212ef96 217 uint32_t WaitSetupTime; /*!< Defines the minimum number of HCLK cycles to assert the
Kojto 112:6f327212ef96 218 command for NAND-Flash read or write access to
Kojto 112:6f327212ef96 219 common/Attribute or I/O memory space (depending on the
Kojto 112:6f327212ef96 220 memory space timing to be configured).
Kojto 112:6f327212ef96 221 This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
Kojto 112:6f327212ef96 222
Kojto 112:6f327212ef96 223 uint32_t HoldSetupTime; /*!< Defines the number of HCLK clock cycles to hold address
Kojto 112:6f327212ef96 224 (and data for write access) after the command de-assertion
Kojto 112:6f327212ef96 225 for NAND-Flash read or write access to common/Attribute
Kojto 112:6f327212ef96 226 or I/O memory space (depending on the memory space timing
Kojto 112:6f327212ef96 227 to be configured).
Kojto 112:6f327212ef96 228 This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
Kojto 112:6f327212ef96 229
Kojto 112:6f327212ef96 230 uint32_t HiZSetupTime; /*!< Defines the number of HCLK clock cycles during which the
Kojto 112:6f327212ef96 231 data bus is kept in HiZ after the start of a NAND-Flash
Kojto 112:6f327212ef96 232 write access to common/Attribute or I/O memory space (depending
Kojto 112:6f327212ef96 233 on the memory space timing to be configured).
Kojto 112:6f327212ef96 234 This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
Kojto 112:6f327212ef96 235 }FMC_NAND_PCC_TimingTypeDef;
Kojto 112:6f327212ef96 236
Kojto 112:6f327212ef96 237 /**
Kojto 112:6f327212ef96 238 * @brief FMC NAND Configuration Structure definition
Kojto 112:6f327212ef96 239 */
Kojto 112:6f327212ef96 240 typedef struct
Kojto 112:6f327212ef96 241 {
Kojto 112:6f327212ef96 242 uint32_t Waitfeature; /*!< Enables or disables the Wait feature for the PCCARD Memory device.
Kojto 112:6f327212ef96 243 This parameter can be any value of @ref FMC_Wait_feature */
Kojto 112:6f327212ef96 244
Kojto 112:6f327212ef96 245 uint32_t TCLRSetupTime; /*!< Defines the number of HCLK cycles to configure the
Kojto 112:6f327212ef96 246 delay between CLE low and RE low.
Kojto 112:6f327212ef96 247 This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
Kojto 112:6f327212ef96 248
Kojto 112:6f327212ef96 249 uint32_t TARSetupTime; /*!< Defines the number of HCLK cycles to configure the
Kojto 112:6f327212ef96 250 delay between ALE low and RE low.
Kojto 112:6f327212ef96 251 This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
Kojto 112:6f327212ef96 252 }FMC_PCCARD_InitTypeDef;
Kojto 112:6f327212ef96 253
Kojto 112:6f327212ef96 254 /**
Kojto 112:6f327212ef96 255 * @brief FMC SDRAM Configuration Structure definition
Kojto 112:6f327212ef96 256 */
Kojto 112:6f327212ef96 257 typedef struct
Kojto 112:6f327212ef96 258 {
Kojto 112:6f327212ef96 259 uint32_t SDBank; /*!< Specifies the SDRAM memory device that will be used.
Kojto 112:6f327212ef96 260 This parameter can be a value of @ref FMC_SDRAM_Bank */
Kojto 112:6f327212ef96 261
Kojto 112:6f327212ef96 262 uint32_t ColumnBitsNumber; /*!< Defines the number of bits of column address.
Kojto 112:6f327212ef96 263 This parameter can be a value of @ref FMC_SDRAM_Column_Bits_number. */
Kojto 112:6f327212ef96 264
Kojto 112:6f327212ef96 265 uint32_t RowBitsNumber; /*!< Defines the number of bits of column address.
Kojto 112:6f327212ef96 266 This parameter can be a value of @ref FMC_SDRAM_Row_Bits_number. */
Kojto 112:6f327212ef96 267
Kojto 112:6f327212ef96 268 uint32_t MemoryDataWidth; /*!< Defines the memory device width.
Kojto 112:6f327212ef96 269 This parameter can be a value of @ref FMC_SDRAM_Memory_Bus_Width. */
Kojto 112:6f327212ef96 270
Kojto 112:6f327212ef96 271 uint32_t InternalBankNumber; /*!< Defines the number of the device's internal banks.
Kojto 112:6f327212ef96 272 This parameter can be of @ref FMC_SDRAM_Internal_Banks_Number. */
Kojto 112:6f327212ef96 273
Kojto 112:6f327212ef96 274 uint32_t CASLatency; /*!< Defines the SDRAM CAS latency in number of memory clock cycles.
Kojto 112:6f327212ef96 275 This parameter can be a value of @ref FMC_SDRAM_CAS_Latency. */
Kojto 112:6f327212ef96 276
Kojto 112:6f327212ef96 277 uint32_t WriteProtection; /*!< Enables the SDRAM device to be accessed in write mode.
Kojto 112:6f327212ef96 278 This parameter can be a value of @ref FMC_SDRAM_Write_Protection. */
Kojto 112:6f327212ef96 279
Kojto 112:6f327212ef96 280 uint32_t SDClockPeriod; /*!< Define the SDRAM Clock Period for both SDRAM devices and they allow
Kojto 112:6f327212ef96 281 to disable the clock before changing frequency.
Kojto 112:6f327212ef96 282 This parameter can be a value of @ref FMC_SDRAM_Clock_Period. */
Kojto 112:6f327212ef96 283
Kojto 112:6f327212ef96 284 uint32_t ReadBurst; /*!< This bit enable the SDRAM controller to anticipate the next read
Kojto 112:6f327212ef96 285 commands during the CAS latency and stores data in the Read FIFO.
Kojto 112:6f327212ef96 286 This parameter can be a value of @ref FMC_SDRAM_Read_Burst. */
Kojto 112:6f327212ef96 287
Kojto 112:6f327212ef96 288 uint32_t ReadPipeDelay; /*!< Define the delay in system clock cycles on read data path.
Kojto 112:6f327212ef96 289 This parameter can be a value of @ref FMC_SDRAM_Read_Pipe_Delay. */
Kojto 112:6f327212ef96 290 }FMC_SDRAM_InitTypeDef;
Kojto 112:6f327212ef96 291
Kojto 112:6f327212ef96 292 /**
Kojto 112:6f327212ef96 293 * @brief FMC SDRAM Timing parameters structure definition
Kojto 112:6f327212ef96 294 */
Kojto 112:6f327212ef96 295 typedef struct
Kojto 112:6f327212ef96 296 {
Kojto 112:6f327212ef96 297 uint32_t LoadToActiveDelay; /*!< Defines the delay between a Load Mode Register command and
Kojto 112:6f327212ef96 298 an active or Refresh command in number of memory clock cycles.
Kojto 112:6f327212ef96 299 This parameter can be a value between Min_Data = 1 and Max_Data = 16 */
Kojto 112:6f327212ef96 300
Kojto 112:6f327212ef96 301 uint32_t ExitSelfRefreshDelay; /*!< Defines the delay from releasing the self refresh command to
Kojto 112:6f327212ef96 302 issuing the Activate command in number of memory clock cycles.
Kojto 112:6f327212ef96 303 This parameter can be a value between Min_Data = 1 and Max_Data = 16 */
Kojto 112:6f327212ef96 304
Kojto 112:6f327212ef96 305 uint32_t SelfRefreshTime; /*!< Defines the minimum Self Refresh period in number of memory clock
Kojto 112:6f327212ef96 306 cycles.
Kojto 112:6f327212ef96 307 This parameter can be a value between Min_Data = 1 and Max_Data = 16 */
Kojto 112:6f327212ef96 308
Kojto 112:6f327212ef96 309 uint32_t RowCycleDelay; /*!< Defines the delay between the Refresh command and the Activate command
Kojto 112:6f327212ef96 310 and the delay between two consecutive Refresh commands in number of
Kojto 112:6f327212ef96 311 memory clock cycles.
Kojto 112:6f327212ef96 312 This parameter can be a value between Min_Data = 1 and Max_Data = 16 */
Kojto 112:6f327212ef96 313
Kojto 112:6f327212ef96 314 uint32_t WriteRecoveryTime; /*!< Defines the Write recovery Time in number of memory clock cycles.
Kojto 112:6f327212ef96 315 This parameter can be a value between Min_Data = 1 and Max_Data = 16 */
Kojto 112:6f327212ef96 316
Kojto 112:6f327212ef96 317 uint32_t RPDelay; /*!< Defines the delay between a Precharge Command and an other command
Kojto 112:6f327212ef96 318 in number of memory clock cycles.
Kojto 112:6f327212ef96 319 This parameter can be a value between Min_Data = 1 and Max_Data = 16 */
Kojto 112:6f327212ef96 320
Kojto 112:6f327212ef96 321 uint32_t RCDDelay; /*!< Defines the delay between the Activate Command and a Read/Write
Kojto 112:6f327212ef96 322 command in number of memory clock cycles.
Kojto 112:6f327212ef96 323 This parameter can be a value between Min_Data = 1 and Max_Data = 16 */
Kojto 112:6f327212ef96 324 }FMC_SDRAM_TimingTypeDef;
Kojto 112:6f327212ef96 325
Kojto 112:6f327212ef96 326 /**
Kojto 112:6f327212ef96 327 * @brief SDRAM command parameters structure definition
Kojto 112:6f327212ef96 328 */
Kojto 112:6f327212ef96 329 typedef struct
Kojto 112:6f327212ef96 330 {
Kojto 112:6f327212ef96 331 uint32_t CommandMode; /*!< Defines the command issued to the SDRAM device.
Kojto 112:6f327212ef96 332 This parameter can be a value of @ref FMC_SDRAM_Command_Mode. */
Kojto 112:6f327212ef96 333
Kojto 112:6f327212ef96 334 uint32_t CommandTarget; /*!< Defines which device (1 or 2) the command will be issued to.
Kojto 112:6f327212ef96 335 This parameter can be a value of @ref FMC_SDRAM_Command_Target. */
Kojto 112:6f327212ef96 336
Kojto 112:6f327212ef96 337 uint32_t AutoRefreshNumber; /*!< Defines the number of consecutive auto refresh command issued
Kojto 112:6f327212ef96 338 in auto refresh mode.
Kojto 112:6f327212ef96 339 This parameter can be a value between Min_Data = 1 and Max_Data = 16 */
Kojto 112:6f327212ef96 340 uint32_t ModeRegisterDefinition; /*!< Defines the SDRAM Mode register content */
Kojto 112:6f327212ef96 341 }FMC_SDRAM_CommandTypeDef;
Kojto 112:6f327212ef96 342 /**
Kojto 112:6f327212ef96 343 * @}
Kojto 112:6f327212ef96 344 */
Kojto 112:6f327212ef96 345
Kojto 112:6f327212ef96 346 /* Private constants ---------------------------------------------------------*/
Kojto 112:6f327212ef96 347 /** @defgroup FMC_LL_Private_Constants FMC Private Constants
Kojto 112:6f327212ef96 348 * @{
Kojto 112:6f327212ef96 349 */
Kojto 112:6f327212ef96 350
Kojto 112:6f327212ef96 351 /** @defgroup FMC_LL_NOR_SRAM_Controller FMC NOR/SRAM Controller
Kojto 112:6f327212ef96 352 * @{
Kojto 112:6f327212ef96 353 */
Kojto 112:6f327212ef96 354 /** @defgroup FMC_NORSRAM_Bank FMC NOR/SRAM Bank
Kojto 112:6f327212ef96 355 * @{
Kojto 112:6f327212ef96 356 */
Kojto 112:6f327212ef96 357 #define FMC_NORSRAM_BANK1 ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 358 #define FMC_NORSRAM_BANK2 ((uint32_t)0x00000002)
Kojto 112:6f327212ef96 359 #define FMC_NORSRAM_BANK3 ((uint32_t)0x00000004)
Kojto 112:6f327212ef96 360 #define FMC_NORSRAM_BANK4 ((uint32_t)0x00000006)
Kojto 112:6f327212ef96 361 /**
Kojto 112:6f327212ef96 362 * @}
Kojto 112:6f327212ef96 363 */
Kojto 112:6f327212ef96 364
Kojto 112:6f327212ef96 365 /** @defgroup FMC_Data_Address_Bus_Multiplexing FMC Data Address Bus Multiplexing
Kojto 112:6f327212ef96 366 * @{
Kojto 112:6f327212ef96 367 */
Kojto 112:6f327212ef96 368 #define FMC_DATA_ADDRESS_MUX_DISABLE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 369 #define FMC_DATA_ADDRESS_MUX_ENABLE ((uint32_t)0x00000002)
Kojto 112:6f327212ef96 370 /**
Kojto 112:6f327212ef96 371 * @}
Kojto 112:6f327212ef96 372 */
Kojto 112:6f327212ef96 373
Kojto 112:6f327212ef96 374 /** @defgroup FMC_Memory_Type FMC Memory Type
Kojto 112:6f327212ef96 375 * @{
Kojto 112:6f327212ef96 376 */
Kojto 112:6f327212ef96 377 #define FMC_MEMORY_TYPE_SRAM ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 378 #define FMC_MEMORY_TYPE_PSRAM ((uint32_t)0x00000004)
Kojto 112:6f327212ef96 379 #define FMC_MEMORY_TYPE_NOR ((uint32_t)0x00000008)
Kojto 112:6f327212ef96 380 /**
Kojto 112:6f327212ef96 381 * @}
Kojto 112:6f327212ef96 382 */
Kojto 112:6f327212ef96 383
Kojto 112:6f327212ef96 384 /** @defgroup FMC_NORSRAM_Data_Width FMC NORSRAM Data Width
Kojto 112:6f327212ef96 385 * @{
Kojto 112:6f327212ef96 386 */
Kojto 112:6f327212ef96 387 #define FMC_NORSRAM_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 388 #define FMC_NORSRAM_MEM_BUS_WIDTH_16 ((uint32_t)0x00000010)
Kojto 112:6f327212ef96 389 #define FMC_NORSRAM_MEM_BUS_WIDTH_32 ((uint32_t)0x00000020)
Kojto 112:6f327212ef96 390 /**
Kojto 112:6f327212ef96 391 * @}
Kojto 112:6f327212ef96 392 */
Kojto 112:6f327212ef96 393
Kojto 112:6f327212ef96 394 /** @defgroup FMC_NORSRAM_Flash_Access FMC NOR/SRAM Flash Access
Kojto 112:6f327212ef96 395 * @{
Kojto 112:6f327212ef96 396 */
Kojto 112:6f327212ef96 397 #define FMC_NORSRAM_FLASH_ACCESS_ENABLE ((uint32_t)0x00000040)
Kojto 112:6f327212ef96 398 #define FMC_NORSRAM_FLASH_ACCESS_DISABLE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 399 /**
Kojto 112:6f327212ef96 400 * @}
Kojto 112:6f327212ef96 401 */
Kojto 112:6f327212ef96 402
Kojto 112:6f327212ef96 403 /** @defgroup FMC_Burst_Access_Mode FMC Burst Access Mode
Kojto 112:6f327212ef96 404 * @{
Kojto 112:6f327212ef96 405 */
Kojto 112:6f327212ef96 406 #define FMC_BURST_ACCESS_MODE_DISABLE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 407 #define FMC_BURST_ACCESS_MODE_ENABLE ((uint32_t)0x00000100)
Kojto 112:6f327212ef96 408 /**
Kojto 112:6f327212ef96 409 * @}
Kojto 112:6f327212ef96 410 */
Kojto 112:6f327212ef96 411
Kojto 112:6f327212ef96 412 /** @defgroup FMC_Wait_Signal_Polarity FMC Wait Signal Polarity
Kojto 112:6f327212ef96 413 * @{
Kojto 112:6f327212ef96 414 */
Kojto 112:6f327212ef96 415 #define FMC_WAIT_SIGNAL_POLARITY_LOW ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 416 #define FMC_WAIT_SIGNAL_POLARITY_HIGH ((uint32_t)0x00000200)
Kojto 112:6f327212ef96 417 /**
Kojto 112:6f327212ef96 418 * @}
Kojto 112:6f327212ef96 419 */
Kojto 112:6f327212ef96 420
Kojto 112:6f327212ef96 421 /** @defgroup FMC_Wrap_Mode FMC Wrap Mode
Kojto 112:6f327212ef96 422 * @{
Kojto 112:6f327212ef96 423 */
Kojto 112:6f327212ef96 424 /** @note This mode is not available for the STM32F446/469/479xx devices
Kojto 112:6f327212ef96 425 */
Kojto 112:6f327212ef96 426 #define FMC_WRAP_MODE_DISABLE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 427 #define FMC_WRAP_MODE_ENABLE ((uint32_t)0x00000400)
Kojto 112:6f327212ef96 428 /**
Kojto 112:6f327212ef96 429 * @}
Kojto 112:6f327212ef96 430 */
Kojto 112:6f327212ef96 431
Kojto 112:6f327212ef96 432 /** @defgroup FMC_Wait_Timing FMC Wait Timing
Kojto 112:6f327212ef96 433 * @{
Kojto 112:6f327212ef96 434 */
Kojto 112:6f327212ef96 435 #define FMC_WAIT_TIMING_BEFORE_WS ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 436 #define FMC_WAIT_TIMING_DURING_WS ((uint32_t)0x00000800)
Kojto 112:6f327212ef96 437 /**
Kojto 112:6f327212ef96 438 * @}
Kojto 112:6f327212ef96 439 */
Kojto 112:6f327212ef96 440
Kojto 112:6f327212ef96 441 /** @defgroup FMC_Write_Operation FMC Write Operation
Kojto 112:6f327212ef96 442 * @{
Kojto 112:6f327212ef96 443 */
Kojto 112:6f327212ef96 444 #define FMC_WRITE_OPERATION_DISABLE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 445 #define FMC_WRITE_OPERATION_ENABLE ((uint32_t)0x00001000)
Kojto 112:6f327212ef96 446 /**
Kojto 112:6f327212ef96 447 * @}
Kojto 112:6f327212ef96 448 */
Kojto 112:6f327212ef96 449
Kojto 112:6f327212ef96 450 /** @defgroup FMC_Wait_Signal FMC Wait Signal
Kojto 112:6f327212ef96 451 * @{
Kojto 112:6f327212ef96 452 */
Kojto 112:6f327212ef96 453 #define FMC_WAIT_SIGNAL_DISABLE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 454 #define FMC_WAIT_SIGNAL_ENABLE ((uint32_t)0x00002000)
Kojto 112:6f327212ef96 455 /**
Kojto 112:6f327212ef96 456 * @}
Kojto 112:6f327212ef96 457 */
Kojto 112:6f327212ef96 458
Kojto 112:6f327212ef96 459 /** @defgroup FMC_Extended_Mode FMC Extended Mode
Kojto 112:6f327212ef96 460 * @{
Kojto 112:6f327212ef96 461 */
Kojto 112:6f327212ef96 462 #define FMC_EXTENDED_MODE_DISABLE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 463 #define FMC_EXTENDED_MODE_ENABLE ((uint32_t)0x00004000)
Kojto 112:6f327212ef96 464 /**
Kojto 112:6f327212ef96 465 * @}
Kojto 112:6f327212ef96 466 */
Kojto 112:6f327212ef96 467
Kojto 112:6f327212ef96 468 /** @defgroup FMC_AsynchronousWait FMC Asynchronous Wait
Kojto 112:6f327212ef96 469 * @{
Kojto 112:6f327212ef96 470 */
Kojto 112:6f327212ef96 471 #define FMC_ASYNCHRONOUS_WAIT_DISABLE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 472 #define FMC_ASYNCHRONOUS_WAIT_ENABLE ((uint32_t)0x00008000)
Kojto 112:6f327212ef96 473 /**
Kojto 112:6f327212ef96 474 * @}
Kojto 112:6f327212ef96 475 */
Kojto 112:6f327212ef96 476
Kojto 112:6f327212ef96 477 /** @defgroup FMC_Page_Size FMC Page Size
Kojto 112:6f327212ef96 478 * @note These values are available only for the STM32F446/469/479xx devices.
Kojto 112:6f327212ef96 479 * @{
Kojto 112:6f327212ef96 480 */
Kojto 112:6f327212ef96 481 #define FMC_PAGE_SIZE_NONE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 482 #define FMC_PAGE_SIZE_128 ((uint32_t)FMC_BCR1_CPSIZE_0)
Kojto 112:6f327212ef96 483 #define FMC_PAGE_SIZE_256 ((uint32_t)FMC_BCR1_CPSIZE_1)
Kojto 112:6f327212ef96 484 #define FMC_PAGE_SIZE_1024 ((uint32_t)FMC_BCR1_CPSIZE_2)
Kojto 112:6f327212ef96 485 /**
Kojto 112:6f327212ef96 486 * @}
Kojto 112:6f327212ef96 487 */
Kojto 112:6f327212ef96 488
Kojto 112:6f327212ef96 489 /** @defgroup FMC_Write_FIFO FMC Write FIFO
Kojto 112:6f327212ef96 490 * @note These values are available only for the STM32F446/469/479xx devices.
Kojto 112:6f327212ef96 491 * @{
Kojto 112:6f327212ef96 492 */
Kojto 112:6f327212ef96 493 #define FMC_WRITE_FIFO_DISABLE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 494 #define FMC_WRITE_FIFO_ENABLE ((uint32_t)FMC_BCR1_WFDIS)
Kojto 112:6f327212ef96 495 /**
Kojto 112:6f327212ef96 496 * @}
Kojto 112:6f327212ef96 497 */
Kojto 112:6f327212ef96 498
Kojto 112:6f327212ef96 499 /** @defgroup FMC_Write_Burst FMC Write Burst
Kojto 112:6f327212ef96 500 * @{
Kojto 112:6f327212ef96 501 */
Kojto 112:6f327212ef96 502 #define FMC_WRITE_BURST_DISABLE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 503 #define FMC_WRITE_BURST_ENABLE ((uint32_t)0x00080000)
Kojto 112:6f327212ef96 504 /**
Kojto 112:6f327212ef96 505 * @}
Kojto 112:6f327212ef96 506 */
Kojto 112:6f327212ef96 507
Kojto 112:6f327212ef96 508 /** @defgroup FMC_Continous_Clock FMC Continuous Clock
Kojto 112:6f327212ef96 509 * @{
Kojto 112:6f327212ef96 510 */
Kojto 112:6f327212ef96 511 #define FMC_CONTINUOUS_CLOCK_SYNC_ONLY ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 512 #define FMC_CONTINUOUS_CLOCK_SYNC_ASYNC ((uint32_t)0x00100000)
Kojto 112:6f327212ef96 513 /**
Kojto 112:6f327212ef96 514 * @}
Kojto 112:6f327212ef96 515 */
Kojto 112:6f327212ef96 516
Kojto 112:6f327212ef96 517 /** @defgroup FMC_Access_Mode FMC Access Mode
Kojto 112:6f327212ef96 518 * @{
Kojto 112:6f327212ef96 519 */
Kojto 112:6f327212ef96 520 #define FMC_ACCESS_MODE_A ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 521 #define FMC_ACCESS_MODE_B ((uint32_t)0x10000000)
Kojto 112:6f327212ef96 522 #define FMC_ACCESS_MODE_C ((uint32_t)0x20000000)
Kojto 112:6f327212ef96 523 #define FMC_ACCESS_MODE_D ((uint32_t)0x30000000)
Kojto 112:6f327212ef96 524 /**
Kojto 112:6f327212ef96 525 * @}
Kojto 112:6f327212ef96 526 */
Kojto 112:6f327212ef96 527
Kojto 112:6f327212ef96 528 /**
Kojto 112:6f327212ef96 529 * @}
Kojto 112:6f327212ef96 530 */
Kojto 112:6f327212ef96 531
Kojto 112:6f327212ef96 532 /** @defgroup FMC_LL_NAND_Controller FMC NAND Controller
Kojto 112:6f327212ef96 533 * @{
Kojto 112:6f327212ef96 534 */
Kojto 112:6f327212ef96 535 /** @defgroup FMC_NAND_Bank FMC NAND Bank
Kojto 112:6f327212ef96 536 * @{
Kojto 112:6f327212ef96 537 */
Kojto 112:6f327212ef96 538 #define FMC_NAND_BANK2 ((uint32_t)0x00000010)
Kojto 112:6f327212ef96 539 #define FMC_NAND_BANK3 ((uint32_t)0x00000100)
Kojto 112:6f327212ef96 540 /**
Kojto 112:6f327212ef96 541 * @}
Kojto 112:6f327212ef96 542 */
Kojto 112:6f327212ef96 543
Kojto 112:6f327212ef96 544 /** @defgroup FMC_Wait_feature FMC Wait feature
Kojto 112:6f327212ef96 545 * @{
Kojto 112:6f327212ef96 546 */
Kojto 112:6f327212ef96 547 #define FMC_NAND_PCC_WAIT_FEATURE_DISABLE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 548 #define FMC_NAND_PCC_WAIT_FEATURE_ENABLE ((uint32_t)0x00000002)
Kojto 112:6f327212ef96 549 /**
Kojto 112:6f327212ef96 550 * @}
Kojto 112:6f327212ef96 551 */
Kojto 112:6f327212ef96 552
Kojto 112:6f327212ef96 553 /** @defgroup FMC_PCR_Memory_Type FMC PCR Memory Type
Kojto 112:6f327212ef96 554 * @{
Kojto 112:6f327212ef96 555 */
Kojto 112:6f327212ef96 556 #define FMC_PCR_MEMORY_TYPE_PCCARD ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 557 #define FMC_PCR_MEMORY_TYPE_NAND ((uint32_t)0x00000008)
Kojto 112:6f327212ef96 558 /**
Kojto 112:6f327212ef96 559 * @}
Kojto 112:6f327212ef96 560 */
Kojto 112:6f327212ef96 561
Kojto 112:6f327212ef96 562 /** @defgroup FMC_NAND_Data_Width FMC NAND Data Width
Kojto 112:6f327212ef96 563 * @{
Kojto 112:6f327212ef96 564 */
Kojto 112:6f327212ef96 565 #define FMC_NAND_PCC_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 566 #define FMC_NAND_PCC_MEM_BUS_WIDTH_16 ((uint32_t)0x00000010)
Kojto 112:6f327212ef96 567 /**
Kojto 112:6f327212ef96 568 * @}
Kojto 112:6f327212ef96 569 */
Kojto 112:6f327212ef96 570
Kojto 112:6f327212ef96 571 /** @defgroup FMC_ECC FMC ECC
Kojto 112:6f327212ef96 572 * @{
Kojto 112:6f327212ef96 573 */
Kojto 112:6f327212ef96 574 #define FMC_NAND_ECC_DISABLE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 575 #define FMC_NAND_ECC_ENABLE ((uint32_t)0x00000040)
Kojto 112:6f327212ef96 576 /**
Kojto 112:6f327212ef96 577 * @}
Kojto 112:6f327212ef96 578 */
Kojto 112:6f327212ef96 579
Kojto 112:6f327212ef96 580 /** @defgroup FMC_ECC_Page_Size FMC ECC Page Size
Kojto 112:6f327212ef96 581 * @{
Kojto 112:6f327212ef96 582 */
Kojto 112:6f327212ef96 583 #define FMC_NAND_ECC_PAGE_SIZE_256BYTE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 584 #define FMC_NAND_ECC_PAGE_SIZE_512BYTE ((uint32_t)0x00020000)
Kojto 112:6f327212ef96 585 #define FMC_NAND_ECC_PAGE_SIZE_1024BYTE ((uint32_t)0x00040000)
Kojto 112:6f327212ef96 586 #define FMC_NAND_ECC_PAGE_SIZE_2048BYTE ((uint32_t)0x00060000)
Kojto 112:6f327212ef96 587 #define FMC_NAND_ECC_PAGE_SIZE_4096BYTE ((uint32_t)0x00080000)
Kojto 112:6f327212ef96 588 #define FMC_NAND_ECC_PAGE_SIZE_8192BYTE ((uint32_t)0x000A0000)
Kojto 112:6f327212ef96 589 /**
Kojto 112:6f327212ef96 590 * @}
Kojto 112:6f327212ef96 591 */
Kojto 112:6f327212ef96 592
Kojto 112:6f327212ef96 593 /**
Kojto 112:6f327212ef96 594 * @}
Kojto 112:6f327212ef96 595 */
Kojto 112:6f327212ef96 596
Kojto 112:6f327212ef96 597 /** @defgroup FMC_LL_SDRAM_Controller FMC SDRAM Controller
Kojto 112:6f327212ef96 598 * @{
Kojto 112:6f327212ef96 599 */
Kojto 112:6f327212ef96 600 /** @defgroup FMC_SDRAM_Bank FMC SDRAM Bank
Kojto 112:6f327212ef96 601 * @{
Kojto 112:6f327212ef96 602 */
Kojto 112:6f327212ef96 603 #define FMC_SDRAM_BANK1 ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 604 #define FMC_SDRAM_BANK2 ((uint32_t)0x00000001)
Kojto 112:6f327212ef96 605 /**
Kojto 112:6f327212ef96 606 * @}
Kojto 112:6f327212ef96 607 */
Kojto 112:6f327212ef96 608
Kojto 112:6f327212ef96 609 /** @defgroup FMC_SDRAM_Column_Bits_number FMC SDRAM Column Bits number
Kojto 112:6f327212ef96 610 * @{
Kojto 112:6f327212ef96 611 */
Kojto 112:6f327212ef96 612 #define FMC_SDRAM_COLUMN_BITS_NUM_8 ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 613 #define FMC_SDRAM_COLUMN_BITS_NUM_9 ((uint32_t)0x00000001)
Kojto 112:6f327212ef96 614 #define FMC_SDRAM_COLUMN_BITS_NUM_10 ((uint32_t)0x00000002)
Kojto 112:6f327212ef96 615 #define FMC_SDRAM_COLUMN_BITS_NUM_11 ((uint32_t)0x00000003)
Kojto 112:6f327212ef96 616 /**
Kojto 112:6f327212ef96 617 * @}
Kojto 112:6f327212ef96 618 */
Kojto 112:6f327212ef96 619
Kojto 112:6f327212ef96 620 /** @defgroup FMC_SDRAM_Row_Bits_number FMC SDRAM Row Bits number
Kojto 112:6f327212ef96 621 * @{
Kojto 112:6f327212ef96 622 */
Kojto 112:6f327212ef96 623 #define FMC_SDRAM_ROW_BITS_NUM_11 ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 624 #define FMC_SDRAM_ROW_BITS_NUM_12 ((uint32_t)0x00000004)
Kojto 112:6f327212ef96 625 #define FMC_SDRAM_ROW_BITS_NUM_13 ((uint32_t)0x00000008)
Kojto 112:6f327212ef96 626 /**
Kojto 112:6f327212ef96 627 * @}
Kojto 112:6f327212ef96 628 */
Kojto 112:6f327212ef96 629
Kojto 112:6f327212ef96 630 /** @defgroup FMC_SDRAM_Memory_Bus_Width FMC SDRAM Memory Bus Width
Kojto 112:6f327212ef96 631 * @{
Kojto 112:6f327212ef96 632 */
Kojto 112:6f327212ef96 633 #define FMC_SDRAM_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 634 #define FMC_SDRAM_MEM_BUS_WIDTH_16 ((uint32_t)0x00000010)
Kojto 112:6f327212ef96 635 #define FMC_SDRAM_MEM_BUS_WIDTH_32 ((uint32_t)0x00000020)
Kojto 112:6f327212ef96 636 /**
Kojto 112:6f327212ef96 637 * @}
Kojto 112:6f327212ef96 638 */
Kojto 112:6f327212ef96 639
Kojto 112:6f327212ef96 640 /** @defgroup FMC_SDRAM_Internal_Banks_Number FMC SDRAM Internal Banks Number
Kojto 112:6f327212ef96 641 * @{
Kojto 112:6f327212ef96 642 */
Kojto 112:6f327212ef96 643 #define FMC_SDRAM_INTERN_BANKS_NUM_2 ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 644 #define FMC_SDRAM_INTERN_BANKS_NUM_4 ((uint32_t)0x00000040)
Kojto 112:6f327212ef96 645 /**
Kojto 112:6f327212ef96 646 * @}
Kojto 112:6f327212ef96 647 */
Kojto 112:6f327212ef96 648
Kojto 112:6f327212ef96 649 /** @defgroup FMC_SDRAM_CAS_Latency FMC SDRAM CAS Latency
Kojto 112:6f327212ef96 650 * @{
Kojto 112:6f327212ef96 651 */
Kojto 112:6f327212ef96 652 #define FMC_SDRAM_CAS_LATENCY_1 ((uint32_t)0x00000080)
Kojto 112:6f327212ef96 653 #define FMC_SDRAM_CAS_LATENCY_2 ((uint32_t)0x00000100)
Kojto 112:6f327212ef96 654 #define FMC_SDRAM_CAS_LATENCY_3 ((uint32_t)0x00000180)
Kojto 112:6f327212ef96 655 /**
Kojto 112:6f327212ef96 656 * @}
Kojto 112:6f327212ef96 657 */
Kojto 112:6f327212ef96 658
Kojto 112:6f327212ef96 659 /** @defgroup FMC_SDRAM_Write_Protection FMC SDRAM Write Protection
Kojto 112:6f327212ef96 660 * @{
Kojto 112:6f327212ef96 661 */
Kojto 112:6f327212ef96 662 #define FMC_SDRAM_WRITE_PROTECTION_DISABLE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 663 #define FMC_SDRAM_WRITE_PROTECTION_ENABLE ((uint32_t)0x00000200)
Kojto 112:6f327212ef96 664
Kojto 112:6f327212ef96 665 /**
Kojto 112:6f327212ef96 666 * @}
Kojto 112:6f327212ef96 667 */
Kojto 112:6f327212ef96 668
Kojto 112:6f327212ef96 669 /** @defgroup FMC_SDRAM_Clock_Period FMC SDRAM Clock Period
Kojto 112:6f327212ef96 670 * @{
Kojto 112:6f327212ef96 671 */
Kojto 112:6f327212ef96 672 #define FMC_SDRAM_CLOCK_DISABLE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 673 #define FMC_SDRAM_CLOCK_PERIOD_2 ((uint32_t)0x00000800)
Kojto 112:6f327212ef96 674 #define FMC_SDRAM_CLOCK_PERIOD_3 ((uint32_t)0x00000C00)
Kojto 112:6f327212ef96 675 /**
Kojto 112:6f327212ef96 676 * @}
Kojto 112:6f327212ef96 677 */
Kojto 112:6f327212ef96 678
Kojto 112:6f327212ef96 679 /** @defgroup FMC_SDRAM_Read_Burst FMC SDRAM Read Burst
Kojto 112:6f327212ef96 680 * @{
Kojto 112:6f327212ef96 681 */
Kojto 112:6f327212ef96 682 #define FMC_SDRAM_RBURST_DISABLE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 683 #define FMC_SDRAM_RBURST_ENABLE ((uint32_t)0x00001000)
Kojto 112:6f327212ef96 684 /**
Kojto 112:6f327212ef96 685 * @}
Kojto 112:6f327212ef96 686 */
Kojto 112:6f327212ef96 687
Kojto 112:6f327212ef96 688 /** @defgroup FMC_SDRAM_Read_Pipe_Delay FMC SDRAM Read Pipe Delay
Kojto 112:6f327212ef96 689 * @{
Kojto 112:6f327212ef96 690 */
Kojto 112:6f327212ef96 691 #define FMC_SDRAM_RPIPE_DELAY_0 ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 692 #define FMC_SDRAM_RPIPE_DELAY_1 ((uint32_t)0x00002000)
Kojto 112:6f327212ef96 693 #define FMC_SDRAM_RPIPE_DELAY_2 ((uint32_t)0x00004000)
Kojto 112:6f327212ef96 694 /**
Kojto 112:6f327212ef96 695 * @}
Kojto 112:6f327212ef96 696 */
Kojto 112:6f327212ef96 697
Kojto 112:6f327212ef96 698 /** @defgroup FMC_SDRAM_Command_Mode FMC SDRAM Command Mode
Kojto 112:6f327212ef96 699 * @{
Kojto 112:6f327212ef96 700 */
Kojto 112:6f327212ef96 701 #define FMC_SDRAM_CMD_NORMAL_MODE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 702 #define FMC_SDRAM_CMD_CLK_ENABLE ((uint32_t)0x00000001)
Kojto 112:6f327212ef96 703 #define FMC_SDRAM_CMD_PALL ((uint32_t)0x00000002)
Kojto 112:6f327212ef96 704 #define FMC_SDRAM_CMD_AUTOREFRESH_MODE ((uint32_t)0x00000003)
Kojto 112:6f327212ef96 705 #define FMC_SDRAM_CMD_LOAD_MODE ((uint32_t)0x00000004)
Kojto 112:6f327212ef96 706 #define FMC_SDRAM_CMD_SELFREFRESH_MODE ((uint32_t)0x00000005)
Kojto 112:6f327212ef96 707 #define FMC_SDRAM_CMD_POWERDOWN_MODE ((uint32_t)0x00000006)
Kojto 112:6f327212ef96 708 /**
Kojto 112:6f327212ef96 709 * @}
Kojto 112:6f327212ef96 710 */
Kojto 112:6f327212ef96 711
Kojto 112:6f327212ef96 712 /** @defgroup FMC_SDRAM_Command_Target FMC SDRAM Command Target
Kojto 112:6f327212ef96 713 * @{
Kojto 112:6f327212ef96 714 */
Kojto 112:6f327212ef96 715 #define FMC_SDRAM_CMD_TARGET_BANK2 FMC_SDCMR_CTB2
Kojto 112:6f327212ef96 716 #define FMC_SDRAM_CMD_TARGET_BANK1 FMC_SDCMR_CTB1
Kojto 112:6f327212ef96 717 #define FMC_SDRAM_CMD_TARGET_BANK1_2 ((uint32_t)0x00000018)
Kojto 112:6f327212ef96 718 /**
Kojto 112:6f327212ef96 719 * @}
Kojto 112:6f327212ef96 720 */
Kojto 112:6f327212ef96 721
Kojto 112:6f327212ef96 722 /** @defgroup FMC_SDRAM_Mode_Status FMC SDRAM Mode Status
Kojto 112:6f327212ef96 723 * @{
Kojto 112:6f327212ef96 724 */
Kojto 112:6f327212ef96 725 #define FMC_SDRAM_NORMAL_MODE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 726 #define FMC_SDRAM_SELF_REFRESH_MODE FMC_SDSR_MODES1_0
Kojto 112:6f327212ef96 727 #define FMC_SDRAM_POWER_DOWN_MODE FMC_SDSR_MODES1_1
Kojto 112:6f327212ef96 728 /**
Kojto 112:6f327212ef96 729 * @}
Kojto 112:6f327212ef96 730 */
Kojto 112:6f327212ef96 731
Kojto 112:6f327212ef96 732 /**
Kojto 112:6f327212ef96 733 * @}
Kojto 112:6f327212ef96 734 */
Kojto 112:6f327212ef96 735
Kojto 112:6f327212ef96 736 /** @defgroup FMC_LL_Interrupt_definition FMC Interrupt definition
Kojto 112:6f327212ef96 737 * @{
Kojto 112:6f327212ef96 738 */
Kojto 112:6f327212ef96 739 #define FMC_IT_RISING_EDGE ((uint32_t)0x00000008)
Kojto 112:6f327212ef96 740 #define FMC_IT_LEVEL ((uint32_t)0x00000010)
Kojto 112:6f327212ef96 741 #define FMC_IT_FALLING_EDGE ((uint32_t)0x00000020)
Kojto 112:6f327212ef96 742 #define FMC_IT_REFRESH_ERROR ((uint32_t)0x00004000)
Kojto 112:6f327212ef96 743 /**
Kojto 112:6f327212ef96 744 * @}
Kojto 112:6f327212ef96 745 */
Kojto 112:6f327212ef96 746
Kojto 112:6f327212ef96 747 /** @defgroup FMC_LL_Flag_definition FMC Flag definition
Kojto 112:6f327212ef96 748 * @{
Kojto 112:6f327212ef96 749 */
Kojto 112:6f327212ef96 750 #define FMC_FLAG_RISING_EDGE ((uint32_t)0x00000001)
Kojto 112:6f327212ef96 751 #define FMC_FLAG_LEVEL ((uint32_t)0x00000002)
Kojto 112:6f327212ef96 752 #define FMC_FLAG_FALLING_EDGE ((uint32_t)0x00000004)
Kojto 112:6f327212ef96 753 #define FMC_FLAG_FEMPT ((uint32_t)0x00000040)
Kojto 112:6f327212ef96 754 #define FMC_SDRAM_FLAG_REFRESH_IT FMC_SDSR_RE
Kojto 112:6f327212ef96 755 #define FMC_SDRAM_FLAG_BUSY FMC_SDSR_BUSY
Kojto 112:6f327212ef96 756 #define FMC_SDRAM_FLAG_REFRESH_ERROR FMC_SDRTR_CRE
Kojto 112:6f327212ef96 757 /**
Kojto 112:6f327212ef96 758 * @}
Kojto 112:6f327212ef96 759 */
Kojto 112:6f327212ef96 760
Kojto 112:6f327212ef96 761 /** @defgroup FMC_LL_Alias_definition FMC Alias definition
Kojto 112:6f327212ef96 762 * @{
Kojto 112:6f327212ef96 763 */
Kojto 112:6f327212ef96 764 #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
Kojto 112:6f327212ef96 765 #define FMC_NAND_TypeDef FMC_Bank3_TypeDef
Kojto 112:6f327212ef96 766 #else
Kojto 112:6f327212ef96 767 #define FMC_NAND_TypeDef FMC_Bank2_3_TypeDef
Kojto 112:6f327212ef96 768 #define FMC_PCCARD_TypeDef FMC_Bank4_TypeDef
Kojto 112:6f327212ef96 769 #endif /* STM32F446xx || STM32F469xx || STM32F479xx */
Kojto 112:6f327212ef96 770 #define FMC_NORSRAM_TypeDef FMC_Bank1_TypeDef
Kojto 112:6f327212ef96 771 #define FMC_NORSRAM_EXTENDED_TypeDef FMC_Bank1E_TypeDef
Kojto 112:6f327212ef96 772 #define FMC_SDRAM_TypeDef FMC_Bank5_6_TypeDef
Kojto 112:6f327212ef96 773
Kojto 112:6f327212ef96 774
Kojto 112:6f327212ef96 775 #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
Kojto 112:6f327212ef96 776 #define FMC_NAND_DEVICE FMC_Bank3
Kojto 112:6f327212ef96 777 #else
Kojto 112:6f327212ef96 778 #define FMC_NAND_DEVICE FMC_Bank2_3
Kojto 112:6f327212ef96 779 #define FMC_PCCARD_DEVICE FMC_Bank4
Kojto 112:6f327212ef96 780 #endif /* STM32F446xx || STM32F469xx || STM32F479xx */
Kojto 112:6f327212ef96 781 #define FMC_NORSRAM_DEVICE FMC_Bank1
Kojto 112:6f327212ef96 782 #define FMC_NORSRAM_EXTENDED_DEVICE FMC_Bank1E
Kojto 112:6f327212ef96 783 #define FMC_SDRAM_DEVICE FMC_Bank5_6
Kojto 112:6f327212ef96 784 /**
Kojto 112:6f327212ef96 785 * @}
Kojto 112:6f327212ef96 786 */
Kojto 112:6f327212ef96 787
Kojto 112:6f327212ef96 788 /**
Kojto 112:6f327212ef96 789 * @}
Kojto 112:6f327212ef96 790 */
Kojto 112:6f327212ef96 791
Kojto 112:6f327212ef96 792 /* Private macro -------------------------------------------------------------*/
Kojto 112:6f327212ef96 793 /** @defgroup FMC_LL_Private_Macros FMC Private Macros
Kojto 112:6f327212ef96 794 * @{
Kojto 112:6f327212ef96 795 */
Kojto 112:6f327212ef96 796
Kojto 112:6f327212ef96 797 /** @defgroup FMC_LL_NOR_Macros FMC NOR/SRAM Macros
Kojto 112:6f327212ef96 798 * @brief macros to handle NOR device enable/disable and read/write operations
Kojto 112:6f327212ef96 799 * @{
Kojto 112:6f327212ef96 800 */
Kojto 112:6f327212ef96 801 /**
Kojto 112:6f327212ef96 802 * @brief Enable the NORSRAM device access.
Kojto 112:6f327212ef96 803 * @param __INSTANCE__: FMC_NORSRAM Instance
Kojto 112:6f327212ef96 804 * @param __BANK__: FMC_NORSRAM Bank
Kojto 112:6f327212ef96 805 * @retval None
Kojto 112:6f327212ef96 806 */
Kojto 112:6f327212ef96 807 #define __FMC_NORSRAM_ENABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->BTCR[(__BANK__)] |= FMC_BCR1_MBKEN)
Kojto 112:6f327212ef96 808
Kojto 112:6f327212ef96 809 /**
Kojto 112:6f327212ef96 810 * @brief Disable the NORSRAM device access.
Kojto 112:6f327212ef96 811 * @param __INSTANCE__: FMC_NORSRAM Instance
Kojto 112:6f327212ef96 812 * @param __BANK__: FMC_NORSRAM Bank
Kojto 112:6f327212ef96 813 * @retval None
Kojto 112:6f327212ef96 814 */
Kojto 112:6f327212ef96 815 #define __FMC_NORSRAM_DISABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->BTCR[(__BANK__)] &= ~FMC_BCR1_MBKEN)
Kojto 112:6f327212ef96 816 /**
Kojto 112:6f327212ef96 817 * @}
Kojto 112:6f327212ef96 818 */
Kojto 112:6f327212ef96 819
Kojto 112:6f327212ef96 820 /** @defgroup FMC_LL_NAND_Macros FMC NAND Macros
Kojto 112:6f327212ef96 821 * @brief macros to handle NAND device enable/disable
Kojto 112:6f327212ef96 822 * @{
Kojto 112:6f327212ef96 823 */
Kojto 112:6f327212ef96 824 #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
Kojto 112:6f327212ef96 825 /**
Kojto 112:6f327212ef96 826 * @brief Enable the NAND device access.
Kojto 112:6f327212ef96 827 * @param __INSTANCE__: FMC_NAND Instance
Kojto 112:6f327212ef96 828 * @param __BANK__: FMC_NAND Bank
Kojto 112:6f327212ef96 829 * @retval None
Kojto 112:6f327212ef96 830 */
Kojto 112:6f327212ef96 831 #define __FMC_NAND_ENABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->PCR |= FMC_PCR_PBKEN)
Kojto 112:6f327212ef96 832
Kojto 112:6f327212ef96 833 /**
Kojto 112:6f327212ef96 834 * @brief Disable the NAND device access.
Kojto 112:6f327212ef96 835 * @param __INSTANCE__: FMC_NAND Instance
Kojto 112:6f327212ef96 836 * @param __BANK__: FMC_NAND Bank
Kojto 112:6f327212ef96 837 * @retval None
Kojto 112:6f327212ef96 838 */
Kojto 112:6f327212ef96 839 #define __FMC_NAND_DISABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->PCR &= ~FMC_PCR_PBKEN)
Kojto 112:6f327212ef96 840 #else /* defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) */
Kojto 112:6f327212ef96 841 /**
Kojto 112:6f327212ef96 842 * @brief Enable the NAND device access.
Kojto 112:6f327212ef96 843 * @param __INSTANCE__: FMC_NAND Instance
Kojto 112:6f327212ef96 844 * @param __BANK__: FMC_NAND Bank
Kojto 112:6f327212ef96 845 * @retval None
Kojto 112:6f327212ef96 846 */
Kojto 112:6f327212ef96 847 #define __FMC_NAND_ENABLE(__INSTANCE__, __BANK__) (((__BANK__) == FMC_NAND_BANK2)? ((__INSTANCE__)->PCR2 |= FMC_PCR2_PBKEN): \
Kojto 112:6f327212ef96 848 ((__INSTANCE__)->PCR3 |= FMC_PCR3_PBKEN))
Kojto 112:6f327212ef96 849
Kojto 112:6f327212ef96 850 /**
Kojto 112:6f327212ef96 851 * @brief Disable the NAND device access.
Kojto 112:6f327212ef96 852 * @param __INSTANCE__: FMC_NAND Instance
Kojto 112:6f327212ef96 853 * @param __BANK__: FMC_NAND Bank
Kojto 112:6f327212ef96 854 * @retval None
Kojto 112:6f327212ef96 855 */
Kojto 112:6f327212ef96 856 #define __FMC_NAND_DISABLE(__INSTANCE__, __BANK__) (((__BANK__) == FMC_NAND_BANK2)? ((__INSTANCE__)->PCR2 &= ~FMC_PCR2_PBKEN): \
Kojto 112:6f327212ef96 857 ((__INSTANCE__)->PCR3 &= ~FMC_PCR3_PBKEN))
Kojto 112:6f327212ef96 858
Kojto 112:6f327212ef96 859 #endif /* defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) */
Kojto 112:6f327212ef96 860 /**
Kojto 112:6f327212ef96 861 * @}
Kojto 112:6f327212ef96 862 */
Kojto 112:6f327212ef96 863 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)
Kojto 112:6f327212ef96 864 /** @defgroup FMC_LL_PCCARD_Macros FMC PCCARD Macros
Kojto 112:6f327212ef96 865 * @brief macros to handle SRAM read/write operations
Kojto 112:6f327212ef96 866 * @{
Kojto 112:6f327212ef96 867 */
Kojto 112:6f327212ef96 868 /**
Kojto 112:6f327212ef96 869 * @brief Enable the PCCARD device access.
Kojto 112:6f327212ef96 870 * @param __INSTANCE__: FMC_PCCARD Instance
Kojto 112:6f327212ef96 871 * @retval None
Kojto 112:6f327212ef96 872 */
Kojto 112:6f327212ef96 873 #define __FMC_PCCARD_ENABLE(__INSTANCE__) ((__INSTANCE__)->PCR4 |= FMC_PCR4_PBKEN)
Kojto 112:6f327212ef96 874
Kojto 112:6f327212ef96 875 /**
Kojto 112:6f327212ef96 876 * @brief Disable the PCCARD device access.
Kojto 112:6f327212ef96 877 * @param __INSTANCE__: FMC_PCCARD Instance
Kojto 112:6f327212ef96 878 * @retval None
Kojto 112:6f327212ef96 879 */
Kojto 112:6f327212ef96 880 #define __FMC_PCCARD_DISABLE(__INSTANCE__) ((__INSTANCE__)->PCR4 &= ~FMC_PCR4_PBKEN)
Kojto 112:6f327212ef96 881 /**
Kojto 112:6f327212ef96 882 * @}
Kojto 112:6f327212ef96 883 */
Kojto 112:6f327212ef96 884 #endif /* defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) */
Kojto 112:6f327212ef96 885
Kojto 112:6f327212ef96 886 /** @defgroup FMC_LL_Flag_Interrupt_Macros FMC Flag&Interrupt Macros
Kojto 112:6f327212ef96 887 * @brief macros to handle FMC flags and interrupts
Kojto 112:6f327212ef96 888 * @{
Kojto 112:6f327212ef96 889 */
Kojto 112:6f327212ef96 890 #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
Kojto 112:6f327212ef96 891 /**
Kojto 112:6f327212ef96 892 * @brief Enable the NAND device interrupt.
Kojto 112:6f327212ef96 893 * @param __INSTANCE__: FMC_NAND instance
Kojto 112:6f327212ef96 894 * @param __BANK__: FMC_NAND Bank
Kojto 112:6f327212ef96 895 * @param __INTERRUPT__: FMC_NAND interrupt
Kojto 112:6f327212ef96 896 * This parameter can be any combination of the following values:
Kojto 112:6f327212ef96 897 * @arg FMC_IT_RISING_EDGE: Interrupt rising edge.
Kojto 112:6f327212ef96 898 * @arg FMC_IT_LEVEL: Interrupt level.
Kojto 112:6f327212ef96 899 * @arg FMC_IT_FALLING_EDGE: Interrupt falling edge.
Kojto 112:6f327212ef96 900 * @retval None
Kojto 112:6f327212ef96 901 */
Kojto 112:6f327212ef96 902 #define __FMC_NAND_ENABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) ((__INSTANCE__)->SR |= (__INTERRUPT__))
Kojto 112:6f327212ef96 903
Kojto 112:6f327212ef96 904 /**
Kojto 112:6f327212ef96 905 * @brief Disable the NAND device interrupt.
Kojto 112:6f327212ef96 906 * @param __INSTANCE__: FMC_NAND Instance
Kojto 112:6f327212ef96 907 * @param __BANK__: FMC_NAND Bank
Kojto 112:6f327212ef96 908 * @param __INTERRUPT__: FMC_NAND interrupt
Kojto 112:6f327212ef96 909 * This parameter can be any combination of the following values:
Kojto 112:6f327212ef96 910 * @arg FMC_IT_RISING_EDGE: Interrupt rising edge.
Kojto 112:6f327212ef96 911 * @arg FMC_IT_LEVEL: Interrupt level.
Kojto 112:6f327212ef96 912 * @arg FMC_IT_FALLING_EDGE: Interrupt falling edge.
Kojto 112:6f327212ef96 913 * @retval None
Kojto 112:6f327212ef96 914 */
Kojto 112:6f327212ef96 915 #define __FMC_NAND_DISABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) ((__INSTANCE__)->SR &= ~(__INTERRUPT__))
Kojto 112:6f327212ef96 916
Kojto 112:6f327212ef96 917 /**
Kojto 112:6f327212ef96 918 * @brief Get flag status of the NAND device.
Kojto 112:6f327212ef96 919 * @param __INSTANCE__: FMC_NAND Instance
Kojto 112:6f327212ef96 920 * @param __BANK__: FMC_NAND Bank
Kojto 112:6f327212ef96 921 * @param __FLAG__: FMC_NAND flag
Kojto 112:6f327212ef96 922 * This parameter can be any combination of the following values:
Kojto 112:6f327212ef96 923 * @arg FMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
Kojto 112:6f327212ef96 924 * @arg FMC_FLAG_LEVEL: Interrupt level edge flag.
Kojto 112:6f327212ef96 925 * @arg FMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
Kojto 112:6f327212ef96 926 * @arg FMC_FLAG_FEMPT: FIFO empty flag.
Kojto 112:6f327212ef96 927 * @retval The state of FLAG (SET or RESET).
Kojto 112:6f327212ef96 928 */
Kojto 112:6f327212ef96 929 #define __FMC_NAND_GET_FLAG(__INSTANCE__, __BANK__, __FLAG__) (((__INSTANCE__)->SR &(__FLAG__)) == (__FLAG__))
Kojto 112:6f327212ef96 930 /**
Kojto 112:6f327212ef96 931 * @brief Clear flag status of the NAND device.
Kojto 112:6f327212ef96 932 * @param __INSTANCE__: FMC_NAND Instance
Kojto 112:6f327212ef96 933 * @param __BANK__: FMC_NAND Bank
Kojto 112:6f327212ef96 934 * @param __FLAG__: FMC_NAND flag
Kojto 112:6f327212ef96 935 * This parameter can be any combination of the following values:
Kojto 112:6f327212ef96 936 * @arg FMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
Kojto 112:6f327212ef96 937 * @arg FMC_FLAG_LEVEL: Interrupt level edge flag.
Kojto 112:6f327212ef96 938 * @arg FMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
Kojto 112:6f327212ef96 939 * @arg FMC_FLAG_FEMPT: FIFO empty flag.
Kojto 112:6f327212ef96 940 * @retval None
Kojto 112:6f327212ef96 941 */
Kojto 112:6f327212ef96 942 #define __FMC_NAND_CLEAR_FLAG(__INSTANCE__, __BANK__, __FLAG__) ((__INSTANCE__)->SR &= ~(__FLAG__))
Kojto 112:6f327212ef96 943 #else /* defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) */
Kojto 112:6f327212ef96 944 /**
Kojto 112:6f327212ef96 945 * @brief Enable the NAND device interrupt.
Kojto 112:6f327212ef96 946 * @param __INSTANCE__: FMC_NAND instance
Kojto 112:6f327212ef96 947 * @param __BANK__: FMC_NAND Bank
Kojto 112:6f327212ef96 948 * @param __INTERRUPT__: FMC_NAND interrupt
Kojto 112:6f327212ef96 949 * This parameter can be any combination of the following values:
Kojto 112:6f327212ef96 950 * @arg FMC_IT_RISING_EDGE: Interrupt rising edge.
Kojto 112:6f327212ef96 951 * @arg FMC_IT_LEVEL: Interrupt level.
Kojto 112:6f327212ef96 952 * @arg FMC_IT_FALLING_EDGE: Interrupt falling edge.
Kojto 112:6f327212ef96 953 * @retval None
Kojto 112:6f327212ef96 954 */
Kojto 112:6f327212ef96 955 #define __FMC_NAND_ENABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) (((__BANK__) == FMC_NAND_BANK2)? ((__INSTANCE__)->SR2 |= (__INTERRUPT__)): \
Kojto 112:6f327212ef96 956 ((__INSTANCE__)->SR3 |= (__INTERRUPT__)))
Kojto 112:6f327212ef96 957
Kojto 112:6f327212ef96 958 /**
Kojto 112:6f327212ef96 959 * @brief Disable the NAND device interrupt.
Kojto 112:6f327212ef96 960 * @param __INSTANCE__: FMC_NAND Instance
Kojto 112:6f327212ef96 961 * @param __BANK__: FMC_NAND Bank
Kojto 112:6f327212ef96 962 * @param __INTERRUPT__: FMC_NAND interrupt
Kojto 112:6f327212ef96 963 * This parameter can be any combination of the following values:
Kojto 112:6f327212ef96 964 * @arg FMC_IT_RISING_EDGE: Interrupt rising edge.
Kojto 112:6f327212ef96 965 * @arg FMC_IT_LEVEL: Interrupt level.
Kojto 112:6f327212ef96 966 * @arg FMC_IT_FALLING_EDGE: Interrupt falling edge.
Kojto 112:6f327212ef96 967 * @retval None
Kojto 112:6f327212ef96 968 */
Kojto 112:6f327212ef96 969 #define __FMC_NAND_DISABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) (((__BANK__) == FMC_NAND_BANK2)? ((__INSTANCE__)->SR2 &= ~(__INTERRUPT__)): \
Kojto 112:6f327212ef96 970 ((__INSTANCE__)->SR3 &= ~(__INTERRUPT__)))
Kojto 112:6f327212ef96 971
Kojto 112:6f327212ef96 972 /**
Kojto 112:6f327212ef96 973 * @brief Get flag status of the NAND device.
Kojto 112:6f327212ef96 974 * @param __INSTANCE__: FMC_NAND Instance
Kojto 112:6f327212ef96 975 * @param __BANK__: FMC_NAND Bank
Kojto 112:6f327212ef96 976 * @param __FLAG__: FMC_NAND flag
Kojto 112:6f327212ef96 977 * This parameter can be any combination of the following values:
Kojto 112:6f327212ef96 978 * @arg FMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
Kojto 112:6f327212ef96 979 * @arg FMC_FLAG_LEVEL: Interrupt level edge flag.
Kojto 112:6f327212ef96 980 * @arg FMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
Kojto 112:6f327212ef96 981 * @arg FMC_FLAG_FEMPT: FIFO empty flag.
Kojto 112:6f327212ef96 982 * @retval The state of FLAG (SET or RESET).
Kojto 112:6f327212ef96 983 */
Kojto 112:6f327212ef96 984 #define __FMC_NAND_GET_FLAG(__INSTANCE__, __BANK__, __FLAG__) (((__BANK__) == FMC_NAND_BANK2)? (((__INSTANCE__)->SR2 &(__FLAG__)) == (__FLAG__)): \
Kojto 112:6f327212ef96 985 (((__INSTANCE__)->SR3 &(__FLAG__)) == (__FLAG__)))
Kojto 112:6f327212ef96 986 /**
Kojto 112:6f327212ef96 987 * @brief Clear flag status of the NAND device.
Kojto 112:6f327212ef96 988 * @param __INSTANCE__: FMC_NAND Instance
Kojto 112:6f327212ef96 989 * @param __BANK__: FMC_NAND Bank
Kojto 112:6f327212ef96 990 * @param __FLAG__: FMC_NAND flag
Kojto 112:6f327212ef96 991 * This parameter can be any combination of the following values:
Kojto 112:6f327212ef96 992 * @arg FMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
Kojto 112:6f327212ef96 993 * @arg FMC_FLAG_LEVEL: Interrupt level edge flag.
Kojto 112:6f327212ef96 994 * @arg FMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
Kojto 112:6f327212ef96 995 * @arg FMC_FLAG_FEMPT: FIFO empty flag.
Kojto 112:6f327212ef96 996 * @retval None
Kojto 112:6f327212ef96 997 */
Kojto 112:6f327212ef96 998 #define __FMC_NAND_CLEAR_FLAG(__INSTANCE__, __BANK__, __FLAG__) (((__BANK__) == FMC_NAND_BANK2)? ((__INSTANCE__)->SR2 &= ~(__FLAG__)): \
Kojto 112:6f327212ef96 999 ((__INSTANCE__)->SR3 &= ~(__FLAG__)))
Kojto 112:6f327212ef96 1000 #endif /* defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) */
Kojto 112:6f327212ef96 1001
Kojto 112:6f327212ef96 1002 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)
Kojto 112:6f327212ef96 1003 /**
Kojto 112:6f327212ef96 1004 * @brief Enable the PCCARD device interrupt.
Kojto 112:6f327212ef96 1005 * @param __INSTANCE__: FMC_PCCARD instance
Kojto 112:6f327212ef96 1006 * @param __INTERRUPT__: FMC_PCCARD interrupt
Kojto 112:6f327212ef96 1007 * This parameter can be any combination of the following values:
Kojto 112:6f327212ef96 1008 * @arg FMC_IT_RISING_EDGE: Interrupt rising edge.
Kojto 112:6f327212ef96 1009 * @arg FMC_IT_LEVEL: Interrupt level.
Kojto 112:6f327212ef96 1010 * @arg FMC_IT_FALLING_EDGE: Interrupt falling edge.
Kojto 112:6f327212ef96 1011 * @retval None
Kojto 112:6f327212ef96 1012 */
Kojto 112:6f327212ef96 1013 #define __FMC_PCCARD_ENABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->SR4 |= (__INTERRUPT__))
Kojto 112:6f327212ef96 1014
Kojto 112:6f327212ef96 1015 /**
Kojto 112:6f327212ef96 1016 * @brief Disable the PCCARD device interrupt.
Kojto 112:6f327212ef96 1017 * @param __INSTANCE__: FMC_PCCARD instance
Kojto 112:6f327212ef96 1018 * @param __INTERRUPT__: FMC_PCCARD interrupt
Kojto 112:6f327212ef96 1019 * This parameter can be any combination of the following values:
Kojto 112:6f327212ef96 1020 * @arg FMC_IT_RISING_EDGE: Interrupt rising edge.
Kojto 112:6f327212ef96 1021 * @arg FMC_IT_LEVEL: Interrupt level.
Kojto 112:6f327212ef96 1022 * @arg FMC_IT_FALLING_EDGE: Interrupt falling edge.
Kojto 112:6f327212ef96 1023 * @retval None
Kojto 112:6f327212ef96 1024 */
Kojto 112:6f327212ef96 1025 #define __FMC_PCCARD_DISABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->SR4 &= ~(__INTERRUPT__))
Kojto 112:6f327212ef96 1026
Kojto 112:6f327212ef96 1027 /**
Kojto 112:6f327212ef96 1028 * @brief Get flag status of the PCCARD device.
Kojto 112:6f327212ef96 1029 * @param __INSTANCE__: FMC_PCCARD instance
Kojto 112:6f327212ef96 1030 * @param __FLAG__: FMC_PCCARD flag
Kojto 112:6f327212ef96 1031 * This parameter can be any combination of the following values:
Kojto 112:6f327212ef96 1032 * @arg FMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
Kojto 112:6f327212ef96 1033 * @arg FMC_FLAG_LEVEL: Interrupt level edge flag.
Kojto 112:6f327212ef96 1034 * @arg FMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
Kojto 112:6f327212ef96 1035 * @arg FMC_FLAG_FEMPT: FIFO empty flag.
Kojto 112:6f327212ef96 1036 * @retval The state of FLAG (SET or RESET).
Kojto 112:6f327212ef96 1037 */
Kojto 112:6f327212ef96 1038 #define __FMC_PCCARD_GET_FLAG(__INSTANCE__, __FLAG__) (((__INSTANCE__)->SR4 &(__FLAG__)) == (__FLAG__))
Kojto 112:6f327212ef96 1039
Kojto 112:6f327212ef96 1040 /**
Kojto 112:6f327212ef96 1041 * @brief Clear flag status of the PCCARD device.
Kojto 112:6f327212ef96 1042 * @param __INSTANCE__: FMC_PCCARD instance
Kojto 112:6f327212ef96 1043 * @param __FLAG__: FMC_PCCARD flag
Kojto 112:6f327212ef96 1044 * This parameter can be any combination of the following values:
Kojto 112:6f327212ef96 1045 * @arg FMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
Kojto 112:6f327212ef96 1046 * @arg FMC_FLAG_LEVEL: Interrupt level edge flag.
Kojto 112:6f327212ef96 1047 * @arg FMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
Kojto 112:6f327212ef96 1048 * @arg FMC_FLAG_FEMPT: FIFO empty flag.
Kojto 112:6f327212ef96 1049 * @retval None
Kojto 112:6f327212ef96 1050 */
Kojto 112:6f327212ef96 1051 #define __FMC_PCCARD_CLEAR_FLAG(__INSTANCE__, __FLAG__) ((__INSTANCE__)->SR4 &= ~(__FLAG__))
Kojto 112:6f327212ef96 1052 #endif /* defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) */
Kojto 112:6f327212ef96 1053
Kojto 112:6f327212ef96 1054 /**
Kojto 112:6f327212ef96 1055 * @brief Enable the SDRAM device interrupt.
Kojto 112:6f327212ef96 1056 * @param __INSTANCE__: FMC_SDRAM instance
Kojto 112:6f327212ef96 1057 * @param __INTERRUPT__: FMC_SDRAM interrupt
Kojto 112:6f327212ef96 1058 * This parameter can be any combination of the following values:
Kojto 112:6f327212ef96 1059 * @arg FMC_IT_REFRESH_ERROR: Interrupt refresh error
Kojto 112:6f327212ef96 1060 * @retval None
Kojto 112:6f327212ef96 1061 */
Kojto 112:6f327212ef96 1062 #define __FMC_SDRAM_ENABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->SDRTR |= (__INTERRUPT__))
Kojto 112:6f327212ef96 1063
Kojto 112:6f327212ef96 1064 /**
Kojto 112:6f327212ef96 1065 * @brief Disable the SDRAM device interrupt.
Kojto 112:6f327212ef96 1066 * @param __INSTANCE__: FMC_SDRAM instance
Kojto 112:6f327212ef96 1067 * @param __INTERRUPT__: FMC_SDRAM interrupt
Kojto 112:6f327212ef96 1068 * This parameter can be any combination of the following values:
Kojto 112:6f327212ef96 1069 * @arg FMC_IT_REFRESH_ERROR: Interrupt refresh error
Kojto 112:6f327212ef96 1070 * @retval None
Kojto 112:6f327212ef96 1071 */
Kojto 112:6f327212ef96 1072 #define __FMC_SDRAM_DISABLE_IT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->SDRTR &= ~(__INTERRUPT__))
Kojto 112:6f327212ef96 1073
Kojto 112:6f327212ef96 1074 /**
Kojto 112:6f327212ef96 1075 * @brief Get flag status of the SDRAM device.
Kojto 112:6f327212ef96 1076 * @param __INSTANCE__: FMC_SDRAM instance
Kojto 112:6f327212ef96 1077 * @param __FLAG__: FMC_SDRAM flag
Kojto 112:6f327212ef96 1078 * This parameter can be any combination of the following values:
Kojto 112:6f327212ef96 1079 * @arg FMC_SDRAM_FLAG_REFRESH_IT: Interrupt refresh error.
Kojto 112:6f327212ef96 1080 * @arg FMC_SDRAM_FLAG_BUSY: SDRAM busy flag.
Kojto 112:6f327212ef96 1081 * @arg FMC_SDRAM_FLAG_REFRESH_ERROR: Refresh error flag.
Kojto 112:6f327212ef96 1082 * @retval The state of FLAG (SET or RESET).
Kojto 112:6f327212ef96 1083 */
Kojto 112:6f327212ef96 1084 #define __FMC_SDRAM_GET_FLAG(__INSTANCE__, __FLAG__) (((__INSTANCE__)->SDSR &(__FLAG__)) == (__FLAG__))
Kojto 112:6f327212ef96 1085
Kojto 112:6f327212ef96 1086 /**
Kojto 112:6f327212ef96 1087 * @brief Clear flag status of the SDRAM device.
Kojto 112:6f327212ef96 1088 * @param __INSTANCE__: FMC_SDRAM instance
Kojto 112:6f327212ef96 1089 * @param __FLAG__: FMC_SDRAM flag
Kojto 112:6f327212ef96 1090 * This parameter can be any combination of the following values:
Kojto 112:6f327212ef96 1091 * @arg FMC_SDRAM_FLAG_REFRESH_ERROR
Kojto 112:6f327212ef96 1092 * @retval None
Kojto 112:6f327212ef96 1093 */
Kojto 112:6f327212ef96 1094 #define __FMC_SDRAM_CLEAR_FLAG(__INSTANCE__, __FLAG__) ((__INSTANCE__)->SDRTR |= (__FLAG__))
Kojto 112:6f327212ef96 1095 /**
Kojto 112:6f327212ef96 1096 * @}
Kojto 112:6f327212ef96 1097 */
Kojto 112:6f327212ef96 1098
Kojto 112:6f327212ef96 1099 /** @defgroup FSMC_LL_Assert_Macros FSMC Assert Macros
Kojto 112:6f327212ef96 1100 * @{
Kojto 112:6f327212ef96 1101 */
Kojto 112:6f327212ef96 1102 #define IS_FMC_NORSRAM_BANK(BANK) (((BANK) == FMC_NORSRAM_BANK1) || \
Kojto 112:6f327212ef96 1103 ((BANK) == FMC_NORSRAM_BANK2) || \
Kojto 112:6f327212ef96 1104 ((BANK) == FMC_NORSRAM_BANK3) || \
Kojto 112:6f327212ef96 1105 ((BANK) == FMC_NORSRAM_BANK4))
Kojto 112:6f327212ef96 1106
Kojto 112:6f327212ef96 1107 #define IS_FMC_MUX(__MUX__) (((__MUX__) == FMC_DATA_ADDRESS_MUX_DISABLE) || \
Kojto 112:6f327212ef96 1108 ((__MUX__) == FMC_DATA_ADDRESS_MUX_ENABLE))
Kojto 112:6f327212ef96 1109
Kojto 112:6f327212ef96 1110 #define IS_FMC_MEMORY(__MEMORY__) (((__MEMORY__) == FMC_MEMORY_TYPE_SRAM) || \
Kojto 112:6f327212ef96 1111 ((__MEMORY__) == FMC_MEMORY_TYPE_PSRAM)|| \
Kojto 112:6f327212ef96 1112 ((__MEMORY__) == FMC_MEMORY_TYPE_NOR))
Kojto 112:6f327212ef96 1113
Kojto 112:6f327212ef96 1114 #define IS_FMC_NORSRAM_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FMC_NORSRAM_MEM_BUS_WIDTH_8) || \
Kojto 112:6f327212ef96 1115 ((__WIDTH__) == FMC_NORSRAM_MEM_BUS_WIDTH_16) || \
Kojto 112:6f327212ef96 1116 ((__WIDTH__) == FMC_NORSRAM_MEM_BUS_WIDTH_32))
Kojto 112:6f327212ef96 1117
Kojto 112:6f327212ef96 1118 #define IS_FMC_ACCESS_MODE(__MODE__) (((__MODE__) == FMC_ACCESS_MODE_A) || \
Kojto 112:6f327212ef96 1119 ((__MODE__) == FMC_ACCESS_MODE_B) || \
Kojto 112:6f327212ef96 1120 ((__MODE__) == FMC_ACCESS_MODE_C) || \
Kojto 112:6f327212ef96 1121 ((__MODE__) == FMC_ACCESS_MODE_D))
Kojto 112:6f327212ef96 1122
Kojto 112:6f327212ef96 1123 #define IS_FMC_NAND_BANK(BANK) (((BANK) == FMC_NAND_BANK2) || \
Kojto 112:6f327212ef96 1124 ((BANK) == FMC_NAND_BANK3))
Kojto 112:6f327212ef96 1125
Kojto 112:6f327212ef96 1126 #define IS_FMC_WAIT_FEATURE(FEATURE) (((FEATURE) == FMC_NAND_PCC_WAIT_FEATURE_DISABLE) || \
Kojto 112:6f327212ef96 1127 ((FEATURE) == FMC_NAND_PCC_WAIT_FEATURE_ENABLE))
Kojto 112:6f327212ef96 1128
Kojto 112:6f327212ef96 1129 #define IS_FMC_NAND_MEMORY_WIDTH(WIDTH) (((WIDTH) == FMC_NAND_PCC_MEM_BUS_WIDTH_8) || \
Kojto 112:6f327212ef96 1130 ((WIDTH) == FMC_NAND_PCC_MEM_BUS_WIDTH_16))
Kojto 112:6f327212ef96 1131
Kojto 112:6f327212ef96 1132 #define IS_FMC_ECC_STATE(STATE) (((STATE) == FMC_NAND_ECC_DISABLE) || \
Kojto 112:6f327212ef96 1133 ((STATE) == FMC_NAND_ECC_ENABLE))
Kojto 112:6f327212ef96 1134
Kojto 112:6f327212ef96 1135 #define IS_FMC_ECCPAGE_SIZE(SIZE) (((SIZE) == FMC_NAND_ECC_PAGE_SIZE_256BYTE) || \
Kojto 112:6f327212ef96 1136 ((SIZE) == FMC_NAND_ECC_PAGE_SIZE_512BYTE) || \
Kojto 112:6f327212ef96 1137 ((SIZE) == FMC_NAND_ECC_PAGE_SIZE_1024BYTE) || \
Kojto 112:6f327212ef96 1138 ((SIZE) == FMC_NAND_ECC_PAGE_SIZE_2048BYTE) || \
Kojto 112:6f327212ef96 1139 ((SIZE) == FMC_NAND_ECC_PAGE_SIZE_4096BYTE) || \
Kojto 112:6f327212ef96 1140 ((SIZE) == FMC_NAND_ECC_PAGE_SIZE_8192BYTE))
Kojto 112:6f327212ef96 1141
Kojto 112:6f327212ef96 1142 #define IS_FMC_TCLR_TIME(TIME) ((TIME) <= 255)
Kojto 112:6f327212ef96 1143
Kojto 112:6f327212ef96 1144 #define IS_FMC_TAR_TIME(TIME) ((TIME) <= 255)
Kojto 112:6f327212ef96 1145
Kojto 112:6f327212ef96 1146 #define IS_FMC_SETUP_TIME(TIME) ((TIME) <= 255)
Kojto 112:6f327212ef96 1147
Kojto 112:6f327212ef96 1148 #define IS_FMC_WAIT_TIME(TIME) ((TIME) <= 255)
Kojto 112:6f327212ef96 1149
Kojto 112:6f327212ef96 1150 #define IS_FMC_HOLD_TIME(TIME) ((TIME) <= 255)
Kojto 112:6f327212ef96 1151
Kojto 112:6f327212ef96 1152 #define IS_FMC_HIZ_TIME(TIME) ((TIME) <= 255)
Kojto 112:6f327212ef96 1153
Kojto 112:6f327212ef96 1154 #define IS_FMC_NORSRAM_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_NORSRAM_DEVICE)
Kojto 112:6f327212ef96 1155
Kojto 112:6f327212ef96 1156 #define IS_FMC_NORSRAM_EXTENDED_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_NORSRAM_EXTENDED_DEVICE)
Kojto 112:6f327212ef96 1157
Kojto 112:6f327212ef96 1158 #define IS_FMC_NAND_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_NAND_DEVICE)
Kojto 112:6f327212ef96 1159
Kojto 112:6f327212ef96 1160 #define IS_FMC_PCCARD_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_PCCARD_DEVICE)
Kojto 112:6f327212ef96 1161
Kojto 112:6f327212ef96 1162 #define IS_FMC_BURSTMODE(__STATE__) (((__STATE__) == FMC_BURST_ACCESS_MODE_DISABLE) || \
Kojto 112:6f327212ef96 1163 ((__STATE__) == FMC_BURST_ACCESS_MODE_ENABLE))
Kojto 112:6f327212ef96 1164
Kojto 112:6f327212ef96 1165 #define IS_FMC_WAIT_POLARITY(__POLARITY__) (((__POLARITY__) == FMC_WAIT_SIGNAL_POLARITY_LOW) || \
Kojto 112:6f327212ef96 1166 ((__POLARITY__) == FMC_WAIT_SIGNAL_POLARITY_HIGH))
Kojto 112:6f327212ef96 1167
Kojto 112:6f327212ef96 1168 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)
Kojto 112:6f327212ef96 1169 #define IS_FMC_WRAP_MODE(__MODE__) (((__MODE__) == FMC_WRAP_MODE_DISABLE) || \
Kojto 112:6f327212ef96 1170 ((__MODE__) == FMC_WRAP_MODE_ENABLE))
Kojto 112:6f327212ef96 1171 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
Kojto 112:6f327212ef96 1172
Kojto 112:6f327212ef96 1173 #define IS_FMC_WAIT_SIGNAL_ACTIVE(__ACTIVE__) (((__ACTIVE__) == FMC_WAIT_TIMING_BEFORE_WS) || \
Kojto 112:6f327212ef96 1174 ((__ACTIVE__) == FMC_WAIT_TIMING_DURING_WS))
Kojto 112:6f327212ef96 1175
Kojto 112:6f327212ef96 1176 #define IS_FMC_WRITE_OPERATION(__OPERATION__) (((__OPERATION__) == FMC_WRITE_OPERATION_DISABLE) || \
Kojto 112:6f327212ef96 1177 ((__OPERATION__) == FMC_WRITE_OPERATION_ENABLE))
Kojto 112:6f327212ef96 1178
Kojto 112:6f327212ef96 1179 #define IS_FMC_WAITE_SIGNAL(__SIGNAL__) (((__SIGNAL__) == FMC_WAIT_SIGNAL_DISABLE) || \
Kojto 112:6f327212ef96 1180 ((__SIGNAL__) == FMC_WAIT_SIGNAL_ENABLE))
Kojto 112:6f327212ef96 1181
Kojto 112:6f327212ef96 1182 #define IS_FMC_EXTENDED_MODE(__MODE__) (((__MODE__) == FMC_EXTENDED_MODE_DISABLE) || \
Kojto 112:6f327212ef96 1183 ((__MODE__) == FMC_EXTENDED_MODE_ENABLE))
Kojto 112:6f327212ef96 1184
Kojto 112:6f327212ef96 1185 #define IS_FMC_ASYNWAIT(__STATE__) (((__STATE__) == FMC_ASYNCHRONOUS_WAIT_DISABLE) || \
Kojto 112:6f327212ef96 1186 ((__STATE__) == FMC_ASYNCHRONOUS_WAIT_ENABLE))
Kojto 112:6f327212ef96 1187
Kojto 112:6f327212ef96 1188 #define IS_FMC_WRITE_BURST(__BURST__) (((__BURST__) == FMC_WRITE_BURST_DISABLE) || \
Kojto 112:6f327212ef96 1189 ((__BURST__) == FMC_WRITE_BURST_ENABLE))
Kojto 112:6f327212ef96 1190
Kojto 112:6f327212ef96 1191 #define IS_FMC_CONTINOUS_CLOCK(CCLOCK) (((CCLOCK) == FMC_CONTINUOUS_CLOCK_SYNC_ONLY) || \
Kojto 112:6f327212ef96 1192 ((CCLOCK) == FMC_CONTINUOUS_CLOCK_SYNC_ASYNC))
Kojto 112:6f327212ef96 1193
Kojto 112:6f327212ef96 1194 #define IS_FMC_ADDRESS_SETUP_TIME(__TIME__) ((__TIME__) <= 15)
Kojto 112:6f327212ef96 1195
Kojto 112:6f327212ef96 1196 #define IS_FMC_ADDRESS_HOLD_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 15))
Kojto 112:6f327212ef96 1197
Kojto 112:6f327212ef96 1198 #define IS_FMC_DATASETUP_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 255))
Kojto 112:6f327212ef96 1199
Kojto 112:6f327212ef96 1200 #define IS_FMC_TURNAROUND_TIME(__TIME__) ((__TIME__) <= 15)
Kojto 112:6f327212ef96 1201
Kojto 112:6f327212ef96 1202 #define IS_FMC_DATA_LATENCY(__LATENCY__) (((__LATENCY__) > 1) && ((__LATENCY__) <= 17))
Kojto 112:6f327212ef96 1203
Kojto 112:6f327212ef96 1204 #define IS_FMC_CLK_DIV(DIV) (((DIV) > 1) && ((DIV) <= 16))
Kojto 112:6f327212ef96 1205
Kojto 112:6f327212ef96 1206 #define IS_FMC_SDRAM_BANK(BANK) (((BANK) == FMC_SDRAM_BANK1) || \
Kojto 112:6f327212ef96 1207 ((BANK) == FMC_SDRAM_BANK2))
Kojto 112:6f327212ef96 1208
Kojto 112:6f327212ef96 1209 #define IS_FMC_COLUMNBITS_NUMBER(COLUMN) (((COLUMN) == FMC_SDRAM_COLUMN_BITS_NUM_8) || \
Kojto 112:6f327212ef96 1210 ((COLUMN) == FMC_SDRAM_COLUMN_BITS_NUM_9) || \
Kojto 112:6f327212ef96 1211 ((COLUMN) == FMC_SDRAM_COLUMN_BITS_NUM_10) || \
Kojto 112:6f327212ef96 1212 ((COLUMN) == FMC_SDRAM_COLUMN_BITS_NUM_11))
Kojto 112:6f327212ef96 1213
Kojto 112:6f327212ef96 1214 #define IS_FMC_ROWBITS_NUMBER(ROW) (((ROW) == FMC_SDRAM_ROW_BITS_NUM_11) || \
Kojto 112:6f327212ef96 1215 ((ROW) == FMC_SDRAM_ROW_BITS_NUM_12) || \
Kojto 112:6f327212ef96 1216 ((ROW) == FMC_SDRAM_ROW_BITS_NUM_13))
Kojto 112:6f327212ef96 1217
Kojto 112:6f327212ef96 1218 #define IS_FMC_SDMEMORY_WIDTH(WIDTH) (((WIDTH) == FMC_SDRAM_MEM_BUS_WIDTH_8) || \
Kojto 112:6f327212ef96 1219 ((WIDTH) == FMC_SDRAM_MEM_BUS_WIDTH_16) || \
Kojto 112:6f327212ef96 1220 ((WIDTH) == FMC_SDRAM_MEM_BUS_WIDTH_32))
Kojto 112:6f327212ef96 1221
Kojto 112:6f327212ef96 1222 #define IS_FMC_INTERNALBANK_NUMBER(NUMBER) (((NUMBER) == FMC_SDRAM_INTERN_BANKS_NUM_2) || \
Kojto 112:6f327212ef96 1223 ((NUMBER) == FMC_SDRAM_INTERN_BANKS_NUM_4))
Kojto 112:6f327212ef96 1224
Kojto 112:6f327212ef96 1225
Kojto 112:6f327212ef96 1226 #define IS_FMC_CAS_LATENCY(LATENCY) (((LATENCY) == FMC_SDRAM_CAS_LATENCY_1) || \
Kojto 112:6f327212ef96 1227 ((LATENCY) == FMC_SDRAM_CAS_LATENCY_2) || \
Kojto 112:6f327212ef96 1228 ((LATENCY) == FMC_SDRAM_CAS_LATENCY_3))
Kojto 112:6f327212ef96 1229
Kojto 112:6f327212ef96 1230 #define IS_FMC_SDCLOCK_PERIOD(PERIOD) (((PERIOD) == FMC_SDRAM_CLOCK_DISABLE) || \
Kojto 112:6f327212ef96 1231 ((PERIOD) == FMC_SDRAM_CLOCK_PERIOD_2) || \
Kojto 112:6f327212ef96 1232 ((PERIOD) == FMC_SDRAM_CLOCK_PERIOD_3))
Kojto 112:6f327212ef96 1233
Kojto 112:6f327212ef96 1234 #define IS_FMC_READ_BURST(RBURST) (((RBURST) == FMC_SDRAM_RBURST_DISABLE) || \
Kojto 112:6f327212ef96 1235 ((RBURST) == FMC_SDRAM_RBURST_ENABLE))
Kojto 112:6f327212ef96 1236
Kojto 112:6f327212ef96 1237
Kojto 112:6f327212ef96 1238 #define IS_FMC_READPIPE_DELAY(DELAY) (((DELAY) == FMC_SDRAM_RPIPE_DELAY_0) || \
Kojto 112:6f327212ef96 1239 ((DELAY) == FMC_SDRAM_RPIPE_DELAY_1) || \
Kojto 112:6f327212ef96 1240 ((DELAY) == FMC_SDRAM_RPIPE_DELAY_2))
Kojto 112:6f327212ef96 1241
Kojto 112:6f327212ef96 1242 #define IS_FMC_LOADTOACTIVE_DELAY(DELAY) (((DELAY) > 0) && ((DELAY) <= 16))
Kojto 112:6f327212ef96 1243
Kojto 112:6f327212ef96 1244 #define IS_FMC_EXITSELFREFRESH_DELAY(DELAY) (((DELAY) > 0) && ((DELAY) <= 16))
Kojto 112:6f327212ef96 1245
Kojto 112:6f327212ef96 1246 #define IS_FMC_SELFREFRESH_TIME(TIME) (((TIME) > 0) && ((TIME) <= 16))
Kojto 112:6f327212ef96 1247
Kojto 112:6f327212ef96 1248 #define IS_FMC_ROWCYCLE_DELAY(DELAY) (((DELAY) > 0) && ((DELAY) <= 16))
Kojto 112:6f327212ef96 1249
Kojto 112:6f327212ef96 1250 #define IS_FMC_WRITE_RECOVERY_TIME(TIME) (((TIME) > 0) && ((TIME) <= 16))
Kojto 112:6f327212ef96 1251
Kojto 112:6f327212ef96 1252 #define IS_FMC_RP_DELAY(DELAY) (((DELAY) > 0) && ((DELAY) <= 16))
Kojto 112:6f327212ef96 1253
Kojto 112:6f327212ef96 1254 #define IS_FMC_RCD_DELAY(DELAY) (((DELAY) > 0) && ((DELAY) <= 16))
Kojto 112:6f327212ef96 1255
Kojto 112:6f327212ef96 1256 #define IS_FMC_COMMAND_MODE(COMMAND) (((COMMAND) == FMC_SDRAM_CMD_NORMAL_MODE) || \
Kojto 112:6f327212ef96 1257 ((COMMAND) == FMC_SDRAM_CMD_CLK_ENABLE) || \
Kojto 112:6f327212ef96 1258 ((COMMAND) == FMC_SDRAM_CMD_PALL) || \
Kojto 112:6f327212ef96 1259 ((COMMAND) == FMC_SDRAM_CMD_AUTOREFRESH_MODE) || \
Kojto 112:6f327212ef96 1260 ((COMMAND) == FMC_SDRAM_CMD_LOAD_MODE) || \
Kojto 112:6f327212ef96 1261 ((COMMAND) == FMC_SDRAM_CMD_SELFREFRESH_MODE) || \
Kojto 112:6f327212ef96 1262 ((COMMAND) == FMC_SDRAM_CMD_POWERDOWN_MODE))
Kojto 112:6f327212ef96 1263
Kojto 112:6f327212ef96 1264 #define IS_FMC_COMMAND_TARGET(TARGET) (((TARGET) == FMC_SDRAM_CMD_TARGET_BANK1) || \
Kojto 112:6f327212ef96 1265 ((TARGET) == FMC_SDRAM_CMD_TARGET_BANK2) || \
Kojto 112:6f327212ef96 1266 ((TARGET) == FMC_SDRAM_CMD_TARGET_BANK1_2))
Kojto 112:6f327212ef96 1267
Kojto 112:6f327212ef96 1268 #define IS_FMC_AUTOREFRESH_NUMBER(NUMBER) (((NUMBER) > 0) && ((NUMBER) <= 16))
Kojto 112:6f327212ef96 1269
Kojto 112:6f327212ef96 1270 #define IS_FMC_MODE_REGISTER(CONTENT) ((CONTENT) <= 8191)
Kojto 112:6f327212ef96 1271
Kojto 112:6f327212ef96 1272 #define IS_FMC_REFRESH_RATE(RATE) ((RATE) <= 8191)
Kojto 112:6f327212ef96 1273
Kojto 112:6f327212ef96 1274 #define IS_FMC_SDRAM_DEVICE(INSTANCE) ((INSTANCE) == FMC_SDRAM_DEVICE)
Kojto 112:6f327212ef96 1275
Kojto 112:6f327212ef96 1276 #define IS_FMC_WRITE_PROTECTION(WRITE) (((WRITE) == FMC_SDRAM_WRITE_PROTECTION_DISABLE) || \
Kojto 112:6f327212ef96 1277 ((WRITE) == FMC_SDRAM_WRITE_PROTECTION_ENABLE))
Kojto 112:6f327212ef96 1278
Kojto 112:6f327212ef96 1279 #if defined (STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
Kojto 112:6f327212ef96 1280 #define IS_FMC_PAGESIZE(SIZE) (((SIZE) == FMC_PAGE_SIZE_NONE) || \
Kojto 112:6f327212ef96 1281 ((SIZE) == FMC_PAGE_SIZE_128) || \
Kojto 112:6f327212ef96 1282 ((SIZE) == FMC_PAGE_SIZE_256) || \
Kojto 112:6f327212ef96 1283 ((SIZE) == FMC_PAGE_SIZE_1024))
Kojto 112:6f327212ef96 1284
Kojto 112:6f327212ef96 1285 #define IS_FMC_WRITE_FIFO(FIFO) (((FIFO) == FMC_WRITE_FIFO_DISABLE) || \
Kojto 112:6f327212ef96 1286 ((FIFO) == FMC_WRITE_FIFO_ENABLE))
Kojto 112:6f327212ef96 1287 #endif /* STM32F446xx || STM32F469xx || STM32F479xx */
Kojto 112:6f327212ef96 1288
Kojto 112:6f327212ef96 1289 /**
Kojto 112:6f327212ef96 1290 * @}
Kojto 112:6f327212ef96 1291 */
Kojto 112:6f327212ef96 1292
Kojto 112:6f327212ef96 1293 /**
Kojto 112:6f327212ef96 1294 * @}
Kojto 112:6f327212ef96 1295 */
Kojto 112:6f327212ef96 1296
Kojto 112:6f327212ef96 1297 /* Private functions ---------------------------------------------------------*/
Kojto 112:6f327212ef96 1298 /** @defgroup FMC_LL_Private_Functions FMC LL Private Functions
Kojto 112:6f327212ef96 1299 * @{
Kojto 112:6f327212ef96 1300 */
Kojto 112:6f327212ef96 1301
Kojto 112:6f327212ef96 1302 /** @defgroup FMC_LL_NORSRAM NOR SRAM
Kojto 112:6f327212ef96 1303 * @{
Kojto 112:6f327212ef96 1304 */
Kojto 112:6f327212ef96 1305 /** @defgroup FMC_LL_NORSRAM_Private_Functions_Group1 NOR SRAM Initialization/de-initialization functions
Kojto 112:6f327212ef96 1306 * @{
Kojto 112:6f327212ef96 1307 */
Kojto 112:6f327212ef96 1308 HAL_StatusTypeDef FMC_NORSRAM_Init(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_InitTypeDef *Init);
Kojto 112:6f327212ef96 1309 HAL_StatusTypeDef FMC_NORSRAM_Timing_Init(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank);
Kojto 112:6f327212ef96 1310 HAL_StatusTypeDef FMC_NORSRAM_Extended_Timing_Init(FMC_NORSRAM_EXTENDED_TypeDef *Device, FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode);
Kojto 112:6f327212ef96 1311 HAL_StatusTypeDef FMC_NORSRAM_DeInit(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank);
Kojto 112:6f327212ef96 1312 /**
Kojto 112:6f327212ef96 1313 * @}
Kojto 112:6f327212ef96 1314 */
Kojto 112:6f327212ef96 1315
Kojto 112:6f327212ef96 1316 /** @defgroup FMC_LL_NORSRAM_Private_Functions_Group2 NOR SRAM Control functions
Kojto 112:6f327212ef96 1317 * @{
Kojto 112:6f327212ef96 1318 */
Kojto 112:6f327212ef96 1319 HAL_StatusTypeDef FMC_NORSRAM_WriteOperation_Enable(FMC_NORSRAM_TypeDef *Device, uint32_t Bank);
Kojto 112:6f327212ef96 1320 HAL_StatusTypeDef FMC_NORSRAM_WriteOperation_Disable(FMC_NORSRAM_TypeDef *Device, uint32_t Bank);
Kojto 112:6f327212ef96 1321 /**
Kojto 112:6f327212ef96 1322 * @}
Kojto 112:6f327212ef96 1323 */
Kojto 112:6f327212ef96 1324 /**
Kojto 112:6f327212ef96 1325 * @}
Kojto 112:6f327212ef96 1326 */
Kojto 112:6f327212ef96 1327
Kojto 112:6f327212ef96 1328 /** @defgroup FMC_LL_NAND NAND
Kojto 112:6f327212ef96 1329 * @{
Kojto 112:6f327212ef96 1330 */
Kojto 112:6f327212ef96 1331 /** @defgroup FMC_LL_NAND_Private_Functions_Group1 NAND Initialization/de-initialization functions
Kojto 112:6f327212ef96 1332 * @{
Kojto 112:6f327212ef96 1333 */
Kojto 112:6f327212ef96 1334 HAL_StatusTypeDef FMC_NAND_Init(FMC_NAND_TypeDef *Device, FMC_NAND_InitTypeDef *Init);
Kojto 112:6f327212ef96 1335 HAL_StatusTypeDef FMC_NAND_CommonSpace_Timing_Init(FMC_NAND_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
Kojto 112:6f327212ef96 1336 HAL_StatusTypeDef FMC_NAND_AttributeSpace_Timing_Init(FMC_NAND_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
Kojto 112:6f327212ef96 1337 HAL_StatusTypeDef FMC_NAND_DeInit(FMC_NAND_TypeDef *Device, uint32_t Bank);
Kojto 112:6f327212ef96 1338 /**
Kojto 112:6f327212ef96 1339 * @}
Kojto 112:6f327212ef96 1340 */
Kojto 112:6f327212ef96 1341
Kojto 112:6f327212ef96 1342 /** @defgroup FMC_LL_NAND_Private_Functions_Group2 NAND Control functions
Kojto 112:6f327212ef96 1343 * @{
Kojto 112:6f327212ef96 1344 */
Kojto 112:6f327212ef96 1345 HAL_StatusTypeDef FMC_NAND_ECC_Enable(FMC_NAND_TypeDef *Device, uint32_t Bank);
Kojto 112:6f327212ef96 1346 HAL_StatusTypeDef FMC_NAND_ECC_Disable(FMC_NAND_TypeDef *Device, uint32_t Bank);
Kojto 112:6f327212ef96 1347 HAL_StatusTypeDef FMC_NAND_GetECC(FMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank, uint32_t Timeout);
Kojto 112:6f327212ef96 1348
Kojto 112:6f327212ef96 1349 /**
Kojto 112:6f327212ef96 1350 * @}
Kojto 112:6f327212ef96 1351 */
Kojto 112:6f327212ef96 1352 /**
Kojto 112:6f327212ef96 1353 * @}
Kojto 112:6f327212ef96 1354 */
Kojto 112:6f327212ef96 1355 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)
Kojto 112:6f327212ef96 1356 /** @defgroup FMC_LL_PCCARD PCCARD
Kojto 112:6f327212ef96 1357 * @{
Kojto 112:6f327212ef96 1358 */
Kojto 112:6f327212ef96 1359 /** @defgroup FMC_LL_PCCARD_Private_Functions_Group1 PCCARD Initialization/de-initialization functions
Kojto 112:6f327212ef96 1360 * @{
Kojto 112:6f327212ef96 1361 */
Kojto 112:6f327212ef96 1362 HAL_StatusTypeDef FMC_PCCARD_Init(FMC_PCCARD_TypeDef *Device, FMC_PCCARD_InitTypeDef *Init);
Kojto 112:6f327212ef96 1363 HAL_StatusTypeDef FMC_PCCARD_CommonSpace_Timing_Init(FMC_PCCARD_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing);
Kojto 112:6f327212ef96 1364 HAL_StatusTypeDef FMC_PCCARD_AttributeSpace_Timing_Init(FMC_PCCARD_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing);
Kojto 112:6f327212ef96 1365 HAL_StatusTypeDef FMC_PCCARD_IOSpace_Timing_Init(FMC_PCCARD_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing);
Kojto 112:6f327212ef96 1366 HAL_StatusTypeDef FMC_PCCARD_DeInit(FMC_PCCARD_TypeDef *Device);
Kojto 112:6f327212ef96 1367 /**
Kojto 112:6f327212ef96 1368 * @}
Kojto 112:6f327212ef96 1369 */
Kojto 112:6f327212ef96 1370 /**
Kojto 112:6f327212ef96 1371 * @}
Kojto 112:6f327212ef96 1372 */
Kojto 112:6f327212ef96 1373 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
Kojto 112:6f327212ef96 1374
Kojto 112:6f327212ef96 1375 /** @defgroup FMC_LL_SDRAM SDRAM
Kojto 112:6f327212ef96 1376 * @{
Kojto 112:6f327212ef96 1377 */
Kojto 112:6f327212ef96 1378 /** @defgroup FMC_LL_SDRAM_Private_Functions_Group1 SDRAM Initialization/de-initialization functions
Kojto 112:6f327212ef96 1379 * @{
Kojto 112:6f327212ef96 1380 */
Kojto 112:6f327212ef96 1381 HAL_StatusTypeDef FMC_SDRAM_Init(FMC_SDRAM_TypeDef *Device, FMC_SDRAM_InitTypeDef *Init);
Kojto 112:6f327212ef96 1382 HAL_StatusTypeDef FMC_SDRAM_Timing_Init(FMC_SDRAM_TypeDef *Device, FMC_SDRAM_TimingTypeDef *Timing, uint32_t Bank);
Kojto 112:6f327212ef96 1383 HAL_StatusTypeDef FMC_SDRAM_DeInit(FMC_SDRAM_TypeDef *Device, uint32_t Bank);
Kojto 112:6f327212ef96 1384 /**
Kojto 112:6f327212ef96 1385 * @}
Kojto 112:6f327212ef96 1386 */
Kojto 112:6f327212ef96 1387
Kojto 112:6f327212ef96 1388 /** @defgroup FMC_LL_SDRAM_Private_Functions_Group2 SDRAM Control functions
Kojto 112:6f327212ef96 1389 * @{
Kojto 112:6f327212ef96 1390 */
Kojto 112:6f327212ef96 1391 HAL_StatusTypeDef FMC_SDRAM_WriteProtection_Enable(FMC_SDRAM_TypeDef *Device, uint32_t Bank);
Kojto 112:6f327212ef96 1392 HAL_StatusTypeDef FMC_SDRAM_WriteProtection_Disable(FMC_SDRAM_TypeDef *Device, uint32_t Bank);
Kojto 112:6f327212ef96 1393 HAL_StatusTypeDef FMC_SDRAM_SendCommand(FMC_SDRAM_TypeDef *Device, FMC_SDRAM_CommandTypeDef *Command, uint32_t Timeout);
Kojto 112:6f327212ef96 1394 HAL_StatusTypeDef FMC_SDRAM_ProgramRefreshRate(FMC_SDRAM_TypeDef *Device, uint32_t RefreshRate);
Kojto 112:6f327212ef96 1395 HAL_StatusTypeDef FMC_SDRAM_SetAutoRefreshNumber(FMC_SDRAM_TypeDef *Device, uint32_t AutoRefreshNumber);
Kojto 112:6f327212ef96 1396 uint32_t FMC_SDRAM_GetModeStatus(FMC_SDRAM_TypeDef *Device, uint32_t Bank);
Kojto 112:6f327212ef96 1397 /**
Kojto 112:6f327212ef96 1398 * @}
Kojto 112:6f327212ef96 1399 */
Kojto 112:6f327212ef96 1400 /**
Kojto 112:6f327212ef96 1401 * @}
Kojto 112:6f327212ef96 1402 */
Kojto 112:6f327212ef96 1403
Kojto 112:6f327212ef96 1404 /**
Kojto 112:6f327212ef96 1405 * @}
Kojto 112:6f327212ef96 1406 */
Kojto 112:6f327212ef96 1407
Kojto 112:6f327212ef96 1408 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx */
Kojto 112:6f327212ef96 1409 /**
Kojto 112:6f327212ef96 1410 * @}
Kojto 112:6f327212ef96 1411 */
Kojto 112:6f327212ef96 1412
Kojto 112:6f327212ef96 1413 /**
Kojto 112:6f327212ef96 1414 * @}
Kojto 112:6f327212ef96 1415 */
Kojto 112:6f327212ef96 1416 #ifdef __cplusplus
Kojto 112:6f327212ef96 1417 }
Kojto 112:6f327212ef96 1418 #endif
Kojto 112:6f327212ef96 1419
Kojto 112:6f327212ef96 1420 #endif /* __STM32F4xx_LL_FMC_H */
Kojto 112:6f327212ef96 1421
Kojto 112:6f327212ef96 1422 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/