Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.
Dependents: 1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB
Fork of mbed by
TARGET_DISCO_L476VG/stm32l4xx_ll_fmc.h@121:672067c3ada4, 2016-04-14 (annotated)
- Committer:
- elijahorr
- Date:
- Thu Apr 14 07:28:54 2016 +0000
- Revision:
- 121:672067c3ada4
- Parent:
- 107:4f6c30876dfa
.
Who changed what in which revision?
User | Revision | Line number | New 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 | 107:4f6c30876dfa | 5 | * @version V1.0.0 |
Kojto | 107:4f6c30876dfa | 6 | * @date 26-June-2015 |
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 | 107:4f6c30876dfa | 11 | * <h2><center>© COPYRIGHT(c) 2015 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 | 107:4f6c30876dfa | 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 | 107:4f6c30876dfa | 46 | /* Includes ------------------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 47 | #include "stm32l4xx_hal_def.h" |
Kojto | 107:4f6c30876dfa | 48 | |
Kojto | 107:4f6c30876dfa | 49 | /** @addtogroup STM32L4xx_HAL_Driver |
Kojto | 107:4f6c30876dfa | 50 | * @{ |
Kojto | 107:4f6c30876dfa | 51 | */ |
Kojto | 107:4f6c30876dfa | 52 | |
Kojto | 107:4f6c30876dfa | 53 | /** @addtogroup FMC_LL FMC Low Layer |
Kojto | 107:4f6c30876dfa | 54 | * @{ |
Kojto | 107:4f6c30876dfa | 55 | */ |
Kojto | 107:4f6c30876dfa | 56 | |
Kojto | 107:4f6c30876dfa | 57 | /** @addtogroup FMC_LL_Private_Macros FMC Low Layer Private Macros |
Kojto | 107:4f6c30876dfa | 58 | * @{ |
Kojto | 107:4f6c30876dfa | 59 | */ |
Kojto | 107:4f6c30876dfa | 60 | #define IS_FMC_NORSRAM_BANK(__BANK__) (((__BANK__) == FMC_NORSRAM_BANK1) || \ |
Kojto | 107:4f6c30876dfa | 61 | ((__BANK__) == FMC_NORSRAM_BANK2) || \ |
Kojto | 107:4f6c30876dfa | 62 | ((__BANK__) == FMC_NORSRAM_BANK3) || \ |
Kojto | 107:4f6c30876dfa | 63 | ((__BANK__) == FMC_NORSRAM_BANK4)) |
Kojto | 107:4f6c30876dfa | 64 | |
Kojto | 107:4f6c30876dfa | 65 | |
Kojto | 107:4f6c30876dfa | 66 | #define IS_FMC_MUX(__MUX__) (((__MUX__) == FMC_DATA_ADDRESS_MUX_DISABLE) || \ |
Kojto | 107:4f6c30876dfa | 67 | ((__MUX__) == FMC_DATA_ADDRESS_MUX_ENABLE)) |
Kojto | 107:4f6c30876dfa | 68 | |
Kojto | 107:4f6c30876dfa | 69 | |
Kojto | 107:4f6c30876dfa | 70 | #define IS_FMC_MEMORY(__MEMORY__) (((__MEMORY__) == FMC_MEMORY_TYPE_SRAM) || \ |
Kojto | 107:4f6c30876dfa | 71 | ((__MEMORY__) == FMC_MEMORY_TYPE_PSRAM)|| \ |
Kojto | 107:4f6c30876dfa | 72 | ((__MEMORY__) == FMC_MEMORY_TYPE_NOR)) |
Kojto | 107:4f6c30876dfa | 73 | |
Kojto | 107:4f6c30876dfa | 74 | #define IS_FMC_NORSRAM_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FMC_NORSRAM_MEM_BUS_WIDTH_8) || \ |
Kojto | 107:4f6c30876dfa | 75 | ((__WIDTH__) == FMC_NORSRAM_MEM_BUS_WIDTH_16) || \ |
Kojto | 107:4f6c30876dfa | 76 | ((__WIDTH__) == FMC_NORSRAM_MEM_BUS_WIDTH_32)) |
Kojto | 107:4f6c30876dfa | 77 | |
Kojto | 107:4f6c30876dfa | 78 | #define IS_FMC_PAGESIZE(__SIZE__) (((__SIZE__) == FMC_PAGE_SIZE_NONE) || \ |
Kojto | 107:4f6c30876dfa | 79 | ((__SIZE__) == FMC_PAGE_SIZE_128) || \ |
Kojto | 107:4f6c30876dfa | 80 | ((__SIZE__) == FMC_PAGE_SIZE_256) || \ |
Kojto | 107:4f6c30876dfa | 81 | ((__SIZE__) == FMC_PAGE_SIZE_1024)) |
Kojto | 107:4f6c30876dfa | 82 | |
Kojto | 107:4f6c30876dfa | 83 | #define IS_FMC_WRITE_BURST(__BURST__) (((__BURST__) == FMC_WRITE_BURST_DISABLE) || \ |
Kojto | 107:4f6c30876dfa | 84 | ((__BURST__) == FMC_WRITE_BURST_ENABLE)) |
Kojto | 107:4f6c30876dfa | 85 | |
Kojto | 107:4f6c30876dfa | 86 | #define IS_FMC_CONTINOUS_CLOCK(__CCLOCK__) (((__CCLOCK__) == FMC_CONTINUOUS_CLOCK_SYNC_ONLY) || \ |
Kojto | 107:4f6c30876dfa | 87 | ((__CCLOCK__) == FMC_CONTINUOUS_CLOCK_SYNC_ASYNC)) |
Kojto | 107:4f6c30876dfa | 88 | |
Kojto | 107:4f6c30876dfa | 89 | #define IS_FMC_WRITE_FIFO(__FIFO__) (((__FIFO__) == FMC_WRITE_FIFO_DISABLE) || \ |
Kojto | 107:4f6c30876dfa | 90 | ((__FIFO__) == FMC_WRITE_FIFO_ENABLE)) |
Kojto | 107:4f6c30876dfa | 91 | |
Kojto | 107:4f6c30876dfa | 92 | |
Kojto | 107:4f6c30876dfa | 93 | #define IS_FMC_ACCESS_MODE(__MODE__) (((__MODE__) == FMC_ACCESS_MODE_A) || \ |
Kojto | 107:4f6c30876dfa | 94 | ((__MODE__) == FMC_ACCESS_MODE_B) || \ |
Kojto | 107:4f6c30876dfa | 95 | ((__MODE__) == FMC_ACCESS_MODE_C) || \ |
Kojto | 107:4f6c30876dfa | 96 | ((__MODE__) == FMC_ACCESS_MODE_D)) |
Kojto | 107:4f6c30876dfa | 97 | |
Kojto | 107:4f6c30876dfa | 98 | |
Kojto | 107:4f6c30876dfa | 99 | #define IS_FMC_NAND_BANK(__BANK__) ((__BANK__) == FMC_NAND_BANK3) |
Kojto | 107:4f6c30876dfa | 100 | |
Kojto | 107:4f6c30876dfa | 101 | #define IS_FMC_WAIT_FEATURE(__FEATURE__) (((__FEATURE__) == FMC_NAND_WAIT_FEATURE_DISABLE) || \ |
Kojto | 107:4f6c30876dfa | 102 | ((__FEATURE__) == FMC_NAND_WAIT_FEATURE_ENABLE)) |
Kojto | 107:4f6c30876dfa | 103 | |
Kojto | 107:4f6c30876dfa | 104 | #define IS_FMC_NAND_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FMC_NAND_MEM_BUS_WIDTH_8) || \ |
Kojto | 107:4f6c30876dfa | 105 | ((__WIDTH__) == FMC_NAND_MEM_BUS_WIDTH_16)) |
Kojto | 107:4f6c30876dfa | 106 | |
Kojto | 107:4f6c30876dfa | 107 | #define IS_FMC_ECC_STATE(__STATE__) (((__STATE__) == FMC_NAND_ECC_DISABLE) || \ |
Kojto | 107:4f6c30876dfa | 108 | ((__STATE__) == FMC_NAND_ECC_ENABLE)) |
Kojto | 107:4f6c30876dfa | 109 | |
Kojto | 107:4f6c30876dfa | 110 | |
Kojto | 107:4f6c30876dfa | 111 | #define IS_FMC_ECCPAGE_SIZE(__SIZE__) (((__SIZE__) == FMC_NAND_ECC_PAGE_SIZE_256BYTE) || \ |
Kojto | 107:4f6c30876dfa | 112 | ((__SIZE__) == FMC_NAND_ECC_PAGE_SIZE_512BYTE) || \ |
Kojto | 107:4f6c30876dfa | 113 | ((__SIZE__) == FMC_NAND_ECC_PAGE_SIZE_1024BYTE) || \ |
Kojto | 107:4f6c30876dfa | 114 | ((__SIZE__) == FMC_NAND_ECC_PAGE_SIZE_2048BYTE) || \ |
Kojto | 107:4f6c30876dfa | 115 | ((__SIZE__) == FMC_NAND_ECC_PAGE_SIZE_4096BYTE) || \ |
Kojto | 107:4f6c30876dfa | 116 | ((__SIZE__) == FMC_NAND_ECC_PAGE_SIZE_8192BYTE)) |
Kojto | 107:4f6c30876dfa | 117 | |
Kojto | 107:4f6c30876dfa | 118 | |
Kojto | 107:4f6c30876dfa | 119 | /** @defgroup FMC_NORSRAM_Device_Instance FMC NOR/SRAM Device Instance |
Kojto | 107:4f6c30876dfa | 120 | * @{ |
Kojto | 107:4f6c30876dfa | 121 | */ |
Kojto | 107:4f6c30876dfa | 122 | #define IS_FMC_NORSRAM_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_NORSRAM_DEVICE) |
Kojto | 107:4f6c30876dfa | 123 | /** |
Kojto | 107:4f6c30876dfa | 124 | * @} |
Kojto | 107:4f6c30876dfa | 125 | */ |
Kojto | 107:4f6c30876dfa | 126 | |
Kojto | 107:4f6c30876dfa | 127 | /** @defgroup FMC_NORSRAM_EXTENDED_Device_Instance FMC NOR/SRAM EXTENDED Device Instance |
Kojto | 107:4f6c30876dfa | 128 | * @{ |
Kojto | 107:4f6c30876dfa | 129 | */ |
Kojto | 107:4f6c30876dfa | 130 | #define IS_FMC_NORSRAM_EXTENDED_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_NORSRAM_EXTENDED_DEVICE) |
Kojto | 107:4f6c30876dfa | 131 | /** |
Kojto | 107:4f6c30876dfa | 132 | * @} |
Kojto | 107:4f6c30876dfa | 133 | */ |
Kojto | 107:4f6c30876dfa | 134 | |
Kojto | 107:4f6c30876dfa | 135 | /** @defgroup FMC_NAND_Device_Instance FMC NAND Device Instance |
Kojto | 107:4f6c30876dfa | 136 | * @{ |
Kojto | 107:4f6c30876dfa | 137 | */ |
Kojto | 107:4f6c30876dfa | 138 | #define IS_FMC_NAND_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_NAND_DEVICE) |
Kojto | 107:4f6c30876dfa | 139 | /** |
Kojto | 107:4f6c30876dfa | 140 | * @} |
Kojto | 107:4f6c30876dfa | 141 | */ |
Kojto | 107:4f6c30876dfa | 142 | |
Kojto | 107:4f6c30876dfa | 143 | #define IS_FMC_BURSTMODE(__STATE__) (((__STATE__) == FMC_BURST_ACCESS_MODE_DISABLE) || \ |
Kojto | 107:4f6c30876dfa | 144 | ((__STATE__) == FMC_BURST_ACCESS_MODE_ENABLE)) |
Kojto | 107:4f6c30876dfa | 145 | |
Kojto | 107:4f6c30876dfa | 146 | #define IS_FMC_WAIT_POLARITY(__POLARITY__) (((__POLARITY__) == FMC_WAIT_SIGNAL_POLARITY_LOW) || \ |
Kojto | 107:4f6c30876dfa | 147 | ((__POLARITY__) == FMC_WAIT_SIGNAL_POLARITY_HIGH)) |
Kojto | 107:4f6c30876dfa | 148 | |
Kojto | 107:4f6c30876dfa | 149 | #define IS_FMC_WAIT_SIGNAL_ACTIVE(__ACTIVE__) (((__ACTIVE__) == FMC_WAIT_TIMING_BEFORE_WS) || \ |
Kojto | 107:4f6c30876dfa | 150 | ((__ACTIVE__) == FMC_WAIT_TIMING_DURING_WS)) |
Kojto | 107:4f6c30876dfa | 151 | |
Kojto | 107:4f6c30876dfa | 152 | |
Kojto | 107:4f6c30876dfa | 153 | #define IS_FMC_WRITE_OPERATION(__OPERATION__) (((__OPERATION__) == FMC_WRITE_OPERATION_DISABLE) || \ |
Kojto | 107:4f6c30876dfa | 154 | ((__OPERATION__) == FMC_WRITE_OPERATION_ENABLE)) |
Kojto | 107:4f6c30876dfa | 155 | |
Kojto | 107:4f6c30876dfa | 156 | #define IS_FMC_WAITE_SIGNAL(__SIGNAL__) (((__SIGNAL__) == FMC_WAIT_SIGNAL_DISABLE) || \ |
Kojto | 107:4f6c30876dfa | 157 | ((__SIGNAL__) == FMC_WAIT_SIGNAL_ENABLE)) |
Kojto | 107:4f6c30876dfa | 158 | |
Kojto | 107:4f6c30876dfa | 159 | #define IS_FMC_EXTENDED_MODE(__MODE__) (((__MODE__) == FMC_EXTENDED_MODE_DISABLE) || \ |
Kojto | 107:4f6c30876dfa | 160 | ((__MODE__) == FMC_EXTENDED_MODE_ENABLE)) |
Kojto | 107:4f6c30876dfa | 161 | |
Kojto | 107:4f6c30876dfa | 162 | #define IS_FMC_ASYNWAIT(__STATE__) (((__STATE__) == FMC_ASYNCHRONOUS_WAIT_DISABLE) || \ |
Kojto | 107:4f6c30876dfa | 163 | ((__STATE__) == FMC_ASYNCHRONOUS_WAIT_ENABLE)) |
Kojto | 107:4f6c30876dfa | 164 | |
Kojto | 107:4f6c30876dfa | 165 | /** @defgroup FMC_Address_Setup_Time |
Kojto | 107:4f6c30876dfa | 166 | * @{ |
Kojto | 107:4f6c30876dfa | 167 | */ |
Kojto | 107:4f6c30876dfa | 168 | #define IS_FMC_ADDRESS_SETUP_TIME(__TIME__) ((__TIME__) <= 15) |
Kojto | 107:4f6c30876dfa | 169 | /** |
Kojto | 107:4f6c30876dfa | 170 | * @} |
Kojto | 107:4f6c30876dfa | 171 | */ |
Kojto | 107:4f6c30876dfa | 172 | |
Kojto | 107:4f6c30876dfa | 173 | /** @defgroup FMC_Address_Hold_Time |
Kojto | 107:4f6c30876dfa | 174 | * @{ |
Kojto | 107:4f6c30876dfa | 175 | */ |
Kojto | 107:4f6c30876dfa | 176 | #define IS_FMC_ADDRESS_HOLD_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 15)) |
Kojto | 107:4f6c30876dfa | 177 | /** |
Kojto | 107:4f6c30876dfa | 178 | * @} |
Kojto | 107:4f6c30876dfa | 179 | */ |
Kojto | 107:4f6c30876dfa | 180 | |
Kojto | 107:4f6c30876dfa | 181 | /** @defgroup FMC_Data_Setup_Time |
Kojto | 107:4f6c30876dfa | 182 | * @{ |
Kojto | 107:4f6c30876dfa | 183 | */ |
Kojto | 107:4f6c30876dfa | 184 | #define IS_FMC_DATASETUP_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 255)) |
Kojto | 107:4f6c30876dfa | 185 | /** |
Kojto | 107:4f6c30876dfa | 186 | * @} |
Kojto | 107:4f6c30876dfa | 187 | */ |
Kojto | 107:4f6c30876dfa | 188 | |
Kojto | 107:4f6c30876dfa | 189 | /** @defgroup FMC_Bus_Turn_around_Duration |
Kojto | 107:4f6c30876dfa | 190 | * @{ |
Kojto | 107:4f6c30876dfa | 191 | */ |
Kojto | 107:4f6c30876dfa | 192 | #define IS_FMC_TURNAROUND_TIME(__TIME__) ((__TIME__) <= 15) |
Kojto | 107:4f6c30876dfa | 193 | /** |
Kojto | 107:4f6c30876dfa | 194 | * @} |
Kojto | 107:4f6c30876dfa | 195 | */ |
Kojto | 107:4f6c30876dfa | 196 | |
Kojto | 107:4f6c30876dfa | 197 | /** @defgroup FMC_CLK_Division |
Kojto | 107:4f6c30876dfa | 198 | * @{ |
Kojto | 107:4f6c30876dfa | 199 | */ |
Kojto | 107:4f6c30876dfa | 200 | #define IS_FMC_CLK_DIV(__DIV__) (((__DIV__) > 1) && ((__DIV__) <= 16)) |
Kojto | 107:4f6c30876dfa | 201 | /** |
Kojto | 107:4f6c30876dfa | 202 | * @} |
Kojto | 107:4f6c30876dfa | 203 | */ |
Kojto | 107:4f6c30876dfa | 204 | |
Kojto | 107:4f6c30876dfa | 205 | /** @defgroup FMC_Data_Latency |
Kojto | 107:4f6c30876dfa | 206 | * @{ |
Kojto | 107:4f6c30876dfa | 207 | */ |
Kojto | 107:4f6c30876dfa | 208 | #define IS_FMC_DATA_LATENCY(__LATENCY__) (((__LATENCY__) > 1) && ((__LATENCY__) <= 17)) |
Kojto | 107:4f6c30876dfa | 209 | /** |
Kojto | 107:4f6c30876dfa | 210 | * @} |
Kojto | 107:4f6c30876dfa | 211 | */ |
Kojto | 107:4f6c30876dfa | 212 | |
Kojto | 107:4f6c30876dfa | 213 | /** @defgroup FMC_TCLR_Setup_Time FMC TCLR Setup Time |
Kojto | 107:4f6c30876dfa | 214 | * @{ |
Kojto | 107:4f6c30876dfa | 215 | */ |
Kojto | 107:4f6c30876dfa | 216 | #define IS_FMC_TCLR_TIME(__TIME__) ((__TIME__) <= 255) |
Kojto | 107:4f6c30876dfa | 217 | /** |
Kojto | 107:4f6c30876dfa | 218 | * @} |
Kojto | 107:4f6c30876dfa | 219 | */ |
Kojto | 107:4f6c30876dfa | 220 | |
Kojto | 107:4f6c30876dfa | 221 | /** @defgroup FMC_TAR_Setup_Time |
Kojto | 107:4f6c30876dfa | 222 | * @{ |
Kojto | 107:4f6c30876dfa | 223 | */ |
Kojto | 107:4f6c30876dfa | 224 | #define IS_FMC_TAR_TIME(__TIME__) ((__TIME__) <= 255) |
Kojto | 107:4f6c30876dfa | 225 | /** |
Kojto | 107:4f6c30876dfa | 226 | * @} |
Kojto | 107:4f6c30876dfa | 227 | */ |
Kojto | 107:4f6c30876dfa | 228 | |
Kojto | 107:4f6c30876dfa | 229 | /** @defgroup FMC_Setup_Time |
Kojto | 107:4f6c30876dfa | 230 | * @{ |
Kojto | 107:4f6c30876dfa | 231 | */ |
Kojto | 107:4f6c30876dfa | 232 | #define IS_FMC_SETUP_TIME(__TIME__) ((__TIME__) <= 255) |
Kojto | 107:4f6c30876dfa | 233 | /** |
Kojto | 107:4f6c30876dfa | 234 | * @} |
Kojto | 107:4f6c30876dfa | 235 | */ |
Kojto | 107:4f6c30876dfa | 236 | |
Kojto | 107:4f6c30876dfa | 237 | /** @defgroup FMC_Wait_Setup_Time |
Kojto | 107:4f6c30876dfa | 238 | * @{ |
Kojto | 107:4f6c30876dfa | 239 | */ |
Kojto | 107:4f6c30876dfa | 240 | #define IS_FMC_WAIT_TIME(__TIME__) ((__TIME__) <= 255) |
Kojto | 107:4f6c30876dfa | 241 | /** |
Kojto | 107:4f6c30876dfa | 242 | * @} |
Kojto | 107:4f6c30876dfa | 243 | */ |
Kojto | 107:4f6c30876dfa | 244 | |
Kojto | 107:4f6c30876dfa | 245 | /** @defgroup FMC_Hold_Setup_Time |
Kojto | 107:4f6c30876dfa | 246 | * @{ |
Kojto | 107:4f6c30876dfa | 247 | */ |
Kojto | 107:4f6c30876dfa | 248 | #define IS_FMC_HOLD_TIME(__TIME__) ((__TIME__) <= 255) |
Kojto | 107:4f6c30876dfa | 249 | /** |
Kojto | 107:4f6c30876dfa | 250 | * @} |
Kojto | 107:4f6c30876dfa | 251 | */ |
Kojto | 107:4f6c30876dfa | 252 | |
Kojto | 107:4f6c30876dfa | 253 | /** @defgroup FMC_HiZ_Setup_Time |
Kojto | 107:4f6c30876dfa | 254 | * @{ |
Kojto | 107:4f6c30876dfa | 255 | */ |
Kojto | 107:4f6c30876dfa | 256 | #define IS_FMC_HIZ_TIME(__TIME__) ((__TIME__) <= 255) |
Kojto | 107:4f6c30876dfa | 257 | /** |
Kojto | 107:4f6c30876dfa | 258 | * @} |
Kojto | 107:4f6c30876dfa | 259 | */ |
Kojto | 107:4f6c30876dfa | 260 | |
Kojto | 107:4f6c30876dfa | 261 | /** |
Kojto | 107:4f6c30876dfa | 262 | * @} |
Kojto | 107:4f6c30876dfa | 263 | */ |
Kojto | 107:4f6c30876dfa | 264 | |
Kojto | 107:4f6c30876dfa | 265 | /* Exported typedef ----------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 266 | /** @addtogroup FMC_LL_Exported_Typedef FMC Low Layer Exported Typedef |
Kojto | 107:4f6c30876dfa | 267 | * @{ |
Kojto | 107:4f6c30876dfa | 268 | */ |
Kojto | 107:4f6c30876dfa | 269 | #define FMC_NORSRAM_TypeDef FMC_Bank1_TypeDef |
Kojto | 107:4f6c30876dfa | 270 | #define FMC_NORSRAM_EXTENDED_TypeDef FMC_Bank1E_TypeDef |
Kojto | 107:4f6c30876dfa | 271 | #define FMC_NAND_TypeDef FMC_Bank3_TypeDef |
Kojto | 107:4f6c30876dfa | 272 | |
Kojto | 107:4f6c30876dfa | 273 | #define FMC_NORSRAM_DEVICE FMC_Bank1_R |
Kojto | 107:4f6c30876dfa | 274 | #define FMC_NORSRAM_EXTENDED_DEVICE FMC_Bank1E_R |
Kojto | 107:4f6c30876dfa | 275 | #define FMC_NAND_DEVICE FMC_Bank3_R |
Kojto | 107:4f6c30876dfa | 276 | |
Kojto | 107:4f6c30876dfa | 277 | /** |
Kojto | 107:4f6c30876dfa | 278 | * @brief FMC_NORSRAM Configuration Structure definition |
Kojto | 107:4f6c30876dfa | 279 | */ |
Kojto | 107:4f6c30876dfa | 280 | typedef struct |
Kojto | 107:4f6c30876dfa | 281 | { |
Kojto | 107:4f6c30876dfa | 282 | uint32_t NSBank; /*!< Specifies the NORSRAM memory device that will be used. |
Kojto | 107:4f6c30876dfa | 283 | This parameter can be a value of @ref FMC_NORSRAM_Bank */ |
Kojto | 107:4f6c30876dfa | 284 | |
Kojto | 107:4f6c30876dfa | 285 | uint32_t DataAddressMux; /*!< Specifies whether the address and data values are |
Kojto | 107:4f6c30876dfa | 286 | multiplexed on the data bus or not. |
Kojto | 107:4f6c30876dfa | 287 | This parameter can be a value of @ref FMC_Data_Address_Bus_Multiplexing */ |
Kojto | 107:4f6c30876dfa | 288 | |
Kojto | 107:4f6c30876dfa | 289 | uint32_t MemoryType; /*!< Specifies the type of external memory attached to |
Kojto | 107:4f6c30876dfa | 290 | the corresponding memory device. |
Kojto | 107:4f6c30876dfa | 291 | This parameter can be a value of @ref FMC_Memory_Type */ |
Kojto | 107:4f6c30876dfa | 292 | |
Kojto | 107:4f6c30876dfa | 293 | uint32_t MemoryDataWidth; /*!< Specifies the external memory device width. |
Kojto | 107:4f6c30876dfa | 294 | This parameter can be a value of @ref FMC_NORSRAM_Data_Width */ |
Kojto | 107:4f6c30876dfa | 295 | |
Kojto | 107:4f6c30876dfa | 296 | uint32_t BurstAccessMode; /*!< Enables or disables the burst access mode for Flash memory, |
Kojto | 107:4f6c30876dfa | 297 | valid only with synchronous burst Flash memories. |
Kojto | 107:4f6c30876dfa | 298 | This parameter can be a value of @ref FMC_Burst_Access_Mode */ |
Kojto | 107:4f6c30876dfa | 299 | |
Kojto | 107:4f6c30876dfa | 300 | uint32_t WaitSignalPolarity; /*!< Specifies the wait signal polarity, valid only when accessing |
Kojto | 107:4f6c30876dfa | 301 | the Flash memory in burst mode. |
Kojto | 107:4f6c30876dfa | 302 | This parameter can be a value of @ref FMC_Wait_Signal_Polarity */ |
Kojto | 107:4f6c30876dfa | 303 | |
Kojto | 107:4f6c30876dfa | 304 | uint32_t WaitSignalActive; /*!< Specifies if the wait signal is asserted by the memory one |
Kojto | 107:4f6c30876dfa | 305 | clock cycle before the wait state or during the wait state, |
Kojto | 107:4f6c30876dfa | 306 | valid only when accessing memories in burst mode. |
Kojto | 107:4f6c30876dfa | 307 | This parameter can be a value of @ref FMC_Wait_Timing */ |
Kojto | 107:4f6c30876dfa | 308 | |
Kojto | 107:4f6c30876dfa | 309 | uint32_t WriteOperation; /*!< Enables or disables the write operation in the selected device by the FMC. |
Kojto | 107:4f6c30876dfa | 310 | This parameter can be a value of @ref FMC_Write_Operation */ |
Kojto | 107:4f6c30876dfa | 311 | |
Kojto | 107:4f6c30876dfa | 312 | uint32_t WaitSignal; /*!< Enables or disables the wait state insertion via wait |
Kojto | 107:4f6c30876dfa | 313 | signal, valid for Flash memory access in burst mode. |
Kojto | 107:4f6c30876dfa | 314 | This parameter can be a value of @ref FMC_Wait_Signal */ |
Kojto | 107:4f6c30876dfa | 315 | |
Kojto | 107:4f6c30876dfa | 316 | uint32_t ExtendedMode; /*!< Enables or disables the extended mode. |
Kojto | 107:4f6c30876dfa | 317 | This parameter can be a value of @ref FMC_Extended_Mode */ |
Kojto | 107:4f6c30876dfa | 318 | |
Kojto | 107:4f6c30876dfa | 319 | uint32_t AsynchronousWait; /*!< Enables or disables wait signal during asynchronous transfers, |
Kojto | 107:4f6c30876dfa | 320 | valid only with asynchronous Flash memories. |
Kojto | 107:4f6c30876dfa | 321 | This parameter can be a value of @ref FMC_AsynchronousWait */ |
Kojto | 107:4f6c30876dfa | 322 | |
Kojto | 107:4f6c30876dfa | 323 | uint32_t WriteBurst; /*!< Enables or disables the write burst operation. |
Kojto | 107:4f6c30876dfa | 324 | This parameter can be a value of @ref FMC_Write_Burst */ |
Kojto | 107:4f6c30876dfa | 325 | |
Kojto | 107:4f6c30876dfa | 326 | uint32_t ContinuousClock; /*!< Enables or disables the FMC clock output to external memory devices. |
Kojto | 107:4f6c30876dfa | 327 | This parameter is only enabled through the FMC_BCR1 register, and don't care |
Kojto | 107:4f6c30876dfa | 328 | through FMC_BCR2..4 registers. |
Kojto | 107:4f6c30876dfa | 329 | This parameter can be a value of @ref FMC_Continous_Clock */ |
Kojto | 107:4f6c30876dfa | 330 | |
Kojto | 107:4f6c30876dfa | 331 | uint32_t WriteFifo; /*!< Enables or disables the write FIFO used by the FMC controller. |
Kojto | 107:4f6c30876dfa | 332 | This parameter is only enabled through the FMC_BCR1 register, and don't care |
Kojto | 107:4f6c30876dfa | 333 | through FMC_BCR2..4 registers. |
Kojto | 107:4f6c30876dfa | 334 | This parameter can be a value of @ref FMC_Write_FIFO */ |
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 | 107:4f6c30876dfa | 341 | /** |
Kojto | 107:4f6c30876dfa | 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 | 107:4f6c30876dfa | 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 | 107:4f6c30876dfa | 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 | 107:4f6c30876dfa | 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 | 107:4f6c30876dfa | 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 | 107:4f6c30876dfa | 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 | 107:4f6c30876dfa | 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 | 107:4f6c30876dfa | 384 | /** |
Kojto | 107:4f6c30876dfa | 385 | * @brief FMC_NAND Configuration Structure definition |
Kojto | 107:4f6c30876dfa | 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 | 107:4f6c30876dfa | 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 | 107:4f6c30876dfa | 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 | 107:4f6c30876dfa | 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 | 107:4f6c30876dfa | 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 | 107:4f6c30876dfa | 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 | 107:4f6c30876dfa | 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 | 107:4f6c30876dfa | 577 | #define FMC_PAGE_SIZE_1024 ((uint32_t)FMC_BCRx_CPSIZE_2) |
Kojto | 107:4f6c30876dfa | 578 | /** |
Kojto | 107:4f6c30876dfa | 579 | * @} |
Kojto | 107:4f6c30876dfa | 580 | */ |
Kojto | 107:4f6c30876dfa | 581 | |
Kojto | 107:4f6c30876dfa | 582 | /** @defgroup FMC_Write_Burst FMC Write Burst |
Kojto | 107:4f6c30876dfa | 583 | * @{ |
Kojto | 107:4f6c30876dfa | 584 | */ |
Kojto | 107:4f6c30876dfa | 585 | #define FMC_WRITE_BURST_DISABLE ((uint32_t)0x00000000) |
Kojto | 107:4f6c30876dfa | 586 | #define FMC_WRITE_BURST_ENABLE ((uint32_t)FMC_BCRx_CBURSTRW) |
Kojto | 107:4f6c30876dfa | 587 | /** |
Kojto | 107:4f6c30876dfa | 588 | * @} |
Kojto | 107:4f6c30876dfa | 589 | */ |
Kojto | 107:4f6c30876dfa | 590 | |
Kojto | 107:4f6c30876dfa | 591 | /** @defgroup FMC_Continous_Clock FMC Continous Clock |
Kojto | 107:4f6c30876dfa | 592 | * @{ |
Kojto | 107:4f6c30876dfa | 593 | */ |
Kojto | 107:4f6c30876dfa | 594 | #define FMC_CONTINUOUS_CLOCK_SYNC_ONLY ((uint32_t)0x00000000) |
Kojto | 107:4f6c30876dfa | 595 | #define FMC_CONTINUOUS_CLOCK_SYNC_ASYNC ((uint32_t)FMC_BCR1_CCLKEN) |
Kojto | 107:4f6c30876dfa | 596 | /** |
Kojto | 107:4f6c30876dfa | 597 | * @} |
Kojto | 107:4f6c30876dfa | 598 | */ |
Kojto | 107:4f6c30876dfa | 599 | |
Kojto | 107:4f6c30876dfa | 600 | /** @defgroup FMC_Write_FIFO FMC Write FIFO |
Kojto | 107:4f6c30876dfa | 601 | * @{ |
Kojto | 107:4f6c30876dfa | 602 | */ |
Kojto | 107:4f6c30876dfa | 603 | #define FMC_WRITE_FIFO_DISABLE ((uint32_t)0x00000000) |
Kojto | 107:4f6c30876dfa | 604 | #define FMC_WRITE_FIFO_ENABLE ((uint32_t)FMC_BCR1_WFDIS) |
Kojto | 107:4f6c30876dfa | 605 | /** |
Kojto | 107:4f6c30876dfa | 606 | * @} |
Kojto | 107:4f6c30876dfa | 607 | */ |
Kojto | 107:4f6c30876dfa | 608 | |
Kojto | 107:4f6c30876dfa | 609 | /** @defgroup FMC_Access_Mode FMC Access Mode |
Kojto | 107:4f6c30876dfa | 610 | * @{ |
Kojto | 107:4f6c30876dfa | 611 | */ |
Kojto | 107:4f6c30876dfa | 612 | #define FMC_ACCESS_MODE_A ((uint32_t)0x00000000) |
Kojto | 107:4f6c30876dfa | 613 | #define FMC_ACCESS_MODE_B ((uint32_t)FMC_BTRx_ACCMOD_0) |
Kojto | 107:4f6c30876dfa | 614 | #define FMC_ACCESS_MODE_C ((uint32_t)FMC_BTRx_ACCMOD_1) |
Kojto | 107:4f6c30876dfa | 615 | #define FMC_ACCESS_MODE_D ((uint32_t)(FMC_BTRx_ACCMOD_0|FMC_BTRx_ACCMOD_1)) |
Kojto | 107:4f6c30876dfa | 616 | /** |
Kojto | 107:4f6c30876dfa | 617 | * @} |
Kojto | 107:4f6c30876dfa | 618 | */ |
Kojto | 107:4f6c30876dfa | 619 | |
Kojto | 107:4f6c30876dfa | 620 | /** |
Kojto | 107:4f6c30876dfa | 621 | * @} |
Kojto | 107:4f6c30876dfa | 622 | */ |
Kojto | 107:4f6c30876dfa | 623 | |
Kojto | 107:4f6c30876dfa | 624 | /** |
Kojto | 107:4f6c30876dfa | 625 | * @} |
Kojto | 107:4f6c30876dfa | 626 | */ |
Kojto | 107:4f6c30876dfa | 627 | |
Kojto | 107:4f6c30876dfa | 628 | /** @defgroup FMC_NAND_Controller FMC NAND Exported constants |
Kojto | 107:4f6c30876dfa | 629 | * @{ |
Kojto | 107:4f6c30876dfa | 630 | */ |
Kojto | 107:4f6c30876dfa | 631 | |
Kojto | 107:4f6c30876dfa | 632 | /** @defgroup FMC_NAND_Bank FMC NAND Bank |
Kojto | 107:4f6c30876dfa | 633 | * @{ |
Kojto | 107:4f6c30876dfa | 634 | */ |
Kojto | 107:4f6c30876dfa | 635 | #define FMC_NAND_BANK3 ((uint32_t)0x00000100) |
Kojto | 107:4f6c30876dfa | 636 | /** |
Kojto | 107:4f6c30876dfa | 637 | * @} |
Kojto | 107:4f6c30876dfa | 638 | */ |
Kojto | 107:4f6c30876dfa | 639 | |
Kojto | 107:4f6c30876dfa | 640 | /** @defgroup FMC_Wait_feature FMC Wait feature |
Kojto | 107:4f6c30876dfa | 641 | * @{ |
Kojto | 107:4f6c30876dfa | 642 | */ |
Kojto | 107:4f6c30876dfa | 643 | #define FMC_NAND_WAIT_FEATURE_DISABLE ((uint32_t)0x00000000) |
Kojto | 107:4f6c30876dfa | 644 | #define FMC_NAND_WAIT_FEATURE_ENABLE ((uint32_t)FMC_PCR_PWAITEN) |
Kojto | 107:4f6c30876dfa | 645 | /** |
Kojto | 107:4f6c30876dfa | 646 | * @} |
Kojto | 107:4f6c30876dfa | 647 | */ |
Kojto | 107:4f6c30876dfa | 648 | |
Kojto | 107:4f6c30876dfa | 649 | /** @defgroup FMC_PCR_Memory_Type FMC PCR Memory Type |
Kojto | 107:4f6c30876dfa | 650 | * @{ |
Kojto | 107:4f6c30876dfa | 651 | */ |
Kojto | 107:4f6c30876dfa | 652 | #define FMC_PCR_MEMORY_TYPE_NAND ((uint32_t)FMC_PCR_PTYP) |
Kojto | 107:4f6c30876dfa | 653 | /** |
Kojto | 107:4f6c30876dfa | 654 | * @} |
Kojto | 107:4f6c30876dfa | 655 | */ |
Kojto | 107:4f6c30876dfa | 656 | |
Kojto | 107:4f6c30876dfa | 657 | /** @defgroup FMC_NAND_Data_Width FMC NAND Data Width |
Kojto | 107:4f6c30876dfa | 658 | * @{ |
Kojto | 107:4f6c30876dfa | 659 | */ |
Kojto | 107:4f6c30876dfa | 660 | #define FMC_NAND_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000) |
Kojto | 107:4f6c30876dfa | 661 | #define FMC_NAND_MEM_BUS_WIDTH_16 ((uint32_t)FMC_PCR_PWID_0) |
Kojto | 107:4f6c30876dfa | 662 | /** |
Kojto | 107:4f6c30876dfa | 663 | * @} |
Kojto | 107:4f6c30876dfa | 664 | */ |
Kojto | 107:4f6c30876dfa | 665 | |
Kojto | 107:4f6c30876dfa | 666 | /** @defgroup FMC_ECC FMC NAND ECC |
Kojto | 107:4f6c30876dfa | 667 | * @{ |
Kojto | 107:4f6c30876dfa | 668 | */ |
Kojto | 107:4f6c30876dfa | 669 | #define FMC_NAND_ECC_DISABLE ((uint32_t)0x00000000) |
Kojto | 107:4f6c30876dfa | 670 | #define FMC_NAND_ECC_ENABLE ((uint32_t)FMC_PCR_ECCEN) |
Kojto | 107:4f6c30876dfa | 671 | /** |
Kojto | 107:4f6c30876dfa | 672 | * @} |
Kojto | 107:4f6c30876dfa | 673 | */ |
Kojto | 107:4f6c30876dfa | 674 | |
Kojto | 107:4f6c30876dfa | 675 | /** @defgroup FMC_ECC_Page_Size FMC NAND ECC Page Size |
Kojto | 107:4f6c30876dfa | 676 | * @{ |
Kojto | 107:4f6c30876dfa | 677 | */ |
Kojto | 107:4f6c30876dfa | 678 | #define FMC_NAND_ECC_PAGE_SIZE_256BYTE ((uint32_t)0x00000000) |
Kojto | 107:4f6c30876dfa | 679 | #define FMC_NAND_ECC_PAGE_SIZE_512BYTE ((uint32_t)FMC_PCR_ECCPS_0) |
Kojto | 107:4f6c30876dfa | 680 | #define FMC_NAND_ECC_PAGE_SIZE_1024BYTE ((uint32_t)FMC_PCR_ECCPS_1) |
Kojto | 107:4f6c30876dfa | 681 | #define FMC_NAND_ECC_PAGE_SIZE_2048BYTE ((uint32_t)FMC_PCR_ECCPS_0|FMC_PCR_ECCPS_1) |
Kojto | 107:4f6c30876dfa | 682 | #define FMC_NAND_ECC_PAGE_SIZE_4096BYTE ((uint32_t)FMC_PCR_ECCPS_2) |
Kojto | 107:4f6c30876dfa | 683 | #define FMC_NAND_ECC_PAGE_SIZE_8192BYTE ((uint32_t)FMC_PCR_ECCPS_0|FMC_PCR_ECCPS_2) |
Kojto | 107:4f6c30876dfa | 684 | /** |
Kojto | 107:4f6c30876dfa | 685 | * @} |
Kojto | 107:4f6c30876dfa | 686 | */ |
Kojto | 107:4f6c30876dfa | 687 | |
Kojto | 107:4f6c30876dfa | 688 | /** |
Kojto | 107:4f6c30876dfa | 689 | * @} |
Kojto | 107:4f6c30876dfa | 690 | */ |
Kojto | 107:4f6c30876dfa | 691 | |
Kojto | 107:4f6c30876dfa | 692 | /** |
Kojto | 107:4f6c30876dfa | 693 | * @} |
Kojto | 107:4f6c30876dfa | 694 | */ |
Kojto | 107:4f6c30876dfa | 695 | |
Kojto | 107:4f6c30876dfa | 696 | /** @defgroup FMC_Interrupt_definition FMC Interrupt definition |
Kojto | 107:4f6c30876dfa | 697 | * @brief FMC Interrupt definition |
Kojto | 107:4f6c30876dfa | 698 | * @{ |
Kojto | 107:4f6c30876dfa | 699 | */ |
Kojto | 107:4f6c30876dfa | 700 | #define FMC_IT_RISING_EDGE ((uint32_t)FMC_SR_IREN) |
Kojto | 107:4f6c30876dfa | 701 | #define FMC_IT_LEVEL ((uint32_t)FMC_SR_ILEN) |
Kojto | 107:4f6c30876dfa | 702 | #define FMC_IT_FALLING_EDGE ((uint32_t)FMC_SR_IFEN) |
Kojto | 107:4f6c30876dfa | 703 | /** |
Kojto | 107:4f6c30876dfa | 704 | * @} |
Kojto | 107:4f6c30876dfa | 705 | */ |
Kojto | 107:4f6c30876dfa | 706 | |
Kojto | 107:4f6c30876dfa | 707 | /** @defgroup FMC_Flag_definition FMC Flag definition |
Kojto | 107:4f6c30876dfa | 708 | * @brief FMC Flag definition |
Kojto | 107:4f6c30876dfa | 709 | * @{ |
Kojto | 107:4f6c30876dfa | 710 | */ |
Kojto | 107:4f6c30876dfa | 711 | #define FMC_FLAG_RISING_EDGE ((uint32_t)FMC_SR_IRS) |
Kojto | 107:4f6c30876dfa | 712 | #define FMC_FLAG_LEVEL ((uint32_t)FMC_SR_ILS) |
Kojto | 107:4f6c30876dfa | 713 | #define FMC_FLAG_FALLING_EDGE ((uint32_t)FMC_SR_IFS) |
Kojto | 107:4f6c30876dfa | 714 | #define FMC_FLAG_FEMPT ((uint32_t)FMC_SR_FEMPT) |
Kojto | 107:4f6c30876dfa | 715 | /** |
Kojto | 107:4f6c30876dfa | 716 | * @} |
Kojto | 107:4f6c30876dfa | 717 | */ |
Kojto | 107:4f6c30876dfa | 718 | |
Kojto | 107:4f6c30876dfa | 719 | /* Exported macro ------------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 720 | |
Kojto | 107:4f6c30876dfa | 721 | /** @defgroup FMC_Exported_Macros FMC Low Layer Exported Macros |
Kojto | 107:4f6c30876dfa | 722 | * @{ |
Kojto | 107:4f6c30876dfa | 723 | */ |
Kojto | 107:4f6c30876dfa | 724 | |
Kojto | 107:4f6c30876dfa | 725 | /** @defgroup FMC_NOR_Macros FMC NOR/SRAM Exported Macros |
Kojto | 107:4f6c30876dfa | 726 | * @brief macros to handle NOR device enable/disable and read/write operations |
Kojto | 107:4f6c30876dfa | 727 | * @{ |
Kojto | 107:4f6c30876dfa | 728 | */ |
Kojto | 107:4f6c30876dfa | 729 | |
Kojto | 107:4f6c30876dfa | 730 | /** |
Kojto | 107:4f6c30876dfa | 731 | * @brief Enable the NORSRAM device access. |
Kojto | 107:4f6c30876dfa | 732 | * @param __INSTANCE__: FMC_NORSRAM Instance |
Kojto | 107:4f6c30876dfa | 733 | * @param __BANK__: FMC_NORSRAM Bank |
Kojto | 107:4f6c30876dfa | 734 | * @retval none |
Kojto | 107:4f6c30876dfa | 735 | */ |
Kojto | 107:4f6c30876dfa | 736 | #define __FMC_NORSRAM_ENABLE(__INSTANCE__, __BANK__) SET_BIT((__INSTANCE__)->BTCR[(__BANK__)], FMC_BCRx_MBKEN) |
Kojto | 107:4f6c30876dfa | 737 | |
Kojto | 107:4f6c30876dfa | 738 | /** |
Kojto | 107:4f6c30876dfa | 739 | * @brief Disable the NORSRAM device access. |
Kojto | 107:4f6c30876dfa | 740 | * @param __INSTANCE__: FMC_NORSRAM Instance |
Kojto | 107:4f6c30876dfa | 741 | * @param __BANK__: FMC_NORSRAM Bank |
Kojto | 107:4f6c30876dfa | 742 | * @retval none |
Kojto | 107:4f6c30876dfa | 743 | */ |
Kojto | 107:4f6c30876dfa | 744 | #define __FMC_NORSRAM_DISABLE(__INSTANCE__, __BANK__) CLEAR_BIT((__INSTANCE__)->BTCR[(__BANK__)], FMC_BCRx_MBKEN) |
Kojto | 107:4f6c30876dfa | 745 | |
Kojto | 107:4f6c30876dfa | 746 | /** |
Kojto | 107:4f6c30876dfa | 747 | * @} |
Kojto | 107:4f6c30876dfa | 748 | */ |
Kojto | 107:4f6c30876dfa | 749 | |
Kojto | 107:4f6c30876dfa | 750 | /** @defgroup FMC_NAND_Macros FMC NAND Macros |
Kojto | 107:4f6c30876dfa | 751 | * @brief macros to handle NAND device enable/disable |
Kojto | 107:4f6c30876dfa | 752 | * @{ |
Kojto | 107:4f6c30876dfa | 753 | */ |
Kojto | 107:4f6c30876dfa | 754 | |
Kojto | 107:4f6c30876dfa | 755 | /** |
Kojto | 107:4f6c30876dfa | 756 | * @brief Enable the NAND device access. |
Kojto | 107:4f6c30876dfa | 757 | * @param __INSTANCE__: FMC_NAND Instance |
Kojto | 107:4f6c30876dfa | 758 | * @param __BANK__: FMC_NAND Bank |
Kojto | 107:4f6c30876dfa | 759 | * @retval none |
Kojto | 107:4f6c30876dfa | 760 | */ |
Kojto | 107:4f6c30876dfa | 761 | #define __FMC_NAND_ENABLE(__INSTANCE__, __BANK__) SET_BIT((__INSTANCE__)->PCR, FMC_PCR_PBKEN) |
Kojto | 107:4f6c30876dfa | 762 | |
Kojto | 107:4f6c30876dfa | 763 | /** |
Kojto | 107:4f6c30876dfa | 764 | * @brief Disable the NAND device access. |
Kojto | 107:4f6c30876dfa | 765 | * @param __INSTANCE__: FMC_NAND Instance |
Kojto | 107:4f6c30876dfa | 766 | * @param __BANK__: FMC_NAND Bank |
Kojto | 107:4f6c30876dfa | 767 | * @retval None |
Kojto | 107:4f6c30876dfa | 768 | */ |
Kojto | 107:4f6c30876dfa | 769 | #define __FMC_NAND_DISABLE(__INSTANCE__, __BANK__) CLEAR_BIT((__INSTANCE__)->PCR, FMC_PCR_PBKEN) |
Kojto | 107:4f6c30876dfa | 770 | |
Kojto | 107:4f6c30876dfa | 771 | /** |
Kojto | 107:4f6c30876dfa | 772 | * @} |
Kojto | 107:4f6c30876dfa | 773 | */ |
Kojto | 107:4f6c30876dfa | 774 | |
Kojto | 107:4f6c30876dfa | 775 | /** @defgroup FMC_Interrupt FMC Interrupt |
Kojto | 107:4f6c30876dfa | 776 | * @brief macros to handle FMC interrupts |
Kojto | 107:4f6c30876dfa | 777 | * @{ |
Kojto | 107:4f6c30876dfa | 778 | */ |
Kojto | 107:4f6c30876dfa | 779 | |
Kojto | 107:4f6c30876dfa | 780 | /** |
Kojto | 107:4f6c30876dfa | 781 | * @brief Enable the NAND device interrupt. |
Kojto | 107:4f6c30876dfa | 782 | * @param __INSTANCE__: FMC_NAND Instance |
Kojto | 107:4f6c30876dfa | 783 | * @param __BANK__: FMC_NAND Bank |
Kojto | 107:4f6c30876dfa | 784 | * @param __INTERRUPT__: FMC_NAND interrupt |
Kojto | 107:4f6c30876dfa | 785 | * This parameter can be any combination of the following values: |
Kojto | 107:4f6c30876dfa | 786 | * @arg FMC_IT_RISING_EDGE: Interrupt rising edge. |
Kojto | 107:4f6c30876dfa | 787 | * @arg FMC_IT_LEVEL: Interrupt level. |
Kojto | 107:4f6c30876dfa | 788 | * @arg FMC_IT_FALLING_EDGE: Interrupt falling edge. |
Kojto | 107:4f6c30876dfa | 789 | * @retval None |
Kojto | 107:4f6c30876dfa | 790 | */ |
Kojto | 107:4f6c30876dfa | 791 | #define __FMC_NAND_ENABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) SET_BIT((__INSTANCE__)->SR, (__INTERRUPT__)) |
Kojto | 107:4f6c30876dfa | 792 | |
Kojto | 107:4f6c30876dfa | 793 | /** |
Kojto | 107:4f6c30876dfa | 794 | * @brief Disable the NAND device interrupt. |
Kojto | 107:4f6c30876dfa | 795 | * @param __INSTANCE__: FMC_NAND Instance |
Kojto | 107:4f6c30876dfa | 796 | * @param __BANK__: FMC_NAND Bank |
Kojto | 107:4f6c30876dfa | 797 | * @param __INTERRUPT__: FMC_NAND interrupt |
Kojto | 107:4f6c30876dfa | 798 | * This parameter can be any combination of the following values: |
Kojto | 107:4f6c30876dfa | 799 | * @arg FMC_IT_RISING_EDGE: Interrupt rising edge. |
Kojto | 107:4f6c30876dfa | 800 | * @arg FMC_IT_LEVEL: Interrupt level. |
Kojto | 107:4f6c30876dfa | 801 | * @arg FMC_IT_FALLING_EDGE: Interrupt falling edge. |
Kojto | 107:4f6c30876dfa | 802 | * @retval None |
Kojto | 107:4f6c30876dfa | 803 | */ |
Kojto | 107:4f6c30876dfa | 804 | #define __FMC_NAND_DISABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) CLEAR_BIT((__INSTANCE__)->SR, (__INTERRUPT__)) |
Kojto | 107:4f6c30876dfa | 805 | |
Kojto | 107:4f6c30876dfa | 806 | /** |
Kojto | 107:4f6c30876dfa | 807 | * @brief Get flag status of the NAND device. |
Kojto | 107:4f6c30876dfa | 808 | * @param __INSTANCE__: FMC_NAND Instance |
Kojto | 107:4f6c30876dfa | 809 | * @param __BANK__: FMC_NAND Bank |
Kojto | 107:4f6c30876dfa | 810 | * @param __FLAG__: FMC_NAND flag |
Kojto | 107:4f6c30876dfa | 811 | * This parameter can be any combination of the following values: |
Kojto | 107:4f6c30876dfa | 812 | * @arg FMC_FLAG_RISING_EDGE: Interrupt rising edge flag. |
Kojto | 107:4f6c30876dfa | 813 | * @arg FMC_FLAG_LEVEL: Interrupt level edge flag. |
Kojto | 107:4f6c30876dfa | 814 | * @arg FMC_FLAG_FALLING_EDGE: Interrupt falling edge flag. |
Kojto | 107:4f6c30876dfa | 815 | * @arg FMC_FLAG_FEMPT: FIFO empty flag. |
Kojto | 107:4f6c30876dfa | 816 | * @retval The state of FLAG (SET or RESET). |
Kojto | 107:4f6c30876dfa | 817 | */ |
Kojto | 107:4f6c30876dfa | 818 | #define __FMC_NAND_GET_FLAG(__INSTANCE__, __BANK__, __FLAG__) (((__INSTANCE__)->SR &(__FLAG__)) == (__FLAG__)) |
Kojto | 107:4f6c30876dfa | 819 | |
Kojto | 107:4f6c30876dfa | 820 | /** |
Kojto | 107:4f6c30876dfa | 821 | * @brief Clear flag status of the NAND device. |
Kojto | 107:4f6c30876dfa | 822 | * @param __INSTANCE__: FMC_NAND Instance |
Kojto | 107:4f6c30876dfa | 823 | * @param __BANK__: FMC_NAND Bank |
Kojto | 107:4f6c30876dfa | 824 | * @param __FLAG__: FMC_NAND flag |
Kojto | 107:4f6c30876dfa | 825 | * This parameter can be any combination of the following values: |
Kojto | 107:4f6c30876dfa | 826 | * @arg FMC_FLAG_RISING_EDGE: Interrupt rising edge flag. |
Kojto | 107:4f6c30876dfa | 827 | * @arg FMC_FLAG_LEVEL: Interrupt level edge flag. |
Kojto | 107:4f6c30876dfa | 828 | * @arg FMC_FLAG_FALLING_EDGE: Interrupt falling edge flag. |
Kojto | 107:4f6c30876dfa | 829 | * @arg FMC_FLAG_FEMPT: FIFO empty flag. |
Kojto | 107:4f6c30876dfa | 830 | * @retval None |
Kojto | 107:4f6c30876dfa | 831 | */ |
Kojto | 107:4f6c30876dfa | 832 | #define __FMC_NAND_CLEAR_FLAG(__INSTANCE__, __BANK__, __FLAG__) CLEAR_BIT((__INSTANCE__)->SR, (__FLAG__)) |
Kojto | 107:4f6c30876dfa | 833 | |
Kojto | 107:4f6c30876dfa | 834 | |
Kojto | 107:4f6c30876dfa | 835 | /* Exported functions --------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 836 | /** @addgroup FMC_LL_Exported_Functions FMC Low Layer Exported Functions |
Kojto | 107:4f6c30876dfa | 837 | * @{ |
Kojto | 107:4f6c30876dfa | 838 | */ |
Kojto | 107:4f6c30876dfa | 839 | |
Kojto | 107:4f6c30876dfa | 840 | /* FMC_LL_NORSRAM Controller functions *******************************************/ |
Kojto | 107:4f6c30876dfa | 841 | /** @addgroup FMC_LL_NORSRAM_Exported_Functions_Group1 Initialization and de-initialization functions |
Kojto | 107:4f6c30876dfa | 842 | * @{ |
Kojto | 107:4f6c30876dfa | 843 | */ |
Kojto | 107:4f6c30876dfa | 844 | /* Initialization/de-initialization functions */ |
Kojto | 107:4f6c30876dfa | 845 | HAL_StatusTypeDef FMC_NORSRAM_Init(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_InitTypeDef *Init); |
Kojto | 107:4f6c30876dfa | 846 | HAL_StatusTypeDef FMC_NORSRAM_Timing_Init(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank); |
Kojto | 107:4f6c30876dfa | 847 | 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 | 848 | HAL_StatusTypeDef FMC_NORSRAM_DeInit(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank); |
Kojto | 107:4f6c30876dfa | 849 | /** |
Kojto | 107:4f6c30876dfa | 850 | * @} |
Kojto | 107:4f6c30876dfa | 851 | */ |
Kojto | 107:4f6c30876dfa | 852 | |
Kojto | 107:4f6c30876dfa | 853 | /** @addtogroup FMC_LL_NORSRAM_Exported_Functions_Group2 Peripheral Control functions |
Kojto | 107:4f6c30876dfa | 854 | * @{ |
Kojto | 107:4f6c30876dfa | 855 | */ |
Kojto | 107:4f6c30876dfa | 856 | /* FMC_NORSRAM Control functions */ |
Kojto | 107:4f6c30876dfa | 857 | HAL_StatusTypeDef FMC_NORSRAM_WriteOperation_Enable(FMC_NORSRAM_TypeDef *Device, uint32_t Bank); |
Kojto | 107:4f6c30876dfa | 858 | HAL_StatusTypeDef FMC_NORSRAM_WriteOperation_Disable(FMC_NORSRAM_TypeDef *Device, uint32_t Bank); |
Kojto | 107:4f6c30876dfa | 859 | /** |
Kojto | 107:4f6c30876dfa | 860 | * @} |
Kojto | 107:4f6c30876dfa | 861 | */ |
Kojto | 107:4f6c30876dfa | 862 | |
Kojto | 107:4f6c30876dfa | 863 | /* FMC_NAND Controller functions **********************************************/ |
Kojto | 107:4f6c30876dfa | 864 | /** @addtogroup FMC_LL_NAND_Exported_Functions_Group1 Initialization and de-initialization functions |
Kojto | 107:4f6c30876dfa | 865 | * @{ |
Kojto | 107:4f6c30876dfa | 866 | */ |
Kojto | 107:4f6c30876dfa | 867 | /* Initialization/de-initialization functions */ |
Kojto | 107:4f6c30876dfa | 868 | HAL_StatusTypeDef FMC_NAND_Init(FMC_NAND_TypeDef *Device, FMC_NAND_InitTypeDef *Init); |
Kojto | 107:4f6c30876dfa | 869 | HAL_StatusTypeDef FMC_NAND_CommonSpace_Timing_Init(FMC_NAND_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank); |
Kojto | 107:4f6c30876dfa | 870 | HAL_StatusTypeDef FMC_NAND_AttributeSpace_Timing_Init(FMC_NAND_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank); |
Kojto | 107:4f6c30876dfa | 871 | HAL_StatusTypeDef FMC_NAND_DeInit(FMC_NAND_TypeDef *Device, uint32_t Bank); |
Kojto | 107:4f6c30876dfa | 872 | /** |
Kojto | 107:4f6c30876dfa | 873 | * @} |
Kojto | 107:4f6c30876dfa | 874 | */ |
Kojto | 107:4f6c30876dfa | 875 | |
Kojto | 107:4f6c30876dfa | 876 | /** @defgroup FMC_LL_NAND_Exported_Functions_Group2 FMC Low Layer Peripheral Control functions |
Kojto | 107:4f6c30876dfa | 877 | * @{ |
Kojto | 107:4f6c30876dfa | 878 | */ |
Kojto | 107:4f6c30876dfa | 879 | /* FMC_NAND Control functions */ |
Kojto | 107:4f6c30876dfa | 880 | HAL_StatusTypeDef FMC_NAND_ECC_Enable(FMC_NAND_TypeDef *Device, uint32_t Bank); |
Kojto | 107:4f6c30876dfa | 881 | HAL_StatusTypeDef FMC_NAND_ECC_Disable(FMC_NAND_TypeDef *Device, uint32_t Bank); |
Kojto | 107:4f6c30876dfa | 882 | HAL_StatusTypeDef FMC_NAND_GetECC(FMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank, uint32_t Timeout); |
Kojto | 107:4f6c30876dfa | 883 | /** |
Kojto | 107:4f6c30876dfa | 884 | * @} |
Kojto | 107:4f6c30876dfa | 885 | */ |
Kojto | 107:4f6c30876dfa | 886 | |
Kojto | 107:4f6c30876dfa | 887 | /** |
Kojto | 107:4f6c30876dfa | 888 | * @} |
Kojto | 107:4f6c30876dfa | 889 | */ |
Kojto | 107:4f6c30876dfa | 890 | |
Kojto | 107:4f6c30876dfa | 891 | /** |
Kojto | 107:4f6c30876dfa | 892 | * @} |
Kojto | 107:4f6c30876dfa | 893 | */ |
Kojto | 107:4f6c30876dfa | 894 | |
Kojto | 107:4f6c30876dfa | 895 | /** |
Kojto | 107:4f6c30876dfa | 896 | * @} |
Kojto | 107:4f6c30876dfa | 897 | */ |
Kojto | 107:4f6c30876dfa | 898 | |
Kojto | 107:4f6c30876dfa | 899 | #ifdef __cplusplus |
Kojto | 107:4f6c30876dfa | 900 | } |
Kojto | 107:4f6c30876dfa | 901 | #endif |
Kojto | 107:4f6c30876dfa | 902 | |
Kojto | 107:4f6c30876dfa | 903 | #endif /* __STM32L4xx_LL_FMC_H */ |
Kojto | 107:4f6c30876dfa | 904 | |
Kojto | 107:4f6c30876dfa | 905 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |