Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2 | Rev 5 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | /** |
1 | /** |
| 2 | ****************************************************************************** |
2 | ****************************************************************************** |
| 3 | * @file stm32f1xx_ll_fsmc.h |
3 | * @file stm32f1xx_ll_fsmc.h |
| 4 | * @author MCD Application Team |
4 | * @author MCD Application Team |
| 5 | * @version V1.0.1 |
5 | * @version V1.0.4 |
| 6 | * @date 31-July-2015 |
6 | * @date 29-April-2016 |
| 7 | * @brief Header file of FSMC HAL module. |
7 | * @brief Header file of FSMC HAL module. |
| 8 | ****************************************************************************** |
8 | ****************************************************************************** |
| 9 | * @attention |
9 | * @attention |
| 10 | * |
10 | * |
| 11 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
11 | * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> |
| 12 | * |
12 | * |
| 13 | * Redistribution and use in source and binary forms, with or without modification, |
13 | * Redistribution and use in source and binary forms, with or without modification, |
| 14 | * are permitted provided that the following conditions are met: |
14 | * are permitted provided that the following conditions are met: |
| 15 | * 1. Redistributions of source code must retain the above copyright notice, |
15 | * 1. Redistributions of source code must retain the above copyright notice, |
| 16 | * this list of conditions and the following disclaimer. |
16 | * this list of conditions and the following disclaimer. |
| Line 31... | Line 31... | ||
| 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 34 | * |
34 | * |
| 35 | ****************************************************************************** |
35 | ****************************************************************************** |
| 36 | */ |
36 | */ |
| 37 | 37 | ||
| 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
| 39 | #ifndef __STM32F1xx_LL_FSMC_H |
39 | #ifndef __STM32F1xx_LL_FSMC_H |
| 40 | #define __STM32F1xx_LL_FSMC_H |
40 | #define __STM32F1xx_LL_FSMC_H |
| 41 | 41 | ||
| 42 | #ifdef __cplusplus |
42 | #ifdef __cplusplus |
| 43 | extern "C" { |
43 | extern "C" { |
| 44 | #endif |
44 | #endif |
| 45 | 45 | ||
| 46 | /* Includes ------------------------------------------------------------------*/ |
46 | /* Includes ------------------------------------------------------------------*/ |
| 47 | #include "stm32f1xx_hal_def.h" |
47 | #include "stm32f1xx_hal_def.h" |
| 48 | 48 | ||
| 49 | /** @addtogroup STM32F1xx_HAL_Driver |
49 | /** @addtogroup STM32F1xx_HAL_Driver |
| 50 | * @{ |
50 | * @{ |
| 51 | */ |
51 | */ |
| 52 | 52 | ||
| 53 | #if defined (STM32F101xE) || defined(STM32F103xE) || defined(STM32F101xG) || defined(STM32F103xG) || defined(STM32F100xE) |
53 | #if defined(FSMC_BANK1) |
| 54 | 54 | ||
| 55 | /** @addtogroup FSMC_LL |
55 | /** @addtogroup FSMC_LL |
| 56 | * @{ |
56 | * @{ |
| 57 | */ |
57 | */ |
| 58 | 58 | ||
| 59 | /** @addtogroup FSMC_LL_Private_Macros |
59 | /** @addtogroup FSMC_LL_Private_Macros |
| 60 | * @{ |
60 | * @{ |
| 61 | */ |
61 | */ |
| 62 | 62 | ||
| Line 74... | Line 74... | ||
| 74 | 74 | ||
| 75 | #define IS_FSMC_NORSRAM_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FSMC_NORSRAM_MEM_BUS_WIDTH_8) || \ |
75 | #define IS_FSMC_NORSRAM_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FSMC_NORSRAM_MEM_BUS_WIDTH_8) || \ |
| 76 | ((__WIDTH__) == FSMC_NORSRAM_MEM_BUS_WIDTH_16) || \ |
76 | ((__WIDTH__) == FSMC_NORSRAM_MEM_BUS_WIDTH_16) || \ |
| 77 | ((__WIDTH__) == FSMC_NORSRAM_MEM_BUS_WIDTH_32)) |
77 | ((__WIDTH__) == FSMC_NORSRAM_MEM_BUS_WIDTH_32)) |
| 78 | 78 | ||
| - | 79 | #define IS_FSMC_WRITE_BURST(__BURST__) (((__BURST__) == FSMC_WRITE_BURST_DISABLE) || \ |
|
| - | 80 | ((__BURST__) == FSMC_WRITE_BURST_ENABLE)) |
|
| - | 81 | ||
| 79 | #define IS_FSMC_ACCESS_MODE(__MODE__) (((__MODE__) == FSMC_ACCESS_MODE_A) || \ |
82 | #define IS_FSMC_ACCESS_MODE(__MODE__) (((__MODE__) == FSMC_ACCESS_MODE_A) || \ |
| 80 | ((__MODE__) == FSMC_ACCESS_MODE_B) || \ |
83 | ((__MODE__) == FSMC_ACCESS_MODE_B) || \ |
| 81 | ((__MODE__) == FSMC_ACCESS_MODE_C) || \ |
84 | ((__MODE__) == FSMC_ACCESS_MODE_C) || \ |
| 82 | ((__MODE__) == FSMC_ACCESS_MODE_D)) |
85 | ((__MODE__) == FSMC_ACCESS_MODE_D)) |
| 83 | 86 | ||
| 84 | #define IS_FSMC_NAND_BANK(BANK) (((BANK) == FSMC_NAND_BANK2) || \ |
87 | #define IS_FSMC_NAND_BANK(__BANK__) (((__BANK__) == FSMC_NAND_BANK2) || \ |
| 85 | ((BANK) == FSMC_NAND_BANK3)) |
88 | ((__BANK__) == FSMC_NAND_BANK3)) |
| - | 89 | ||
| - | 90 | #define IS_FSMC_WAIT_FEATURE(__FEATURE__) (((__FEATURE__) == FSMC_NAND_PCC_WAIT_FEATURE_DISABLE) || \ |
|
| - | 91 | ((__FEATURE__) == FSMC_NAND_PCC_WAIT_FEATURE_ENABLE)) |
|
| 86 | 92 | ||
| 87 | #define IS_FSMC_WAIT_FEATURE(FEATURE) (((FEATURE) == FSMC_NAND_PCC_WAIT_FEATURE_DISABLE) || \ |
93 | #define IS_FSMC_NAND_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FSMC_NAND_PCC_MEM_BUS_WIDTH_8) || \ |
| 88 | ((FEATURE) == FSMC_NAND_PCC_WAIT_FEATURE_ENABLE)) |
94 | ((__WIDTH__) == FSMC_NAND_PCC_MEM_BUS_WIDTH_16)) |
| 89 | 95 | ||
| 90 | #define IS_FSMC_NAND_MEMORY_WIDTH(WIDTH) (((WIDTH) == FSMC_NAND_PCC_MEM_BUS_WIDTH_8) || \ |
- | |
| 91 | ((WIDTH) == FSMC_NAND_PCC_MEM_BUS_WIDTH_16)) |
- | |
| 92 | - | ||
| 93 | #define IS_FSMC_ECC_STATE(STATE) (((STATE) == FSMC_NAND_ECC_DISABLE) || \ |
96 | #define IS_FSMC_ECC_STATE(__STATE__) (((__STATE__) == FSMC_NAND_ECC_DISABLE) || \ |
| 94 | ((STATE) == FSMC_NAND_ECC_ENABLE)) |
97 | ((__STATE__) == FSMC_NAND_ECC_ENABLE)) |
| 95 | - | ||
| - | 98 | ||
| 96 | #define IS_FSMC_ECCPAGE_SIZE(SIZE) (((SIZE) == FSMC_NAND_ECC_PAGE_SIZE_256BYTE) || \ |
99 | #define IS_FSMC_ECCPAGE_SIZE(__SIZE__) (((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_256BYTE) || \ |
| 97 | ((SIZE) == FSMC_NAND_ECC_PAGE_SIZE_512BYTE) || \ |
100 | ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_512BYTE) || \ |
| 98 | ((SIZE) == FSMC_NAND_ECC_PAGE_SIZE_1024BYTE) || \ |
101 | ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_1024BYTE) || \ |
| 99 | ((SIZE) == FSMC_NAND_ECC_PAGE_SIZE_2048BYTE) || \ |
102 | ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_2048BYTE) || \ |
| 100 | ((SIZE) == FSMC_NAND_ECC_PAGE_SIZE_4096BYTE) || \ |
103 | ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_4096BYTE) || \ |
| 101 | ((SIZE) == FSMC_NAND_ECC_PAGE_SIZE_8192BYTE)) |
104 | ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_8192BYTE)) |
| - | 105 | ||
| 102 | /** @defgroup FSMC_TCLR_Setup_Time FSMC_TCLR_Setup_Time |
106 | /** @defgroup FSMC_TCLR_Setup_Time FSMC_TCLR_Setup_Time |
| 103 | * @{ |
107 | * @{ |
| 104 | */ |
108 | */ |
| 105 | #define IS_FSMC_TCLR_TIME(TIME) ((TIME) <= 255) |
109 | #define IS_FSMC_TCLR_TIME(__TIME__) ((__TIME__) <= 255) |
| 106 | /** |
110 | /** |
| 107 | * @} |
111 | * @} |
| 108 | */ |
112 | */ |
| 109 | 113 | ||
| 110 | /** @defgroup FSMC_TAR_Setup_Time FSMC_TAR_Setup_Time |
114 | /** @defgroup FSMC_TAR_Setup_Time FSMC_TAR_Setup_Time |
| 111 | * @{ |
115 | * @{ |
| 112 | */ |
116 | */ |
| 113 | #define IS_FSMC_TAR_TIME(TIME) ((TIME) <= 255) |
117 | #define IS_FSMC_TAR_TIME(__TIME__) ((__TIME__) <= 255) |
| 114 | /** |
118 | /** |
| 115 | * @} |
119 | * @} |
| 116 | */ |
120 | */ |
| 117 | 121 | ||
| 118 | /** @defgroup FSMC_Setup_Time FSMC_Setup_Time |
122 | /** @defgroup FSMC_Setup_Time FSMC_Setup_Time |
| 119 | * @{ |
123 | * @{ |
| 120 | */ |
124 | */ |
| 121 | #define IS_FSMC_SETUP_TIME(TIME) ((TIME) <= 255) |
125 | #define IS_FSMC_SETUP_TIME(__TIME__) ((__TIME__) <= 255) |
| 122 | /** |
126 | /** |
| 123 | * @} |
127 | * @} |
| 124 | */ |
128 | */ |
| 125 | 129 | ||
| 126 | /** @defgroup FSMC_Wait_Setup_Time FSMC_Wait_Setup_Time |
130 | /** @defgroup FSMC_Wait_Setup_Time FSMC_Wait_Setup_Time |
| 127 | * @{ |
131 | * @{ |
| 128 | */ |
132 | */ |
| 129 | #define IS_FSMC_WAIT_TIME(TIME) ((TIME) <= 255) |
133 | #define IS_FSMC_WAIT_TIME(__TIME__) ((__TIME__) <= 255) |
| 130 | /** |
134 | /** |
| 131 | * @} |
135 | * @} |
| 132 | */ |
136 | */ |
| 133 | 137 | ||
| 134 | /** @defgroup FSMC_Hold_Setup_Time FSMC_Hold_Setup_Time |
138 | /** @defgroup FSMC_Hold_Setup_Time FSMC_Hold_Setup_Time |
| 135 | * @{ |
139 | * @{ |
| 136 | */ |
140 | */ |
| 137 | #define IS_FSMC_HOLD_TIME(TIME) ((TIME) <= 255) |
141 | #define IS_FSMC_HOLD_TIME(__TIME__) ((__TIME__) <= 255) |
| 138 | /** |
142 | /** |
| 139 | * @} |
143 | * @} |
| 140 | */ |
144 | */ |
| 141 | 145 | ||
| 142 | /** @defgroup FSMC_HiZ_Setup_Time FSMC_HiZ_Setup_Time |
146 | /** @defgroup FSMC_HiZ_Setup_Time FSMC_HiZ_Setup_Time |
| 143 | * @{ |
147 | * @{ |
| 144 | */ |
148 | */ |
| 145 | #define IS_FSMC_HIZ_TIME(TIME) ((TIME) <= 255) |
149 | #define IS_FSMC_HIZ_TIME(__TIME__) ((__TIME__) <= 255) |
| 146 | /** |
150 | /** |
| 147 | * @} |
151 | * @} |
| 148 | */ |
152 | */ |
| 149 | 153 | ||
| 150 | /** @defgroup FSMC_NORSRAM_Device_Instance FSMC NOR/SRAM Device Instance |
154 | /** @defgroup FSMC_NORSRAM_Device_Instance FSMC NOR/SRAM Device Instance |
| 151 | * @{ |
155 | * @{ |
| 152 | */ |
156 | */ |
| 153 | 157 | ||
| 154 | #define IS_FSMC_NORSRAM_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_NORSRAM_DEVICE) |
158 | #define IS_FSMC_NORSRAM_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_NORSRAM_DEVICE) |
| 155 | 159 | ||
| 156 | /** |
160 | /** |
| 157 | * @} |
161 | * @} |
| 158 | */ |
162 | */ |
| 159 | 163 | ||
| 160 | /** @defgroup FSMC_NORSRAM_EXTENDED_Device_Instance FSMC NOR/SRAM EXTENDED Device Instance |
164 | /** @defgroup FSMC_NORSRAM_EXTENDED_Device_Instance FSMC NOR/SRAM EXTENDED Device Instance |
| 161 | * @{ |
165 | * @{ |
| 162 | */ |
166 | */ |
| 163 | 167 | ||
| 164 | #define IS_FSMC_NORSRAM_EXTENDED_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_NORSRAM_EXTENDED_DEVICE) |
168 | #define IS_FSMC_NORSRAM_EXTENDED_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_NORSRAM_EXTENDED_DEVICE) |
| 165 | 169 | ||
| 166 | /** |
170 | /** |
| 167 | * @} |
171 | * @} |
| 168 | */ |
172 | */ |
| 169 | 173 | ||
| 170 | /** @defgroup FSMC_NAND_Device_Instance FSMC_NAND_Device_Instance |
174 | /** @defgroup FSMC_NAND_Device_Instance FSMC NAND Device Instance |
| 171 | * @{ |
175 | * @{ |
| 172 | */ |
176 | */ |
| 173 | #define IS_FSMC_NAND_DEVICE(INSTANCE) ((INSTANCE) == FSMC_NAND_DEVICE) |
177 | #define IS_FSMC_NAND_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_NAND_DEVICE) |
| 174 | /** |
178 | /** |
| 175 | * @} |
179 | * @} |
| 176 | */ |
180 | */ |
| 177 | 181 | ||
| 178 | /** @defgroup FSMC_PCCARD_Device_Instance FSMC_PCCARD_Device_Instance |
182 | /** @defgroup FSMC_PCCARD_Device_Instance FSMC PCCARD Device Instance |
| 179 | * @{ |
183 | * @{ |
| 180 | */ |
184 | */ |
| 181 | #define IS_FSMC_PCCARD_DEVICE(INSTANCE) ((INSTANCE) == FSMC_PCCARD_DEVICE) |
185 | #define IS_FSMC_PCCARD_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_PCCARD_DEVICE) |
| 182 | 186 | ||
| 183 | /** |
187 | /** |
| 184 | * @} |
188 | * @} |
| 185 | */ |
189 | */ |
| 186 | - | ||
| 187 | #define IS_FSMC_BURSTMODE(__STATE__) (((__STATE__) == FSMC_BURST_ACCESS_MODE_DISABLE) || \ |
190 | #define IS_FSMC_BURSTMODE(__STATE__) (((__STATE__) == FSMC_BURST_ACCESS_MODE_DISABLE) || \ |
| 188 | ((__STATE__) == FSMC_BURST_ACCESS_MODE_ENABLE)) |
191 | ((__STATE__) == FSMC_BURST_ACCESS_MODE_ENABLE)) |
| 189 | 192 | ||
| 190 | #define IS_FSMC_WAIT_POLARITY(__POLARITY__) (((__POLARITY__) == FSMC_WAIT_SIGNAL_POLARITY_LOW) || \ |
193 | #define IS_FSMC_WAIT_POLARITY(__POLARITY__) (((__POLARITY__) == FSMC_WAIT_SIGNAL_POLARITY_LOW) || \ |
| 191 | ((__POLARITY__) == FSMC_WAIT_SIGNAL_POLARITY_HIGH)) |
194 | ((__POLARITY__) == FSMC_WAIT_SIGNAL_POLARITY_HIGH)) |
| 192 | 195 | ||
| 193 | #define IS_FSMC_WRAP_MODE(__MODE__) (((__MODE__) == FSMC_WRAP_MODE_DISABLE) || \ |
196 | #define IS_FSMC_WRAP_MODE(__MODE__) (((__MODE__) == FSMC_WRAP_MODE_DISABLE) || \ |
| 194 | ((__MODE__) == FSMC_WRAP_MODE_ENABLE)) |
197 | ((__MODE__) == FSMC_WRAP_MODE_ENABLE)) |
| 195 | 198 | ||
| 196 | #define IS_FSMC_WAIT_SIGNAL_ACTIVE(__ACTIVE__) (((__ACTIVE__) == FSMC_WAIT_TIMING_BEFORE_WS) || \ |
199 | #define IS_FSMC_WAIT_SIGNAL_ACTIVE(__ACTIVE__) (((__ACTIVE__) == FSMC_WAIT_TIMING_BEFORE_WS) || \ |
| 197 | ((__ACTIVE__) == FSMC_WAIT_TIMING_DURING_WS)) |
200 | ((__ACTIVE__) == FSMC_WAIT_TIMING_DURING_WS)) |
| 198 | 201 | ||
| 199 | #define IS_FSMC_WRITE_OPERATION(__OPERATION__) (((__OPERATION__) == FSMC_WRITE_OPERATION_DISABLE) || \ |
202 | #define IS_FSMC_WRITE_OPERATION(__OPERATION__) (((__OPERATION__) == FSMC_WRITE_OPERATION_DISABLE) || \ |
| 200 | ((__OPERATION__) == FSMC_WRITE_OPERATION_ENABLE)) |
203 | ((__OPERATION__) == FSMC_WRITE_OPERATION_ENABLE)) |
| 201 | 204 | ||
| 202 | #define IS_FSMC_WAITE_SIGNAL(__SIGNAL__) (((__SIGNAL__) == FSMC_WAIT_SIGNAL_DISABLE) || \ |
205 | #define IS_FSMC_WAITE_SIGNAL(__SIGNAL__) (((__SIGNAL__) == FSMC_WAIT_SIGNAL_DISABLE) || \ |
| 203 | ((__SIGNAL__) == FSMC_WAIT_SIGNAL_ENABLE)) |
206 | ((__SIGNAL__) == FSMC_WAIT_SIGNAL_ENABLE)) |
| 204 | 207 | ||
| 205 | #define IS_FSMC_EXTENDED_MODE(__MODE__) (((__MODE__) == FSMC_EXTENDED_MODE_DISABLE) || \ |
208 | #define IS_FSMC_EXTENDED_MODE(__MODE__) (((__MODE__) == FSMC_EXTENDED_MODE_DISABLE) || \ |
| 206 | ((__MODE__) == FSMC_EXTENDED_MODE_ENABLE)) |
209 | ((__MODE__) == FSMC_EXTENDED_MODE_ENABLE)) |
| 207 | 210 | ||
| 208 | #define IS_FSMC_ASYNWAIT(__STATE__) (((__STATE__) == FSMC_ASYNCHRONOUS_WAIT_DISABLE) || \ |
211 | #define IS_FSMC_ASYNWAIT(__STATE__) (((__STATE__) == FSMC_ASYNCHRONOUS_WAIT_DISABLE) || \ |
| 209 | ((__STATE__) == FSMC_ASYNCHRONOUS_WAIT_ENABLE)) |
212 | ((__STATE__) == FSMC_ASYNCHRONOUS_WAIT_ENABLE)) |
| 210 | 213 | ||
| 211 | #define IS_FSMC_CLK_DIV(DIV) (((DIV) > 1) && ((DIV) <= 16)) |
214 | #define IS_FSMC_CLK_DIV(__DIV__) (((__DIV__) > 1) && ((__DIV__) <= 16)) |
| 212 | 215 | ||
| 213 | /** @defgroup FSMC_Data_Latency FSMC Data Latency |
216 | /** @defgroup FSMC_Data_Latency FSMC Data Latency |
| 214 | * @{ |
217 | * @{ |
| 215 | */ |
218 | */ |
| 216 | - | ||
| 217 | #define IS_FSMC_DATA_LATENCY(__LATENCY__) (((__LATENCY__) > 1) && ((__LATENCY__) <= 17)) |
219 | #define IS_FSMC_DATA_LATENCY(__LATENCY__) (((__LATENCY__) > 1) && ((__LATENCY__) <= 17)) |
| 218 | /** |
220 | /** |
| 219 | * @} |
221 | * @} |
| 220 | */ |
222 | */ |
| 221 | 223 | ||
| 222 | #define IS_FSMC_WRITE_BURST(__BURST__) (((__BURST__) == FSMC_WRITE_BURST_DISABLE) || \ |
- | |
| 223 | ((__BURST__) == FSMC_WRITE_BURST_ENABLE)) |
- | |
| 224 | /** @defgroup FSMC_Address_Setup_Time FSMC Address Setup Time |
224 | /** @defgroup FSMC_Address_Setup_Time FSMC Address Setup Time |
| 225 | * @{ |
225 | * @{ |
| 226 | */ |
226 | */ |
| 227 | - | ||
| 228 | #define IS_FSMC_ADDRESS_SETUP_TIME(__TIME__) ((__TIME__) <= 15) |
227 | #define IS_FSMC_ADDRESS_SETUP_TIME(__TIME__) ((__TIME__) <= 15) |
| 229 | /** |
228 | /** |
| 230 | * @} |
229 | * @} |
| 231 | */ |
230 | */ |
| 232 | 231 | ||
| 233 | /** @defgroup FSMC_Address_Hold_Time FSMC Address Hold Time |
232 | /** @defgroup FSMC_Address_Hold_Time FSMC Address Hold Time |
| 234 | * @{ |
233 | * @{ |
| 235 | */ |
234 | */ |
| 236 | - | ||
| 237 | #define IS_FSMC_ADDRESS_HOLD_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 15)) |
235 | #define IS_FSMC_ADDRESS_HOLD_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 15)) |
| 238 | /** |
236 | /** |
| 239 | * @} |
237 | * @} |
| 240 | */ |
238 | */ |
| 241 | 239 | ||
| 242 | /** @defgroup FSMC_Data_Setup_Time FSMC Data Setup Time |
240 | /** @defgroup FSMC_Data_Setup_Time FSMC Data Setup Time |
| 243 | * @{ |
241 | * @{ |
| 244 | */ |
242 | */ |
| 245 | - | ||
| 246 | #define IS_FSMC_DATASETUP_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 255)) |
243 | #define IS_FSMC_DATASETUP_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 255)) |
| 247 | /** |
244 | /** |
| 248 | * @} |
245 | * @} |
| 249 | */ |
246 | */ |
| 250 | 247 | ||
| 251 | /** @defgroup FSMC_Bus_Turn_around_Duration FSMC Bus Turn around Duration |
248 | /** @defgroup FSMC_Bus_Turn_around_Duration FSMC Bus Turn around Duration |
| 252 | * @{ |
249 | * @{ |
| 253 | */ |
250 | */ |
| 254 | - | ||
| 255 | #define IS_FSMC_TURNAROUND_TIME(__TIME__) ((__TIME__) <= 15) |
251 | #define IS_FSMC_TURNAROUND_TIME(__TIME__) ((__TIME__) <= 15) |
| 256 | /** |
252 | /** |
| 257 | * @} |
253 | * @} |
| 258 | */ |
254 | */ |
| 259 | 255 | ||
| 260 | /** |
256 | /** |
| 261 | * @} |
257 | * @} |
| 262 | */ |
258 | */ |
| 263 | 259 | ||
| 264 | /* Exported typedef ----------------------------------------------------------*/ |
260 | /* Exported typedef ----------------------------------------------------------*/ |
| 265 | 261 | ||
| 266 | /** @defgroup FSMC_NORSRAM_Exported_typedef FSMC Low Layer Exported Types |
262 | /** @defgroup FSMC_NORSRAM_Exported_typedef FSMC Low Layer Exported Types |
| 267 | * @{ |
263 | * @{ |
| 268 | */ |
264 | */ |
| 269 | 265 | ||
| 270 | #define FSMC_NORSRAM_TypeDef FSMC_Bank1_TypeDef |
266 | #define FSMC_NORSRAM_TypeDef FSMC_Bank1_TypeDef |
| 271 | #define FSMC_NORSRAM_EXTENDED_TypeDef FSMC_Bank1E_TypeDef |
267 | #define FSMC_NORSRAM_EXTENDED_TypeDef FSMC_Bank1E_TypeDef |
| 272 | #define FSMC_NAND_TypeDef FSMC_Bank2_3_TypeDef |
268 | #define FSMC_NAND_TypeDef FSMC_Bank2_3_TypeDef |
| 273 | #define FSMC_PCCARD_TypeDef FSMC_Bank4_TypeDef |
269 | #define FSMC_PCCARD_TypeDef FSMC_Bank4_TypeDef |
| 274 | 270 | ||
| 275 | #define FSMC_NORSRAM_DEVICE FSMC_Bank1 |
271 | #define FSMC_NORSRAM_DEVICE FSMC_Bank1 |
| 276 | #define FSMC_NORSRAM_EXTENDED_DEVICE FSMC_Bank1E |
272 | #define FSMC_NORSRAM_EXTENDED_DEVICE FSMC_Bank1E |
| 277 | #define FSMC_NAND_DEVICE FSMC_Bank2_3 |
273 | #define FSMC_NAND_DEVICE FSMC_Bank2_3 |
| 278 | #define FSMC_PCCARD_DEVICE FSMC_Bank4 |
274 | #define FSMC_PCCARD_DEVICE FSMC_Bank4 |
| 279 | 275 | ||
| 280 | /** |
276 | /** |
| 281 | * @brief FSMC_NORSRAM Configuration Structure definition |
277 | * @brief FSMC_NORSRAM Configuration Structure definition |
| 282 | */ |
278 | */ |
| 283 | typedef struct |
279 | typedef struct |
| 284 | { |
280 | { |
| 285 | uint32_t NSBank; /*!< Specifies the NORSRAM memory device that will be used. |
281 | uint32_t NSBank; /*!< Specifies the NORSRAM memory device that will be used. |
| 286 | This parameter can be a value of @ref FSMC_NORSRAM_Bank */ |
282 | This parameter can be a value of @ref FSMC_NORSRAM_Bank */ |
| 287 | - | ||
| - | 283 | ||
| 288 | uint32_t DataAddressMux; /*!< Specifies whether the address and data values are |
284 | uint32_t DataAddressMux; /*!< Specifies whether the address and data values are |
| 289 | multiplexed on the data bus or not. |
285 | multiplexed on the data bus or not. |
| 290 | This parameter can be a value of @ref FSMC_Data_Address_Bus_Multiplexing */ |
286 | This parameter can be a value of @ref FSMC_Data_Address_Bus_Multiplexing */ |
| 291 | 287 | ||
| 292 | uint32_t MemoryType; /*!< Specifies the type of external memory attached to |
288 | uint32_t MemoryType; /*!< Specifies the type of external memory attached to |
| 293 | the corresponding memory device. |
289 | the corresponding memory device. |
| 294 | This parameter can be a value of @ref FSMC_Memory_Type */ |
290 | This parameter can be a value of @ref FSMC_Memory_Type */ |
| 295 | - | ||
| - | 291 | ||
| 296 | uint32_t MemoryDataWidth; /*!< Specifies the external memory device width. |
292 | uint32_t MemoryDataWidth; /*!< Specifies the external memory device width. |
| 297 | This parameter can be a value of @ref FSMC_NORSRAM_Data_Width */ |
293 | This parameter can be a value of @ref FSMC_NORSRAM_Data_Width */ |
| 298 | 294 | ||
| 299 | uint32_t BurstAccessMode; /*!< Enables or disables the burst access mode for Flash memory, |
295 | uint32_t BurstAccessMode; /*!< Enables or disables the burst access mode for Flash memory, |
| 300 | valid only with synchronous burst Flash memories. |
296 | valid only with synchronous burst Flash memories. |
| 301 | This parameter can be a value of @ref FSMC_Burst_Access_Mode */ |
297 | This parameter can be a value of @ref FSMC_Burst_Access_Mode */ |
| 302 | - | ||
| - | 298 | ||
| 303 | uint32_t WaitSignalPolarity; /*!< Specifies the wait signal polarity, valid only when accessing |
299 | uint32_t WaitSignalPolarity; /*!< Specifies the wait signal polarity, valid only when accessing |
| 304 | the Flash memory in burst mode. |
300 | the Flash memory in burst mode. |
| 305 | This parameter can be a value of @ref FSMC_Wait_Signal_Polarity */ |
301 | This parameter can be a value of @ref FSMC_Wait_Signal_Polarity */ |
| 306 | 302 | ||
| 307 | uint32_t WrapMode; /*!< Enables or disables the Wrapped burst access mode for Flash |
303 | uint32_t WrapMode; /*!< Enables or disables the Wrapped burst access mode for Flash |
| 308 | memory, valid only when accessing Flash memories in burst mode. |
304 | memory, valid only when accessing Flash memories in burst mode. |
| 309 | This parameter can be a value of @ref FSMC_Wrap_Mode */ |
305 | This parameter can be a value of @ref FSMC_Wrap_Mode */ |
| 310 | 306 | ||
| 311 | uint32_t WaitSignalActive; /*!< Specifies if the wait signal is asserted by the memory one |
307 | uint32_t WaitSignalActive; /*!< Specifies if the wait signal is asserted by the memory one |
| 312 | clock cycle before the wait state or during the wait state, |
308 | clock cycle before the wait state or during the wait state, |
| 313 | valid only when accessing memories in burst mode. |
309 | valid only when accessing memories in burst mode. |
| 314 | This parameter can be a value of @ref FSMC_Wait_Timing */ |
310 | This parameter can be a value of @ref FSMC_Wait_Timing */ |
| 315 | 311 | ||
| 316 | uint32_t WriteOperation; /*!< Enables or disables the write operation in the selected device by the FSMC. |
312 | uint32_t WriteOperation; /*!< Enables or disables the write operation in the selected device by the FSMC. |
| 317 | This parameter can be a value of @ref FSMC_Write_Operation */ |
313 | This parameter can be a value of @ref FSMC_Write_Operation */ |
| 318 | 314 | ||
| 319 | uint32_t WaitSignal; /*!< Enables or disables the wait state insertion via wait |
315 | uint32_t WaitSignal; /*!< Enables or disables the wait state insertion via wait |
| 320 | signal, valid for Flash memory access in burst mode. |
316 | signal, valid for Flash memory access in burst mode. |
| 321 | This parameter can be a value of @ref FSMC_Wait_Signal */ |
317 | This parameter can be a value of @ref FSMC_Wait_Signal */ |
| 322 | 318 | ||
| 323 | uint32_t ExtendedMode; /*!< Enables or disables the extended mode. |
319 | uint32_t ExtendedMode; /*!< Enables or disables the extended mode. |
| 324 | This parameter can be a value of @ref FSMC_Extended_Mode */ |
320 | This parameter can be a value of @ref FSMC_Extended_Mode */ |
| 325 | 321 | ||
| 326 | uint32_t AsynchronousWait; /*!< Enables or disables wait signal during asynchronous transfers, |
322 | uint32_t AsynchronousWait; /*!< Enables or disables wait signal during asynchronous transfers, |
| 327 | valid only with asynchronous Flash memories. |
323 | valid only with asynchronous Flash memories. |
| 328 | This parameter can be a value of @ref FSMC_AsynchronousWait */ |
324 | This parameter can be a value of @ref FSMC_AsynchronousWait */ |
| 329 | 325 | ||
| 330 | uint32_t WriteBurst; /*!< Enables or disables the write burst operation. |
326 | uint32_t WriteBurst; /*!< Enables or disables the write burst operation. |
| 331 | This parameter can be a value of @ref FSMC_Write_Burst */ |
327 | This parameter can be a value of @ref FSMC_Write_Burst */ |
| 332 | 328 | ||
| 333 | }FSMC_NORSRAM_InitTypeDef; |
329 | }FSMC_NORSRAM_InitTypeDef; |
| 334 | 330 | ||
| 335 | - | ||
| 336 | /** |
331 | /** |
| 337 | * @brief FSMC_NORSRAM Timing parameters structure definition |
332 | * @brief FSMC_NORSRAM Timing parameters structure definition |
| 338 | */ |
333 | */ |
| 339 | typedef struct |
334 | typedef struct |
| 340 | { |
335 | { |
| 341 | uint32_t AddressSetupTime; /*!< Defines the number of HCLK cycles to configure |
336 | uint32_t AddressSetupTime; /*!< Defines the number of HCLK cycles to configure |
| 342 | the duration of the address setup time. |
337 | the duration of the address setup time. |
| 343 | This parameter can be a value between Min_Data = 0 and Max_Data = 15. |
338 | This parameter can be a value between Min_Data = 0 and Max_Data = 15. |
| 344 | @note This parameter is not used with synchronous NOR Flash memories. */ |
339 | @note This parameter is not used with synchronous NOR Flash memories. */ |
| 345 | 340 | ||
| 346 | uint32_t AddressHoldTime; /*!< Defines the number of HCLK cycles to configure |
341 | uint32_t AddressHoldTime; /*!< Defines the number of HCLK cycles to configure |
| 347 | the duration of the address hold time. |
342 | the duration of the address hold time. |
| 348 | This parameter can be a value between Min_Data = 1 and Max_Data = 15. |
343 | This parameter can be a value between Min_Data = 1 and Max_Data = 15. |
| 349 | @note This parameter is not used with synchronous NOR Flash memories. */ |
344 | @note This parameter is not used with synchronous NOR Flash memories. */ |
| 350 | 345 | ||
| 351 | uint32_t DataSetupTime; /*!< Defines the number of HCLK cycles to configure |
346 | uint32_t DataSetupTime; /*!< Defines the number of HCLK cycles to configure |
| 352 | the duration of the data setup time. |
347 | the duration of the data setup time. |
| 353 | This parameter can be a value between Min_Data = 1 and Max_Data = 255. |
348 | This parameter can be a value between Min_Data = 1 and Max_Data = 255. |
| 354 | @note This parameter is used for SRAMs, ROMs and asynchronous multiplexed |
349 | @note This parameter is used for SRAMs, ROMs and asynchronous multiplexed |
| 355 | NOR Flash memories. */ |
350 | NOR Flash memories. */ |
| 356 | 351 | ||
| 357 | uint32_t BusTurnAroundDuration; /*!< Defines the number of HCLK cycles to configure |
352 | uint32_t BusTurnAroundDuration; /*!< Defines the number of HCLK cycles to configure |
| 358 | the duration of the bus turnaround. |
353 | the duration of the bus turnaround. |
| 359 | This parameter can be a value between Min_Data = 0 and Max_Data = 15. |
354 | This parameter can be a value between Min_Data = 0 and Max_Data = 15. |
| 360 | @note This parameter is only used for multiplexed NOR Flash memories. */ |
355 | @note This parameter is only used for multiplexed NOR Flash memories. */ |
| 361 | 356 | ||
| 362 | uint32_t CLKDivision; /*!< Defines the period of CLK clock output signal, expressed in number of |
357 | uint32_t CLKDivision; /*!< Defines the period of CLK clock output signal, expressed in number of |
| 363 | HCLK cycles. This parameter can be a value between Min_Data = 2 and Max_Data = 16. |
358 | HCLK cycles. This parameter can be a value between Min_Data = 2 and Max_Data = 16. |
| 364 | @note This parameter is not used for asynchronous NOR Flash, SRAM or ROM |
359 | @note This parameter is not used for asynchronous NOR Flash, SRAM or ROM |
| 365 | accesses. */ |
360 | accesses. */ |
| 366 | 361 | ||
| 367 | uint32_t DataLatency; /*!< Defines the number of memory clock cycles to issue |
362 | uint32_t DataLatency; /*!< Defines the number of memory clock cycles to issue |
| 368 | to the memory before getting the first data. |
363 | to the memory before getting the first data. |
| 369 | The parameter value depends on the memory type as shown below: |
364 | The parameter value depends on the memory type as shown below: |
| 370 | - It must be set to 0 in case of a CRAM |
365 | - It must be set to 0 in case of a CRAM |
| 371 | - It is don't care in asynchronous NOR, SRAM or ROM accesses |
366 | - It is don't care in asynchronous NOR, SRAM or ROM accesses |
| 372 | - It may assume a value between Min_Data = 2 and Max_Data = 17 in NOR Flash memories |
367 | - It may assume a value between Min_Data = 2 and Max_Data = 17 in NOR Flash memories |
| 373 | with synchronous burst mode enable */ |
368 | with synchronous burst mode enable */ |
| 374 | 369 | ||
| 375 | uint32_t AccessMode; /*!< Specifies the asynchronous access mode. |
370 | uint32_t AccessMode; /*!< Specifies the asynchronous access mode. |
| 376 | This parameter can be a value of @ref FSMC_Access_Mode */ |
371 | This parameter can be a value of @ref FSMC_Access_Mode */ |
| 377 | 372 | ||
| 378 | }FSMC_NORSRAM_TimingTypeDef; |
373 | }FSMC_NORSRAM_TimingTypeDef; |
| 379 | 374 | ||
| 380 | #if defined (STM32F101xE) || defined(STM32F103xE) || defined(STM32F101xG) || defined(STM32F103xG) |
375 | #if (defined(STM32F101xE) || defined(STM32F103xE) || defined(STM32F101xG) || defined(STM32F103xG)) |
| 381 | /** |
376 | /** |
| 382 | * @brief FSMC_NAND Configuration Structure definition |
377 | * @brief FSMC_NAND Configuration Structure definition |
| 383 | */ |
378 | */ |
| 384 | typedef struct |
379 | typedef struct |
| 385 | { |
380 | { |
| 386 | uint32_t NandBank; /*!< Specifies the NAND memory device that will be used. |
381 | uint32_t NandBank; /*!< Specifies the NAND memory device that will be used. |
| 387 | This parameter can be a value of @ref FSMC_NAND_Bank */ |
382 | This parameter can be a value of @ref FSMC_NAND_Bank */ |
| 388 | 383 | ||
| 389 | uint32_t Waitfeature; /*!< Enables or disables the Wait feature for the NAND Memory device. |
384 | uint32_t Waitfeature; /*!< Enables or disables the Wait feature for the NAND Memory device. |
| 390 | This parameter can be any value of @ref FSMC_Wait_feature */ |
385 | This parameter can be any value of @ref FSMC_Wait_feature */ |
| 391 | 386 | ||
| 392 | uint32_t MemoryDataWidth; /*!< Specifies the external memory device width. |
387 | uint32_t MemoryDataWidth; /*!< Specifies the external memory device width. |
| 393 | This parameter can be any value of @ref FSMC_NAND_Data_Width */ |
388 | This parameter can be any value of @ref FSMC_NAND_Data_Width */ |
| 394 | 389 | ||
| 395 | uint32_t EccComputation; /*!< Enables or disables the ECC computation. |
390 | uint32_t EccComputation; /*!< Enables or disables the ECC computation. |
| 396 | This parameter can be any value of @ref FSMC_ECC */ |
391 | This parameter can be any value of @ref FSMC_ECC */ |
| 397 | 392 | ||
| 398 | uint32_t ECCPageSize; /*!< Defines the page size for the extended ECC. |
393 | uint32_t ECCPageSize; /*!< Defines the page size for the extended ECC. |
| 399 | This parameter can be any value of @ref FSMC_ECC_Page_Size */ |
394 | This parameter can be any value of @ref FSMC_ECC_Page_Size */ |
| 400 | 395 | ||
| 401 | uint32_t TCLRSetupTime; /*!< Defines the number of HCLK cycles to configure the |
396 | uint32_t TCLRSetupTime; /*!< Defines the number of HCLK cycles to configure the |
| 402 | delay between CLE low and RE low. |
397 | delay between CLE low and RE low. |
| 403 | This parameter can be a value between Min_Data = 0 and Max_Data = 255 */ |
398 | This parameter can be a value between Min_Data = 0 and Max_Data = 255 */ |
| 404 | 399 | ||
| 405 | uint32_t TARSetupTime; /*!< Defines the number of HCLK cycles to configure the |
400 | uint32_t TARSetupTime; /*!< Defines the number of HCLK cycles to configure the |
| 406 | delay between ALE low and RE low. |
401 | delay between ALE low and RE low. |
| 407 | This parameter can be a number between Min_Data = 0 and Max_Data = 255 */ |
402 | This parameter can be a number between Min_Data = 0 and Max_Data = 255 */ |
| 408 | - | ||
| 409 | }FSMC_NAND_InitTypeDef; |
- | |
| 410 | 403 | ||
| - | 404 | }FSMC_NAND_InitTypeDef; |
|
| - | 405 | ||
| 411 | /** |
406 | /** |
| 412 | * @brief FSMC_NAND_PCCARD Timing parameters structure definition |
407 | * @brief FSMC_NAND_PCCARD Timing parameters structure definition |
| 413 | */ |
408 | */ |
| 414 | typedef struct |
409 | typedef struct |
| 415 | { |
410 | { |
| 416 | uint32_t SetupTime; /*!< Defines the number of HCLK cycles to setup address before |
411 | uint32_t SetupTime; /*!< Defines the number of HCLK cycles to setup address before |
| 417 | the command assertion for NAND-Flash read or write access |
412 | the command assertion for NAND-Flash read or write access |
| 418 | to common/Attribute or I/O memory space (depending on |
413 | to common/Attribute or I/O memory space (depending on |
| 419 | the memory space timing to be configured). |
414 | the memory space timing to be configured). |
| 420 | This parameter can be a value between Min_Data = 0 and Max_Data = 255 */ |
415 | This parameter can be a value between Min_Data = 0 and Max_Data = 255 */ |
| 421 | 416 | ||
| 422 | uint32_t WaitSetupTime; /*!< Defines the minimum number of HCLK cycles to assert the |
417 | uint32_t WaitSetupTime; /*!< Defines the minimum number of HCLK cycles to assert the |
| 423 | command for NAND-Flash read or write access to |
418 | command for NAND-Flash read or write access to |
| 424 | common/Attribute or I/O memory space (depending on the |
419 | common/Attribute or I/O memory space (depending on the |
| 425 | memory space timing to be configured). |
420 | memory space timing to be configured). |
| 426 | This parameter can be a number between Min_Data = 0 and Max_Data = 255 */ |
421 | This parameter can be a number between Min_Data = 0 and Max_Data = 255 */ |
| 427 | 422 | ||
| 428 | uint32_t HoldSetupTime; /*!< Defines the number of HCLK clock cycles to hold address |
423 | uint32_t HoldSetupTime; /*!< Defines the number of HCLK clock cycles to hold address |
| 429 | (and data for write access) after the command de-assertion |
424 | (and data for write access) after the command de-assertion |
| 430 | for NAND-Flash read or write access to common/Attribute |
425 | for NAND-Flash read or write access to common/Attribute |
| 431 | or I/O memory space (depending on the memory space timing |
426 | or I/O memory space (depending on the memory space timing |
| 432 | to be configured). |
427 | to be configured). |
| 433 | This parameter can be a number between Min_Data = 0 and Max_Data = 255 */ |
428 | This parameter can be a number between Min_Data = 0 and Max_Data = 255 */ |
| 434 | 429 | ||
| 435 | uint32_t HiZSetupTime; /*!< Defines the number of HCLK clock cycles during which the |
430 | uint32_t HiZSetupTime; /*!< Defines the number of HCLK clock cycles during which the |
| 436 | data bus is kept in HiZ after the start of a NAND-Flash |
431 | data bus is kept in HiZ after the start of a NAND-Flash |
| 437 | write access to common/Attribute or I/O memory space (depending |
432 | write access to common/Attribute or I/O memory space (depending |
| 438 | on the memory space timing to be configured). |
433 | on the memory space timing to be configured). |
| 439 | This parameter can be a number between Min_Data = 0 and Max_Data = 255 */ |
434 | This parameter can be a number between Min_Data = 0 and Max_Data = 255 */ |
| 440 | 435 | ||
| 441 | }FSMC_NAND_PCC_TimingTypeDef; |
436 | }FSMC_NAND_PCC_TimingTypeDef; |
| 442 | 437 | ||
| - | 438 | #endif /* STM32F101xE || STM32F103xE || STM32F101xG || STM32F103xG */ |
|
| - | 439 | #if (defined(STM32F101xE) || defined(STM32F103xE) || defined(STM32F101xG) || defined(STM32F103xG)) |
|
| 443 | /** |
440 | /** |
| 444 | * @brief FSMC_NAND Configuration Structure definition |
441 | * @brief FSMC_NAND Configuration Structure definition |
| 445 | */ |
442 | */ |
| 446 | typedef struct |
443 | typedef struct |
| 447 | { |
444 | { |
| 448 | uint32_t Waitfeature; /*!< Enables or disables the Wait feature for the PCCARD Memory device. |
445 | uint32_t Waitfeature; /*!< Enables or disables the Wait feature for the PCCARD Memory device. |
| 449 | This parameter can be any value of @ref FSMC_Wait_feature */ |
446 | This parameter can be any value of @ref FSMC_Wait_feature */ |
| 450 | 447 | ||
| 451 | uint32_t TCLRSetupTime; /*!< Defines the number of HCLK cycles to configure the |
448 | uint32_t TCLRSetupTime; /*!< Defines the number of HCLK cycles to configure the |
| 452 | delay between CLE low and RE low. |
449 | delay between CLE low and RE low. |
| 453 | This parameter can be a value between Min_Data = 0 and Max_Data = 255 */ |
450 | This parameter can be a value between Min_Data = 0 and Max_Data = 255 */ |
| 454 | 451 | ||
| 455 | uint32_t TARSetupTime; /*!< Defines the number of HCLK cycles to configure the |
452 | uint32_t TARSetupTime; /*!< Defines the number of HCLK cycles to configure the |
| 456 | delay between ALE low and RE low. |
453 | delay between ALE low and RE low. |
| 457 | This parameter can be a number between Min_Data = 0 and Max_Data = 255 */ |
454 | This parameter can be a number between Min_Data = 0 and Max_Data = 255 */ |
| 458 | - | ||
| - | 455 | ||
| 459 | }FSMC_PCCARD_InitTypeDef; |
456 | }FSMC_PCCARD_InitTypeDef; |
| 460 | 457 | ||
| 461 | #endif /* STM32F101xE || STM32F103xE || STM32F101xG || STM32F103xG */ |
458 | #endif /* STM32F101xE || STM32F103xE || STM32F101xG || STM32F103xG */ |
| 462 | /** |
459 | /** |
| 463 | * @} |
460 | * @} |
| 464 | */ |
461 | */ |
| 465 | 462 | ||
| 466 | /* Exported constants --------------------------------------------------------*/ |
463 | /* Exported constants --------------------------------------------------------*/ |
| 467 | 464 | ||
| 468 | /** @defgroup FSMC_Exported_Constants FSMC Low Layer Exported Constants |
465 | /** @defgroup FSMC_Exported_Constants FSMC Low Layer Exported Constants |
| 469 | * @{ |
466 | * @{ |
| 470 | */ |
467 | */ |
| 471 | 468 | ||
| 472 | /** @defgroup FSMC_NORSRAM_Exported_constants FSMC NOR/SRAM Exported constants |
469 | /** @defgroup FSMC_NORSRAM_Exported_constants FSMC NOR/SRAM Exported constants |
| 473 | * @{ |
470 | * @{ |
| 474 | */ |
471 | */ |
| 475 | 472 | ||
| 476 | /** @defgroup FSMC_NORSRAM_Bank FSMC NOR/SRAM Bank |
473 | /** @defgroup FSMC_NORSRAM_Bank FSMC NOR/SRAM Bank |
| 477 | * @{ |
474 | * @{ |
| 478 | */ |
475 | */ |
| 479 | #define FSMC_NORSRAM_BANK1 ((uint32_t)0x00000000) |
476 | #define FSMC_NORSRAM_BANK1 ((uint32_t)0x00000000) |
| 480 | #define FSMC_NORSRAM_BANK2 ((uint32_t)0x00000002) |
477 | #define FSMC_NORSRAM_BANK2 ((uint32_t)0x00000002) |
| Line 502... | Line 499... | ||
| 502 | 499 | ||
| 503 | #define FSMC_MEMORY_TYPE_SRAM ((uint32_t)0x00000000) |
500 | #define FSMC_MEMORY_TYPE_SRAM ((uint32_t)0x00000000) |
| 504 | #define FSMC_MEMORY_TYPE_PSRAM ((uint32_t)FSMC_BCRx_MTYP_0) |
501 | #define FSMC_MEMORY_TYPE_PSRAM ((uint32_t)FSMC_BCRx_MTYP_0) |
| 505 | #define FSMC_MEMORY_TYPE_NOR ((uint32_t)FSMC_BCRx_MTYP_1) |
502 | #define FSMC_MEMORY_TYPE_NOR ((uint32_t)FSMC_BCRx_MTYP_1) |
| 506 | 503 | ||
| 507 | - | ||
| 508 | /** |
504 | /** |
| 509 | * @} |
505 | * @} |
| 510 | */ |
506 | */ |
| 511 | 507 | ||
| 512 | /** @defgroup FSMC_NORSRAM_Data_Width FSMC NOR/SRAM Data Width |
508 | /** @defgroup FSMC_NORSRAM_Data_Width FSMC NOR/SRAM Data Width |
| Line 522... | Line 518... | ||
| 522 | */ |
518 | */ |
| 523 | 519 | ||
| 524 | /** @defgroup FSMC_NORSRAM_Flash_Access FSMC NOR/SRAM Flash Access |
520 | /** @defgroup FSMC_NORSRAM_Flash_Access FSMC NOR/SRAM Flash Access |
| 525 | * @{ |
521 | * @{ |
| 526 | */ |
522 | */ |
| 527 | 523 | ||
| 528 | #define FSMC_NORSRAM_FLASH_ACCESS_ENABLE ((uint32_t)FSMC_BCRx_FACCEN) |
524 | #define FSMC_NORSRAM_FLASH_ACCESS_ENABLE ((uint32_t)FSMC_BCRx_FACCEN) |
| 529 | #define FSMC_NORSRAM_FLASH_ACCESS_DISABLE ((uint32_t)0x00000000) |
525 | #define FSMC_NORSRAM_FLASH_ACCESS_DISABLE ((uint32_t)0x00000000) |
| 530 | /** |
526 | /** |
| 531 | * @} |
527 | * @} |
| 532 | */ |
528 | */ |
| 533 | 529 | ||
| 534 | /** @defgroup FSMC_Burst_Access_Mode FSMC Burst Access Mode |
530 | /** @defgroup FSMC_Burst_Access_Mode FSMC Burst Access Mode |
| 535 | * @{ |
531 | * @{ |
| 536 | */ |
532 | */ |
| 537 | 533 | ||
| 538 | #define FSMC_BURST_ACCESS_MODE_DISABLE ((uint32_t)0x00000000) |
534 | #define FSMC_BURST_ACCESS_MODE_DISABLE ((uint32_t)0x00000000) |
| 539 | #define FSMC_BURST_ACCESS_MODE_ENABLE ((uint32_t)FSMC_BCRx_BURSTEN) |
535 | #define FSMC_BURST_ACCESS_MODE_ENABLE ((uint32_t)FSMC_BCRx_BURSTEN) |
| 540 | 536 | ||
| 541 | /** |
537 | /** |
| 542 | * @} |
538 | * @} |
| 543 | */ |
539 | */ |
| 544 | 540 | ||
| 545 | 541 | ||
| 546 | /** @defgroup FSMC_Wait_Signal_Polarity FSMC Wait Signal Polarity |
542 | /** @defgroup FSMC_Wait_Signal_Polarity FSMC Wait Signal Polarity |
| 547 | * @{ |
543 | * @{ |
| 548 | */ |
544 | */ |
| 549 | 545 | ||
| 550 | #define FSMC_WAIT_SIGNAL_POLARITY_LOW ((uint32_t)0x00000000) |
546 | #define FSMC_WAIT_SIGNAL_POLARITY_LOW ((uint32_t)0x00000000) |
| 551 | #define FSMC_WAIT_SIGNAL_POLARITY_HIGH ((uint32_t)FSMC_BCRx_WAITPOL) |
547 | #define FSMC_WAIT_SIGNAL_POLARITY_HIGH ((uint32_t)FSMC_BCRx_WAITPOL) |
| 552 | 548 | ||
| 553 | /** |
549 | /** |
| 554 | * @} |
550 | * @} |
| 555 | */ |
551 | */ |
| 556 | 552 | ||
| 557 | /** @defgroup FSMC_Wrap_Mode FSMC Wrap Mode |
553 | /** @defgroup FSMC_Wrap_Mode FSMC Wrap Mode |
| 558 | * @{ |
554 | * @{ |
| 559 | */ |
555 | */ |
| 560 | 556 | ||
| 561 | #define FSMC_WRAP_MODE_DISABLE ((uint32_t)0x00000000) |
557 | #define FSMC_WRAP_MODE_DISABLE ((uint32_t)0x00000000) |
| 562 | #define FSMC_WRAP_MODE_ENABLE ((uint32_t)FSMC_BCRx_WRAPMOD) |
558 | #define FSMC_WRAP_MODE_ENABLE ((uint32_t)FSMC_BCRx_WRAPMOD) |
| 563 | 559 | ||
| 564 | /** |
560 | /** |
| 565 | * @} |
561 | * @} |
| 566 | */ |
562 | */ |
| 567 | 563 | ||
| 568 | /** @defgroup FSMC_Wait_Timing FSMC Wait Timing |
564 | /** @defgroup FSMC_Wait_Timing FSMC Wait Timing |
| 569 | * @{ |
565 | * @{ |
| 570 | */ |
566 | */ |
| 571 | 567 | ||
| 572 | #define FSMC_WAIT_TIMING_BEFORE_WS ((uint32_t)0x00000000) |
568 | #define FSMC_WAIT_TIMING_BEFORE_WS ((uint32_t)0x00000000) |
| 573 | #define FSMC_WAIT_TIMING_DURING_WS ((uint32_t)FSMC_BCRx_WAITCFG) |
569 | #define FSMC_WAIT_TIMING_DURING_WS ((uint32_t)FSMC_BCRx_WAITCFG) |
| 574 | 570 | ||
| 575 | /** |
571 | /** |
| 576 | * @} |
572 | * @} |
| 577 | */ |
573 | */ |
| 578 | 574 | ||
| 579 | /** @defgroup FSMC_Write_Operation FSMC Write Operation |
575 | /** @defgroup FSMC_Write_Operation FSMC Write Operation |
| 580 | * @{ |
576 | * @{ |
| 581 | */ |
577 | */ |
| 582 | 578 | ||
| 583 | #define FSMC_WRITE_OPERATION_DISABLE ((uint32_t)0x00000000) |
579 | #define FSMC_WRITE_OPERATION_DISABLE ((uint32_t)0x00000000) |
| 584 | #define FSMC_WRITE_OPERATION_ENABLE ((uint32_t)FSMC_BCRx_WREN) |
580 | #define FSMC_WRITE_OPERATION_ENABLE ((uint32_t)FSMC_BCRx_WREN) |
| 585 | 581 | ||
| 586 | /** |
582 | /** |
| 587 | * @} |
583 | * @} |
| 588 | */ |
584 | */ |
| 589 | 585 | ||
| 590 | /** @defgroup FSMC_Wait_Signal FSMC Wait Signal |
586 | /** @defgroup FSMC_Wait_Signal FSMC Wait Signal |
| 591 | * @{ |
587 | * @{ |
| 592 | */ |
588 | */ |
| 593 | 589 | ||
| 594 | #define FSMC_WAIT_SIGNAL_DISABLE ((uint32_t)0x00000000) |
590 | #define FSMC_WAIT_SIGNAL_DISABLE ((uint32_t)0x00000000) |
| 595 | #define FSMC_WAIT_SIGNAL_ENABLE ((uint32_t)FSMC_BCRx_WAITEN) |
591 | #define FSMC_WAIT_SIGNAL_ENABLE ((uint32_t)FSMC_BCRx_WAITEN) |
| 596 | 592 | ||
| 597 | /** |
593 | /** |
| 598 | * @} |
594 | * @} |
| 599 | */ |
595 | */ |
| 600 | 596 | ||
| 601 | /** @defgroup FSMC_Extended_Mode FSMC Extended Mode |
597 | /** @defgroup FSMC_Extended_Mode FSMC Extended Mode |
| 602 | * @{ |
598 | * @{ |
| 603 | */ |
599 | */ |
| 604 | 600 | ||
| 605 | #define FSMC_EXTENDED_MODE_DISABLE ((uint32_t)0x00000000) |
601 | #define FSMC_EXTENDED_MODE_DISABLE ((uint32_t)0x00000000) |
| 606 | #define FSMC_EXTENDED_MODE_ENABLE ((uint32_t)FSMC_BCRx_EXTMOD) |
602 | #define FSMC_EXTENDED_MODE_ENABLE ((uint32_t)FSMC_BCRx_EXTMOD) |
| 607 | 603 | ||
| 608 | /** |
604 | /** |
| 609 | * @} |
605 | * @} |
| 610 | */ |
606 | */ |
| 611 | 607 | ||
| 612 | /** @defgroup FSMC_AsynchronousWait FSMC Asynchronous Wait |
608 | /** @defgroup FSMC_AsynchronousWait FSMC Asynchronous Wait |
| 613 | * @{ |
609 | * @{ |
| 614 | */ |
610 | */ |
| 615 | 611 | ||
| 616 | #define FSMC_ASYNCHRONOUS_WAIT_DISABLE ((uint32_t)0x00000000) |
612 | #define FSMC_ASYNCHRONOUS_WAIT_DISABLE ((uint32_t)0x00000000) |
| 617 | #define FSMC_ASYNCHRONOUS_WAIT_ENABLE ((uint32_t)FSMC_BCRx_ASYNCWAIT) |
613 | #define FSMC_ASYNCHRONOUS_WAIT_ENABLE ((uint32_t)FSMC_BCRx_ASYNCWAIT) |
| 618 | 614 | ||
| 619 | /** |
615 | /** |
| 620 | * @} |
616 | * @} |
| 621 | */ |
617 | */ |
| 622 | 618 | ||
| 623 | /** @defgroup FSMC_Write_Burst FSMC Write Burst |
619 | /** @defgroup FSMC_Write_Burst FSMC Write Burst |
| 624 | * @{ |
620 | * @{ |
| 625 | */ |
621 | */ |
| 626 | 622 | ||
| Line 632... | Line 628... | ||
| 632 | */ |
628 | */ |
| 633 | 629 | ||
| 634 | /** @defgroup FSMC_Access_Mode FSMC Access Mode |
630 | /** @defgroup FSMC_Access_Mode FSMC Access Mode |
| 635 | * @{ |
631 | * @{ |
| 636 | */ |
632 | */ |
| 637 | 633 | ||
| 638 | #define FSMC_ACCESS_MODE_A ((uint32_t)0x00000000) |
634 | #define FSMC_ACCESS_MODE_A ((uint32_t)0x00000000) |
| 639 | #define FSMC_ACCESS_MODE_B ((uint32_t)FSMC_BTRx_ACCMOD_0) |
635 | #define FSMC_ACCESS_MODE_B ((uint32_t)FSMC_BTRx_ACCMOD_0) |
| 640 | #define FSMC_ACCESS_MODE_C ((uint32_t)FSMC_BTRx_ACCMOD_1) |
636 | #define FSMC_ACCESS_MODE_C ((uint32_t)FSMC_BTRx_ACCMOD_1) |
| 641 | #define FSMC_ACCESS_MODE_D ((uint32_t)(FSMC_BTRx_ACCMOD_0 | FSMC_BTRx_ACCMOD_1)) |
637 | #define FSMC_ACCESS_MODE_D ((uint32_t)(FSMC_BTRx_ACCMOD_0 | FSMC_BTRx_ACCMOD_1)) |
| 642 | 638 | ||
| 643 | /** |
639 | /** |
| 644 | * @} |
640 | * @} |
| 645 | */ |
641 | */ |
| 646 | - | ||
| 647 | 642 | ||
| 648 | /** |
643 | /** |
| 649 | * @} |
644 | * @} |
| 650 | */ |
645 | */ |
| 651 | 646 | ||
| 652 | #if defined (STM32F101xE) || defined(STM32F103xE) || defined(STM32F101xG) || defined(STM32F103xG) |
647 | #if (defined(STM32F101xE) || defined(STM32F103xE) || defined(STM32F101xG) || defined(STM32F103xG)) |
| 653 | /** @defgroup FSMC_NAND_Controller FSMC NAND and PCCARD Controller |
648 | /** @defgroup FSMC_NAND_Controller FSMC NAND and PCCARD Controller |
| 654 | * @{ |
649 | * @{ |
| 655 | */ |
650 | */ |
| 656 | 651 | ||
| 657 | /** @defgroup FSMC_NAND_Bank FSMC_NAND_Bank |
652 | /** @defgroup FSMC_NAND_Bank FSMC NAND Bank |
| 658 | * @{ |
653 | * @{ |
| 659 | */ |
654 | */ |
| 660 | #define FSMC_NAND_BANK2 ((uint32_t)0x00000010) |
655 | #define FSMC_NAND_BANK2 ((uint32_t)0x00000010) |
| 661 | #define FSMC_NAND_BANK3 ((uint32_t)0x00000100) |
656 | #define FSMC_NAND_BANK3 ((uint32_t)0x00000100) |
| 662 | 657 | ||
| 663 | /** |
658 | /** |
| 664 | * @} |
659 | * @} |
| 665 | */ |
660 | */ |
| 666 | 661 | ||
| 667 | /** @defgroup FSMC_Wait_feature FSMC_Wait_feature |
662 | /** @defgroup FSMC_Wait_feature FSMC Wait feature |
| 668 | * @{ |
663 | * @{ |
| 669 | */ |
664 | */ |
| 670 | #define FSMC_NAND_PCC_WAIT_FEATURE_DISABLE ((uint32_t)0x00000000) |
665 | #define FSMC_NAND_PCC_WAIT_FEATURE_DISABLE ((uint32_t)0x00000000) |
| 671 | #define FSMC_NAND_PCC_WAIT_FEATURE_ENABLE ((uint32_t)0x00000002) |
666 | #define FSMC_NAND_PCC_WAIT_FEATURE_ENABLE ((uint32_t)FSMC_PCRx_PWAITEN) |
| 672 | 667 | ||
| 673 | /** |
668 | /** |
| 674 | * @} |
669 | * @} |
| 675 | */ |
670 | */ |
| 676 | 671 | ||
| 677 | /** @defgroup FSMC_PCR_Memory_Type FSMC_PCR_Memory_Type |
672 | /** @defgroup FSMC_PCR_Memory_Type FSMC PCR Memory Type |
| 678 | * @{ |
673 | * @{ |
| 679 | */ |
674 | */ |
| 680 | #define FSMC_PCR_MEMORY_TYPE_PCCARD ((uint32_t)0x00000000) |
675 | #define FSMC_PCR_MEMORY_TYPE_PCCARD ((uint32_t)0x00000000) |
| 681 | #define FSMC_PCR_MEMORY_TYPE_NAND ((uint32_t)FSMC_PCRx_PTYP) |
676 | #define FSMC_PCR_MEMORY_TYPE_NAND ((uint32_t)FSMC_PCRx_PTYP) |
| 682 | /** |
677 | /** |
| 683 | * @} |
678 | * @} |
| 684 | */ |
679 | */ |
| 685 | 680 | ||
| 686 | /** @defgroup FSMC_NAND_Data_Width FSMC_NAND_Data_Width |
681 | /** @defgroup FSMC_NAND_Data_Width FSMC NAND Data Width |
| 687 | * @{ |
682 | * @{ |
| 688 | */ |
683 | */ |
| 689 | #define FSMC_NAND_PCC_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000) |
684 | #define FSMC_NAND_PCC_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000) |
| 690 | #define FSMC_NAND_PCC_MEM_BUS_WIDTH_16 ((uint32_t)FSMC_PCRx_PWID_0) |
685 | #define FSMC_NAND_PCC_MEM_BUS_WIDTH_16 ((uint32_t)FSMC_PCRx_PWID_0) |
| 691 | 686 | ||
| 692 | /** |
687 | /** |
| 693 | * @} |
688 | * @} |
| 694 | */ |
689 | */ |
| 695 | 690 | ||
| 696 | /** @defgroup FSMC_ECC FSMC_ECC |
691 | /** @defgroup FSMC_ECC FSMC NAND ECC |
| 697 | * @{ |
692 | * @{ |
| 698 | */ |
693 | */ |
| 699 | #define FSMC_NAND_ECC_DISABLE ((uint32_t)0x00000000) |
694 | #define FSMC_NAND_ECC_DISABLE ((uint32_t)0x00000000) |
| 700 | #define FSMC_NAND_ECC_ENABLE ((uint32_t)FSMC_PCRx_ECCEN) |
695 | #define FSMC_NAND_ECC_ENABLE ((uint32_t)FSMC_PCRx_ECCEN) |
| 701 | 696 | ||
| 702 | /** |
697 | /** |
| 703 | * @} |
698 | * @} |
| 704 | */ |
699 | */ |
| 705 | 700 | ||
| 706 | /** @defgroup FSMC_ECC_Page_Size FSMC_ECC_Page_Size |
701 | /** @defgroup FSMC_ECC_Page_Size FSMC ECC Page Size |
| 707 | * @{ |
702 | * @{ |
| 708 | */ |
703 | */ |
| 709 | #define FSMC_NAND_ECC_PAGE_SIZE_256BYTE ((uint32_t)0x00000000) |
704 | #define FSMC_NAND_ECC_PAGE_SIZE_256BYTE ((uint32_t)0x00000000) |
| 710 | #define FSMC_NAND_ECC_PAGE_SIZE_512BYTE ((uint32_t)FSMC_PCRx_ECCPS_0) |
705 | #define FSMC_NAND_ECC_PAGE_SIZE_512BYTE ((uint32_t)FSMC_PCRx_ECCPS_0) |
| 711 | #define FSMC_NAND_ECC_PAGE_SIZE_1024BYTE ((uint32_t)FSMC_PCRx_ECCPS_1) |
706 | #define FSMC_NAND_ECC_PAGE_SIZE_1024BYTE ((uint32_t)FSMC_PCRx_ECCPS_1) |
| Line 715... | Line 710... | ||
| 715 | 710 | ||
| 716 | /** |
711 | /** |
| 717 | * @} |
712 | * @} |
| 718 | */ |
713 | */ |
| 719 | 714 | ||
| 720 | /** @defgroup FSMC_Interrupt_definition FSMC_Interrupt_definition |
715 | /** @defgroup FSMC_Interrupt_definition FSMC Interrupt definition |
| 721 | * @brief FSMC Interrupt definition |
716 | * @brief FSMC Interrupt definition |
| 722 | * @{ |
717 | * @{ |
| 723 | */ |
718 | */ |
| 724 | #define FSMC_IT_RISING_EDGE ((uint32_t)FSMC_SRx_IREN) |
719 | #define FSMC_IT_RISING_EDGE ((uint32_t)FSMC_SRx_IREN) |
| 725 | #define FSMC_IT_LEVEL ((uint32_t)FSMC_SRx_ILEN) |
720 | #define FSMC_IT_LEVEL ((uint32_t)FSMC_SRx_ILEN) |
| 726 | #define FSMC_IT_FALLING_EDGE ((uint32_t)FSMC_SRx_IFEN) |
721 | #define FSMC_IT_FALLING_EDGE ((uint32_t)FSMC_SRx_IFEN) |
| 727 | 722 | ||
| 728 | /** |
723 | /** |
| 729 | * @} |
724 | * @} |
| 730 | */ |
725 | */ |
| 731 | 726 | ||
| 732 | /** @defgroup FSMC_Flag_definition FSMC_Flag_definition |
727 | /** @defgroup FSMC_Flag_definition FSMC Flag definition |
| 733 | * @brief FSMC Flag definition |
728 | * @brief FSMC Flag definition |
| 734 | * @{ |
729 | * @{ |
| 735 | */ |
730 | */ |
| 736 | #define FSMC_FLAG_RISING_EDGE ((uint32_t)FSMC_SRx_IRS) |
731 | #define FSMC_FLAG_RISING_EDGE ((uint32_t)FSMC_SRx_IRS) |
| 737 | #define FSMC_FLAG_LEVEL ((uint32_t)FSMC_SRx_ILS) |
732 | #define FSMC_FLAG_LEVEL ((uint32_t)FSMC_SRx_ILS) |
| 738 | #define FSMC_FLAG_FALLING_EDGE ((uint32_t)FSMC_SRx_IFS) |
733 | #define FSMC_FLAG_FALLING_EDGE ((uint32_t)FSMC_SRx_IFS) |
| 739 | #define FSMC_FLAG_FEMPT ((uint32_t)FSMC_SRx_FEMPT) |
734 | #define FSMC_FLAG_FEMPT ((uint32_t)FSMC_SRx_FEMPT) |
| 740 | 735 | ||
| Line 753... | Line 748... | ||
| 753 | 748 | ||
| 754 | /* Exported macro ------------------------------------------------------------*/ |
749 | /* Exported macro ------------------------------------------------------------*/ |
| 755 | 750 | ||
| 756 | /** @defgroup FSMC_Exported_Macros FSMC Low Layer Exported Macros |
751 | /** @defgroup FSMC_Exported_Macros FSMC Low Layer Exported Macros |
| 757 | * @{ |
752 | * @{ |
| 758 | */ |
753 | */ |
| 759 | 754 | ||
| 760 | /** @defgroup FSMC_NOR_Macros FSMC NOR/SRAM Exported Macros |
755 | /** @defgroup FSMC_NOR_Macros FSMC NOR/SRAM Exported Macros |
| 761 | * @brief macros to handle NOR device enable/disable and read/write operations |
756 | * @brief macros to handle NOR device enable/disable and read/write operations |
| 762 | * @{ |
757 | * @{ |
| 763 | */ |
758 | */ |
| 764 | 759 | ||
| 765 | /** |
760 | /** |
| 766 | * @brief Enable the NORSRAM device access. |
761 | * @brief Enable the NORSRAM device access. |
| 767 | * @param __INSTANCE__: FSMC_NORSRAM Instance |
762 | * @param __INSTANCE__ FSMC_NORSRAM Instance |
| 768 | * @param __BANK__: FSMC_NORSRAM Bank |
763 | * @param __BANK__ FSMC_NORSRAM Bank |
| 769 | * @retval none |
764 | * @retval none |
| 770 | */ |
765 | */ |
| 771 | #define __FSMC_NORSRAM_ENABLE(__INSTANCE__, __BANK__) SET_BIT((__INSTANCE__)->BTCR[(__BANK__)], FSMC_BCRx_MBKEN) |
766 | #define __FSMC_NORSRAM_ENABLE(__INSTANCE__, __BANK__) SET_BIT((__INSTANCE__)->BTCR[(__BANK__)], FSMC_BCRx_MBKEN) |
| 772 | 767 | ||
| 773 | /** |
768 | /** |
| 774 | * @brief Disable the NORSRAM device access. |
769 | * @brief Disable the NORSRAM device access. |
| 775 | * @param __INSTANCE__: FSMC_NORSRAM Instance |
770 | * @param __INSTANCE__ FSMC_NORSRAM Instance |
| 776 | * @param __BANK__: FSMC_NORSRAM Bank |
771 | * @param __BANK__ FSMC_NORSRAM Bank |
| 777 | * @retval none |
772 | * @retval none |
| 778 | */ |
773 | */ |
| 779 | #define __FSMC_NORSRAM_DISABLE(__INSTANCE__, __BANK__) CLEAR_BIT((__INSTANCE__)->BTCR[(__BANK__)], FSMC_BCRx_MBKEN) |
774 | #define __FSMC_NORSRAM_DISABLE(__INSTANCE__, __BANK__) CLEAR_BIT((__INSTANCE__)->BTCR[(__BANK__)], FSMC_BCRx_MBKEN) |
| 780 | 775 | ||
| 781 | /** |
776 | /** |
| 782 | * @} |
777 | * @} |
| 783 | */ |
778 | */ |
| 784 | 779 | ||
| 785 | #if defined (STM32F101xE) || defined(STM32F103xE) || defined(STM32F101xG) || defined(STM32F103xG) |
780 | #if (defined(STM32F101xE) || defined(STM32F103xE) || defined(STM32F101xG) || defined(STM32F103xG)) |
| 786 | /** @defgroup FSMC_NAND_Macros FSMC_NAND_Macros |
781 | /** @defgroup FSMC_NAND_Macros FSMC NAND Macros |
| 787 | * @brief macros to handle NAND device enable/disable |
782 | * @brief macros to handle NAND device enable/disable |
| 788 | * @{ |
783 | * @{ |
| 789 | */ |
784 | */ |
| 790 | 785 | ||
| 791 | /** |
786 | /** |
| 792 | * @brief Enable the NAND device access. |
787 | * @brief Enable the NAND device access. |
| 793 | * @param __INSTANCE__: FSMC_NAND Instance |
788 | * @param __INSTANCE__ FSMC_NAND Instance |
| 794 | * @param __BANK__: FSMC_NAND Bank |
789 | * @param __BANK__ FSMC_NAND Bank |
| 795 | * @retval None |
790 | * @retval None |
| 796 | */ |
791 | */ |
| 797 | #define __FSMC_NAND_ENABLE(__INSTANCE__, __BANK__) (((__BANK__) == FSMC_NAND_BANK2)? SET_BIT((__INSTANCE__)->PCR2, FSMC_PCRx_PBKEN): \ |
792 | #define __FSMC_NAND_ENABLE(__INSTANCE__, __BANK__) (((__BANK__) == FSMC_NAND_BANK2)? SET_BIT((__INSTANCE__)->PCR2, FSMC_PCRx_PBKEN): \ |
| 798 | SET_BIT((__INSTANCE__)->PCR3, FSMC_PCRx_PBKEN)) |
793 | SET_BIT((__INSTANCE__)->PCR3, FSMC_PCRx_PBKEN)) |
| 799 | 794 | ||
| 800 | /** |
795 | /** |
| 801 | * @brief Disable the NAND device access. |
796 | * @brief Disable the NAND device access. |
| 802 | * @param __INSTANCE__: FSMC_NAND Instance |
797 | * @param __INSTANCE__ FSMC_NAND Instance |
| 803 | * @param __BANK__: FSMC_NAND Bank |
798 | * @param __BANK__ FSMC_NAND Bank |
| 804 | * @retval None |
799 | * @retval None |
| 805 | */ |
800 | */ |
| 806 | #define __FSMC_NAND_DISABLE(__INSTANCE__, __BANK__) (((__BANK__) == FSMC_NAND_BANK2)? CLEAR_BIT((__INSTANCE__)->PCR2, FSMC_PCRx_PBKEN): \ |
801 | #define __FSMC_NAND_DISABLE(__INSTANCE__, __BANK__) (((__BANK__) == FSMC_NAND_BANK2)? CLEAR_BIT((__INSTANCE__)->PCR2, FSMC_PCRx_PBKEN): \ |
| 807 | CLEAR_BIT((__INSTANCE__)->PCR3, FSMC_PCRx_PBKEN)) |
802 | CLEAR_BIT((__INSTANCE__)->PCR3, FSMC_PCRx_PBKEN)) |
| - | 803 | ||
| 808 | /** |
804 | /** |
| 809 | * @} |
805 | * @} |
| 810 | */ |
806 | */ |
| 811 | 807 | ||
| 812 | /** @defgroup FSMC_PCCARD_Macros FSMC_PCCARD_Macros |
808 | /** @defgroup FSMC_PCCARD_Macros FSMC PCCARD Macros |
| 813 | * @brief macros to handle SRAM read/write operations |
809 | * @brief macros to handle PCCARD read/write operations |
| 814 | * @{ |
810 | * @{ |
| 815 | */ |
811 | */ |
| 816 | 812 | ||
| 817 | /** |
813 | /** |
| 818 | * @brief Enable the PCCARD device access. |
814 | * @brief Enable the PCCARD device access. |
| 819 | * @param __INSTANCE__: FSMC_PCCARD Instance |
815 | * @param __INSTANCE__ FSMC_PCCARD Instance |
| 820 | * @retval None |
816 | * @retval None |
| 821 | */ |
817 | */ |
| 822 | #define __FSMC_PCCARD_ENABLE(__INSTANCE__) SET_BIT((__INSTANCE__)->PCR4, FSMC_PCRx_PBKEN) |
818 | #define __FSMC_PCCARD_ENABLE(__INSTANCE__) SET_BIT((__INSTANCE__)->PCR4, FSMC_PCRx_PBKEN) |
| 823 | 819 | ||
| 824 | /** |
820 | /** |
| 825 | * @brief Disable the PCCARD device access. |
821 | * @brief Disable the PCCARD device access. |
| 826 | * @param __INSTANCE__: FSMC_PCCARD Instance |
822 | * @param __INSTANCE__ FSMC_PCCARD Instance |
| 827 | * @retval None |
823 | * @retval None |
| 828 | */ |
824 | */ |
| 829 | #define __FSMC_PCCARD_DISABLE(__INSTANCE__) CLEAR_BIT((__INSTANCE__)->PCR4, FSMC_PCRx_PBKEN) |
825 | #define __FSMC_PCCARD_DISABLE(__INSTANCE__) CLEAR_BIT((__INSTANCE__)->PCR4, FSMC_PCRx_PBKEN) |
| 830 | /** |
826 | /** |
| 831 | * @} |
827 | * @} |
| 832 | */ |
828 | */ |
| 833 | 829 | ||
| 834 | /** @defgroup FSMC_Interrupt FSMC_Interrupt |
830 | /** @defgroup FSMC_Interrupt FSMC Interrupt |
| 835 | * @brief macros to handle FSMC interrupts |
831 | * @brief macros to handle FSMC interrupts |
| 836 | * @{ |
832 | * @{ |
| 837 | */ |
833 | */ |
| 838 | 834 | ||
| 839 | /** |
835 | /** |
| 840 | * @brief Enable the NAND device interrupt. |
836 | * @brief Enable the NAND device interrupt. |
| 841 | * @param __INSTANCE__: FSMC_NAND Instance |
837 | * @param __INSTANCE__ FSMC_NAND Instance |
| 842 | * @param __BANK__: FSMC_NAND Bank |
838 | * @param __BANK__ FSMC_NAND Bank |
| 843 | * @param __INTERRUPT__: FSMC_NAND interrupt |
839 | * @param __INTERRUPT__ FSMC_NAND interrupt |
| 844 | * This parameter can be any combination of the following values: |
840 | * This parameter can be any combination of the following values: |
| 845 | * @arg FSMC_IT_RISING_EDGE: Interrupt rising edge. |
841 | * @arg FSMC_IT_RISING_EDGE Interrupt rising edge. |
| 846 | * @arg FSMC_IT_LEVEL: Interrupt level. |
842 | * @arg FSMC_IT_LEVEL Interrupt level. |
| 847 | * @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge. |
843 | * @arg FSMC_IT_FALLING_EDGE Interrupt falling edge. |
| 848 | * @retval None |
844 | * @retval None |
| 849 | */ |
845 | */ |
| 850 | #define __FSMC_NAND_ENABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) (((__BANK__) == FSMC_NAND_BANK2)? SET_BIT((__INSTANCE__)->SR2, (__INTERRUPT__)): \ |
846 | #define __FSMC_NAND_ENABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) (((__BANK__) == FSMC_NAND_BANK2)? SET_BIT((__INSTANCE__)->SR2, (__INTERRUPT__)): \ |
| 851 | SET_BIT((__INSTANCE__)->SR3, (__INTERRUPT__))) |
847 | SET_BIT((__INSTANCE__)->SR3, (__INTERRUPT__))) |
| 852 | 848 | ||
| 853 | /** |
849 | /** |
| 854 | * @brief Disable the NAND device interrupt. |
850 | * @brief Disable the NAND device interrupt. |
| 855 | * @param __INSTANCE__: FSMC_NAND Instance |
851 | * @param __INSTANCE__ FSMC_NAND Instance |
| 856 | * @param __BANK__: FSMC_NAND Bank |
852 | * @param __BANK__ FSMC_NAND Bank |
| 857 | * @param __INTERRUPT__: FSMC_NAND interrupt |
853 | * @param __INTERRUPT__ FSMC_NAND interrupt |
| 858 | * This parameter can be any combination of the following values: |
854 | * This parameter can be any combination of the following values: |
| 859 | * @arg FSMC_IT_RISING_EDGE: Interrupt rising edge. |
855 | * @arg FSMC_IT_RISING_EDGE Interrupt rising edge. |
| 860 | * @arg FSMC_IT_LEVEL: Interrupt level. |
856 | * @arg FSMC_IT_LEVEL Interrupt level. |
| 861 | * @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge. |
857 | * @arg FSMC_IT_FALLING_EDGE Interrupt falling edge. |
| 862 | * @retval None |
858 | * @retval None |
| 863 | */ |
859 | */ |
| 864 | #define __FSMC_NAND_DISABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) (((__BANK__) == FSMC_NAND_BANK2)? CLEAR_BIT((__INSTANCE__)->SR2, (__INTERRUPT__)): \ |
860 | #define __FSMC_NAND_DISABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__) (((__BANK__) == FSMC_NAND_BANK2)? CLEAR_BIT((__INSTANCE__)->SR2, (__INTERRUPT__)): \ |
| 865 | CLEAR_BIT((__INSTANCE__)->SR3, (__INTERRUPT__))) |
861 | CLEAR_BIT((__INSTANCE__)->SR3, (__INTERRUPT__))) |
| 866 | - | ||
| - | 862 | ||
| 867 | /** |
863 | /** |
| 868 | * @brief Get flag status of the NAND device. |
864 | * @brief Get flag status of the NAND device. |
| 869 | * @param __INSTANCE__: FSMC_NAND Instance |
865 | * @param __INSTANCE__ FSMC_NAND Instance |
| 870 | * @param __BANK__: FSMC_NAND Bank |
866 | * @param __BANK__ FSMC_NAND Bank |
| 871 | * @param __FLAG__: FSMC_NAND flag |
867 | * @param __FLAG__ FSMC_NAND flag |
| 872 | * This parameter can be any combination of the following values: |
868 | * This parameter can be any combination of the following values: |
| 873 | * @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag. |
869 | * @arg FSMC_FLAG_RISING_EDGE Interrupt rising edge flag. |
| 874 | * @arg FSMC_FLAG_LEVEL: Interrupt level edge flag. |
870 | * @arg FSMC_FLAG_LEVEL Interrupt level edge flag. |
| 875 | * @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag. |
871 | * @arg FSMC_FLAG_FALLING_EDGE Interrupt falling edge flag. |
| 876 | * @arg FSMC_FLAG_FEMPT: FIFO empty flag. |
872 | * @arg FSMC_FLAG_FEMPT FIFO empty flag. |
| 877 | * @retval The state of FLAG (SET or RESET). |
873 | * @retval The state of FLAG (SET or RESET). |
| 878 | */ |
874 | */ |
| 879 | #define __FSMC_NAND_GET_FLAG(__INSTANCE__, __BANK__, __FLAG__) (((__BANK__) == FSMC_NAND_BANK2)? (((__INSTANCE__)->SR2 &(__FLAG__)) == (__FLAG__)): \ |
875 | #define __FSMC_NAND_GET_FLAG(__INSTANCE__, __BANK__, __FLAG__) (((__BANK__) == FSMC_NAND_BANK2)? (((__INSTANCE__)->SR2 &(__FLAG__)) == (__FLAG__)): \ |
| 880 | (((__INSTANCE__)->SR3 &(__FLAG__)) == (__FLAG__))) |
876 | (((__INSTANCE__)->SR3 &(__FLAG__)) == (__FLAG__))) |
| - | 877 | ||
| 881 | /** |
878 | /** |
| 882 | * @brief Clear flag status of the NAND device. |
879 | * @brief Clear flag status of the NAND device. |
| 883 | * @param __INSTANCE__: FSMC_NAND Instance |
880 | * @param __INSTANCE__ FSMC_NAND Instance |
| 884 | * @param __BANK__: FSMC_NAND Bank |
881 | * @param __BANK__ FSMC_NAND Bank |
| 885 | * @param __FLAG__: FSMC_NAND flag |
882 | * @param __FLAG__ FSMC_NAND flag |
| 886 | * This parameter can be any combination of the following values: |
883 | * This parameter can be any combination of the following values: |
| 887 | * @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag. |
884 | * @arg FSMC_FLAG_RISING_EDGE Interrupt rising edge flag. |
| 888 | * @arg FSMC_FLAG_LEVEL: Interrupt level edge flag. |
885 | * @arg FSMC_FLAG_LEVEL Interrupt level edge flag. |
| 889 | * @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag. |
886 | * @arg FSMC_FLAG_FALLING_EDGE Interrupt falling edge flag. |
| 890 | * @arg FSMC_FLAG_FEMPT: FIFO empty flag. |
887 | * @arg FSMC_FLAG_FEMPT FIFO empty flag. |
| 891 | * @retval None |
888 | * @retval None |
| 892 | */ |
889 | */ |
| 893 | #define __FSMC_NAND_CLEAR_FLAG(__INSTANCE__, __BANK__, __FLAG__) (((__BANK__) == FSMC_NAND_BANK2)? CLEAR_BIT((__INSTANCE__)->SR2, (__FLAG__)): \ |
890 | #define __FSMC_NAND_CLEAR_FLAG(__INSTANCE__, __BANK__, __FLAG__) (((__BANK__) == FSMC_NAND_BANK2)? CLEAR_BIT((__INSTANCE__)->SR2, (__FLAG__)): \ |
| 894 | CLEAR_BIT((__INSTANCE__)->SR3, (__FLAG__))) |
891 | CLEAR_BIT((__INSTANCE__)->SR3, (__FLAG__))) |
| - | 892 | ||
| 895 | /** |
893 | /** |
| 896 | * @brief Enable the PCCARD device interrupt. |
894 | * @brief Enable the PCCARD device interrupt. |
| 897 | * @param __INSTANCE__: FSMC_PCCARD Instance |
895 | * @param __INSTANCE__ FSMC_PCCARD Instance |
| 898 | * @param __INTERRUPT__: FSMC_PCCARD interrupt |
896 | * @param __INTERRUPT__ FSMC_PCCARD interrupt |
| 899 | * This parameter can be any combination of the following values: |
897 | * This parameter can be any combination of the following values: |
| 900 | * @arg FSMC_IT_RISING_EDGE: Interrupt rising edge. |
898 | * @arg FSMC_IT_RISING_EDGE Interrupt rising edge. |
| 901 | * @arg FSMC_IT_LEVEL: Interrupt level. |
899 | * @arg FSMC_IT_LEVEL Interrupt level. |
| 902 | * @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge. |
900 | * @arg FSMC_IT_FALLING_EDGE Interrupt falling edge. |
| 903 | * @retval None |
901 | * @retval None |
| 904 | */ |
902 | */ |
| 905 | #define __FSMC_PCCARD_ENABLE_IT(__INSTANCE__, __INTERRUPT__) SET_BIT((__INSTANCE__)->SR4, (__INTERRUPT__)) |
903 | #define __FSMC_PCCARD_ENABLE_IT(__INSTANCE__, __INTERRUPT__) SET_BIT((__INSTANCE__)->SR4, (__INTERRUPT__)) |
| 906 | 904 | ||
| 907 | /** |
905 | /** |
| 908 | * @brief Disable the PCCARD device interrupt. |
906 | * @brief Disable the PCCARD device interrupt. |
| 909 | * @param __INSTANCE__: FSMC_PCCARD Instance |
907 | * @param __INSTANCE__ FSMC_PCCARD Instance |
| 910 | * @param __INTERRUPT__: FSMC_PCCARD interrupt |
908 | * @param __INTERRUPT__ FSMC_PCCARD interrupt |
| 911 | * This parameter can be any combination of the following values: |
909 | * This parameter can be any combination of the following values: |
| 912 | * @arg FSMC_IT_RISING_EDGE: Interrupt rising edge. |
910 | * @arg FSMC_IT_RISING_EDGE Interrupt rising edge. |
| 913 | * @arg FSMC_IT_LEVEL: Interrupt level. |
911 | * @arg FSMC_IT_LEVEL Interrupt level. |
| 914 | * @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge. |
912 | * @arg FSMC_IT_FALLING_EDGE Interrupt falling edge. |
| 915 | * @retval None |
913 | * @retval None |
| 916 | */ |
914 | */ |
| 917 | #define __FSMC_PCCARD_DISABLE_IT(__INSTANCE__, __INTERRUPT__) CLEAR_BIT((__INSTANCE__)->SR4, (__INTERRUPT__)) |
915 | #define __FSMC_PCCARD_DISABLE_IT(__INSTANCE__, __INTERRUPT__) CLEAR_BIT((__INSTANCE__)->SR4, (__INTERRUPT__)) |
| 918 | 916 | ||
| 919 | /** |
917 | /** |
| 920 | * @brief Get flag status of the PCCARD device. |
918 | * @brief Get flag status of the PCCARD device. |
| 921 | * @param __INSTANCE__: FSMC_PCCARD Instance |
919 | * @param __INSTANCE__ FSMC_PCCARD Instance |
| 922 | * @param __FLAG__: FSMC_PCCARD flag |
920 | * @param __FLAG__ FSMC_PCCARD flag |
| 923 | * This parameter can be any combination of the following values: |
921 | * This parameter can be any combination of the following values: |
| 924 | * @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag. |
922 | * @arg FSMC_FLAG_RISING_EDGE Interrupt rising edge flag. |
| 925 | * @arg FSMC_FLAG_LEVEL: Interrupt level edge flag. |
923 | * @arg FSMC_FLAG_LEVEL Interrupt level edge flag. |
| 926 | * @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag. |
924 | * @arg FSMC_FLAG_FALLING_EDGE Interrupt falling edge flag. |
| 927 | * @arg FSMC_FLAG_FEMPT: FIFO empty flag. |
925 | * @arg FSMC_FLAG_FEMPT FIFO empty flag. |
| 928 | * @retval The state of FLAG (SET or RESET). |
926 | * @retval The state of FLAG (SET or RESET). |
| 929 | */ |
927 | */ |
| 930 | #define __FSMC_PCCARD_GET_FLAG(__INSTANCE__, __FLAG__) (((__INSTANCE__)->SR4 &(__FLAG__)) == (__FLAG__)) |
928 | #define __FSMC_PCCARD_GET_FLAG(__INSTANCE__, __FLAG__) (((__INSTANCE__)->SR4 &(__FLAG__)) == (__FLAG__)) |
| 931 | 929 | ||
| 932 | /** |
930 | /** |
| 933 | * @brief Clear flag status of the PCCARD device. |
931 | * @brief Clear flag status of the PCCARD device. |
| 934 | * @param __INSTANCE__: FSMC_PCCARD Instance |
932 | * @param __INSTANCE__ FSMC_PCCARD Instance |
| 935 | * @param __FLAG__: FSMC_PCCARD flag |
933 | * @param __FLAG__ FSMC_PCCARD flag |
| 936 | * This parameter can be any combination of the following values: |
934 | * This parameter can be any combination of the following values: |
| 937 | * @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag. |
935 | * @arg FSMC_FLAG_RISING_EDGE Interrupt rising edge flag. |
| 938 | * @arg FSMC_FLAG_LEVEL: Interrupt level edge flag. |
936 | * @arg FSMC_FLAG_LEVEL Interrupt level edge flag. |
| 939 | * @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag. |
937 | * @arg FSMC_FLAG_FALLING_EDGE Interrupt falling edge flag. |
| 940 | * @arg FSMC_FLAG_FEMPT: FIFO empty flag. |
938 | * @arg FSMC_FLAG_FEMPT FIFO empty flag. |
| 941 | * @retval None |
939 | * @retval None |
| 942 | */ |
940 | */ |
| 943 | #define __FSMC_PCCARD_CLEAR_FLAG(__INSTANCE__, __FLAG__) CLEAR_BIT((__INSTANCE__)->SR4, (__FLAG__)) |
941 | #define __FSMC_PCCARD_CLEAR_FLAG(__INSTANCE__, __FLAG__) CLEAR_BIT((__INSTANCE__)->SR4, (__FLAG__)) |
| 944 | 942 | ||
| 945 | /** |
943 | /** |
| 946 | * @} |
944 | * @} |
| 947 | */ |
945 | */ |
| 948 | 946 | ||
| 949 | #endif /* STM32F101xE || STM32F103xE || STM32F101xG || STM32F103xG */ |
947 | #endif /* STM32F101xE || STM32F103xE || STM32F101xG || STM32F103xG */ |
| 950 | 948 | ||
| 951 | /** |
949 | /** |
| 952 | * @} |
950 | * @} |
| 953 | */ |
951 | */ |
| 954 | 952 | ||
| 955 | /* Exported functions --------------------------------------------------------*/ |
953 | /* Exported functions --------------------------------------------------------*/ |
| 956 | 954 | ||
| 957 | /** @addtogroup FSMC_LL_Exported_Functions |
955 | /** @addtogroup FSMC_LL_Exported_Functions |
| 958 | * @{ |
956 | * @{ |
| Line 973... | Line 971... | ||
| 973 | HAL_StatusTypeDef FSMC_NORSRAM_Extended_Timing_Init(FSMC_NORSRAM_EXTENDED_TypeDef *Device, FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode); |
971 | HAL_StatusTypeDef FSMC_NORSRAM_Extended_Timing_Init(FSMC_NORSRAM_EXTENDED_TypeDef *Device, FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode); |
| 974 | HAL_StatusTypeDef FSMC_NORSRAM_DeInit(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank); |
972 | HAL_StatusTypeDef FSMC_NORSRAM_DeInit(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank); |
| 975 | 973 | ||
| 976 | /** |
974 | /** |
| 977 | * @} |
975 | * @} |
| 978 | */ |
976 | */ |
| 979 | 977 | ||
| 980 | /** @addtogroup FSMC_NORSRAM_Group2 |
978 | /** @addtogroup FSMC_NORSRAM_Group2 |
| 981 | * @{ |
979 | * @{ |
| 982 | */ |
980 | */ |
| 983 | 981 | ||
| Line 985... | Line 983... | ||
| 985 | HAL_StatusTypeDef FSMC_NORSRAM_WriteOperation_Enable(FSMC_NORSRAM_TypeDef *Device, uint32_t Bank); |
983 | HAL_StatusTypeDef FSMC_NORSRAM_WriteOperation_Enable(FSMC_NORSRAM_TypeDef *Device, uint32_t Bank); |
| 986 | HAL_StatusTypeDef FSMC_NORSRAM_WriteOperation_Disable(FSMC_NORSRAM_TypeDef *Device, uint32_t Bank); |
984 | HAL_StatusTypeDef FSMC_NORSRAM_WriteOperation_Disable(FSMC_NORSRAM_TypeDef *Device, uint32_t Bank); |
| 987 | 985 | ||
| 988 | /** |
986 | /** |
| 989 | * @} |
987 | * @} |
| 990 | */ |
988 | */ |
| 991 | 989 | ||
| 992 | /** |
990 | /** |
| 993 | * @} |
991 | * @} |
| 994 | */ |
992 | */ |
| 995 | 993 | ||
| 996 | #if defined (STM32F101xE) || defined(STM32F103xE) || defined(STM32F101xG) || defined(STM32F103xG) |
994 | #if (defined(STM32F101xE) || defined(STM32F103xE) || defined(STM32F101xG) || defined(STM32F103xG)) |
| 997 | /** @addtogroup FSMC_NAND |
995 | /** @addtogroup FSMC_NAND |
| 998 | * @{ |
996 | * @{ |
| 999 | */ |
997 | */ |
| 1000 | 998 | ||
| 1001 | /* FSMC_NAND Controller functions **********************************************/ |
999 | /* FSMC_NAND Controller functions **********************************************/ |
| Line 1009... | Line 1007... | ||
| 1009 | HAL_StatusTypeDef FSMC_NAND_AttributeSpace_Timing_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank); |
1007 | HAL_StatusTypeDef FSMC_NAND_AttributeSpace_Timing_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank); |
| 1010 | HAL_StatusTypeDef FSMC_NAND_DeInit(FSMC_NAND_TypeDef *Device, uint32_t Bank); |
1008 | HAL_StatusTypeDef FSMC_NAND_DeInit(FSMC_NAND_TypeDef *Device, uint32_t Bank); |
| 1011 | 1009 | ||
| 1012 | /** |
1010 | /** |
| 1013 | * @} |
1011 | * @} |
| 1014 | */ |
1012 | */ |
| 1015 | 1013 | ||
| 1016 | /* FSMC_NAND Control functions */ |
1014 | /* FSMC_NAND Control functions */ |
| 1017 | /** @addtogroup FSMC_NAND_Exported_Functions_Group2 |
1015 | /** @addtogroup FSMC_NAND_Exported_Functions_Group2 |
| 1018 | * @{ |
1016 | * @{ |
| 1019 | */ |
1017 | */ |
| Line 1022... | Line 1020... | ||
| 1022 | HAL_StatusTypeDef FSMC_NAND_ECC_Disable(FSMC_NAND_TypeDef *Device, uint32_t Bank); |
1020 | HAL_StatusTypeDef FSMC_NAND_ECC_Disable(FSMC_NAND_TypeDef *Device, uint32_t Bank); |
| 1023 | HAL_StatusTypeDef FSMC_NAND_GetECC(FSMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank, uint32_t Timeout); |
1021 | HAL_StatusTypeDef FSMC_NAND_GetECC(FSMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank, uint32_t Timeout); |
| 1024 | 1022 | ||
| 1025 | /** |
1023 | /** |
| 1026 | * @} |
1024 | * @} |
| 1027 | */ |
1025 | */ |
| 1028 | 1026 | ||
| 1029 | /** |
1027 | /** |
| 1030 | * @} |
1028 | * @} |
| 1031 | */ |
1029 | */ |
| 1032 | 1030 | ||
| 1033 | /** @addtogroup FSMC_PCCARD |
1031 | /** @addtogroup FSMC_PCCARD |
| 1034 | * @{ |
1032 | * @{ |
| 1035 | */ |
1033 | */ |
| 1036 | 1034 | ||
| Line 1046... | Line 1044... | ||
| 1046 | HAL_StatusTypeDef FSMC_PCCARD_IOSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing); |
1044 | HAL_StatusTypeDef FSMC_PCCARD_IOSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing); |
| 1047 | HAL_StatusTypeDef FSMC_PCCARD_DeInit(FSMC_PCCARD_TypeDef *Device); |
1045 | HAL_StatusTypeDef FSMC_PCCARD_DeInit(FSMC_PCCARD_TypeDef *Device); |
| 1048 | 1046 | ||
| 1049 | /** |
1047 | /** |
| 1050 | * @} |
1048 | * @} |
| 1051 | */ |
1049 | */ |
| 1052 | 1050 | ||
| 1053 | /** |
1051 | /** |
| 1054 | * @} |
1052 | * @} |
| 1055 | */ |
1053 | */ |
| 1056 | 1054 | ||
| 1057 | #endif /* STM32F101xE || STM32F103xE || STM32F101xG || STM32F103xG */ |
1055 | #endif /* STM32F101xE || STM32F103xE || STM32F101xG || STM32F103xG */ |
| 1058 | - | ||
| 1059 | /** |
1056 | /** |
| 1060 | * @} |
1057 | * @} |
| 1061 | */ |
1058 | */ |
| 1062 | 1059 | ||
| 1063 | /** |
1060 | /** |
| 1064 | * @} |
1061 | * @} |
| 1065 | */ |
1062 | */ |
| 1066 | 1063 | ||
| 1067 | #endif /* STM32F101xE || STM32F103xE || STM32F101xG || STM32F103xG || STM32F100xE */ |
1064 | #endif /* FSMC_BANK1 */ |
| 1068 | 1065 | ||
| 1069 | /** |
1066 | /** |
| 1070 | * @} |
1067 | * @} |
| 1071 | */ |
1068 | */ |
| 1072 | 1069 | ||
| 1073 | #ifdef __cplusplus |
1070 | #ifdef __cplusplus |
| 1074 | } |
1071 | } |
| 1075 | #endif |
1072 | #endif |
| 1076 | 1073 | ||
| 1077 | #endif /* __STM32F1xx_LL_FSMC_H */ |
1074 | #endif /* __STM32F1xx_LL_FSMC_H */ |