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

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
Kojto
Date:
Thu Jul 07 14:34:11 2016 +0100
Revision:
122:f9eeca106725
Parent:
110:165afa46840b
Release 122 of the mbed library

Changes:
- new targets - Nucleo L432KC, Beetle, Nucleo F446ZE, Nucleo L011K4
- Thread safety addition - mbed API should contain a statement about thread safety
- critical section API addition
- CAS API (core_util_atomic_incr/decr)
- DEVICE_ are generated from targets.json file, device.h deprecated
- Callback replaces FunctionPointer to provide std like interface
- mbed HAL API docs improvements
- toolchain - prexif attributes with MBED_
- add new attributes - packed, weak, forcedinline, align
- target.json - contains targets definitions
- ST - L1XX - Cube update to 1.5
- SPI clock selection fix (clock from APB domain)
- F7 - Cube update v1.4.0
- L0 - baudrate init fix
- L1 - Cube update v1.5
- F3 - baudrate init fix, 3 targets CAN support
- F4 - Cube update v1.12.0, 3 targets CAN support
- L4XX - Cube update v1.5.1
- F0 - update Cube to v1.5.0
- L4 - 2 targets (L476RG/VG) CAN support
- NXP - pwm clock fix for KSDK2 MCU
- LPC2368 - remove ARM toolchain support - due to regression
- KSDK2 - fix SPI , I2C address and repeat start
- Silabs - some fixes backported from mbed 3
- Renesas - RZ_A1H - SystemCoreClockUpdate addition

Who changed what in which revision?

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