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