mbed official / mbed

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Committer:
Kojto
Date:
Thu Jul 07 14:34:11 2016 +0100
Revision:
122:f9eeca106725
Parent:
107:4f6c30876dfa
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
Kojto 107:4f6c30876dfa 1 /**
Kojto 107:4f6c30876dfa 2 ******************************************************************************
Kojto 107:4f6c30876dfa 3 * @file stm32l4xx_ll_fmc.h
Kojto 107:4f6c30876dfa 4 * @author MCD Application Team
Kojto 122:f9eeca106725 5 * @version V1.5.1
Kojto 122:f9eeca106725 6 * @date 31-May-2016
Kojto 107:4f6c30876dfa 7 * @brief Header file of FMC HAL module.
Kojto 107:4f6c30876dfa 8 ******************************************************************************
Kojto 107:4f6c30876dfa 9 * @attention
Kojto 107:4f6c30876dfa 10 *
Kojto 122:f9eeca106725 11 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
Kojto 107:4f6c30876dfa 12 *
Kojto 107:4f6c30876dfa 13 * Redistribution and use in source and binary forms, with or without modification,
Kojto 107:4f6c30876dfa 14 * are permitted provided that the following conditions are met:
Kojto 107:4f6c30876dfa 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 107:4f6c30876dfa 16 * this list of conditions and the following disclaimer.
Kojto 107:4f6c30876dfa 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 107:4f6c30876dfa 18 * this list of conditions and the following disclaimer in the documentation
Kojto 107:4f6c30876dfa 19 * and/or other materials provided with the distribution.
Kojto 107:4f6c30876dfa 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 107:4f6c30876dfa 21 * may be used to endorse or promote products derived from this software
Kojto 107:4f6c30876dfa 22 * without specific prior written permission.
Kojto 107:4f6c30876dfa 23 *
Kojto 107:4f6c30876dfa 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 107:4f6c30876dfa 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 107:4f6c30876dfa 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 107:4f6c30876dfa 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 107:4f6c30876dfa 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 107:4f6c30876dfa 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 107:4f6c30876dfa 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 107:4f6c30876dfa 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 107:4f6c30876dfa 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 107:4f6c30876dfa 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 107:4f6c30876dfa 34 *
Kojto 107:4f6c30876dfa 35 ******************************************************************************
Kojto 122:f9eeca106725 36 */
Kojto 107:4f6c30876dfa 37
Kojto 107:4f6c30876dfa 38 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 107:4f6c30876dfa 39 #ifndef __STM32L4xx_LL_FMC_H
Kojto 107:4f6c30876dfa 40 #define __STM32L4xx_LL_FMC_H
Kojto 107:4f6c30876dfa 41
Kojto 107:4f6c30876dfa 42 #ifdef __cplusplus
Kojto 107:4f6c30876dfa 43 extern "C" {
Kojto 107:4f6c30876dfa 44 #endif
Kojto 107:4f6c30876dfa 45
Kojto 122:f9eeca106725 46 #if defined(STM32L471xx) || defined(STM32L475xx) || defined(STM32L476xx) || defined(STM32L485xx) || defined(STM32L486xx)
Kojto 122:f9eeca106725 47
Kojto 107:4f6c30876dfa 48 /* Includes ------------------------------------------------------------------*/
Kojto 107:4f6c30876dfa 49 #include "stm32l4xx_hal_def.h"
Kojto 107:4f6c30876dfa 50
Kojto 107:4f6c30876dfa 51 /** @addtogroup STM32L4xx_HAL_Driver
Kojto 107:4f6c30876dfa 52 * @{
Kojto 107:4f6c30876dfa 53 */
Kojto 107:4f6c30876dfa 54
Kojto 107:4f6c30876dfa 55 /** @addtogroup FMC_LL FMC Low Layer
Kojto 107:4f6c30876dfa 56 * @{
Kojto 122:f9eeca106725 57 */
Kojto 107:4f6c30876dfa 58
Kojto 107:4f6c30876dfa 59 /** @addtogroup FMC_LL_Private_Macros FMC Low Layer Private Macros
Kojto 107:4f6c30876dfa 60 * @{
Kojto 107:4f6c30876dfa 61 */
Kojto 107:4f6c30876dfa 62 #define IS_FMC_NORSRAM_BANK(__BANK__) (((__BANK__) == FMC_NORSRAM_BANK1) || \
Kojto 107:4f6c30876dfa 63 ((__BANK__) == FMC_NORSRAM_BANK2) || \
Kojto 107:4f6c30876dfa 64 ((__BANK__) == FMC_NORSRAM_BANK3) || \
Kojto 107:4f6c30876dfa 65 ((__BANK__) == FMC_NORSRAM_BANK4))
Kojto 107:4f6c30876dfa 66
Kojto 107:4f6c30876dfa 67
Kojto 107:4f6c30876dfa 68 #define IS_FMC_MUX(__MUX__) (((__MUX__) == FMC_DATA_ADDRESS_MUX_DISABLE) || \
Kojto 107:4f6c30876dfa 69 ((__MUX__) == FMC_DATA_ADDRESS_MUX_ENABLE))
Kojto 107:4f6c30876dfa 70
Kojto 107:4f6c30876dfa 71
Kojto 107:4f6c30876dfa 72 #define IS_FMC_MEMORY(__MEMORY__) (((__MEMORY__) == FMC_MEMORY_TYPE_SRAM) || \
Kojto 107:4f6c30876dfa 73 ((__MEMORY__) == FMC_MEMORY_TYPE_PSRAM)|| \
Kojto 107:4f6c30876dfa 74 ((__MEMORY__) == FMC_MEMORY_TYPE_NOR))
Kojto 107:4f6c30876dfa 75
Kojto 107:4f6c30876dfa 76 #define IS_FMC_NORSRAM_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FMC_NORSRAM_MEM_BUS_WIDTH_8) || \
Kojto 107:4f6c30876dfa 77 ((__WIDTH__) == FMC_NORSRAM_MEM_BUS_WIDTH_16) || \
Kojto 107:4f6c30876dfa 78 ((__WIDTH__) == FMC_NORSRAM_MEM_BUS_WIDTH_32))
Kojto 107:4f6c30876dfa 79
Kojto 107:4f6c30876dfa 80 #define IS_FMC_PAGESIZE(__SIZE__) (((__SIZE__) == FMC_PAGE_SIZE_NONE) || \
Kojto 107:4f6c30876dfa 81 ((__SIZE__) == FMC_PAGE_SIZE_128) || \
Kojto 107:4f6c30876dfa 82 ((__SIZE__) == FMC_PAGE_SIZE_256) || \
Kojto 122:f9eeca106725 83 ((__SIZE__) == FMC_PAGE_SIZE_512) || \
Kojto 107:4f6c30876dfa 84 ((__SIZE__) == FMC_PAGE_SIZE_1024))
Kojto 107:4f6c30876dfa 85
Kojto 107:4f6c30876dfa 86 #define IS_FMC_WRITE_BURST(__BURST__) (((__BURST__) == FMC_WRITE_BURST_DISABLE) || \
Kojto 122:f9eeca106725 87 ((__BURST__) == FMC_WRITE_BURST_ENABLE))
Kojto 107:4f6c30876dfa 88
Kojto 107:4f6c30876dfa 89 #define IS_FMC_CONTINOUS_CLOCK(__CCLOCK__) (((__CCLOCK__) == FMC_CONTINUOUS_CLOCK_SYNC_ONLY) || \
Kojto 122:f9eeca106725 90 ((__CCLOCK__) == FMC_CONTINUOUS_CLOCK_SYNC_ASYNC))
Kojto 107:4f6c30876dfa 91
Kojto 107:4f6c30876dfa 92 #define IS_FMC_ACCESS_MODE(__MODE__) (((__MODE__) == FMC_ACCESS_MODE_A) || \
Kojto 107:4f6c30876dfa 93 ((__MODE__) == FMC_ACCESS_MODE_B) || \
Kojto 107:4f6c30876dfa 94 ((__MODE__) == FMC_ACCESS_MODE_C) || \
Kojto 107:4f6c30876dfa 95 ((__MODE__) == FMC_ACCESS_MODE_D))
Kojto 107:4f6c30876dfa 96
Kojto 107:4f6c30876dfa 97
Kojto 122:f9eeca106725 98 #define IS_FMC_NAND_BANK(__BANK__) ((__BANK__) == FMC_NAND_BANK3)
Kojto 107:4f6c30876dfa 99
Kojto 107:4f6c30876dfa 100 #define IS_FMC_WAIT_FEATURE(__FEATURE__) (((__FEATURE__) == FMC_NAND_WAIT_FEATURE_DISABLE) || \
Kojto 107:4f6c30876dfa 101 ((__FEATURE__) == FMC_NAND_WAIT_FEATURE_ENABLE))
Kojto 107:4f6c30876dfa 102
Kojto 107:4f6c30876dfa 103 #define IS_FMC_NAND_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FMC_NAND_MEM_BUS_WIDTH_8) || \
Kojto 107:4f6c30876dfa 104 ((__WIDTH__) == FMC_NAND_MEM_BUS_WIDTH_16))
Kojto 107:4f6c30876dfa 105
Kojto 107:4f6c30876dfa 106 #define IS_FMC_ECC_STATE(__STATE__) (((__STATE__) == FMC_NAND_ECC_DISABLE) || \
Kojto 107:4f6c30876dfa 107 ((__STATE__) == FMC_NAND_ECC_ENABLE))
Kojto 107:4f6c30876dfa 108
Kojto 107:4f6c30876dfa 109
Kojto 107:4f6c30876dfa 110 #define IS_FMC_ECCPAGE_SIZE(__SIZE__) (((__SIZE__) == FMC_NAND_ECC_PAGE_SIZE_256BYTE) || \
Kojto 107:4f6c30876dfa 111 ((__SIZE__) == FMC_NAND_ECC_PAGE_SIZE_512BYTE) || \
Kojto 107:4f6c30876dfa 112 ((__SIZE__) == FMC_NAND_ECC_PAGE_SIZE_1024BYTE) || \
Kojto 107:4f6c30876dfa 113 ((__SIZE__) == FMC_NAND_ECC_PAGE_SIZE_2048BYTE) || \
Kojto 107:4f6c30876dfa 114 ((__SIZE__) == FMC_NAND_ECC_PAGE_SIZE_4096BYTE) || \
Kojto 107:4f6c30876dfa 115 ((__SIZE__) == FMC_NAND_ECC_PAGE_SIZE_8192BYTE))
Kojto 107:4f6c30876dfa 116
Kojto 107:4f6c30876dfa 117
Kojto 107:4f6c30876dfa 118 /** @defgroup FMC_NORSRAM_Device_Instance FMC NOR/SRAM Device Instance
Kojto 107:4f6c30876dfa 119 * @{
Kojto 107:4f6c30876dfa 120 */
Kojto 107:4f6c30876dfa 121 #define IS_FMC_NORSRAM_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_NORSRAM_DEVICE)
Kojto 107:4f6c30876dfa 122 /**
Kojto 107:4f6c30876dfa 123 * @}
Kojto 107:4f6c30876dfa 124 */
Kojto 107:4f6c30876dfa 125
Kojto 107:4f6c30876dfa 126 /** @defgroup FMC_NORSRAM_EXTENDED_Device_Instance FMC NOR/SRAM EXTENDED Device Instance
Kojto 107:4f6c30876dfa 127 * @{
Kojto 107:4f6c30876dfa 128 */
Kojto 107:4f6c30876dfa 129 #define IS_FMC_NORSRAM_EXTENDED_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_NORSRAM_EXTENDED_DEVICE)
Kojto 107:4f6c30876dfa 130 /**
Kojto 107:4f6c30876dfa 131 * @}
Kojto 107:4f6c30876dfa 132 */
Kojto 122:f9eeca106725 133
Kojto 107:4f6c30876dfa 134 /** @defgroup FMC_NAND_Device_Instance FMC NAND Device Instance
Kojto 107:4f6c30876dfa 135 * @{
Kojto 107:4f6c30876dfa 136 */
Kojto 107:4f6c30876dfa 137 #define IS_FMC_NAND_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_NAND_DEVICE)
Kojto 107:4f6c30876dfa 138 /**
Kojto 107:4f6c30876dfa 139 * @}
Kojto 122:f9eeca106725 140 */
Kojto 107:4f6c30876dfa 141
Kojto 107:4f6c30876dfa 142 #define IS_FMC_BURSTMODE(__STATE__) (((__STATE__) == FMC_BURST_ACCESS_MODE_DISABLE) || \
Kojto 107:4f6c30876dfa 143 ((__STATE__) == FMC_BURST_ACCESS_MODE_ENABLE))
Kojto 107:4f6c30876dfa 144
Kojto 107:4f6c30876dfa 145 #define IS_FMC_WAIT_POLARITY(__POLARITY__) (((__POLARITY__) == FMC_WAIT_SIGNAL_POLARITY_LOW) || \
Kojto 107:4f6c30876dfa 146 ((__POLARITY__) == FMC_WAIT_SIGNAL_POLARITY_HIGH))
Kojto 107:4f6c30876dfa 147
Kojto 107:4f6c30876dfa 148 #define IS_FMC_WAIT_SIGNAL_ACTIVE(__ACTIVE__) (((__ACTIVE__) == FMC_WAIT_TIMING_BEFORE_WS) || \
Kojto 122:f9eeca106725 149 ((__ACTIVE__) == FMC_WAIT_TIMING_DURING_WS))
Kojto 107:4f6c30876dfa 150
Kojto 107:4f6c30876dfa 151
Kojto 107:4f6c30876dfa 152 #define IS_FMC_WRITE_OPERATION(__OPERATION__) (((__OPERATION__) == FMC_WRITE_OPERATION_DISABLE) || \
Kojto 107:4f6c30876dfa 153 ((__OPERATION__) == FMC_WRITE_OPERATION_ENABLE))
Kojto 107:4f6c30876dfa 154
Kojto 107:4f6c30876dfa 155 #define IS_FMC_WAITE_SIGNAL(__SIGNAL__) (((__SIGNAL__) == FMC_WAIT_SIGNAL_DISABLE) || \
Kojto 122:f9eeca106725 156 ((__SIGNAL__) == FMC_WAIT_SIGNAL_ENABLE))
Kojto 107:4f6c30876dfa 157
Kojto 107:4f6c30876dfa 158 #define IS_FMC_EXTENDED_MODE(__MODE__) (((__MODE__) == FMC_EXTENDED_MODE_DISABLE) || \
Kojto 107:4f6c30876dfa 159 ((__MODE__) == FMC_EXTENDED_MODE_ENABLE))
Kojto 107:4f6c30876dfa 160
Kojto 107:4f6c30876dfa 161 #define IS_FMC_ASYNWAIT(__STATE__) (((__STATE__) == FMC_ASYNCHRONOUS_WAIT_DISABLE) || \
Kojto 107:4f6c30876dfa 162 ((__STATE__) == FMC_ASYNCHRONOUS_WAIT_ENABLE))
Kojto 107:4f6c30876dfa 163
Kojto 122:f9eeca106725 164 /** @defgroup FMC_Address_Setup_Time
Kojto 107:4f6c30876dfa 165 * @{
Kojto 107:4f6c30876dfa 166 */
Kojto 107:4f6c30876dfa 167 #define IS_FMC_ADDRESS_SETUP_TIME(__TIME__) ((__TIME__) <= 15)
Kojto 107:4f6c30876dfa 168 /**
Kojto 107:4f6c30876dfa 169 * @}
Kojto 107:4f6c30876dfa 170 */
Kojto 107:4f6c30876dfa 171
Kojto 122:f9eeca106725 172 /** @defgroup FMC_Address_Hold_Time
Kojto 107:4f6c30876dfa 173 * @{
Kojto 107:4f6c30876dfa 174 */
Kojto 107:4f6c30876dfa 175 #define IS_FMC_ADDRESS_HOLD_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 15))
Kojto 107:4f6c30876dfa 176 /**
Kojto 107:4f6c30876dfa 177 * @}
Kojto 107:4f6c30876dfa 178 */
Kojto 107:4f6c30876dfa 179
Kojto 122:f9eeca106725 180 /** @defgroup FMC_Data_Setup_Time
Kojto 107:4f6c30876dfa 181 * @{
Kojto 107:4f6c30876dfa 182 */
Kojto 107:4f6c30876dfa 183 #define IS_FMC_DATASETUP_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 255))
Kojto 107:4f6c30876dfa 184 /**
Kojto 107:4f6c30876dfa 185 * @}
Kojto 107:4f6c30876dfa 186 */
Kojto 107:4f6c30876dfa 187
Kojto 122:f9eeca106725 188 /** @defgroup FMC_Bus_Turn_around_Duration
Kojto 107:4f6c30876dfa 189 * @{
Kojto 107:4f6c30876dfa 190 */
Kojto 107:4f6c30876dfa 191 #define IS_FMC_TURNAROUND_TIME(__TIME__) ((__TIME__) <= 15)
Kojto 107:4f6c30876dfa 192 /**
Kojto 107:4f6c30876dfa 193 * @}
Kojto 107:4f6c30876dfa 194 */
Kojto 107:4f6c30876dfa 195
Kojto 122:f9eeca106725 196 /** @defgroup FMC_CLK_Division
Kojto 107:4f6c30876dfa 197 * @{
Kojto 107:4f6c30876dfa 198 */
Kojto 107:4f6c30876dfa 199 #define IS_FMC_CLK_DIV(__DIV__) (((__DIV__) > 1) && ((__DIV__) <= 16))
Kojto 107:4f6c30876dfa 200 /**
Kojto 107:4f6c30876dfa 201 * @}
Kojto 107:4f6c30876dfa 202 */
Kojto 107:4f6c30876dfa 203
Kojto 122:f9eeca106725 204 /** @defgroup FMC_Data_Latency
Kojto 107:4f6c30876dfa 205 * @{
Kojto 107:4f6c30876dfa 206 */
Kojto 107:4f6c30876dfa 207 #define IS_FMC_DATA_LATENCY(__LATENCY__) (((__LATENCY__) > 1) && ((__LATENCY__) <= 17))
Kojto 107:4f6c30876dfa 208 /**
Kojto 107:4f6c30876dfa 209 * @}
Kojto 122:f9eeca106725 210 */
Kojto 107:4f6c30876dfa 211
Kojto 107:4f6c30876dfa 212 /** @defgroup FMC_TCLR_Setup_Time FMC TCLR Setup Time
Kojto 107:4f6c30876dfa 213 * @{
Kojto 107:4f6c30876dfa 214 */
Kojto 107:4f6c30876dfa 215 #define IS_FMC_TCLR_TIME(__TIME__) ((__TIME__) <= 255)
Kojto 107:4f6c30876dfa 216 /**
Kojto 107:4f6c30876dfa 217 * @}
Kojto 107:4f6c30876dfa 218 */
Kojto 107:4f6c30876dfa 219
Kojto 122:f9eeca106725 220 /** @defgroup FMC_TAR_Setup_Time
Kojto 107:4f6c30876dfa 221 * @{
Kojto 107:4f6c30876dfa 222 */
Kojto 107:4f6c30876dfa 223 #define IS_FMC_TAR_TIME(__TIME__) ((__TIME__) <= 255)
Kojto 107:4f6c30876dfa 224 /**
Kojto 107:4f6c30876dfa 225 * @}
Kojto 107:4f6c30876dfa 226 */
Kojto 107:4f6c30876dfa 227
Kojto 122:f9eeca106725 228 /** @defgroup FMC_Setup_Time
Kojto 107:4f6c30876dfa 229 * @{
Kojto 107:4f6c30876dfa 230 */
Kojto 107:4f6c30876dfa 231 #define IS_FMC_SETUP_TIME(__TIME__) ((__TIME__) <= 255)
Kojto 107:4f6c30876dfa 232 /**
Kojto 107:4f6c30876dfa 233 * @}
Kojto 107:4f6c30876dfa 234 */
Kojto 107:4f6c30876dfa 235
Kojto 122:f9eeca106725 236 /** @defgroup FMC_Wait_Setup_Time
Kojto 107:4f6c30876dfa 237 * @{
Kojto 107:4f6c30876dfa 238 */
Kojto 107:4f6c30876dfa 239 #define IS_FMC_WAIT_TIME(__TIME__) ((__TIME__) <= 255)
Kojto 107:4f6c30876dfa 240 /**
Kojto 107:4f6c30876dfa 241 * @}
Kojto 107:4f6c30876dfa 242 */
Kojto 107:4f6c30876dfa 243
Kojto 122:f9eeca106725 244 /** @defgroup FMC_Hold_Setup_Time
Kojto 107:4f6c30876dfa 245 * @{
Kojto 107:4f6c30876dfa 246 */
Kojto 107:4f6c30876dfa 247 #define IS_FMC_HOLD_TIME(__TIME__) ((__TIME__) <= 255)
Kojto 107:4f6c30876dfa 248 /**
Kojto 107:4f6c30876dfa 249 * @}
Kojto 107:4f6c30876dfa 250 */
Kojto 107:4f6c30876dfa 251
Kojto 122:f9eeca106725 252 /** @defgroup FMC_HiZ_Setup_Time
Kojto 107:4f6c30876dfa 253 * @{
Kojto 107:4f6c30876dfa 254 */
Kojto 107:4f6c30876dfa 255 #define IS_FMC_HIZ_TIME(__TIME__) ((__TIME__) <= 255)
Kojto 107:4f6c30876dfa 256 /**
Kojto 107:4f6c30876dfa 257 * @}
Kojto 122:f9eeca106725 258 */
Kojto 122:f9eeca106725 259
Kojto 107:4f6c30876dfa 260 /**
Kojto 107:4f6c30876dfa 261 * @}
Kojto 122:f9eeca106725 262 */
Kojto 107:4f6c30876dfa 263
Kojto 122:f9eeca106725 264 /* Exported typedef ----------------------------------------------------------*/
Kojto 107:4f6c30876dfa 265 /** @addtogroup FMC_LL_Exported_Typedef FMC Low Layer Exported Typedef
Kojto 107:4f6c30876dfa 266 * @{
Kojto 107:4f6c30876dfa 267 */
Kojto 107:4f6c30876dfa 268 #define FMC_NORSRAM_TypeDef FMC_Bank1_TypeDef
Kojto 107:4f6c30876dfa 269 #define FMC_NORSRAM_EXTENDED_TypeDef FMC_Bank1E_TypeDef
Kojto 107:4f6c30876dfa 270 #define FMC_NAND_TypeDef FMC_Bank3_TypeDef
Kojto 107:4f6c30876dfa 271
Kojto 107:4f6c30876dfa 272 #define FMC_NORSRAM_DEVICE FMC_Bank1_R
Kojto 107:4f6c30876dfa 273 #define FMC_NORSRAM_EXTENDED_DEVICE FMC_Bank1E_R
Kojto 107:4f6c30876dfa 274 #define FMC_NAND_DEVICE FMC_Bank3_R
Kojto 107:4f6c30876dfa 275
Kojto 122:f9eeca106725 276 /**
Kojto 107:4f6c30876dfa 277 * @brief FMC_NORSRAM Configuration Structure definition
Kojto 122:f9eeca106725 278 */
Kojto 107:4f6c30876dfa 279 typedef struct
Kojto 107:4f6c30876dfa 280 {
Kojto 107:4f6c30876dfa 281 uint32_t NSBank; /*!< Specifies the NORSRAM memory device that will be used.
Kojto 107:4f6c30876dfa 282 This parameter can be a value of @ref FMC_NORSRAM_Bank */
Kojto 107:4f6c30876dfa 283
Kojto 107:4f6c30876dfa 284 uint32_t DataAddressMux; /*!< Specifies whether the address and data values are
Kojto 122:f9eeca106725 285 multiplexed on the data bus or not.
Kojto 107:4f6c30876dfa 286 This parameter can be a value of @ref FMC_Data_Address_Bus_Multiplexing */
Kojto 107:4f6c30876dfa 287
Kojto 107:4f6c30876dfa 288 uint32_t MemoryType; /*!< Specifies the type of external memory attached to
Kojto 107:4f6c30876dfa 289 the corresponding memory device.
Kojto 107:4f6c30876dfa 290 This parameter can be a value of @ref FMC_Memory_Type */
Kojto 107:4f6c30876dfa 291
Kojto 107:4f6c30876dfa 292 uint32_t MemoryDataWidth; /*!< Specifies the external memory device width.
Kojto 107:4f6c30876dfa 293 This parameter can be a value of @ref FMC_NORSRAM_Data_Width */
Kojto 107:4f6c30876dfa 294
Kojto 107:4f6c30876dfa 295 uint32_t BurstAccessMode; /*!< Enables or disables the burst access mode for Flash memory,
Kojto 107:4f6c30876dfa 296 valid only with synchronous burst Flash memories.
Kojto 107:4f6c30876dfa 297 This parameter can be a value of @ref FMC_Burst_Access_Mode */
Kojto 107:4f6c30876dfa 298
Kojto 107:4f6c30876dfa 299 uint32_t WaitSignalPolarity; /*!< Specifies the wait signal polarity, valid only when accessing
Kojto 107:4f6c30876dfa 300 the Flash memory in burst mode.
Kojto 107:4f6c30876dfa 301 This parameter can be a value of @ref FMC_Wait_Signal_Polarity */
Kojto 107:4f6c30876dfa 302
Kojto 107:4f6c30876dfa 303 uint32_t WaitSignalActive; /*!< Specifies if the wait signal is asserted by the memory one
Kojto 107:4f6c30876dfa 304 clock cycle before the wait state or during the wait state,
Kojto 122:f9eeca106725 305 valid only when accessing memories in burst mode.
Kojto 107:4f6c30876dfa 306 This parameter can be a value of @ref FMC_Wait_Timing */
Kojto 107:4f6c30876dfa 307
Kojto 122:f9eeca106725 308 uint32_t WriteOperation; /*!< Enables or disables the write operation in the selected device by the FMC.
Kojto 107:4f6c30876dfa 309 This parameter can be a value of @ref FMC_Write_Operation */
Kojto 107:4f6c30876dfa 310
Kojto 107:4f6c30876dfa 311 uint32_t WaitSignal; /*!< Enables or disables the wait state insertion via wait
Kojto 122:f9eeca106725 312 signal, valid for Flash memory access in burst mode.
Kojto 107:4f6c30876dfa 313 This parameter can be a value of @ref FMC_Wait_Signal */
Kojto 107:4f6c30876dfa 314
Kojto 107:4f6c30876dfa 315 uint32_t ExtendedMode; /*!< Enables or disables the extended mode.
Kojto 107:4f6c30876dfa 316 This parameter can be a value of @ref FMC_Extended_Mode */
Kojto 107:4f6c30876dfa 317
Kojto 107:4f6c30876dfa 318 uint32_t AsynchronousWait; /*!< Enables or disables wait signal during asynchronous transfers,
Kojto 107:4f6c30876dfa 319 valid only with asynchronous Flash memories.
Kojto 107:4f6c30876dfa 320 This parameter can be a value of @ref FMC_AsynchronousWait */
Kojto 107:4f6c30876dfa 321
Kojto 107:4f6c30876dfa 322 uint32_t WriteBurst; /*!< Enables or disables the write burst operation.
Kojto 107:4f6c30876dfa 323 This parameter can be a value of @ref FMC_Write_Burst */
Kojto 107:4f6c30876dfa 324
Kojto 107:4f6c30876dfa 325 uint32_t ContinuousClock; /*!< Enables or disables the FMC clock output to external memory devices.
Kojto 122:f9eeca106725 326 This parameter is only enabled through the FMC_BCR1 register, and don't care
Kojto 107:4f6c30876dfa 327 through FMC_BCR2..4 registers.
Kojto 107:4f6c30876dfa 328 This parameter can be a value of @ref FMC_Continous_Clock */
Kojto 107:4f6c30876dfa 329
Kojto 107:4f6c30876dfa 330 uint32_t WriteFifo; /*!< Enables or disables the write FIFO used by the FMC controller.
Kojto 122:f9eeca106725 331 This parameter is only enabled through the FMC_BCR1 register, and don't care
Kojto 107:4f6c30876dfa 332 through FMC_BCR2..4 registers.
Kojto 122:f9eeca106725 333 This parameter can be a value of @ref FMC_Write_FIFO.
Kojto 122:f9eeca106725 334 @note This Parameter is not available for STM32L47x/L48x devices. */
Kojto 107:4f6c30876dfa 335
Kojto 107:4f6c30876dfa 336 uint32_t PageSize; /*!< Specifies the memory page size.
Kojto 107:4f6c30876dfa 337 This parameter can be a value of @ref FMC_Page_Size */
Kojto 107:4f6c30876dfa 338
Kojto 107:4f6c30876dfa 339 }FMC_NORSRAM_InitTypeDef;
Kojto 107:4f6c30876dfa 340
Kojto 122:f9eeca106725 341 /**
Kojto 122:f9eeca106725 342 * @brief FMC_NORSRAM Timing parameters structure definition
Kojto 107:4f6c30876dfa 343 */
Kojto 107:4f6c30876dfa 344 typedef struct
Kojto 107:4f6c30876dfa 345 {
Kojto 107:4f6c30876dfa 346 uint32_t AddressSetupTime; /*!< Defines the number of HCLK cycles to configure
Kojto 122:f9eeca106725 347 the duration of the address setup time.
Kojto 107:4f6c30876dfa 348 This parameter can be a value between Min_Data = 0 and Max_Data = 15.
Kojto 107:4f6c30876dfa 349 @note This parameter is not used with synchronous NOR Flash memories. */
Kojto 107:4f6c30876dfa 350
Kojto 107:4f6c30876dfa 351 uint32_t AddressHoldTime; /*!< Defines the number of HCLK cycles to configure
Kojto 107:4f6c30876dfa 352 the duration of the address hold time.
Kojto 122:f9eeca106725 353 This parameter can be a value between Min_Data = 1 and Max_Data = 15.
Kojto 107:4f6c30876dfa 354 @note This parameter is not used with synchronous NOR Flash memories. */
Kojto 107:4f6c30876dfa 355
Kojto 107:4f6c30876dfa 356 uint32_t DataSetupTime; /*!< Defines the number of HCLK cycles to configure
Kojto 107:4f6c30876dfa 357 the duration of the data setup time.
Kojto 107:4f6c30876dfa 358 This parameter can be a value between Min_Data = 1 and Max_Data = 255.
Kojto 122:f9eeca106725 359 @note This parameter is used for SRAMs, ROMs and asynchronous multiplexed
Kojto 107:4f6c30876dfa 360 NOR Flash memories. */
Kojto 107:4f6c30876dfa 361
Kojto 107:4f6c30876dfa 362 uint32_t BusTurnAroundDuration; /*!< Defines the number of HCLK cycles to configure
Kojto 107:4f6c30876dfa 363 the duration of the bus turnaround.
Kojto 107:4f6c30876dfa 364 This parameter can be a value between Min_Data = 0 and Max_Data = 15.
Kojto 107:4f6c30876dfa 365 @note This parameter is only used for multiplexed NOR Flash memories. */
Kojto 107:4f6c30876dfa 366
Kojto 122:f9eeca106725 367 uint32_t CLKDivision; /*!< Defines the period of CLK clock output signal, expressed in number of
Kojto 107:4f6c30876dfa 368 HCLK cycles. This parameter can be a value between Min_Data = 2 and Max_Data = 16.
Kojto 122:f9eeca106725 369 @note This parameter is not used for asynchronous NOR Flash, SRAM or ROM
Kojto 107:4f6c30876dfa 370 accesses. */
Kojto 107:4f6c30876dfa 371
Kojto 107:4f6c30876dfa 372 uint32_t DataLatency; /*!< Defines the number of memory clock cycles to issue
Kojto 107:4f6c30876dfa 373 to the memory before getting the first data.
Kojto 107:4f6c30876dfa 374 The parameter value depends on the memory type as shown below:
Kojto 107:4f6c30876dfa 375 - It must be set to 0 in case of a CRAM
Kojto 107:4f6c30876dfa 376 - It is don't care in asynchronous NOR, SRAM or ROM accesses
Kojto 107:4f6c30876dfa 377 - It may assume a value between Min_Data = 2 and Max_Data = 17 in NOR Flash memories
Kojto 107:4f6c30876dfa 378 with synchronous burst mode enable */
Kojto 107:4f6c30876dfa 379
Kojto 122:f9eeca106725 380 uint32_t AccessMode; /*!< Specifies the asynchronous access mode.
Kojto 107:4f6c30876dfa 381 This parameter can be a value of @ref FMC_Access_Mode */
Kojto 107:4f6c30876dfa 382 }FMC_NORSRAM_TimingTypeDef;
Kojto 107:4f6c30876dfa 383
Kojto 122:f9eeca106725 384 /**
Kojto 122:f9eeca106725 385 * @brief FMC_NAND Configuration Structure definition
Kojto 122:f9eeca106725 386 */
Kojto 107:4f6c30876dfa 387 typedef struct
Kojto 107:4f6c30876dfa 388 {
Kojto 107:4f6c30876dfa 389 uint32_t NandBank; /*!< Specifies the NAND memory device that will be used.
Kojto 107:4f6c30876dfa 390 This parameter can be a value of @ref FMC_NAND_Bank */
Kojto 107:4f6c30876dfa 391
Kojto 107:4f6c30876dfa 392 uint32_t Waitfeature; /*!< Enables or disables the Wait feature for the NAND Memory device.
Kojto 107:4f6c30876dfa 393 This parameter can be any value of @ref FMC_Wait_feature */
Kojto 107:4f6c30876dfa 394
Kojto 107:4f6c30876dfa 395 uint32_t MemoryDataWidth; /*!< Specifies the external memory device width.
Kojto 107:4f6c30876dfa 396 This parameter can be any value of @ref FMC_NAND_Data_Width */
Kojto 107:4f6c30876dfa 397
Kojto 107:4f6c30876dfa 398 uint32_t EccComputation; /*!< Enables or disables the ECC computation.
Kojto 107:4f6c30876dfa 399 This parameter can be any value of @ref FMC_ECC */
Kojto 107:4f6c30876dfa 400
Kojto 107:4f6c30876dfa 401 uint32_t ECCPageSize; /*!< Defines the page size for the extended ECC.
Kojto 107:4f6c30876dfa 402 This parameter can be any value of @ref FMC_ECC_Page_Size */
Kojto 107:4f6c30876dfa 403
Kojto 107:4f6c30876dfa 404 uint32_t TCLRSetupTime; /*!< Defines the number of HCLK cycles to configure the
Kojto 107:4f6c30876dfa 405 delay between CLE low and RE low.
Kojto 107:4f6c30876dfa 406 This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
Kojto 107:4f6c30876dfa 407
Kojto 107:4f6c30876dfa 408 uint32_t TARSetupTime; /*!< Defines the number of HCLK cycles to configure the
Kojto 107:4f6c30876dfa 409 delay between ALE low and RE low.
Kojto 107:4f6c30876dfa 410 This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
Kojto 107:4f6c30876dfa 411 }FMC_NAND_InitTypeDef;
Kojto 107:4f6c30876dfa 412
Kojto 122:f9eeca106725 413 /**
Kojto 107:4f6c30876dfa 414 * @brief FMC_NAND Timing parameters structure definition
Kojto 107:4f6c30876dfa 415 */
Kojto 107:4f6c30876dfa 416 typedef struct
Kojto 107:4f6c30876dfa 417 {
Kojto 107:4f6c30876dfa 418 uint32_t SetupTime; /*!< Defines the number of HCLK cycles to setup address before
Kojto 107:4f6c30876dfa 419 the command assertion for NAND-Flash read or write access
Kojto 107:4f6c30876dfa 420 to common/Attribute or I/O memory space (depending on
Kojto 107:4f6c30876dfa 421 the memory space timing to be configured).
Kojto 107:4f6c30876dfa 422 This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
Kojto 107:4f6c30876dfa 423
Kojto 107:4f6c30876dfa 424 uint32_t WaitSetupTime; /*!< Defines the minimum number of HCLK cycles to assert the
Kojto 107:4f6c30876dfa 425 command for NAND-Flash read or write access to
Kojto 107:4f6c30876dfa 426 common/Attribute or I/O memory space (depending on the
Kojto 122:f9eeca106725 427 memory space timing to be configured).
Kojto 107:4f6c30876dfa 428 This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
Kojto 107:4f6c30876dfa 429
Kojto 107:4f6c30876dfa 430 uint32_t HoldSetupTime; /*!< Defines the number of HCLK clock cycles to hold address
Kojto 107:4f6c30876dfa 431 (and data for write access) after the command de-assertion
Kojto 107:4f6c30876dfa 432 for NAND-Flash read or write access to common/Attribute
Kojto 107:4f6c30876dfa 433 or I/O memory space (depending on the memory space timing
Kojto 107:4f6c30876dfa 434 to be configured).
Kojto 107:4f6c30876dfa 435 This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
Kojto 107:4f6c30876dfa 436
Kojto 107:4f6c30876dfa 437 uint32_t HiZSetupTime; /*!< Defines the number of HCLK clock cycles during which the
Kojto 107:4f6c30876dfa 438 data bus is kept in HiZ after the start of a NAND-Flash
Kojto 107:4f6c30876dfa 439 write access to common/Attribute or I/O memory space (depending
Kojto 107:4f6c30876dfa 440 on the memory space timing to be configured).
Kojto 107:4f6c30876dfa 441 This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
Kojto 107:4f6c30876dfa 442 }FMC_NAND_PCC_TimingTypeDef;
Kojto 107:4f6c30876dfa 443
Kojto 107:4f6c30876dfa 444 /**
Kojto 107:4f6c30876dfa 445 * @}
Kojto 122:f9eeca106725 446 */
Kojto 107:4f6c30876dfa 447
Kojto 107:4f6c30876dfa 448 /* Exported constants --------------------------------------------------------*/
Kojto 107:4f6c30876dfa 449 /** @addtogroup FMC_LL_Exported_Constants FMC Low Layer Exported Constants
Kojto 107:4f6c30876dfa 450 * @{
Kojto 107:4f6c30876dfa 451 */
Kojto 107:4f6c30876dfa 452
Kojto 107:4f6c30876dfa 453 /** @defgroup FMC_NOR_SRAM_Exported_constants FMC NOR/SRAM Exported constants
Kojto 107:4f6c30876dfa 454 * @{
Kojto 107:4f6c30876dfa 455 */
Kojto 107:4f6c30876dfa 456
Kojto 107:4f6c30876dfa 457 /** @defgroup FMC_NORSRAM_Bank FMC NOR/SRAM Bank
Kojto 107:4f6c30876dfa 458 * @{
Kojto 107:4f6c30876dfa 459 */
Kojto 107:4f6c30876dfa 460 #define FMC_NORSRAM_BANK1 ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 461 #define FMC_NORSRAM_BANK2 ((uint32_t)0x00000002)
Kojto 107:4f6c30876dfa 462 #define FMC_NORSRAM_BANK3 ((uint32_t)0x00000004)
Kojto 107:4f6c30876dfa 463 #define FMC_NORSRAM_BANK4 ((uint32_t)0x00000006)
Kojto 107:4f6c30876dfa 464 /**
Kojto 107:4f6c30876dfa 465 * @}
Kojto 107:4f6c30876dfa 466 */
Kojto 107:4f6c30876dfa 467
Kojto 107:4f6c30876dfa 468 /** @defgroup FMC_Data_Address_Bus_Multiplexing FMC Data Address Bus Multiplexing
Kojto 107:4f6c30876dfa 469 * @{
Kojto 107:4f6c30876dfa 470 */
Kojto 107:4f6c30876dfa 471 #define FMC_DATA_ADDRESS_MUX_DISABLE ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 472 #define FMC_DATA_ADDRESS_MUX_ENABLE ((uint32_t)FMC_BCRx_MUXEN)
Kojto 107:4f6c30876dfa 473 /**
Kojto 107:4f6c30876dfa 474 * @}
Kojto 107:4f6c30876dfa 475 */
Kojto 107:4f6c30876dfa 476
Kojto 107:4f6c30876dfa 477 /** @defgroup FMC_Memory_Type FMC Memory Type
Kojto 107:4f6c30876dfa 478 * @{
Kojto 107:4f6c30876dfa 479 */
Kojto 107:4f6c30876dfa 480 #define FMC_MEMORY_TYPE_SRAM ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 481 #define FMC_MEMORY_TYPE_PSRAM ((uint32_t)FMC_BCRx_MTYP_0)
Kojto 107:4f6c30876dfa 482 #define FMC_MEMORY_TYPE_NOR ((uint32_t)FMC_BCRx_MTYP_1)
Kojto 107:4f6c30876dfa 483 /**
Kojto 107:4f6c30876dfa 484 * @}
Kojto 107:4f6c30876dfa 485 */
Kojto 107:4f6c30876dfa 486
Kojto 107:4f6c30876dfa 487 /** @defgroup FMC_NORSRAM_Data_Width FMC NORSRAM Data Width
Kojto 107:4f6c30876dfa 488 * @{
Kojto 107:4f6c30876dfa 489 */
Kojto 107:4f6c30876dfa 490 #define FMC_NORSRAM_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 491 #define FMC_NORSRAM_MEM_BUS_WIDTH_16 ((uint32_t)FMC_BCRx_MWID_0)
Kojto 107:4f6c30876dfa 492 #define FMC_NORSRAM_MEM_BUS_WIDTH_32 ((uint32_t)FMC_BCRx_MWID_1)
Kojto 107:4f6c30876dfa 493 /**
Kojto 107:4f6c30876dfa 494 * @}
Kojto 107:4f6c30876dfa 495 */
Kojto 107:4f6c30876dfa 496
Kojto 107:4f6c30876dfa 497 /** @defgroup FMC_NORSRAM_Flash_Access FMC NORSRAM Flash Access
Kojto 107:4f6c30876dfa 498 * @{
Kojto 107:4f6c30876dfa 499 */
Kojto 107:4f6c30876dfa 500 #define FMC_NORSRAM_FLASH_ACCESS_ENABLE ((uint32_t)FMC_BCRx_FACCEN)
Kojto 107:4f6c30876dfa 501 #define FMC_NORSRAM_FLASH_ACCESS_DISABLE ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 502 /**
Kojto 107:4f6c30876dfa 503 * @}
Kojto 107:4f6c30876dfa 504 */
Kojto 107:4f6c30876dfa 505
Kojto 107:4f6c30876dfa 506 /** @defgroup FMC_Burst_Access_Mode FMC Burst Access Mode
Kojto 107:4f6c30876dfa 507 * @{
Kojto 107:4f6c30876dfa 508 */
Kojto 122:f9eeca106725 509 #define FMC_BURST_ACCESS_MODE_DISABLE ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 510 #define FMC_BURST_ACCESS_MODE_ENABLE ((uint32_t)FMC_BCRx_BURSTEN)
Kojto 107:4f6c30876dfa 511 /**
Kojto 107:4f6c30876dfa 512 * @}
Kojto 107:4f6c30876dfa 513 */
Kojto 122:f9eeca106725 514
Kojto 107:4f6c30876dfa 515
Kojto 107:4f6c30876dfa 516 /** @defgroup FMC_Wait_Signal_Polarity FMC Wait Signal Polarity
Kojto 107:4f6c30876dfa 517 * @{
Kojto 107:4f6c30876dfa 518 */
Kojto 107:4f6c30876dfa 519 #define FMC_WAIT_SIGNAL_POLARITY_LOW ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 520 #define FMC_WAIT_SIGNAL_POLARITY_HIGH ((uint32_t)FMC_BCRx_WAITPOL)
Kojto 107:4f6c30876dfa 521 /**
Kojto 107:4f6c30876dfa 522 * @}
Kojto 107:4f6c30876dfa 523 */
Kojto 107:4f6c30876dfa 524
Kojto 107:4f6c30876dfa 525 /** @defgroup FMC_Wait_Timing FMC Wait Timing
Kojto 107:4f6c30876dfa 526 * @{
Kojto 107:4f6c30876dfa 527 */
Kojto 107:4f6c30876dfa 528 #define FMC_WAIT_TIMING_BEFORE_WS ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 529 #define FMC_WAIT_TIMING_DURING_WS ((uint32_t)FMC_BCRx_WAITCFG)
Kojto 107:4f6c30876dfa 530
Kojto 107:4f6c30876dfa 531 /**
Kojto 107:4f6c30876dfa 532 * @}
Kojto 107:4f6c30876dfa 533 */
Kojto 107:4f6c30876dfa 534
Kojto 107:4f6c30876dfa 535 /** @defgroup FMC_Write_Operation FMC Write Operation
Kojto 107:4f6c30876dfa 536 * @{
Kojto 107:4f6c30876dfa 537 */
Kojto 107:4f6c30876dfa 538 #define FMC_WRITE_OPERATION_DISABLE ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 539 #define FMC_WRITE_OPERATION_ENABLE ((uint32_t)FMC_BCRx_WREN)
Kojto 107:4f6c30876dfa 540 /**
Kojto 107:4f6c30876dfa 541 * @}
Kojto 107:4f6c30876dfa 542 */
Kojto 107:4f6c30876dfa 543
Kojto 107:4f6c30876dfa 544 /** @defgroup FMC_Wait_Signal FMC Wait Signal
Kojto 107:4f6c30876dfa 545 * @{
Kojto 107:4f6c30876dfa 546 */
Kojto 107:4f6c30876dfa 547 #define FMC_WAIT_SIGNAL_DISABLE ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 548 #define FMC_WAIT_SIGNAL_ENABLE ((uint32_t)FMC_BCRx_WAITEN)
Kojto 107:4f6c30876dfa 549 /**
Kojto 107:4f6c30876dfa 550 * @}
Kojto 107:4f6c30876dfa 551 */
Kojto 107:4f6c30876dfa 552
Kojto 107:4f6c30876dfa 553 /** @defgroup FMC_Extended_Mode FMC Extended Mode
Kojto 107:4f6c30876dfa 554 * @{
Kojto 107:4f6c30876dfa 555 */
Kojto 107:4f6c30876dfa 556 #define FMC_EXTENDED_MODE_DISABLE ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 557 #define FMC_EXTENDED_MODE_ENABLE ((uint32_t)FMC_BCRx_EXTMOD)
Kojto 107:4f6c30876dfa 558 /**
Kojto 107:4f6c30876dfa 559 * @}
Kojto 107:4f6c30876dfa 560 */
Kojto 107:4f6c30876dfa 561
Kojto 107:4f6c30876dfa 562 /** @defgroup FMC_AsynchronousWait FMC Asynchronous Wait
Kojto 107:4f6c30876dfa 563 * @{
Kojto 107:4f6c30876dfa 564 */
Kojto 107:4f6c30876dfa 565 #define FMC_ASYNCHRONOUS_WAIT_DISABLE ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 566 #define FMC_ASYNCHRONOUS_WAIT_ENABLE ((uint32_t)FMC_BCRx_ASYNCWAIT)
Kojto 107:4f6c30876dfa 567 /**
Kojto 107:4f6c30876dfa 568 * @}
Kojto 122:f9eeca106725 569 */
Kojto 107:4f6c30876dfa 570
Kojto 107:4f6c30876dfa 571 /** @defgroup FMC_Page_Size FMC Page Size
Kojto 107:4f6c30876dfa 572 * @{
Kojto 107:4f6c30876dfa 573 */
Kojto 107:4f6c30876dfa 574 #define FMC_PAGE_SIZE_NONE ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 575 #define FMC_PAGE_SIZE_128 ((uint32_t)FMC_BCRx_CPSIZE_0)
Kojto 107:4f6c30876dfa 576 #define FMC_PAGE_SIZE_256 ((uint32_t)FMC_BCRx_CPSIZE_1)
Kojto 122:f9eeca106725 577 #define FMC_PAGE_SIZE_512 ((uint32_t)(FMC_BCRx_CPSIZE_0 | FMC_BCRx_CPSIZE_1))
Kojto 107:4f6c30876dfa 578 #define FMC_PAGE_SIZE_1024 ((uint32_t)FMC_BCRx_CPSIZE_2)
Kojto 107:4f6c30876dfa 579 /**
Kojto 107:4f6c30876dfa 580 * @}
Kojto 122:f9eeca106725 581 */
Kojto 107:4f6c30876dfa 582
Kojto 107:4f6c30876dfa 583 /** @defgroup FMC_Write_Burst FMC Write Burst
Kojto 107:4f6c30876dfa 584 * @{
Kojto 107:4f6c30876dfa 585 */
Kojto 107:4f6c30876dfa 586 #define FMC_WRITE_BURST_DISABLE ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 587 #define FMC_WRITE_BURST_ENABLE ((uint32_t)FMC_BCRx_CBURSTRW)
Kojto 107:4f6c30876dfa 588 /**
Kojto 107:4f6c30876dfa 589 * @}
Kojto 107:4f6c30876dfa 590 */
Kojto 122:f9eeca106725 591
Kojto 107:4f6c30876dfa 592 /** @defgroup FMC_Continous_Clock FMC Continous Clock
Kojto 107:4f6c30876dfa 593 * @{
Kojto 107:4f6c30876dfa 594 */
Kojto 107:4f6c30876dfa 595 #define FMC_CONTINUOUS_CLOCK_SYNC_ONLY ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 596 #define FMC_CONTINUOUS_CLOCK_SYNC_ASYNC ((uint32_t)FMC_BCR1_CCLKEN)
Kojto 107:4f6c30876dfa 597 /**
Kojto 107:4f6c30876dfa 598 * @}
Kojto 107:4f6c30876dfa 599 */
Kojto 107:4f6c30876dfa 600
Kojto 107:4f6c30876dfa 601 /** @defgroup FMC_Access_Mode FMC Access Mode
Kojto 107:4f6c30876dfa 602 * @{
Kojto 107:4f6c30876dfa 603 */
Kojto 107:4f6c30876dfa 604 #define FMC_ACCESS_MODE_A ((uint32_t)0x00000000)
Kojto 122:f9eeca106725 605 #define FMC_ACCESS_MODE_B ((uint32_t)FMC_BTRx_ACCMOD_0)
Kojto 107:4f6c30876dfa 606 #define FMC_ACCESS_MODE_C ((uint32_t)FMC_BTRx_ACCMOD_1)
Kojto 107:4f6c30876dfa 607 #define FMC_ACCESS_MODE_D ((uint32_t)(FMC_BTRx_ACCMOD_0|FMC_BTRx_ACCMOD_1))
Kojto 107:4f6c30876dfa 608 /**
Kojto 107:4f6c30876dfa 609 * @}
Kojto 122:f9eeca106725 610 */
Kojto 107:4f6c30876dfa 611
Kojto 107:4f6c30876dfa 612 /**
Kojto 107:4f6c30876dfa 613 * @}
Kojto 107:4f6c30876dfa 614 */
Kojto 122:f9eeca106725 615
Kojto 107:4f6c30876dfa 616 /**
Kojto 107:4f6c30876dfa 617 * @}
Kojto 122:f9eeca106725 618 */
Kojto 107:4f6c30876dfa 619
Kojto 107:4f6c30876dfa 620 /** @defgroup FMC_NAND_Controller FMC NAND Exported constants
Kojto 107:4f6c30876dfa 621 * @{
Kojto 107:4f6c30876dfa 622 */
Kojto 107:4f6c30876dfa 623
Kojto 107:4f6c30876dfa 624 /** @defgroup FMC_NAND_Bank FMC NAND Bank
Kojto 107:4f6c30876dfa 625 * @{
Kojto 122:f9eeca106725 626 */
Kojto 107:4f6c30876dfa 627 #define FMC_NAND_BANK3 ((uint32_t)0x00000100)
Kojto 107:4f6c30876dfa 628 /**
Kojto 107:4f6c30876dfa 629 * @}
Kojto 107:4f6c30876dfa 630 */
Kojto 107:4f6c30876dfa 631
Kojto 107:4f6c30876dfa 632 /** @defgroup FMC_Wait_feature FMC Wait feature
Kojto 107:4f6c30876dfa 633 * @{
Kojto 107:4f6c30876dfa 634 */
Kojto 107:4f6c30876dfa 635 #define FMC_NAND_WAIT_FEATURE_DISABLE ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 636 #define FMC_NAND_WAIT_FEATURE_ENABLE ((uint32_t)FMC_PCR_PWAITEN)
Kojto 107:4f6c30876dfa 637 /**
Kojto 107:4f6c30876dfa 638 * @}
Kojto 107:4f6c30876dfa 639 */
Kojto 107:4f6c30876dfa 640
Kojto 107:4f6c30876dfa 641 /** @defgroup FMC_PCR_Memory_Type FMC PCR Memory Type
Kojto 107:4f6c30876dfa 642 * @{
Kojto 107:4f6c30876dfa 643 */
Kojto 107:4f6c30876dfa 644 #define FMC_PCR_MEMORY_TYPE_NAND ((uint32_t)FMC_PCR_PTYP)
Kojto 107:4f6c30876dfa 645 /**
Kojto 107:4f6c30876dfa 646 * @}
Kojto 107:4f6c30876dfa 647 */
Kojto 107:4f6c30876dfa 648
Kojto 107:4f6c30876dfa 649 /** @defgroup FMC_NAND_Data_Width FMC NAND Data Width
Kojto 107:4f6c30876dfa 650 * @{
Kojto 107:4f6c30876dfa 651 */
Kojto 107:4f6c30876dfa 652 #define FMC_NAND_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 653 #define FMC_NAND_MEM_BUS_WIDTH_16 ((uint32_t)FMC_PCR_PWID_0)
Kojto 107:4f6c30876dfa 654 /**
Kojto 107:4f6c30876dfa 655 * @}
Kojto 107:4f6c30876dfa 656 */
Kojto 107:4f6c30876dfa 657
Kojto 107:4f6c30876dfa 658 /** @defgroup FMC_ECC FMC NAND ECC
Kojto 107:4f6c30876dfa 659 * @{
Kojto 107:4f6c30876dfa 660 */
Kojto 107:4f6c30876dfa 661 #define FMC_NAND_ECC_DISABLE ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 662 #define FMC_NAND_ECC_ENABLE ((uint32_t)FMC_PCR_ECCEN)
Kojto 107:4f6c30876dfa 663 /**
Kojto 107:4f6c30876dfa 664 * @}
Kojto 107:4f6c30876dfa 665 */
Kojto 107:4f6c30876dfa 666
Kojto 107:4f6c30876dfa 667 /** @defgroup FMC_ECC_Page_Size FMC NAND ECC Page Size
Kojto 107:4f6c30876dfa 668 * @{
Kojto 107:4f6c30876dfa 669 */
Kojto 107:4f6c30876dfa 670 #define FMC_NAND_ECC_PAGE_SIZE_256BYTE ((uint32_t)0x00000000)
Kojto 107:4f6c30876dfa 671 #define FMC_NAND_ECC_PAGE_SIZE_512BYTE ((uint32_t)FMC_PCR_ECCPS_0)
Kojto 107:4f6c30876dfa 672 #define FMC_NAND_ECC_PAGE_SIZE_1024BYTE ((uint32_t)FMC_PCR_ECCPS_1)
Kojto 107:4f6c30876dfa 673 #define FMC_NAND_ECC_PAGE_SIZE_2048BYTE ((uint32_t)FMC_PCR_ECCPS_0|FMC_PCR_ECCPS_1)
Kojto 107:4f6c30876dfa 674 #define FMC_NAND_ECC_PAGE_SIZE_4096BYTE ((uint32_t)FMC_PCR_ECCPS_2)
Kojto 107:4f6c30876dfa 675 #define FMC_NAND_ECC_PAGE_SIZE_8192BYTE ((uint32_t)FMC_PCR_ECCPS_0|FMC_PCR_ECCPS_2)
Kojto 107:4f6c30876dfa 676 /**
Kojto 107:4f6c30876dfa 677 * @}
Kojto 107:4f6c30876dfa 678 */
Kojto 107:4f6c30876dfa 679
Kojto 107:4f6c30876dfa 680 /**
Kojto 107:4f6c30876dfa 681 * @}
Kojto 122:f9eeca106725 682 */
Kojto 107:4f6c30876dfa 683
Kojto 107:4f6c30876dfa 684 /**
Kojto 107:4f6c30876dfa 685 * @}
Kojto 122:f9eeca106725 686 */
Kojto 107:4f6c30876dfa 687
Kojto 107:4f6c30876dfa 688 /** @defgroup FMC_Interrupt_definition FMC Interrupt definition
Kojto 107:4f6c30876dfa 689 * @brief FMC Interrupt definition
Kojto 107:4f6c30876dfa 690 * @{
Kojto 122:f9eeca106725 691 */
Kojto 107:4f6c30876dfa 692 #define FMC_IT_RISING_EDGE ((uint32_t)FMC_SR_IREN)
Kojto 107:4f6c30876dfa 693 #define FMC_IT_LEVEL ((uint32_t)FMC_SR_ILEN)
Kojto 107:4f6c30876dfa 694 #define FMC_IT_FALLING_EDGE ((uint32_t)FMC_SR_IFEN)
Kojto 107:4f6c30876dfa 695 /**
Kojto 107:4f6c30876dfa 696 * @}
Kojto 107:4f6c30876dfa 697 */
Kojto 122:f9eeca106725 698
Kojto 107:4f6c30876dfa 699 /** @defgroup FMC_Flag_definition FMC Flag definition
Kojto 107:4f6c30876dfa 700 * @brief FMC Flag definition
Kojto 107:4f6c30876dfa 701 * @{
Kojto 122:f9eeca106725 702 */
Kojto 107:4f6c30876dfa 703 #define FMC_FLAG_RISING_EDGE ((uint32_t)FMC_SR_IRS)
Kojto 107:4f6c30876dfa 704 #define FMC_FLAG_LEVEL ((uint32_t)FMC_SR_ILS)
Kojto 107:4f6c30876dfa 705 #define FMC_FLAG_FALLING_EDGE ((uint32_t)FMC_SR_IFS)
Kojto 107:4f6c30876dfa 706 #define FMC_FLAG_FEMPT ((uint32_t)FMC_SR_FEMPT)
Kojto 107:4f6c30876dfa 707 /**
Kojto 107:4f6c30876dfa 708 * @}
Kojto 107:4f6c30876dfa 709 */
Kojto 107:4f6c30876dfa 710
Kojto 107:4f6c30876dfa 711 /* Exported macro ------------------------------------------------------------*/
Kojto 107:4f6c30876dfa 712
Kojto 107:4f6c30876dfa 713 /** @defgroup FMC_Exported_Macros FMC Low Layer Exported Macros
Kojto 107:4f6c30876dfa 714 * @{
Kojto 122:f9eeca106725 715 */
Kojto 122:f9eeca106725 716
Kojto 107:4f6c30876dfa 717 /** @defgroup FMC_NOR_Macros FMC NOR/SRAM Exported Macros
Kojto 107:4f6c30876dfa 718 * @brief macros to handle NOR device enable/disable and read/write operations
Kojto 107:4f6c30876dfa 719 * @{
Kojto 107:4f6c30876dfa 720 */
Kojto 122:f9eeca106725 721
Kojto 107:4f6c30876dfa 722 /**
Kojto 107:4f6c30876dfa 723 * @brief Enable the NORSRAM device access.
Kojto 107:4f6c30876dfa 724 * @param __INSTANCE__: FMC_NORSRAM Instance
Kojto 122:f9eeca106725 725 * @param __BANK__: FMC_NORSRAM Bank
Kojto 107:4f6c30876dfa 726 * @retval none
Kojto 122:f9eeca106725 727 */
Kojto 107:4f6c30876dfa 728 #define __FMC_NORSRAM_ENABLE(__INSTANCE__, __BANK__) SET_BIT((__INSTANCE__)->BTCR[(__BANK__)], FMC_BCRx_MBKEN)
Kojto 107:4f6c30876dfa 729
Kojto 107:4f6c30876dfa 730 /**
Kojto 107:4f6c30876dfa 731 * @brief Disable the NORSRAM device access.
Kojto 107:4f6c30876dfa 732 * @param __INSTANCE__: FMC_NORSRAM Instance
Kojto 122:f9eeca106725 733 * @param __BANK__: FMC_NORSRAM Bank
Kojto 107:4f6c30876dfa 734 * @retval none
Kojto 122:f9eeca106725 735 */
Kojto 122:f9eeca106725 736 #define __FMC_NORSRAM_DISABLE(__INSTANCE__, __BANK__) CLEAR_BIT((__INSTANCE__)->BTCR[(__BANK__)], FMC_BCRx_MBKEN)
Kojto 107:4f6c30876dfa 737
Kojto 107:4f6c30876dfa 738 /**
Kojto 107:4f6c30876dfa 739 * @}
Kojto 122:f9eeca106725 740 */
Kojto 107:4f6c30876dfa 741
Kojto 107:4f6c30876dfa 742 /** @defgroup FMC_NAND_Macros FMC NAND Macros
Kojto 107:4f6c30876dfa 743 * @brief macros to handle NAND device enable/disable
Kojto 107:4f6c30876dfa 744 * @{
Kojto 107:4f6c30876dfa 745 */
Kojto 122:f9eeca106725 746
Kojto 107:4f6c30876dfa 747 /**
Kojto 107:4f6c30876dfa 748 * @brief Enable the NAND device access.
Kojto 107:4f6c30876dfa 749 * @param __INSTANCE__: FMC_NAND Instance
Kojto 122:f9eeca106725 750 * @param __BANK__: FMC_NAND Bank
Kojto 107:4f6c30876dfa 751 * @retval none
Kojto 122:f9eeca106725 752 */
Kojto 107:4f6c30876dfa 753 #define __FMC_NAND_ENABLE(__INSTANCE__, __BANK__) SET_BIT((__INSTANCE__)->PCR, FMC_PCR_PBKEN)
Kojto 107:4f6c30876dfa 754
Kojto 107:4f6c30876dfa 755 /**
Kojto 107:4f6c30876dfa 756 * @brief Disable the NAND device access.
Kojto 107:4f6c30876dfa 757 * @param __INSTANCE__: FMC_NAND Instance
Kojto 122:f9eeca106725 758 * @param __BANK__: FMC_NAND Bank
Kojto 107:4f6c30876dfa 759 * @retval None
Kojto 107:4f6c30876dfa 760 */
Kojto 107:4f6c30876dfa 761 #define __FMC_NAND_DISABLE(__INSTANCE__, __BANK__) CLEAR_BIT((__INSTANCE__)->PCR, FMC_PCR_PBKEN)
Kojto 107:4f6c30876dfa 762
Kojto 107:4f6c30876dfa 763 /**
Kojto 107:4f6c30876dfa 764 * @}
Kojto 122:f9eeca106725 765 */
Kojto 122:f9eeca106725 766
Kojto 107:4f6c30876dfa 767 /** @defgroup FMC_Interrupt FMC Interrupt
Kojto 107:4f6c30876dfa 768 * @brief macros to handle FMC interrupts
Kojto 107:4f6c30876dfa 769 * @{
Kojto 122:f9eeca106725 770 */
Kojto 107:4f6c30876dfa 771
Kojto 107:4f6c30876dfa 772 /**
Kojto 107:4f6c30876dfa 773 * @brief Enable the NAND device interrupt.
Kojto 107:4f6c30876dfa 774 * @param __INSTANCE__: FMC_NAND Instance
Kojto 122:f9eeca106725 775 * @param __BANK__: FMC_NAND Bank
Kojto 122:f9eeca106725 776 * @param __INTERRUPT__: FMC_NAND interrupt
Kojto 107:4f6c30876dfa 777 * This parameter can be any combination of the following values:
Kojto 107:4f6c30876dfa 778 * @arg FMC_IT_RISING_EDGE: Interrupt rising edge.
Kojto 107:4f6c30876dfa 779 * @arg FMC_IT_LEVEL: Interrupt level.
Kojto 122:f9eeca106725 780 * @arg FMC_IT_FALLING_EDGE: Interrupt falling edge.
Kojto 107:4f6c30876dfa 781 * @retval None
Kojto 122:f9eeca106725 782 */
Kojto 107:4f6c30876dfa 783 #define __FMC_NAND_ENABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) SET_BIT((__INSTANCE__)->SR, (__INTERRUPT__))
Kojto 107:4f6c30876dfa 784
Kojto 107:4f6c30876dfa 785 /**
Kojto 107:4f6c30876dfa 786 * @brief Disable the NAND device interrupt.
Kojto 107:4f6c30876dfa 787 * @param __INSTANCE__: FMC_NAND Instance
Kojto 122:f9eeca106725 788 * @param __BANK__: FMC_NAND Bank
Kojto 107:4f6c30876dfa 789 * @param __INTERRUPT__: FMC_NAND interrupt
Kojto 107:4f6c30876dfa 790 * This parameter can be any combination of the following values:
Kojto 107:4f6c30876dfa 791 * @arg FMC_IT_RISING_EDGE: Interrupt rising edge.
Kojto 107:4f6c30876dfa 792 * @arg FMC_IT_LEVEL: Interrupt level.
Kojto 122:f9eeca106725 793 * @arg FMC_IT_FALLING_EDGE: Interrupt falling edge.
Kojto 107:4f6c30876dfa 794 * @retval None
Kojto 107:4f6c30876dfa 795 */
Kojto 107:4f6c30876dfa 796 #define __FMC_NAND_DISABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) CLEAR_BIT((__INSTANCE__)->SR, (__INTERRUPT__))
Kojto 122:f9eeca106725 797
Kojto 107:4f6c30876dfa 798 /**
Kojto 107:4f6c30876dfa 799 * @brief Get flag status of the NAND device.
Kojto 107:4f6c30876dfa 800 * @param __INSTANCE__: FMC_NAND Instance
Kojto 122:f9eeca106725 801 * @param __BANK__: FMC_NAND Bank
Kojto 107:4f6c30876dfa 802 * @param __FLAG__: FMC_NAND flag
Kojto 107:4f6c30876dfa 803 * This parameter can be any combination of the following values:
Kojto 107:4f6c30876dfa 804 * @arg FMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
Kojto 107:4f6c30876dfa 805 * @arg FMC_FLAG_LEVEL: Interrupt level edge flag.
Kojto 107:4f6c30876dfa 806 * @arg FMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
Kojto 122:f9eeca106725 807 * @arg FMC_FLAG_FEMPT: FIFO empty flag.
Kojto 107:4f6c30876dfa 808 * @retval The state of FLAG (SET or RESET).
Kojto 107:4f6c30876dfa 809 */
Kojto 107:4f6c30876dfa 810 #define __FMC_NAND_GET_FLAG(__INSTANCE__, __BANK__, __FLAG__) (((__INSTANCE__)->SR &(__FLAG__)) == (__FLAG__))
Kojto 107:4f6c30876dfa 811
Kojto 107:4f6c30876dfa 812 /**
Kojto 107:4f6c30876dfa 813 * @brief Clear flag status of the NAND device.
Kojto 122:f9eeca106725 814 * @param __INSTANCE__: FMC_NAND Instance
Kojto 122:f9eeca106725 815 * @param __BANK__: FMC_NAND Bank
Kojto 107:4f6c30876dfa 816 * @param __FLAG__: FMC_NAND flag
Kojto 107:4f6c30876dfa 817 * This parameter can be any combination of the following values:
Kojto 107:4f6c30876dfa 818 * @arg FMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
Kojto 107:4f6c30876dfa 819 * @arg FMC_FLAG_LEVEL: Interrupt level edge flag.
Kojto 107:4f6c30876dfa 820 * @arg FMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
Kojto 122:f9eeca106725 821 * @arg FMC_FLAG_FEMPT: FIFO empty flag.
Kojto 107:4f6c30876dfa 822 * @retval None
Kojto 107:4f6c30876dfa 823 */
Kojto 122:f9eeca106725 824 #define __FMC_NAND_CLEAR_FLAG(__INSTANCE__, __BANK__, __FLAG__) CLEAR_BIT((__INSTANCE__)->SR, (__FLAG__))
Kojto 107:4f6c30876dfa 825
Kojto 107:4f6c30876dfa 826
Kojto 107:4f6c30876dfa 827 /* Exported functions --------------------------------------------------------*/
Kojto 107:4f6c30876dfa 828 /** @addgroup FMC_LL_Exported_Functions FMC Low Layer Exported Functions
Kojto 107:4f6c30876dfa 829 * @{
Kojto 107:4f6c30876dfa 830 */
Kojto 107:4f6c30876dfa 831
Kojto 107:4f6c30876dfa 832 /* FMC_LL_NORSRAM Controller functions *******************************************/
Kojto 107:4f6c30876dfa 833 /** @addgroup FMC_LL_NORSRAM_Exported_Functions_Group1 Initialization and de-initialization functions
Kojto 107:4f6c30876dfa 834 * @{
Kojto 107:4f6c30876dfa 835 */
Kojto 107:4f6c30876dfa 836 /* Initialization/de-initialization functions */
Kojto 107:4f6c30876dfa 837 HAL_StatusTypeDef FMC_NORSRAM_Init(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_InitTypeDef *Init);
Kojto 107:4f6c30876dfa 838 HAL_StatusTypeDef FMC_NORSRAM_Timing_Init(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank);
Kojto 107:4f6c30876dfa 839 HAL_StatusTypeDef FMC_NORSRAM_Extended_Timing_Init(FMC_NORSRAM_EXTENDED_TypeDef *Device, FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode);
Kojto 107:4f6c30876dfa 840 HAL_StatusTypeDef FMC_NORSRAM_DeInit(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank);
Kojto 107:4f6c30876dfa 841 /**
Kojto 107:4f6c30876dfa 842 * @}
Kojto 122:f9eeca106725 843 */
Kojto 107:4f6c30876dfa 844
Kojto 122:f9eeca106725 845 /** @addtogroup FMC_LL_NORSRAM_Exported_Functions_Group2 Peripheral Control functions
Kojto 107:4f6c30876dfa 846 * @{
Kojto 107:4f6c30876dfa 847 */
Kojto 107:4f6c30876dfa 848 /* FMC_NORSRAM Control functions */
Kojto 107:4f6c30876dfa 849 HAL_StatusTypeDef FMC_NORSRAM_WriteOperation_Enable(FMC_NORSRAM_TypeDef *Device, uint32_t Bank);
Kojto 107:4f6c30876dfa 850 HAL_StatusTypeDef FMC_NORSRAM_WriteOperation_Disable(FMC_NORSRAM_TypeDef *Device, uint32_t Bank);
Kojto 107:4f6c30876dfa 851 /**
Kojto 107:4f6c30876dfa 852 * @}
Kojto 122:f9eeca106725 853 */
Kojto 107:4f6c30876dfa 854
Kojto 107:4f6c30876dfa 855 /* FMC_NAND Controller functions **********************************************/
Kojto 107:4f6c30876dfa 856 /** @addtogroup FMC_LL_NAND_Exported_Functions_Group1 Initialization and de-initialization functions
Kojto 107:4f6c30876dfa 857 * @{
Kojto 107:4f6c30876dfa 858 */
Kojto 107:4f6c30876dfa 859 /* Initialization/de-initialization functions */
Kojto 107:4f6c30876dfa 860 HAL_StatusTypeDef FMC_NAND_Init(FMC_NAND_TypeDef *Device, FMC_NAND_InitTypeDef *Init);
Kojto 107:4f6c30876dfa 861 HAL_StatusTypeDef FMC_NAND_CommonSpace_Timing_Init(FMC_NAND_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
Kojto 107:4f6c30876dfa 862 HAL_StatusTypeDef FMC_NAND_AttributeSpace_Timing_Init(FMC_NAND_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
Kojto 107:4f6c30876dfa 863 HAL_StatusTypeDef FMC_NAND_DeInit(FMC_NAND_TypeDef *Device, uint32_t Bank);
Kojto 107:4f6c30876dfa 864 /**
Kojto 107:4f6c30876dfa 865 * @}
Kojto 122:f9eeca106725 866 */
Kojto 107:4f6c30876dfa 867
Kojto 122:f9eeca106725 868 /** @defgroup FMC_LL_NAND_Exported_Functions_Group2 FMC Low Layer Peripheral Control functions
Kojto 107:4f6c30876dfa 869 * @{
Kojto 107:4f6c30876dfa 870 */
Kojto 107:4f6c30876dfa 871 /* FMC_NAND Control functions */
Kojto 107:4f6c30876dfa 872 HAL_StatusTypeDef FMC_NAND_ECC_Enable(FMC_NAND_TypeDef *Device, uint32_t Bank);
Kojto 107:4f6c30876dfa 873 HAL_StatusTypeDef FMC_NAND_ECC_Disable(FMC_NAND_TypeDef *Device, uint32_t Bank);
Kojto 107:4f6c30876dfa 874 HAL_StatusTypeDef FMC_NAND_GetECC(FMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank, uint32_t Timeout);
Kojto 107:4f6c30876dfa 875 /**
Kojto 107:4f6c30876dfa 876 * @}
Kojto 122:f9eeca106725 877 */
Kojto 107:4f6c30876dfa 878
Kojto 107:4f6c30876dfa 879 /**
Kojto 107:4f6c30876dfa 880 * @}
Kojto 107:4f6c30876dfa 881 */
Kojto 122:f9eeca106725 882
Kojto 122:f9eeca106725 883 /**
Kojto 122:f9eeca106725 884 * @}
Kojto 122:f9eeca106725 885 */
Kojto 122:f9eeca106725 886
Kojto 122:f9eeca106725 887 /**
Kojto 122:f9eeca106725 888 * @}
Kojto 122:f9eeca106725 889 */
Kojto 122:f9eeca106725 890
Kojto 122:f9eeca106725 891 #endif /* STM32L471xx || STM32L475xx || STM32L476xx || STM32L485xx || STM32L486xx */
Kojto 122:f9eeca106725 892
Kojto 107:4f6c30876dfa 893 #ifdef __cplusplus
Kojto 107:4f6c30876dfa 894 }
Kojto 107:4f6c30876dfa 895 #endif
Kojto 107:4f6c30876dfa 896
Kojto 107:4f6c30876dfa 897 #endif /* __STM32L4xx_LL_FMC_H */
Kojto 107:4f6c30876dfa 898
Kojto 107:4f6c30876dfa 899 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/