Hal Drivers for L4

Dependents:   BSP OneHopeOnePrayer FINAL_AUDIO_RECORD AudioDemo

Fork of STM32L4xx_HAL_Driver by Senior Design: Sound Monitor

Committer:
EricLew
Date:
Wed Nov 25 17:30:43 2015 +0000
Revision:
2:7aef7655b0a8
Parent:
0:80ee8f3b695e
commit;

Who changed what in which revision?

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