Subversion Repositories LedShow

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 9
Line 4... Line 4...
4
  * @author  MCD Application Team
4
  * @author  MCD Application Team
5
  * @brief   Header file of FSMC HAL module.
5
  * @brief   Header file of FSMC HAL module.
6
  ******************************************************************************
6
  ******************************************************************************
7
  * @attention
7
  * @attention
8
  *
8
  *
9
  * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
9
  * <h2><center>&copy; Copyright (c) 2016 STMicroelectronics.
-
 
10
  * All rights reserved.</center></h2>
10
  *
11
  *
11
  * Redistribution and use in source and binary forms, with or without modification,
12
  * This software component is licensed by ST under BSD 3-Clause license,
12
  * are permitted provided that the following conditions are met:
13
  * the "License"; You may not use this file except in compliance with the
13
  *   1. Redistributions of source code must retain the above copyright notice,
-
 
14
  *      this list of conditions and the following disclaimer.
14
  * License. You may obtain a copy of the License at:
15
  *   2. Redistributions in binary form must reproduce the above copyright notice,
-
 
16
  *      this list of conditions and the following disclaimer in the documentation
-
 
17
  *      and/or other materials provided with the distribution.
15
  *                       opensource.org/licenses/BSD-3-Clause
18
  *   3. Neither the name of STMicroelectronics nor the names of its contributors
-
 
19
  *      may be used to endorse or promote products derived from this software
-
 
20
  *      without specific prior written permission.
-
 
21
  *
-
 
22
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-
 
23
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-
 
24
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-
 
25
  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-
 
26
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-
 
27
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-
 
28
  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-
 
29
  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-
 
30
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-
 
31
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
 
32
  *
16
  *
33
  ******************************************************************************
17
  ******************************************************************************
34
  */
18
  */
35
 
19
 
36
/* Define to prevent recursive inclusion -------------------------------------*/
20
/* Define to prevent recursive inclusion -------------------------------------*/
37
#ifndef __STM32F1xx_LL_FSMC_H
21
#ifndef STM32F1xx_LL_FSMC_H
38
#define __STM32F1xx_LL_FSMC_H
22
#define STM32F1xx_LL_FSMC_H
39
 
23
 
40
#ifdef __cplusplus
24
#ifdef __cplusplus
41
extern "C" {
25
extern "C" {
42
#endif
26
#endif
43
 
27
 
Line 46... Line 30...
46
 
30
 
47
/** @addtogroup STM32F1xx_HAL_Driver
31
/** @addtogroup STM32F1xx_HAL_Driver
48
  * @{
32
  * @{
49
  */
33
  */
50
 
34
 
51
#if defined(FSMC_BANK1)
-
 
52
 
-
 
53
/** @addtogroup FSMC_LL
35
/** @addtogroup FSMC_LL
54
  * @{
36
  * @{
55
  */
37
  */
56
 
38
 
-
 
39
/** @addtogroup FSMC_LL_Private_Macros
-
 
40
  * @{
-
 
41
  */
-
 
42
#if defined FSMC_BANK1
-
 
43
 
-
 
44
#define IS_FSMC_NORSRAM_BANK(__BANK__) (((__BANK__) == FSMC_NORSRAM_BANK1) || \
-
 
45
                                       ((__BANK__) == FSMC_NORSRAM_BANK2) || \
-
 
46
                                       ((__BANK__) == FSMC_NORSRAM_BANK3) || \
-
 
47
                                       ((__BANK__) == FSMC_NORSRAM_BANK4))
-
 
48
#define IS_FSMC_MUX(__MUX__) (((__MUX__) == FSMC_DATA_ADDRESS_MUX_DISABLE) || \
-
 
49
                             ((__MUX__) == FSMC_DATA_ADDRESS_MUX_ENABLE))
-
 
50
#define IS_FSMC_MEMORY(__MEMORY__) (((__MEMORY__) == FSMC_MEMORY_TYPE_SRAM) || \
-
 
51
                                   ((__MEMORY__) == FSMC_MEMORY_TYPE_PSRAM)|| \
-
 
52
                                   ((__MEMORY__) == FSMC_MEMORY_TYPE_NOR))
-
 
53
#define IS_FSMC_NORSRAM_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FSMC_NORSRAM_MEM_BUS_WIDTH_8)  || \
-
 
54
                                                ((__WIDTH__) == FSMC_NORSRAM_MEM_BUS_WIDTH_16) || \
-
 
55
                                                ((__WIDTH__) == FSMC_NORSRAM_MEM_BUS_WIDTH_32))
-
 
56
#define IS_FSMC_PAGESIZE(__SIZE__) (((__SIZE__) == FSMC_PAGE_SIZE_NONE) || \
-
 
57
                                   ((__SIZE__) == FSMC_PAGE_SIZE_128) || \
-
 
58
                                   ((__SIZE__) == FSMC_PAGE_SIZE_256) || \
-
 
59
                                   ((__SIZE__) == FSMC_PAGE_SIZE_512) || \
-
 
60
                                   ((__SIZE__) == FSMC_PAGE_SIZE_1024))
-
 
61
#define IS_FSMC_ACCESS_MODE(__MODE__) (((__MODE__) == FSMC_ACCESS_MODE_A) || \
-
 
62
                                      ((__MODE__) == FSMC_ACCESS_MODE_B) || \
-
 
63
                                      ((__MODE__) == FSMC_ACCESS_MODE_C) || \
-
 
64
                                      ((__MODE__) == FSMC_ACCESS_MODE_D))
-
 
65
#define IS_FSMC_BURSTMODE(__STATE__) (((__STATE__) == FSMC_BURST_ACCESS_MODE_DISABLE) || \
-
 
66
                                     ((__STATE__) == FSMC_BURST_ACCESS_MODE_ENABLE))
-
 
67
#define IS_FSMC_WAIT_POLARITY(__POLARITY__) (((__POLARITY__) == FSMC_WAIT_SIGNAL_POLARITY_LOW) || \
-
 
68
                                            ((__POLARITY__) == FSMC_WAIT_SIGNAL_POLARITY_HIGH))
-
 
69
#define IS_FSMC_WRAP_MODE(__MODE__) (((__MODE__) == FSMC_WRAP_MODE_DISABLE) || \
-
 
70
                                             ((__MODE__) == FSMC_WRAP_MODE_ENABLE))
-
 
71
#define IS_FSMC_WAIT_SIGNAL_ACTIVE(__ACTIVE__) (((__ACTIVE__) == FSMC_WAIT_TIMING_BEFORE_WS) || \
-
 
72
                                               ((__ACTIVE__) == FSMC_WAIT_TIMING_DURING_WS))
-
 
73
#define IS_FSMC_WRITE_OPERATION(__OPERATION__) (((__OPERATION__) == FSMC_WRITE_OPERATION_DISABLE) || \
-
 
74
                                               ((__OPERATION__) == FSMC_WRITE_OPERATION_ENABLE))
-
 
75
#define IS_FSMC_WAITE_SIGNAL(__SIGNAL__) (((__SIGNAL__) == FSMC_WAIT_SIGNAL_DISABLE) || \
-
 
76
                                         ((__SIGNAL__) == FSMC_WAIT_SIGNAL_ENABLE))
-
 
77
#define IS_FSMC_EXTENDED_MODE(__MODE__) (((__MODE__) == FSMC_EXTENDED_MODE_DISABLE) || \
-
 
78
                                        ((__MODE__) == FSMC_EXTENDED_MODE_ENABLE))
-
 
79
#define IS_FSMC_ASYNWAIT(__STATE__) (((__STATE__) == FSMC_ASYNCHRONOUS_WAIT_DISABLE) || \
-
 
80
                                    ((__STATE__) == FSMC_ASYNCHRONOUS_WAIT_ENABLE))
-
 
81
#define IS_FSMC_DATA_LATENCY(__LATENCY__) (((__LATENCY__) > 1U) && ((__LATENCY__) <= 17U))
-
 
82
#define IS_FSMC_WRITE_BURST(__BURST__) (((__BURST__) == FSMC_WRITE_BURST_DISABLE) || \
-
 
83
                                       ((__BURST__) == FSMC_WRITE_BURST_ENABLE))
-
 
84
#define IS_FSMC_CONTINOUS_CLOCK(__CCLOCK__) (((__CCLOCK__) == FSMC_CONTINUOUS_CLOCK_SYNC_ONLY) || \
-
 
85
                                            ((__CCLOCK__) == FSMC_CONTINUOUS_CLOCK_SYNC_ASYNC))
-
 
86
#define IS_FSMC_ADDRESS_SETUP_TIME(__TIME__) ((__TIME__) <= 15U)
-
 
87
#define IS_FSMC_ADDRESS_HOLD_TIME(__TIME__) (((__TIME__) > 0U) && ((__TIME__) <= 15U))
-
 
88
#define IS_FSMC_DATASETUP_TIME(__TIME__) (((__TIME__) > 0U) && ((__TIME__) <= 255U))
-
 
89
#define IS_FSMC_DATAHOLD_DURATION(__DATAHOLD__) ((__DATAHOLD__) <= 3U)
-
 
90
#define IS_FSMC_TURNAROUND_TIME(__TIME__) ((__TIME__) <= 15U)
-
 
91
#define IS_FSMC_CLK_DIV(__DIV__) (((__DIV__) > 1U) && ((__DIV__) <= 16U))
-
 
92
#define IS_FSMC_NORSRAM_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_NORSRAM_DEVICE)
-
 
93
#define IS_FSMC_NORSRAM_EXTENDED_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_NORSRAM_EXTENDED_DEVICE)
-
 
94
 
-
 
95
#endif /* FSMC_BANK1 */
-
 
96
#if defined(FSMC_BANK3)
-
 
97
 
-
 
98
#define IS_FSMC_NAND_BANK(__BANK__) ((__BANK__) == FSMC_NAND_BANK3)
-
 
99
#define IS_FSMC_WAIT_FEATURE(__FEATURE__) (((__FEATURE__) == FSMC_NAND_PCC_WAIT_FEATURE_DISABLE) || \
-
 
100
                                                   ((__FEATURE__) == FSMC_NAND_PCC_WAIT_FEATURE_ENABLE))
-
 
101
#define IS_FSMC_NAND_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FSMC_NAND_PCC_MEM_BUS_WIDTH_8) || \
-
 
102
                                                      ((__WIDTH__) == FSMC_NAND_PCC_MEM_BUS_WIDTH_16))
-
 
103
#define IS_FSMC_ECC_STATE(__STATE__) (((__STATE__) == FSMC_NAND_ECC_DISABLE) || \
-
 
104
                                     ((__STATE__) == FSMC_NAND_ECC_ENABLE))
-
 
105
 
-
 
106
#define IS_FSMC_ECCPAGE_SIZE(__SIZE__) (((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_256BYTE)  || \
-
 
107
                                       ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_512BYTE)  || \
-
 
108
                                       ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_1024BYTE) || \
-
 
109
                                       ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_2048BYTE) || \
-
 
110
                                       ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_4096BYTE) || \
-
 
111
                                       ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_8192BYTE))
-
 
112
#define IS_FSMC_TCLR_TIME(__TIME__) ((__TIME__) <= 255U)
-
 
113
#define IS_FSMC_TAR_TIME(__TIME__) ((__TIME__) <= 255U)
-
 
114
#define IS_FSMC_SETUP_TIME(__TIME__) ((__TIME__) <= 254U)
-
 
115
#define IS_FSMC_WAIT_TIME(__TIME__) ((__TIME__) <= 254U)
-
 
116
#define IS_FSMC_HOLD_TIME(__TIME__) ((__TIME__) <= 254U)
-
 
117
#define IS_FSMC_HIZ_TIME(__TIME__) ((__TIME__) <= 254U)
-
 
118
#define IS_FSMC_NAND_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_NAND_DEVICE)
-
 
119
 
-
 
120
#endif /* FSMC_BANK3 */
-
 
121
#if defined(FSMC_BANK4)
-
 
122
#define IS_FSMC_PCCARD_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_PCCARD_DEVICE)
-
 
123
 
-
 
124
#endif /* FSMC_BANK4 */
-
 
125
 
-
 
126
/**
-
 
127
  * @}
-
 
128
  */
57
 
129
 
58
/* Exported typedef ----------------------------------------------------------*/
130
/* Exported typedef ----------------------------------------------------------*/
59
 
131
 
60
/** @defgroup FSMC_NORSRAM_Exported_typedef FSMC Low Layer Exported Types
132
/** @defgroup FSMC_LL_Exported_typedef FSMC Low Layer Exported Types
61
  * @{
133
  * @{
62
  */
134
  */
63
 
135
 
-
 
136
#if defined FSMC_BANK1
-
 
137
#define FSMC_NORSRAM_TypeDef            FSMC_Bank1_TypeDef
-
 
138
#define FSMC_NORSRAM_EXTENDED_TypeDef   FSMC_Bank1E_TypeDef
-
 
139
#endif /* FSMC_BANK1 */
-
 
140
#if defined(FSMC_BANK3)
-
 
141
#define FSMC_NAND_TypeDef               FSMC_Bank2_3_TypeDef
-
 
142
#endif /* FSMC_BANK3 */
-
 
143
#if defined(FSMC_BANK4)
-
 
144
#define FSMC_PCCARD_TypeDef             FSMC_Bank4_TypeDef
-
 
145
#endif /* FSMC_BANK4 */
-
 
146
 
-
 
147
#if defined FSMC_BANK1
-
 
148
#define FSMC_NORSRAM_DEVICE             FSMC_Bank1
-
 
149
#define FSMC_NORSRAM_EXTENDED_DEVICE    FSMC_Bank1E
-
 
150
#endif /* FSMC_BANK1 */
-
 
151
#if defined(FSMC_BANK3)
-
 
152
#define FSMC_NAND_DEVICE                FSMC_Bank2_3
-
 
153
#endif /* FSMC_BANK3 */
-
 
154
#if defined(FSMC_BANK4)
-
 
155
#define FSMC_PCCARD_DEVICE              FSMC_Bank4
-
 
156
#endif /* FSMC_BANK4 */
-
 
157
 
-
 
158
#if defined FSMC_BANK1
64
/**
159
/**
65
  * @brief FSMC NORSRAM Configuration Structure definition
160
  * @brief  FSMC NORSRAM Configuration Structure definition
66
  */
161
  */
67
typedef struct
162
typedef struct
68
{
163
{
69
  uint32_t NSBank;                       /*!< Specifies the NORSRAM memory device that will be used.
164
  uint32_t NSBank;                       /*!< Specifies the NORSRAM memory device that will be used.
70
                                              This parameter can be a value of @ref FSMC_NORSRAM_Bank                     */
165
                                              This parameter can be a value of @ref FSMC_NORSRAM_Bank                     */
Line 112... Line 207...
112
                                              This parameter can be a value of @ref FSMC_AsynchronousWait                 */
207
                                              This parameter can be a value of @ref FSMC_AsynchronousWait                 */
113
 
208
 
114
  uint32_t WriteBurst;                   /*!< Enables or disables the write burst operation.
209
  uint32_t WriteBurst;                   /*!< Enables or disables the write burst operation.
115
                                              This parameter can be a value of @ref FSMC_Write_Burst                      */
210
                                              This parameter can be a value of @ref FSMC_Write_Burst                      */
116
 
211
 
-
 
212
 
-
 
213
  uint32_t PageSize;                     /*!< Specifies the memory page size.
-
 
214
                                              This parameter can be a value of @ref FSMC_Page_Size                        */
117
}FSMC_NORSRAM_InitTypeDef;
215
} FSMC_NORSRAM_InitTypeDef;
118
 
216
 
119
/**
217
/**
120
  * @brief FSMC NORSRAM Timing parameters structure definition
218
  * @brief  FSMC NORSRAM Timing parameters structure definition
121
  */
219
  */
122
typedef struct
220
typedef struct
123
{
221
{
124
  uint32_t AddressSetupTime;             /*!< Defines the number of HCLK cycles to configure
222
  uint32_t AddressSetupTime;             /*!< Defines the number of HCLK cycles to configure
125
                                              the duration of the address setup time.
223
                                              the duration of the address setup time.
Line 154... Line 252...
154
                                              - It is don't care in asynchronous NOR, SRAM or ROM accesses
252
                                              - It is don't care in asynchronous NOR, SRAM or ROM accesses
155
                                              - It may assume a value between Min_Data = 2 and Max_Data = 17 in NOR Flash memories
253
                                              - It may assume a value between Min_Data = 2 and Max_Data = 17 in NOR Flash memories
156
                                                with synchronous burst mode enable                                       */
254
                                                with synchronous burst mode enable                                       */
157
 
255
 
158
  uint32_t AccessMode;                   /*!< Specifies the asynchronous access mode.
256
  uint32_t AccessMode;                   /*!< Specifies the asynchronous access mode.
159
                                              This parameter can be a value of @ref FSMC_Access_Mode                     */
257
                                              This parameter can be a value of @ref FSMC_Access_Mode                      */
160
 
-
 
161
}FSMC_NORSRAM_TimingTypeDef;
258
} FSMC_NORSRAM_TimingTypeDef;
-
 
259
#endif /* FSMC_BANK1 */
162
 
260
 
163
#if (defined(STM32F101xE) || defined(STM32F103xE) || defined(STM32F101xG) || defined(STM32F103xG))
261
#if defined(FSMC_BANK3)
164
/**
262
/**
165
  * @brief FSMC NAND Configuration Structure definition
263
  * @brief  FSMC NAND Configuration Structure definition
166
  */
264
  */
167
typedef struct
265
typedef struct
168
{
266
{
169
  uint32_t NandBank;               /*!< Specifies the NAND memory device that will be used.
267
  uint32_t NandBank;               /*!< Specifies the NAND memory device that will be used.
170
                                        This parameter can be a value of @ref FSMC_NAND_Bank                   */
268
                                        This parameter can be a value of @ref FSMC_NAND_Bank                    */
171
 
269
 
172
  uint32_t Waitfeature;            /*!< Enables or disables the Wait feature for the NAND Memory device.
270
  uint32_t Waitfeature;            /*!< Enables or disables the Wait feature for the NAND Memory device.
173
                                        This parameter can be any value of @ref FSMC_Wait_feature              */
271
                                        This parameter can be any value of @ref FSMC_Wait_feature               */
174
 
272
 
175
  uint32_t MemoryDataWidth;        /*!< Specifies the external memory device width.
273
  uint32_t MemoryDataWidth;        /*!< Specifies the external memory device width.
176
                                        This parameter can be any value of @ref FSMC_NAND_Data_Width           */
274
                                        This parameter can be any value of @ref FSMC_NAND_Data_Width            */
177
 
275
 
178
  uint32_t EccComputation;         /*!< Enables or disables the ECC computation.
276
  uint32_t EccComputation;         /*!< Enables or disables the ECC computation.
179
                                        This parameter can be any value of @ref FSMC_ECC                       */
277
                                        This parameter can be any value of @ref FSMC_ECC                        */
180
 
278
 
181
  uint32_t ECCPageSize;            /*!< Defines the page size for the extended ECC.
279
  uint32_t ECCPageSize;            /*!< Defines the page size for the extended ECC.
182
                                        This parameter can be any value of @ref FSMC_ECC_Page_Size             */
280
                                        This parameter can be any value of @ref FSMC_ECC_Page_Size              */
183
 
281
 
184
  uint32_t TCLRSetupTime;          /*!< Defines the number of HCLK cycles to configure the
282
  uint32_t TCLRSetupTime;          /*!< Defines the number of HCLK cycles to configure the
185
                                        delay between CLE low and RE low.
283
                                        delay between CLE low and RE low.
186
                                        This parameter can be a value between Min_Data = 0 and Max_Data = 255  */
284
                                        This parameter can be a value between Min_Data = 0 and Max_Data = 255  */
187
 
285
 
188
  uint32_t TARSetupTime;           /*!< Defines the number of HCLK cycles to configure the
286
  uint32_t TARSetupTime;           /*!< Defines the number of HCLK cycles to configure the
189
                                        delay between ALE low and RE low.
287
                                        delay between ALE low and RE low.
190
                                        This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
288
                                        This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
-
 
289
} FSMC_NAND_InitTypeDef;
-
 
290
#endif
191
 
291
 
192
}FSMC_NAND_InitTypeDef;
292
#if defined(FSMC_BANK3)||defined(FSMC_BANK4)
193
 
-
 
194
/**
293
/**
195
  * @brief FSMC NAND/PCCARD Timing parameters structure definition
294
  * @brief  FSMC NAND Timing parameters structure definition
196
  */
295
  */
197
typedef struct
296
typedef struct
198
{
297
{
199
  uint32_t SetupTime;            /*!< Defines the number of HCLK cycles to setup address before
298
  uint32_t SetupTime;            /*!< Defines the number of HCLK cycles to setup address before
200
                                      the command assertion for NAND-Flash read or write access
299
                                      the command assertion for NAND-Flash read or write access
201
                                      to common/Attribute or I/O memory space (depending on
300
                                      to common/Attribute or I/O memory space (depending on
202
                                      the memory space timing to be configured).
301
                                      the memory space timing to be configured).
203
                                      This parameter can be a value between Min_Data = 0 and Max_Data = 255    */
302
                                      This parameter can be a value between Min_Data = 0 and Max_Data = 254    */
204
 
303
 
205
  uint32_t WaitSetupTime;        /*!< Defines the minimum number of HCLK cycles to assert the
304
  uint32_t WaitSetupTime;        /*!< Defines the minimum number of HCLK cycles to assert the
206
                                      command for NAND-Flash read or write access to
305
                                      command for NAND-Flash read or write access to
207
                                      common/Attribute or I/O memory space (depending on the
306
                                      common/Attribute or I/O memory space (depending on the
208
                                      memory space timing to be configured).
307
                                      memory space timing to be configured).
209
                                      This parameter can be a number between Min_Data = 0 and Max_Data = 255   */
308
                                      This parameter can be a number between Min_Data = 0 and Max_Data = 254   */
210
 
309
 
211
  uint32_t HoldSetupTime;        /*!< Defines the number of HCLK clock cycles to hold address
310
  uint32_t HoldSetupTime;        /*!< Defines the number of HCLK clock cycles to hold address
212
                                      (and data for write access) after the command de-assertion
311
                                      (and data for write access) after the command de-assertion
213
                                      for NAND-Flash read or write access to common/Attribute
312
                                      for NAND-Flash read or write access to common/Attribute
214
                                      or I/O memory space (depending on the memory space timing
313
                                      or I/O memory space (depending on the memory space timing
215
                                      to be configured).
314
                                      to be configured).
216
                                      This parameter can be a number between Min_Data = 0 and Max_Data = 255   */
315
                                      This parameter can be a number between Min_Data = 0 and Max_Data = 254   */
217
 
316
 
218
  uint32_t HiZSetupTime;         /*!< Defines the number of HCLK clock cycles during which the
317
  uint32_t HiZSetupTime;         /*!< Defines the number of HCLK clock cycles during which the
219
                                      data bus is kept in HiZ after the start of a NAND-Flash
318
                                      data bus is kept in HiZ after the start of a NAND-Flash
220
                                      write access to common/Attribute or I/O memory space (depending
319
                                      write access to common/Attribute or I/O memory space (depending
221
                                      on the memory space timing to be configured).
320
                                      on the memory space timing to be configured).
222
                                      This parameter can be a number between Min_Data = 0 and Max_Data = 255   */
321
                                      This parameter can be a number between Min_Data = 0 and Max_Data = 254   */
223
 
-
 
224
}FSMC_NAND_PCC_TimingTypeDef;
322
} FSMC_NAND_PCC_TimingTypeDef;
-
 
323
#endif /* FSMC_BANK3 */
225
 
324
 
-
 
325
#if defined(FSMC_BANK4)
226
/**
326
/**
227
  * @brief  FSMC NAND Configuration Structure definition
327
  * @brief FSMC PCCARD Configuration Structure definition
228
  */
328
  */
229
typedef struct
329
typedef struct
230
{
330
{
231
  uint32_t Waitfeature;            /*!< Enables or disables the Wait feature for the PCCARD Memory device.
331
  uint32_t Waitfeature;            /*!< Enables or disables the Wait feature for the PCCARD Memory device.
232
                                        This parameter can be any value of @ref FSMC_Wait_feature              */
332
                                        This parameter can be any value of @ref FSMC_Wait_feature      */
233
 
333
 
234
  uint32_t TCLRSetupTime;          /*!< Defines the number of HCLK cycles to configure the
334
  uint32_t TCLRSetupTime;          /*!< Defines the number of HCLK cycles to configure the
235
                                        delay between CLE low and RE low.
335
                                        delay between CLE low and RE low.
236
                                        This parameter can be a value between Min_Data = 0 and Max_Data = 255  */
336
                                        This parameter can be a value between Min_Data = 0 and Max_Data = 255  */
237
 
337
 
238
  uint32_t TARSetupTime;           /*!< Defines the number of HCLK cycles to configure the
338
  uint32_t TARSetupTime;           /*!< Defines the number of HCLK cycles to configure the
239
                                        delay between ALE low and RE low.
339
                                        delay between ALE low and RE low.
240
                                        This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
340
                                        This parameter can be a number between Min_Data = 0 and Max_Data = 255 */
241
 
-
 
242
}FSMC_PCCARD_InitTypeDef;
341
}FSMC_PCCARD_InitTypeDef;
243
#endif /* STM32F101xE || STM32F103xE || STM32F101xG || STM32F103xG */
342
#endif
-
 
343
 
244
/**
344
/**
245
  * @}
345
  * @}
246
  */
346
  */
247
 
347
 
248
/* Exported constants --------------------------------------------------------*/
348
/* Exported constants --------------------------------------------------------*/
249
 
-
 
250
/** @defgroup FSMC_Exported_Constants FSMC Low Layer Exported Constants
349
/** @addtogroup FSMC_LL_Exported_Constants FSMC Low Layer Exported Constants
251
  * @{
350
  * @{
252
  */
351
  */
-
 
352
#if defined FSMC_BANK1
253
 
353
 
254
/** @defgroup FSMC_NORSRAM_Exported_constants FSMC NOR/SRAM Exported constants
354
/** @defgroup FSMC_LL_NOR_SRAM_Controller FSMC NOR/SRAM Controller
255
  * @{
355
  * @{
256
  */
356
  */
-
 
357
 
257
/** @defgroup FSMC_NORSRAM_Bank FSMC NOR/SRAM Bank
358
/** @defgroup FSMC_NORSRAM_Bank FSMC NOR/SRAM Bank
258
  * @{
359
  * @{
259
  */
360
  */
260
#define FSMC_NORSRAM_BANK1                       0x00000000U
361
#define FSMC_NORSRAM_BANK1                       (0x00000000U)
261
#define FSMC_NORSRAM_BANK2                       0x00000002U
362
#define FSMC_NORSRAM_BANK2                       (0x00000002U)
262
#define FSMC_NORSRAM_BANK3                       0x00000004U
363
#define FSMC_NORSRAM_BANK3                       (0x00000004U)
263
#define FSMC_NORSRAM_BANK4                       0x00000006U
364
#define FSMC_NORSRAM_BANK4                       (0x00000006U)
264
/**
365
/**
265
  * @}
366
  * @}
266
  */
367
  */
267
 
368
 
268
/** @defgroup FSMC_Data_Address_Bus_Multiplexing FSMC Data Address Bus Multiplexing
369
/** @defgroup FSMC_Data_Address_Bus_Multiplexing FSMC Data Address Bus Multiplexing
269
  * @{
370
  * @{
270
  */
371
  */
271
#define FSMC_DATA_ADDRESS_MUX_DISABLE            0x00000000U
372
#define FSMC_DATA_ADDRESS_MUX_DISABLE            (0x00000000U)
272
#define FSMC_DATA_ADDRESS_MUX_ENABLE             ((uint32_t)FSMC_BCRx_MUXEN)
373
#define FSMC_DATA_ADDRESS_MUX_ENABLE             (0x00000002U)
273
/**
374
/**
274
  * @}
375
  * @}
275
  */
376
  */
276
 
377
 
277
/** @defgroup FSMC_Memory_Type FSMC Memory Type
378
/** @defgroup FSMC_Memory_Type FSMC Memory Type
278
  * @{
379
  * @{
279
  */
380
  */
280
#define FSMC_MEMORY_TYPE_SRAM                    0x00000000U
381
#define FSMC_MEMORY_TYPE_SRAM                    (0x00000000U)
281
#define FSMC_MEMORY_TYPE_PSRAM                   ((uint32_t)FSMC_BCRx_MTYP_0)
382
#define FSMC_MEMORY_TYPE_PSRAM                   (0x00000004U)
282
#define FSMC_MEMORY_TYPE_NOR                     ((uint32_t)FSMC_BCRx_MTYP_1)
383
#define FSMC_MEMORY_TYPE_NOR                     (0x00000008U)
283
/**
384
/**
284
  * @}
385
  * @}
285
  */
386
  */
286
 
387
 
287
/** @defgroup FSMC_NORSRAM_Data_Width FSMC NOR/SRAM Data Width
388
/** @defgroup FSMC_NORSRAM_Data_Width FSMC NORSRAM Data Width
288
  * @{
389
  * @{
289
  */
390
  */
290
#define FSMC_NORSRAM_MEM_BUS_WIDTH_8             0x00000000U
391
#define FSMC_NORSRAM_MEM_BUS_WIDTH_8             (0x00000000U)
291
#define FSMC_NORSRAM_MEM_BUS_WIDTH_16            ((uint32_t)FSMC_BCRx_MWID_0)
392
#define FSMC_NORSRAM_MEM_BUS_WIDTH_16            (0x00000010U)
292
#define FSMC_NORSRAM_MEM_BUS_WIDTH_32            ((uint32_t)FSMC_BCRx_MWID_1)
393
#define FSMC_NORSRAM_MEM_BUS_WIDTH_32            (0x00000020U)
293
/**
394
/**
294
  * @}
395
  * @}
295
  */
396
  */
296
 
397
 
297
/** @defgroup FSMC_NORSRAM_Flash_Access FSMC NOR/SRAM Flash Access
398
/** @defgroup FSMC_NORSRAM_Flash_Access FSMC NOR/SRAM Flash Access
298
  * @{
399
  * @{
299
  */
400
  */
300
#define FSMC_NORSRAM_FLASH_ACCESS_ENABLE         ((uint32_t)FSMC_BCRx_FACCEN)
401
#define FSMC_NORSRAM_FLASH_ACCESS_ENABLE         (0x00000040U)
301
#define FSMC_NORSRAM_FLASH_ACCESS_DISABLE        0x00000000U
402
#define FSMC_NORSRAM_FLASH_ACCESS_DISABLE        (0x00000000U)
302
/**
403
/**
303
  * @}
404
  * @}
304
  */
405
  */
305
 
406
 
306
/** @defgroup FSMC_Burst_Access_Mode FSMC Burst Access Mode
407
/** @defgroup FSMC_Burst_Access_Mode FSMC Burst Access Mode
307
  * @{
408
  * @{
308
  */
409
  */
309
#define FSMC_BURST_ACCESS_MODE_DISABLE           0x00000000U
410
#define FSMC_BURST_ACCESS_MODE_DISABLE           (0x00000000U)
310
#define FSMC_BURST_ACCESS_MODE_ENABLE            ((uint32_t)FSMC_BCRx_BURSTEN)
411
#define FSMC_BURST_ACCESS_MODE_ENABLE            (0x00000100U)
311
/**
412
/**
312
  * @}
413
  * @}
313
  */
414
  */
314
 
415
 
315
/** @defgroup FSMC_Wait_Signal_Polarity FSMC Wait Signal Polarity
416
/** @defgroup FSMC_Wait_Signal_Polarity FSMC Wait Signal Polarity
316
  * @{
417
  * @{
317
  */
418
  */
318
#define FSMC_WAIT_SIGNAL_POLARITY_LOW            0x00000000U
419
#define FSMC_WAIT_SIGNAL_POLARITY_LOW            (0x00000000U)
319
#define FSMC_WAIT_SIGNAL_POLARITY_HIGH           ((uint32_t)FSMC_BCRx_WAITPOL)
420
#define FSMC_WAIT_SIGNAL_POLARITY_HIGH           (0x00000200U)
320
/**
421
/**
321
  * @}
422
  * @}
322
  */
423
  */
323
 
424
 
324
/** @defgroup FSMC_Wrap_Mode FSMC Wrap Mode
425
/** @defgroup FSMC_Wrap_Mode FSMC Wrap Mode
325
  * @{
426
  * @{
326
  */
427
  */
327
#define FSMC_WRAP_MODE_DISABLE                   0x00000000U
428
#define FSMC_WRAP_MODE_DISABLE                   (0x00000000U)
328
#define FSMC_WRAP_MODE_ENABLE                    ((uint32_t)FSMC_BCRx_WRAPMOD)
429
#define FSMC_WRAP_MODE_ENABLE                    (0x00000400U)
329
/**
430
/**
330
  * @}
431
  * @}
331
  */
432
  */
332
 
433
 
333
/** @defgroup FSMC_Wait_Timing FSMC Wait Timing
434
/** @defgroup FSMC_Wait_Timing FSMC Wait Timing
334
  * @{
435
  * @{
335
  */
436
  */
336
#define FSMC_WAIT_TIMING_BEFORE_WS               0x00000000U
437
#define FSMC_WAIT_TIMING_BEFORE_WS               (0x00000000U)
337
#define FSMC_WAIT_TIMING_DURING_WS               ((uint32_t)FSMC_BCRx_WAITCFG)
438
#define FSMC_WAIT_TIMING_DURING_WS               (0x00000800U)
338
/**
439
/**
339
  * @}
440
  * @}
340
  */
441
  */
341
 
442
 
342
/** @defgroup FSMC_Write_Operation FSMC Write Operation
443
/** @defgroup FSMC_Write_Operation FSMC Write Operation
343
  * @{
444
  * @{
344
  */
445
  */
345
#define FSMC_WRITE_OPERATION_DISABLE             0x00000000U
446
#define FSMC_WRITE_OPERATION_DISABLE             (0x00000000U)
346
#define FSMC_WRITE_OPERATION_ENABLE              ((uint32_t)FSMC_BCRx_WREN)
447
#define FSMC_WRITE_OPERATION_ENABLE              (0x00001000U)
347
/**
448
/**
348
  * @}
449
  * @}
349
  */
450
  */
350
 
451
 
351
/** @defgroup FSMC_Wait_Signal FSMC Wait Signal
452
/** @defgroup FSMC_Wait_Signal FSMC Wait Signal
352
  * @{
453
  * @{
353
  */
454
  */
354
#define FSMC_WAIT_SIGNAL_DISABLE                 0x00000000U
455
#define FSMC_WAIT_SIGNAL_DISABLE                 (0x00000000U)
355
#define FSMC_WAIT_SIGNAL_ENABLE                  ((uint32_t)FSMC_BCRx_WAITEN)
456
#define FSMC_WAIT_SIGNAL_ENABLE                  (0x00002000U)
356
/**
457
/**
357
  * @}
458
  * @}
358
  */
459
  */
359
 
460
 
360
/** @defgroup FSMC_Extended_Mode FSMC Extended Mode
461
/** @defgroup FSMC_Extended_Mode FSMC Extended Mode
361
  * @{
462
  * @{
362
  */
463
  */
363
#define FSMC_EXTENDED_MODE_DISABLE               0x00000000U
464
#define FSMC_EXTENDED_MODE_DISABLE               (0x00000000U)
364
#define FSMC_EXTENDED_MODE_ENABLE                ((uint32_t)FSMC_BCRx_EXTMOD)
465
#define FSMC_EXTENDED_MODE_ENABLE                (0x00004000U)
365
/**
466
/**
366
  * @}
467
  * @}
367
  */
468
  */
368
 
469
 
369
/** @defgroup FSMC_AsynchronousWait FSMC Asynchronous Wait
470
/** @defgroup FSMC_AsynchronousWait FSMC Asynchronous Wait
370
  * @{
471
  * @{
371
  */
472
  */
372
#define FSMC_ASYNCHRONOUS_WAIT_DISABLE           0x00000000U
473
#define FSMC_ASYNCHRONOUS_WAIT_DISABLE           (0x00000000U)
373
#define FSMC_ASYNCHRONOUS_WAIT_ENABLE            ((uint32_t)FSMC_BCRx_ASYNCWAIT)
474
#define FSMC_ASYNCHRONOUS_WAIT_ENABLE            (0x00008000U)
-
 
475
/**
-
 
476
  * @}
-
 
477
  */
-
 
478
 
-
 
479
/** @defgroup FSMC_Page_Size FSMC Page Size
-
 
480
  * @{
-
 
481
  */
-
 
482
#define FSMC_PAGE_SIZE_NONE                      (0x00000000U)
-
 
483
#define FSMC_PAGE_SIZE_128                       (0x00010000U)
-
 
484
#define FSMC_PAGE_SIZE_256                       (0x00020000U)
-
 
485
#define FSMC_PAGE_SIZE_512                       (0x00030000U)
-
 
486
#define FSMC_PAGE_SIZE_1024                      (0x00040000U)
374
/**
487
/**
375
  * @}
488
  * @}
376
  */
489
  */
377
 
490
 
378
/** @defgroup FSMC_Write_Burst FSMC Write Burst
491
/** @defgroup FSMC_Write_Burst FSMC Write Burst
379
  * @{
492
  * @{
380
  */
493
  */
381
#define FSMC_WRITE_BURST_DISABLE                 0x00000000U
494
#define FSMC_WRITE_BURST_DISABLE                 (0x00000000U)
382
#define FSMC_WRITE_BURST_ENABLE                  ((uint32_t)FSMC_BCRx_CBURSTRW)
495
#define FSMC_WRITE_BURST_ENABLE                  (0x00080000U)
-
 
496
/**
-
 
497
  * @}
-
 
498
  */
-
 
499
 
-
 
500
/** @defgroup FSMC_Continous_Clock FSMC Continuous Clock
-
 
501
  * @{
-
 
502
  */
-
 
503
#define FSMC_CONTINUOUS_CLOCK_SYNC_ONLY          (0x00000000U)
-
 
504
#define FSMC_CONTINUOUS_CLOCK_SYNC_ASYNC         (0x00100000U)
383
/**
505
/**
384
  * @}
506
  * @}
385
  */
507
  */
386
 
508
 
387
/** @defgroup FSMC_Access_Mode FSMC Access Mode
509
/** @defgroup FSMC_Access_Mode FSMC Access Mode
388
  * @{
510
  * @{
389
  */
511
  */
390
#define FSMC_ACCESS_MODE_A                        0x00000000U
512
#define FSMC_ACCESS_MODE_A                       (0x00000000U)
391
#define FSMC_ACCESS_MODE_B                        ((uint32_t)FSMC_BTRx_ACCMOD_0)
513
#define FSMC_ACCESS_MODE_B                       (0x10000000U)
392
#define FSMC_ACCESS_MODE_C                        ((uint32_t)FSMC_BTRx_ACCMOD_1)
514
#define FSMC_ACCESS_MODE_C                       (0x20000000U)
393
#define FSMC_ACCESS_MODE_D                        ((uint32_t)(FSMC_BTRx_ACCMOD_0 | FSMC_BTRx_ACCMOD_1))
515
#define FSMC_ACCESS_MODE_D                       (0x30000000U)
394
/**
516
/**
395
  * @}
517
  * @}
396
  */
518
  */
397
 
519
 
398
/**
520
/**
399
  * @}
521
  * @}
400
  */
522
  */
-
 
523
#endif /* FSMC_BANK1 */
-
 
524
 
-
 
525
#if defined(FSMC_BANK3)||defined(FSMC_BANK4)
401
 
526
 
402
#if (defined(STM32F101xE) || defined(STM32F103xE) || defined(STM32F101xG) || defined(STM32F103xG))
-
 
403
/** @defgroup FSMC_NAND_Controller FSMC NAND and PCCARD Controller
527
/** @defgroup FSMC_LL_NAND_Controller FSMC NAND Controller
404
  * @{
528
  * @{
405
  */
529
  */
406
/** @defgroup FSMC_NAND_Bank FSMC NAND Bank
530
/** @defgroup FSMC_NAND_Bank FSMC NAND Bank
407
  * @{
531
  * @{
408
  */
532
  */
409
#define FSMC_NAND_BANK2                          0x00000010U
533
#define FSMC_NAND_BANK2                          (0x00000010U)
410
#define FSMC_NAND_BANK3                          0x00000100U
534
#define FSMC_NAND_BANK3                          (0x00000100U)
411
/**
535
/**
412
  * @}
536
  * @}
413
  */
537
  */
414
 
538
 
415
/** @defgroup FSMC_Wait_feature FSMC Wait feature
539
/** @defgroup FSMC_Wait_feature FSMC Wait feature
416
  * @{
540
  * @{
417
  */
541
  */
418
#define FSMC_NAND_PCC_WAIT_FEATURE_DISABLE           0x00000000U
542
#define FSMC_NAND_PCC_WAIT_FEATURE_DISABLE       (0x00000000U)
419
#define FSMC_NAND_PCC_WAIT_FEATURE_ENABLE            ((uint32_t)FSMC_PCRx_PWAITEN)
543
#define FSMC_NAND_PCC_WAIT_FEATURE_ENABLE        (0x00000002U)
420
/**
544
/**
421
  * @}
545
  * @}
422
  */
546
  */
423
 
547
 
424
/** @defgroup FSMC_PCR_Memory_Type FSMC PCR Memory Type
548
/** @defgroup FSMC_PCR_Memory_Type FSMC PCR Memory Type
425
  * @{
549
  * @{
426
  */
550
  */
-
 
551
#if defined(FSMC_BANK4)
427
#define FSMC_PCR_MEMORY_TYPE_PCCARD        0x00000000U
552
#define FSMC_PCR_MEMORY_TYPE_PCCARD              (0x00000000U)
-
 
553
#endif
428
#define FSMC_PCR_MEMORY_TYPE_NAND          ((uint32_t)FSMC_PCRx_PTYP)
554
#define FSMC_PCR_MEMORY_TYPE_NAND                (0x00000008U)
429
/**
555
/**
430
  * @}
556
  * @}
431
  */
557
  */
432
 
558
 
433
/** @defgroup FSMC_NAND_Data_Width FSMC NAND Data Width
559
/** @defgroup FSMC_NAND_Data_Width FSMC NAND Data Width
434
  * @{
560
  * @{
435
  */
561
  */
436
#define FSMC_NAND_PCC_MEM_BUS_WIDTH_8                0x00000000U
562
#define FSMC_NAND_PCC_MEM_BUS_WIDTH_8            (0x00000000U)
437
#define FSMC_NAND_PCC_MEM_BUS_WIDTH_16               ((uint32_t)FSMC_PCRx_PWID_0)
563
#define FSMC_NAND_PCC_MEM_BUS_WIDTH_16           (0x00000010U)
438
/**
564
/**
439
  * @}
565
  * @}
440
  */
566
  */
441
 
567
 
442
/** @defgroup FSMC_ECC FSMC NAND ECC
568
/** @defgroup FSMC_ECC FSMC ECC
443
  * @{
569
  * @{
444
  */
570
  */
445
#define FSMC_NAND_ECC_DISABLE                    0x00000000U
571
#define FSMC_NAND_ECC_DISABLE                    (0x00000000U)
446
#define FSMC_NAND_ECC_ENABLE                     ((uint32_t)FSMC_PCRx_ECCEN)
572
#define FSMC_NAND_ECC_ENABLE                     (0x00000040U)
447
/**
573
/**
448
  * @}
574
  * @}
449
  */
575
  */
450
 
576
 
451
/** @defgroup FSMC_ECC_Page_Size FSMC ECC Page Size
577
/** @defgroup FSMC_ECC_Page_Size FSMC ECC Page Size
452
  * @{
578
  * @{
453
  */
579
  */
454
#define FSMC_NAND_ECC_PAGE_SIZE_256BYTE          0x00000000U
580
#define FSMC_NAND_ECC_PAGE_SIZE_256BYTE          (0x00000000U)
455
#define FSMC_NAND_ECC_PAGE_SIZE_512BYTE          ((uint32_t)FSMC_PCRx_ECCPS_0)
581
#define FSMC_NAND_ECC_PAGE_SIZE_512BYTE          (0x00020000U)
456
#define FSMC_NAND_ECC_PAGE_SIZE_1024BYTE         ((uint32_t)FSMC_PCRx_ECCPS_1)
582
#define FSMC_NAND_ECC_PAGE_SIZE_1024BYTE         (0x00040000U)
457
#define FSMC_NAND_ECC_PAGE_SIZE_2048BYTE         ((uint32_t)FSMC_PCRx_ECCPS_0|FSMC_PCRx_ECCPS_1)
583
#define FSMC_NAND_ECC_PAGE_SIZE_2048BYTE         (0x00060000U)
458
#define FSMC_NAND_ECC_PAGE_SIZE_4096BYTE         ((uint32_t)FSMC_PCRx_ECCPS_2)
584
#define FSMC_NAND_ECC_PAGE_SIZE_4096BYTE         (0x00080000U)
459
#define FSMC_NAND_ECC_PAGE_SIZE_8192BYTE         ((uint32_t)FSMC_PCRx_ECCPS_0|FSMC_PCRx_ECCPS_2)
585
#define FSMC_NAND_ECC_PAGE_SIZE_8192BYTE         (0x000A0000U)
460
/**
586
/**
461
  * @}
587
  * @}
462
  */
588
  */
463
 
589
 
464
/**
590
/**
465
  * @}
591
  * @}
466
  */
592
  */
467
#endif /* STM32F101xE || STM32F103xE || STM32F101xG || STM32F103xG */
593
#endif /* FSMC_BANK3 */
468
 
594
 
-
 
595
 
469
/** @defgroup FSMC_LL_Interrupt_definition FSMC Interrupt definition
596
/** @defgroup FSMC_LL_Interrupt_definition FSMC Low Layer Interrupt definition
470
  * @brief FSMC Interrupt definition
-
 
471
  * @{
597
  * @{
472
  */
598
  */
-
 
599
#if defined(FSMC_BANK3)||defined(FSMC_BANK4)
473
#define FSMC_IT_RISING_EDGE                ((uint32_t)FSMC_SRx_IREN)
600
#define FSMC_IT_RISING_EDGE                      (0x00000008U)
474
#define FSMC_IT_LEVEL                      ((uint32_t)FSMC_SRx_ILEN)
601
#define FSMC_IT_LEVEL                            (0x00000010U)
475
#define FSMC_IT_FALLING_EDGE               ((uint32_t)FSMC_SRx_IFEN)
602
#define FSMC_IT_FALLING_EDGE                     (0x00000020U)
-
 
603
#endif /* FSMC_BANK3 */
476
/**
604
/**
477
  * @}
605
  * @}
478
  */
606
  */
479
 
607
 
480
/** @defgroup FSMC_LL_Flag_definition FSMC Flag definition
608
/** @defgroup FSMC_LL_Flag_definition FSMC Low Layer Flag definition
481
  * @brief FSMC Flag definition
-
 
482
  * @{
609
  * @{
483
  */
610
  */
-
 
611
#if defined(FSMC_BANK3)||defined(FSMC_BANK4)
484
#define FSMC_FLAG_RISING_EDGE                    ((uint32_t)FSMC_SRx_IRS)
612
#define FSMC_FLAG_RISING_EDGE                    (0x00000001U)
485
#define FSMC_FLAG_LEVEL                          ((uint32_t)FSMC_SRx_ILS)
613
#define FSMC_FLAG_LEVEL                          (0x00000002U)
486
#define FSMC_FLAG_FALLING_EDGE                   ((uint32_t)FSMC_SRx_IFS)
614
#define FSMC_FLAG_FALLING_EDGE                   (0x00000004U)
487
#define FSMC_FLAG_FEMPT                          ((uint32_t)FSMC_SRx_FEMPT)
615
#define FSMC_FLAG_FEMPT                          (0x00000040U)
-
 
616
#endif /* FSMC_BANK3 */
488
/**
617
/**
489
  * @}
618
  * @}
490
  */
619
  */
491
 
620
 
492
/** @defgroup FSMC_LL_Alias_definition  FSMC Alias definition
-
 
493
  * @{
-
 
494
  */
-
 
495
#define FSMC_NORSRAM_TypeDef            FSMC_Bank1_TypeDef
-
 
496
#define FSMC_NORSRAM_EXTENDED_TypeDef   FSMC_Bank1E_TypeDef
-
 
497
#define FSMC_NAND_TypeDef               FSMC_Bank2_3_TypeDef
-
 
498
#define FSMC_PCCARD_TypeDef             FSMC_Bank4_TypeDef
-
 
499
 
-
 
500
#define FSMC_NORSRAM_DEVICE             FSMC_Bank1
-
 
501
#define FSMC_NORSRAM_EXTENDED_DEVICE    FSMC_Bank1E
-
 
502
#define FSMC_NAND_DEVICE                FSMC_Bank2_3
-
 
503
#define FSMC_PCCARD_DEVICE              FSMC_Bank4
-
 
504
/**
621
/**
505
  * @}
622
  * @}
506
  */
623
  */
507
 
624
 
508
/**
625
/**
509
  * @}
626
  * @}
510
  */
627
  */
511
 
628
 
512
/* Exported macro ------------------------------------------------------------*/
629
/* Private macro -------------------------------------------------------------*/
513
/** @defgroup FSMC_Exported_Macros FSMC Low Layer Exported Macros
630
/** @defgroup FSMC_LL_Private_Macros FSMC_LL  Private Macros
514
  * @{
631
  * @{
515
  */
632
  */
516
 
-
 
-
 
633
#if defined FSMC_BANK1
517
/** @defgroup FSMC_LL_NOR_Macros FSMC NOR/SRAM Exported Macros
634
/** @defgroup FSMC_LL_NOR_Macros FSMC NOR/SRAM Macros
518
  *  @brief macros to handle NOR device enable/disable and read/write operations
635
  * @brief macros to handle NOR device enable/disable and read/write operations
519
  *  @{
636
  * @{
520
  */
637
  */
521
 
638
 
522
/**
639
/**
523
  * @brief  Enable the NORSRAM device access.
640
  * @brief  Enable the NORSRAM device access.
524
  * @param  __INSTANCE__: FSMC_NORSRAM Instance
641
  * @param  __INSTANCE__ FSMC_NORSRAM Instance
525
  * @param  __BANK__: FSMC_NORSRAM Bank
642
  * @param  __BANK__ FSMC_NORSRAM Bank
526
  * @retval none
643
  * @retval None
527
  */
644
  */
528
#define __FSMC_NORSRAM_ENABLE(__INSTANCE__, __BANK__)  SET_BIT((__INSTANCE__)->BTCR[(__BANK__)], FSMC_BCRx_MBKEN)
645
#define __FSMC_NORSRAM_ENABLE(__INSTANCE__, __BANK__)  ((__INSTANCE__)->BTCR[(__BANK__)]\
-
 
646
                                                       |= FSMC_BCRx_MBKEN)
529
 
647
 
530
/**
648
/**
531
  * @brief  Disable the NORSRAM device access.
649
  * @brief  Disable the NORSRAM device access.
532
  * @param  __INSTANCE__: FSMC_NORSRAM Instance
650
  * @param  __INSTANCE__ FSMC_NORSRAM Instance
533
  * @param  __BANK__: FSMC_NORSRAM Bank
651
  * @param  __BANK__ FSMC_NORSRAM Bank
534
  * @retval none
652
  * @retval None
535
  */
653
  */
536
#define __FSMC_NORSRAM_DISABLE(__INSTANCE__, __BANK__) CLEAR_BIT((__INSTANCE__)->BTCR[(__BANK__)], FSMC_BCRx_MBKEN)
654
#define __FSMC_NORSRAM_DISABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->BTCR[(__BANK__)]\
-
 
655
                                                       &= ~FSMC_BCRx_MBKEN)
537
 
656
 
538
/**
657
/**
539
  * @}
658
  * @}
540
  */
659
  */
-
 
660
#endif /* FSMC_BANK1 */
541
 
661
 
542
#if (defined(STM32F101xE) || defined(STM32F103xE) || defined(STM32F101xG) || defined(STM32F103xG))
662
#if defined(FSMC_BANK3)
543
/** @defgroup FSMC_LL_NAND_Macros FSMC NAND Macros
663
/** @defgroup FSMC_LL_NAND_Macros FSMC NAND Macros
544
  *  @brief macros to handle NAND device enable/disable
664
  *  @brief macros to handle NAND device enable/disable
545
  *  @{
665
  *  @{
546
  */
666
  */
547
 
667
 
548
/**
668
/**
549
  * @brief  Enable the NAND device access.
669
  * @brief  Enable the NAND device access.
550
  * @param  __INSTANCE__: FSMC_NAND Instance
670
  * @param  __INSTANCE__ FSMC_NAND Instance
551
  * @param  __BANK__: FSMC_NAND Bank
671
  * @param  __BANK__     FSMC_NAND Bank
552
  * @retval None
672
  * @retval None
553
  */
673
  */
554
#define __FSMC_NAND_ENABLE(__INSTANCE__, __BANK__)  (((__BANK__) == FSMC_NAND_BANK2)? SET_BIT((__INSTANCE__)->PCR2, FSMC_PCRx_PBKEN): \
674
#define __FSMC_NAND_ENABLE(__INSTANCE__, __BANK__)  (((__BANK__) == FSMC_NAND_BANK2)? ((__INSTANCE__)->PCR2 |= FSMC_PCRx_PBKEN): \
555
                                                                                      SET_BIT((__INSTANCE__)->PCR3, FSMC_PCRx_PBKEN))
675
                                                             ((__INSTANCE__)->PCR3 |= FSMC_PCRx_PBKEN))
556
 
676
 
557
/**
677
/**
558
  * @brief  Disable the NAND device access.
678
  * @brief  Disable the NAND device access.
559
  * @param  __INSTANCE__: FSMC_NAND Instance
679
  * @param  __INSTANCE__ FSMC_NAND Instance
560
  * @param  __BANK__: FSMC_NAND Bank
680
  * @param  __BANK__     FSMC_NAND Bank
561
  * @retval None
681
  * @retval None
562
  */
682
  */
563
#define __FSMC_NAND_DISABLE(__INSTANCE__, __BANK__) (((__BANK__) == FSMC_NAND_BANK2)? CLEAR_BIT((__INSTANCE__)->PCR2, FSMC_PCRx_PBKEN): \
683
#define __FSMC_NAND_DISABLE(__INSTANCE__, __BANK__) (((__BANK__) == FSMC_NAND_BANK2)? CLEAR_BIT((__INSTANCE__)->PCR2, FSMC_PCRx_PBKEN): \
564
                                                                                      CLEAR_BIT((__INSTANCE__)->PCR3, FSMC_PCRx_PBKEN))
684
                                                             CLEAR_BIT((__INSTANCE__)->PCR3, FSMC_PCRx_PBKEN))
-
 
685
 
565
/**
686
/**
566
  * @}
687
  * @}
567
  */
688
  */
-
 
689
#endif
568
 
690
 
-
 
691
#if defined(FSMC_BANK4)
569
/** @defgroup FSMC_LL_PCCARD_Macros FSMC PCCARD Macros
692
/** @defgroup FSMC_LL_PCCARD_Macros FMC PCCARD Macros
570
  *  @brief macros to handle PCCARD read/write operations
693
  *  @brief macros to handle PCCARD read/write operations
571
  *  @{
694
  *  @{
572
  */
695
  */
573
/**
696
/**
574
  * @brief  Enable the PCCARD device access.
697
  * @brief  Enable the PCCARD device access.
575
  * @param  __INSTANCE__: FSMC_PCCARD Instance
698
  * @param  __INSTANCE__ FSMC_PCCARD Instance
576
  * @retval None
699
  * @retval None
577
  */
700
  */
578
#define __FSMC_PCCARD_ENABLE(__INSTANCE__)  SET_BIT((__INSTANCE__)->PCR4, FSMC_PCRx_PBKEN)
701
#define __FSMC_PCCARD_ENABLE(__INSTANCE__)  ((__INSTANCE__)->PCR4 |= FSMC_PCRx_PBKEN)
579
 
702
 
580
/**
703
/**
581
  * @brief  Disable the PCCARD device access.
704
  * @brief  Disable the PCCARD device access.
582
  * @param  __INSTANCE__: FSMC_PCCARD Instance
705
  * @param  __INSTANCE__ FSMC_PCCARD Instance
583
  * @retval None
706
  * @retval None
584
  */
707
  */
585
#define __FSMC_PCCARD_DISABLE(__INSTANCE__) CLEAR_BIT((__INSTANCE__)->PCR4, FSMC_PCRx_PBKEN)
708
#define __FSMC_PCCARD_DISABLE(__INSTANCE__) ((__INSTANCE__)->PCR4 &= ~FSMC_PCRx_PBKEN)
586
/**
709
/**
587
  * @}
710
  * @}
588
  */
711
  */
589
 
712
 
-
 
713
#endif
-
 
714
#if defined(FSMC_BANK3)
590
/** @defgroup FSMC_LL_Flag_Interrupt_Macros FSMC Flag&Interrupt Macros
715
/** @defgroup FSMC_LL_NAND_Interrupt FSMC NAND Interrupt
591
  *  @brief macros to handle FSMC flags and interrupts
716
  * @brief macros to handle NAND interrupts
592
  * @{
717
  * @{
593
  */
718
  */
594
 
719
 
595
/**
720
/**
596
  * @brief  Enable the NAND device interrupt.
721
  * @brief  Enable the NAND device interrupt.
597
  * @param  __INSTANCE__: FSMC_NAND Instance
722
  * @param  __INSTANCE__  FSMC_NAND instance
598
  * @param  __BANK__: FSMC_NAND Bank
723
  * @param  __BANK__     FSMC_NAND Bank
599
  * @param  __INTERRUPT__: FSMC_NAND interrupt
724
  * @param  __INTERRUPT__ FSMC_NAND interrupt
600
  *         This parameter can be any combination of the following values:
725
  *         This parameter can be any combination of the following values:
601
  *            @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
726
  *            @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
602
  *            @arg FSMC_IT_LEVEL: Interrupt level.
727
  *            @arg FSMC_IT_LEVEL: Interrupt level.
603
  *            @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
728
  *            @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
604
  * @retval None
729
  * @retval None
605
  */
730
  */
606
#define __FSMC_NAND_ENABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__)  (((__BANK__) == FSMC_NAND_BANK2)? SET_BIT((__INSTANCE__)->SR2, (__INTERRUPT__)): \
731
#define __FSMC_NAND_ENABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__)  (((__BANK__) == FSMC_NAND_BANK2)? ((__INSTANCE__)->SR2 |= (__INTERRUPT__)): \
607
                                                                                                        SET_BIT((__INSTANCE__)->SR3, (__INTERRUPT__)))
732
                                                                               ((__INSTANCE__)->SR3 |= (__INTERRUPT__)))
608
 
733
 
609
/**
734
/**
610
  * @brief  Disable the NAND device interrupt.
735
  * @brief  Disable the NAND device interrupt.
611
  * @param  __INSTANCE__: FSMC_NAND Instance
736
  * @param  __INSTANCE__  FSMC_NAND Instance
612
  * @param  __BANK__: FSMC_NAND Bank
737
  * @param  __BANK__     FSMC_NAND Bank
613
  * @param  __INTERRUPT__: FSMC_NAND interrupt
738
  * @param  __INTERRUPT__ FSMC_NAND interrupt
614
  *         This parameter can be any combination of the following values:
739
  *         This parameter can be any combination of the following values:
615
  *            @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
740
  *            @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
616
  *            @arg FSMC_IT_LEVEL: Interrupt level.
741
  *            @arg FSMC_IT_LEVEL: Interrupt level.
617
  *            @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
742
  *            @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
618
  * @retval None
743
  * @retval None
619
  */
744
  */
620
#define __FSMC_NAND_DISABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__)  (((__BANK__) == FSMC_NAND_BANK2)? CLEAR_BIT((__INSTANCE__)->SR2, (__INTERRUPT__)): \
745
#define __FSMC_NAND_DISABLE_IT(__INSTANCE__, __BANK__, __INTERRUPT__)  (((__BANK__) == FSMC_NAND_BANK2)? ((__INSTANCE__)->SR2 &= ~(__INTERRUPT__)): \
621
                                                                                                         CLEAR_BIT((__INSTANCE__)->SR3, (__INTERRUPT__)))
746
                                                                                ((__INSTANCE__)->SR3 &= ~(__INTERRUPT__)))
622
 
747
 
623
/**
748
/**
624
  * @brief  Get flag status of the NAND device.
749
  * @brief  Get flag status of the NAND device.
625
  * @param  __INSTANCE__: FSMC_NAND Instance
750
  * @param  __INSTANCE__ FSMC_NAND Instance
626
  * @param  __BANK__    : FSMC_NAND Bank
751
  * @param  __BANK__     FSMC_NAND Bank
627
  * @param  __FLAG__    : FSMC_NAND flag
752
  * @param  __FLAG__     FSMC_NAND flag
628
  *         This parameter can be any combination of the following values:
753
  *         This parameter can be any combination of the following values:
629
  *            @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
754
  *            @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
630
  *            @arg FSMC_FLAG_LEVEL: Interrupt level edge flag.
755
  *            @arg FSMC_FLAG_LEVEL: Interrupt level edge flag.
631
  *            @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
756
  *            @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
632
  *            @arg FSMC_FLAG_FEMPT: FIFO empty flag.
757
  *            @arg FSMC_FLAG_FEMPT: FIFO empty flag.
633
  * @retval The state of FLAG (SET or RESET).
758
  * @retval The state of FLAG (SET or RESET).
634
  */
759
  */
635
#define __FSMC_NAND_GET_FLAG(__INSTANCE__, __BANK__, __FLAG__)  (((__BANK__) == FSMC_NAND_BANK2)? (((__INSTANCE__)->SR2 &(__FLAG__)) == (__FLAG__)): \
760
#define __FSMC_NAND_GET_FLAG(__INSTANCE__, __BANK__, __FLAG__)  (((__BANK__) == FSMC_NAND_BANK2)? (((__INSTANCE__)->SR2 &(__FLAG__)) == (__FLAG__)): \
636
                                                                                                   (((__INSTANCE__)->SR3 &(__FLAG__)) == (__FLAG__)))
761
                                                                         (((__INSTANCE__)->SR3 &(__FLAG__)) == (__FLAG__)))
-
 
762
 
637
/**
763
/**
638
  * @brief  Clear flag status of the NAND device.
764
  * @brief  Clear flag status of the NAND device.
639
  * @param  __INSTANCE__: FSMC_NAND Instance
765
  * @param  __INSTANCE__ FSMC_NAND Instance
640
  * @param  __BANK__: FSMC_NAND Bank
766
  * @param  __BANK__     FSMC_NAND Bank
641
  * @param  __FLAG__: FSMC_NAND flag
767
  * @param  __FLAG__     FSMC_NAND flag
642
  *         This parameter can be any combination of the following values:
768
  *         This parameter can be any combination of the following values:
643
  *            @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
769
  *            @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
644
  *            @arg FSMC_FLAG_LEVEL: Interrupt level edge flag.
770
  *            @arg FSMC_FLAG_LEVEL: Interrupt level edge flag.
645
  *            @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
771
  *            @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
646
  *            @arg FSMC_FLAG_FEMPT: FIFO empty flag.
772
  *            @arg FSMC_FLAG_FEMPT: FIFO empty flag.
647
  * @retval None
773
  * @retval None
648
  */
774
  */
649
#define __FSMC_NAND_CLEAR_FLAG(__INSTANCE__, __BANK__, __FLAG__)  (((__BANK__) == FSMC_NAND_BANK2)? CLEAR_BIT((__INSTANCE__)->SR2, (__FLAG__)): \
775
#define __FSMC_NAND_CLEAR_FLAG(__INSTANCE__, __BANK__, __FLAG__)  (((__BANK__) == FSMC_NAND_BANK2)? ((__INSTANCE__)->SR2 &= ~(__FLAG__)): \
650
                                                                                                    CLEAR_BIT((__INSTANCE__)->SR3, (__FLAG__)))
776
                                                                           ((__INSTANCE__)->SR3 &= ~(__FLAG__)))
-
 
777
 
-
 
778
/**
-
 
779
  * @}
-
 
780
  */
-
 
781
#endif /* FSMC_BANK3 */
-
 
782
 
-
 
783
#if defined(FSMC_BANK4)
-
 
784
/** @defgroup FSMC_LL_PCCARD_Interrupt FSMC PCCARD Interrupt
-
 
785
  * @brief macros to handle PCCARD interrupts
-
 
786
  * @{
-
 
787
  */
651
 
788
 
652
/**
789
/**
653
  * @brief  Enable the PCCARD device interrupt.
790
  * @brief  Enable the PCCARD device interrupt.
654
  * @param  __INSTANCE__: FSMC_PCCARD Instance
791
  * @param  __INSTANCE__ FSMC_PCCARD instance
655
  * @param  __INTERRUPT__: FSMC_PCCARD interrupt
792
  * @param  __INTERRUPT__ FSMC_PCCARD interrupt
656
  *         This parameter can be any combination of the following values:
793
  *         This parameter can be any combination of the following values:
657
  *            @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
794
  *            @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
658
  *            @arg FSMC_IT_LEVEL: Interrupt level.
795
  *            @arg FSMC_IT_LEVEL: Interrupt level.
659
  *            @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
796
  *            @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
660
  * @retval None
797
  * @retval None
661
  */
798
  */
662
#define __FSMC_PCCARD_ENABLE_IT(__INSTANCE__, __INTERRUPT__)  SET_BIT((__INSTANCE__)->SR4, (__INTERRUPT__))
799
#define __FSMC_PCCARD_ENABLE_IT(__INSTANCE__, __INTERRUPT__)  ((__INSTANCE__)->SR4 |= (__INTERRUPT__))
663
 
800
 
664
/**
801
/**
665
  * @brief  Disable the PCCARD device interrupt.
802
  * @brief  Disable the PCCARD device interrupt.
666
  * @param  __INSTANCE__: FSMC_PCCARD Instance
803
  * @param  __INSTANCE__ FSMC_PCCARD instance
667
  * @param  __INTERRUPT__: FSMC_PCCARD interrupt
804
  * @param  __INTERRUPT__ FSMC_PCCARD interrupt
668
  *         This parameter can be any combination of the following values:
805
  *         This parameter can be any combination of the following values:
669
  *            @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
806
  *            @arg FSMC_IT_RISING_EDGE: Interrupt rising edge.
670
  *            @arg FSMC_IT_LEVEL: Interrupt level.
807
  *            @arg FSMC_IT_LEVEL: Interrupt level.
671
  *            @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
808
  *            @arg FSMC_IT_FALLING_EDGE: Interrupt falling edge.
672
  * @retval None
809
  * @retval None
673
  */
810
  */
674
#define __FSMC_PCCARD_DISABLE_IT(__INSTANCE__, __INTERRUPT__)  CLEAR_BIT((__INSTANCE__)->SR4, (__INTERRUPT__))
811
#define __FSMC_PCCARD_DISABLE_IT(__INSTANCE__, __INTERRUPT__)  ((__INSTANCE__)->SR4 &= ~(__INTERRUPT__))
675
 
812
 
676
/**
813
/**
677
  * @brief  Get flag status of the PCCARD device.
814
  * @brief  Get flag status of the PCCARD device.
678
  * @param  __INSTANCE__: FSMC_PCCARD Instance
815
  * @param  __INSTANCE__ FSMC_PCCARD instance
679
  * @param  __FLAG__: FSMC_PCCARD flag
816
  * @param  __FLAG__ FSMC_PCCARD flag
680
  *         This parameter can be any combination of the following values:
817
  *         This parameter can be any combination of the following values:
681
  *            @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
818
  *            @arg  FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
682
  *            @arg FSMC_FLAG_LEVEL: Interrupt level edge flag.
819
  *            @arg  FSMC_FLAG_LEVEL: Interrupt level edge flag.
683
  *            @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
820
  *            @arg  FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
684
  *            @arg FSMC_FLAG_FEMPT: FIFO empty flag.
821
  *            @arg  FSMC_FLAG_FEMPT: FIFO empty flag.
685
  * @retval The state of FLAG (SET or RESET).
822
  * @retval The state of FLAG (SET or RESET).
686
  */
823
  */
687
#define __FSMC_PCCARD_GET_FLAG(__INSTANCE__, __FLAG__)  (((__INSTANCE__)->SR4 &(__FLAG__)) == (__FLAG__))
824
#define __FSMC_PCCARD_GET_FLAG(__INSTANCE__, __FLAG__)  (((__INSTANCE__)->SR4 &(__FLAG__)) == (__FLAG__))
688
 
825
 
689
/**
826
/**
690
  * @brief  Clear flag status of the PCCARD device.
827
  * @brief  Clear flag status of the PCCARD device.
691
  * @param  __INSTANCE__: FSMC_PCCARD Instance
828
  * @param  __INSTANCE__ FSMC_PCCARD instance
692
  * @param  __FLAG__: FSMC_PCCARD flag
829
  * @param  __FLAG__ FSMC_PCCARD flag
693
  *         This parameter can be any combination of the following values:
830
  *         This parameter can be any combination of the following values:
694
  *            @arg FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
831
  *            @arg  FSMC_FLAG_RISING_EDGE: Interrupt rising edge flag.
695
  *            @arg FSMC_FLAG_LEVEL: Interrupt level edge flag.
832
  *            @arg  FSMC_FLAG_LEVEL: Interrupt level edge flag.
696
  *            @arg FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
833
  *            @arg  FSMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.
697
  *            @arg FSMC_FLAG_FEMPT: FIFO empty flag.
834
  *            @arg  FSMC_FLAG_FEMPT: FIFO empty flag.
698
  * @retval None
835
  * @retval None
699
  */
836
  */
700
#define __FSMC_PCCARD_CLEAR_FLAG(__INSTANCE__, __FLAG__)  CLEAR_BIT((__INSTANCE__)->SR4, (__FLAG__))
837
#define __FSMC_PCCARD_CLEAR_FLAG(__INSTANCE__, __FLAG__)  ((__INSTANCE__)->SR4 &= ~(__FLAG__))
701
 
-
 
702
/**
-
 
703
  * @}
-
 
704
  */
-
 
705
#endif /* STM32F101xE || STM32F103xE || STM32F101xG || STM32F103xG */
-
 
706
 
-
 
707
/**
-
 
708
  * @}
-
 
709
  */
-
 
710
 
-
 
711
/** @defgroup FSMC_LL_Private_Macros FSMC Low Layer Private Macros
-
 
712
  * @{
-
 
713
  */
-
 
714
#define IS_FSMC_NORSRAM_BANK(__BANK__) (((__BANK__) == FSMC_NORSRAM_BANK1) || \
-
 
715
                                        ((__BANK__) == FSMC_NORSRAM_BANK2) || \
-
 
716
                                        ((__BANK__) == FSMC_NORSRAM_BANK3) || \
-
 
717
                                        ((__BANK__) == FSMC_NORSRAM_BANK4))
-
 
718
 
-
 
719
#define IS_FSMC_MUX(__MUX__) (((__MUX__) == FSMC_DATA_ADDRESS_MUX_DISABLE) || \
-
 
720
                              ((__MUX__) == FSMC_DATA_ADDRESS_MUX_ENABLE))
-
 
721
 
-
 
722
#define IS_FSMC_MEMORY(__MEMORY__) (((__MEMORY__) == FSMC_MEMORY_TYPE_SRAM) || \
-
 
723
                                    ((__MEMORY__) == FSMC_MEMORY_TYPE_PSRAM)|| \
-
 
724
                                    ((__MEMORY__) == FSMC_MEMORY_TYPE_NOR))
-
 
725
 
-
 
726
#define IS_FSMC_NORSRAM_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FSMC_NORSRAM_MEM_BUS_WIDTH_8)  || \
-
 
727
                                                 ((__WIDTH__) == FSMC_NORSRAM_MEM_BUS_WIDTH_16) || \
-
 
728
                                                 ((__WIDTH__) == FSMC_NORSRAM_MEM_BUS_WIDTH_32))
-
 
729
 
-
 
730
#define IS_FSMC_WRITE_BURST(__BURST__)          (((__BURST__) == FSMC_WRITE_BURST_DISABLE) || \
-
 
731
                                                 ((__BURST__) == FSMC_WRITE_BURST_ENABLE))
-
 
732
 
-
 
733
#define IS_FSMC_ACCESS_MODE(__MODE__) (((__MODE__) == FSMC_ACCESS_MODE_A) || \
-
 
734
                                       ((__MODE__) == FSMC_ACCESS_MODE_B) || \
-
 
735
                                       ((__MODE__) == FSMC_ACCESS_MODE_C) || \
-
 
736
                                       ((__MODE__) == FSMC_ACCESS_MODE_D))
-
 
737
 
-
 
738
#define IS_FSMC_NAND_BANK(__BANK__) (((__BANK__) == FSMC_NAND_BANK2) || \
-
 
739
                                     ((__BANK__) == FSMC_NAND_BANK3))
-
 
740
 
-
 
741
#define IS_FSMC_WAIT_FEATURE(__FEATURE__) (((__FEATURE__) == FSMC_NAND_PCC_WAIT_FEATURE_DISABLE) || \
-
 
742
                                           ((__FEATURE__) == FSMC_NAND_PCC_WAIT_FEATURE_ENABLE))
-
 
743
 
-
 
744
#define IS_FSMC_NAND_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FSMC_NAND_PCC_MEM_BUS_WIDTH_8) || \
-
 
745
                                              ((__WIDTH__) == FSMC_NAND_PCC_MEM_BUS_WIDTH_16))
-
 
746
 
-
 
747
#define IS_FSMC_ECC_STATE(__STATE__) (((__STATE__) == FSMC_NAND_ECC_DISABLE) || \
-
 
748
                                      ((__STATE__) == FSMC_NAND_ECC_ENABLE))
-
 
749
 
-
 
750
#define IS_FSMC_ECCPAGE_SIZE(__SIZE__) (((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_256BYTE)  || \
-
 
751
                                        ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_512BYTE)  || \
-
 
752
                                        ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_1024BYTE) || \
-
 
753
                                        ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_2048BYTE) || \
-
 
754
                                        ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_4096BYTE) || \
-
 
755
                                        ((__SIZE__) == FSMC_NAND_ECC_PAGE_SIZE_8192BYTE))
-
 
756
 
-
 
757
/** @defgroup FSMC_TCLR_Setup_Time FSMC_TCLR_Setup_Time
-
 
758
  * @{
-
 
759
  */
-
 
760
#define IS_FSMC_TCLR_TIME(__TIME__) ((__TIME__) <= 255U)
-
 
761
/**
-
 
762
  * @}
-
 
763
  */
-
 
764
 
-
 
765
/** @defgroup FSMC_TAR_Setup_Time FSMC_TAR_Setup_Time
-
 
766
  * @{
-
 
767
  */
-
 
768
#define IS_FSMC_TAR_TIME(__TIME__) ((__TIME__) <= 255U)
-
 
769
/**
-
 
770
  * @}
-
 
771
  */
-
 
772
 
-
 
773
/** @defgroup FSMC_Setup_Time FSMC_Setup_Time
-
 
774
  * @{
-
 
775
  */
-
 
776
#define IS_FSMC_SETUP_TIME(__TIME__) ((__TIME__) <= 255U)
-
 
777
/**
-
 
778
  * @}
-
 
779
  */
-
 
780
 
-
 
781
/** @defgroup FSMC_Wait_Setup_Time FSMC_Wait_Setup_Time
-
 
782
  * @{
-
 
783
  */
-
 
784
#define IS_FSMC_WAIT_TIME(__TIME__) ((__TIME__) <= 255U)
-
 
785
/**
-
 
786
  * @}
-
 
787
  */
-
 
788
 
-
 
789
/** @defgroup FSMC_Hold_Setup_Time FSMC_Hold_Setup_Time
-
 
790
  * @{
-
 
791
  */
-
 
792
#define IS_FSMC_HOLD_TIME(__TIME__) ((__TIME__) <= 255U)
-
 
793
/**
-
 
794
  * @}
-
 
795
  */
-
 
796
 
-
 
797
/** @defgroup FSMC_HiZ_Setup_Time FSMC_HiZ_Setup_Time
-
 
798
  * @{
-
 
799
  */
-
 
800
#define IS_FSMC_HIZ_TIME(__TIME__) ((__TIME__) <= 255U)
-
 
801
/**
-
 
802
  * @}
-
 
803
  */
-
 
804
 
-
 
805
/** @defgroup FSMC_NORSRAM_Device_Instance FSMC NOR/SRAM Device Instance
-
 
806
  * @{
-
 
807
  */
-
 
808
#define IS_FSMC_NORSRAM_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_NORSRAM_DEVICE)
-
 
809
/**
-
 
810
  * @}
-
 
811
  */
-
 
812
 
-
 
813
/** @defgroup FSMC_NORSRAM_EXTENDED_Device_Instance FSMC NOR/SRAM EXTENDED Device Instance
-
 
814
  * @{
-
 
815
  */
-
 
816
#define IS_FSMC_NORSRAM_EXTENDED_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_NORSRAM_EXTENDED_DEVICE)
-
 
817
/**
-
 
818
  * @}
-
 
819
  */
-
 
820
 
-
 
821
/** @defgroup FSMC_NAND_Device_Instance FSMC NAND Device Instance
-
 
822
  * @{
-
 
823
  */
-
 
824
#define IS_FSMC_NAND_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_NAND_DEVICE)
-
 
825
/**
-
 
826
  * @}
-
 
827
  */
-
 
828
 
-
 
829
/** @defgroup FSMC_PCCARD_Device_Instance FSMC PCCARD Device Instance
-
 
830
  * @{
-
 
831
  */
-
 
832
#define IS_FSMC_PCCARD_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_PCCARD_DEVICE)
-
 
833
 
838
 
834
/**
839
/**
835
  * @}
840
  * @}
836
  */
841
  */
837
#define IS_FSMC_BURSTMODE(__STATE__) (((__STATE__) == FSMC_BURST_ACCESS_MODE_DISABLE) || \
-
 
838
                                      ((__STATE__) == FSMC_BURST_ACCESS_MODE_ENABLE))
-
 
839
 
-
 
840
#define IS_FSMC_WAIT_POLARITY(__POLARITY__) (((__POLARITY__) == FSMC_WAIT_SIGNAL_POLARITY_LOW) || \
-
 
841
                                             ((__POLARITY__) == FSMC_WAIT_SIGNAL_POLARITY_HIGH))
-
 
842
 
-
 
843
#define IS_FSMC_WRAP_MODE(__MODE__) (((__MODE__) == FSMC_WRAP_MODE_DISABLE) || \
-
 
844
                                     ((__MODE__) == FSMC_WRAP_MODE_ENABLE))
-
 
845
 
-
 
846
#define IS_FSMC_WAIT_SIGNAL_ACTIVE(__ACTIVE__) (((__ACTIVE__) == FSMC_WAIT_TIMING_BEFORE_WS) || \
-
 
847
                                                ((__ACTIVE__) == FSMC_WAIT_TIMING_DURING_WS))
-
 
848
 
-
 
849
#define IS_FSMC_WRITE_OPERATION(__OPERATION__) (((__OPERATION__) == FSMC_WRITE_OPERATION_DISABLE) || \
-
 
850
                                                ((__OPERATION__) == FSMC_WRITE_OPERATION_ENABLE))
-
 
851
 
-
 
852
#define IS_FSMC_WAITE_SIGNAL(__SIGNAL__) (((__SIGNAL__) == FSMC_WAIT_SIGNAL_DISABLE) || \
-
 
853
                                          ((__SIGNAL__) == FSMC_WAIT_SIGNAL_ENABLE))
-
 
854
 
-
 
855
#define IS_FSMC_EXTENDED_MODE(__MODE__) (((__MODE__) == FSMC_EXTENDED_MODE_DISABLE) || \
-
 
856
                                         ((__MODE__) == FSMC_EXTENDED_MODE_ENABLE))
-
 
857
 
-
 
858
#define IS_FSMC_ASYNWAIT(__STATE__) (((__STATE__) == FSMC_ASYNCHRONOUS_WAIT_DISABLE) || \
-
 
859
                                     ((__STATE__) == FSMC_ASYNCHRONOUS_WAIT_ENABLE))
-
 
860
 
-
 
861
#define IS_FSMC_CLK_DIV(__DIV__) (((__DIV__) > 1U) && ((__DIV__) <= 16U))
-
 
862
 
-
 
863
/** @defgroup FSMC_Data_Latency FSMC Data Latency
-
 
864
  * @{
-
 
865
  */
-
 
866
#define IS_FSMC_DATA_LATENCY(__LATENCY__) (((__LATENCY__) > 1U) && ((__LATENCY__) <= 17U))
-
 
867
/**
-
 
868
  * @}
-
 
869
  */
-
 
870
 
-
 
871
/** @defgroup FSMC_Address_Setup_Time FSMC Address Setup Time
-
 
872
  * @{
-
 
873
  */
-
 
874
#define IS_FSMC_ADDRESS_SETUP_TIME(__TIME__) ((__TIME__) <= 15U)
-
 
875
/**
-
 
876
  * @}
-
 
877
  */
-
 
878
 
-
 
879
/** @defgroup FSMC_Address_Hold_Time FSMC Address Hold Time
-
 
880
  * @{
-
 
881
  */
-
 
882
#define IS_FSMC_ADDRESS_HOLD_TIME(__TIME__) (((__TIME__) > 0U) && ((__TIME__) <= 15U))
-
 
883
/**
-
 
884
  * @}
-
 
885
  */
-
 
886
 
-
 
887
/** @defgroup FSMC_Data_Setup_Time FSMC Data Setup Time
-
 
888
  * @{
-
 
889
  */
-
 
890
#define IS_FSMC_DATASETUP_TIME(__TIME__) (((__TIME__) > 0U) && ((__TIME__) <= 255U))
-
 
891
/**
-
 
892
  * @}
-
 
893
  */
-
 
894
 
-
 
895
/** @defgroup FSMC_Bus_Turn_around_Duration FSMC Bus Turn around Duration
-
 
896
  * @{
-
 
897
  */
-
 
898
#define IS_FSMC_TURNAROUND_TIME(__TIME__) ((__TIME__) <= 15U)
-
 
899
/**
-
 
900
  * @}
842
#endif
901
  */
-
 
902
 
843
 
903
/**
844
/**
904
  * @}
845
  * @}
905
  */
846
  */
906
 
-
 
907
/** @defgroup FSMC_LL_Private_Constants FSMC Low Layer Private Constants
-
 
908
  * @{
-
 
909
  */
-
 
910
 
-
 
911
/* ----------------------- FSMC registers bit mask --------------------------- */
-
 
912
#if (defined (STM32F101xE) || defined(STM32F103xE) || defined(STM32F101xG) || defined(STM32F103xG))
-
 
913
/* --- PCR Register ---*/
-
 
914
/* PCR register clear mask */
-
 
915
#define PCR_CLEAR_MASK    ((uint32_t)(FSMC_PCRx_PWAITEN | FSMC_PCRx_PBKEN  | \
-
 
916
                                      FSMC_PCRx_PTYP    | FSMC_PCRx_PWID   | \
-
 
917
                                      FSMC_PCRx_ECCEN   | FSMC_PCRx_TCLR   | \
-
 
918
                                      FSMC_PCRx_TAR     | FSMC_PCRx_ECCPS))
-
 
919
 
847
 
920
/* --- PMEM Register ---*/
-
 
921
/* PMEM register clear mask */
-
 
922
#define PMEM_CLEAR_MASK   ((uint32_t)(FSMC_PMEMx_MEMSETx  | FSMC_PMEMx_MEMWAITx |\
-
 
923
                                      FSMC_PMEMx_MEMHOLDx | FSMC_PMEMx_MEMHIZx))
-
 
924
 
-
 
925
/* --- PATT Register ---*/
-
 
926
/* PATT register clear mask */
-
 
927
#define PATT_CLEAR_MASK   ((uint32_t)(FSMC_PATTx_ATTSETx  | FSMC_PATTx_ATTWAITx |\
-
 
928
                                      FSMC_PATTx_ATTHOLDx | FSMC_PATTx_ATTHIZx))
-
 
929
 
-
 
930
#endif /* STM32F101xE || STM32F103xE || STM32F101xG || STM32F103xG */
-
 
931
/* --- BCR Register ---*/
-
 
932
/* BCR register clear mask */
-
 
933
#define BCR_CLEAR_MASK                 ((uint32_t)(FSMC_BCRx_FACCEN  | FSMC_BCRx_MUXEN     | \
-
 
934
                                                   FSMC_BCRx_MTYP    | FSMC_BCRx_MWID      | \
-
 
935
                                                   FSMC_BCRx_BURSTEN | FSMC_BCRx_WAITPOL   | \
-
 
936
                                                   FSMC_BCRx_WRAPMOD | FSMC_BCRx_WAITCFG   | \
-
 
937
                                                   FSMC_BCRx_WREN    | FSMC_BCRx_WAITEN    | \
-
 
938
                                                   FSMC_BCRx_EXTMOD  | FSMC_BCRx_ASYNCWAIT | \
-
 
939
                                                   FSMC_BCRx_CBURSTRW))
-
 
940
/* --- BTR Register ---*/
-
 
941
/* BTR register clear mask */
-
 
942
#define BTR_CLEAR_MASK                 ((uint32_t)(FSMC_BTRx_ADDSET | FSMC_BTRx_ADDHLD  |\
-
 
943
                                                   FSMC_BTRx_DATAST | FSMC_BTRx_BUSTURN |\
-
 
944
                                                   FSMC_BTRx_CLKDIV | FSMC_BTRx_DATLAT  |\
-
 
945
                                                   FSMC_BTRx_ACCMOD))
-
 
946
 
-
 
947
/* --- BWTR Register ---*/
-
 
948
/* BWTR register clear mask */
-
 
949
#if   (defined(STM32F101xE) || defined(STM32F103xE) || defined(STM32F101xG) || defined(STM32F103xG))
-
 
950
#define BWTR_CLEAR_MASK                ((uint32_t)(FSMC_BWTRx_ADDSET | FSMC_BWTRx_ADDHLD | \
-
 
951
                                                   FSMC_BWTRx_DATAST | FSMC_BWTRx_ACCMOD | \
-
 
952
                                                   FSMC_BWTRx_BUSTURN))
-
 
953
#else
-
 
954
#define BWTR_CLEAR_MASK                ((uint32_t)(FSMC_BWTRx_ADDSET | FSMC_BWTRx_ADDHLD | \
-
 
955
                                                   FSMC_BWTRx_DATAST | FSMC_BWTRx_ACCMOD | \
-
 
956
                                                   FSMC_BWTRx_CLKDIV  | FSMC_BWTRx_DATLAT))
-
 
957
#endif /* STM32F101xE || STM32F103xE || STM32F101xG || STM32F103xG */
-
 
958
 
-
 
959
/* --- PIO4 Register ---*/
-
 
960
/* PIO4 register clear mask */
-
 
961
#define PIO4_CLEAR_MASK   ((uint32_t)(FSMC_PIO4_IOSET4    | FSMC_PIO4_IOWAIT4   | \
-
 
962
                                      FSMC_PIO4_IOHOLD4   | FSMC_PIO4_IOHIZ4))
-
 
963
/**
848
/**
964
  * @}
849
  * @}
965
  */
850
  */
966
/* Exported functions --------------------------------------------------------*/
-
 
967
 
851
 
-
 
852
/* Private functions ---------------------------------------------------------*/
968
/** @addtogroup FSMC_LL_Exported_Functions
853
/** @defgroup FSMC_LL_Private_Functions FSMC LL Private Functions
969
  * @{
854
  *  @{
970
  */
855
  */
971
 
856
 
-
 
857
#if defined FSMC_BANK1
972
/** @addtogroup FSMC_NORSRAM
858
/** @defgroup FSMC_LL_NORSRAM  NOR SRAM
973
  * @{
859
  *  @{
974
  */
860
  */
975
 
-
 
976
/** @addtogroup FSMC_NORSRAM_Group1
861
/** @defgroup FSMC_LL_NORSRAM_Private_Functions_Group1 NOR SRAM Initialization/de-initialization functions
977
  * @{
862
  *  @{
978
  */
863
  */
979
/* FSMC_NORSRAM Controller functions ******************************************/
864
HAL_StatusTypeDef  FSMC_NORSRAM_Init(FSMC_NORSRAM_TypeDef *Device,
980
/* Initialization/de-initialization functions */
865
                                    FSMC_NORSRAM_InitTypeDef *Init);
981
HAL_StatusTypeDef  FSMC_NORSRAM_Init(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_InitTypeDef *Init);
866
HAL_StatusTypeDef  FSMC_NORSRAM_Timing_Init(FSMC_NORSRAM_TypeDef *Device,
-
 
867
                                           FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank);
982
HAL_StatusTypeDef  FSMC_NORSRAM_Timing_Init(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank);
868
HAL_StatusTypeDef  FSMC_NORSRAM_Extended_Timing_Init(FSMC_NORSRAM_EXTENDED_TypeDef *Device,
983
HAL_StatusTypeDef  FSMC_NORSRAM_Extended_Timing_Init(FSMC_NORSRAM_EXTENDED_TypeDef *Device, FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode);
869
                                                    FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode);
984
HAL_StatusTypeDef  FSMC_NORSRAM_DeInit(FSMC_NORSRAM_TypeDef *Device, FSMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank);
870
HAL_StatusTypeDef  FSMC_NORSRAM_DeInit(FSMC_NORSRAM_TypeDef *Device,
-
 
871
                                      FSMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank);
985
/**
872
/**
986
  * @}
873
  * @}
987
  */
874
  */
988
 
875
 
989
/** @addtogroup FSMC_NORSRAM_Group2
876
/** @defgroup FSMC_LL_NORSRAM_Private_Functions_Group2 NOR SRAM Control functions
990
  * @{
877
  *  @{
991
  */
878
  */
992
/* FSMC_NORSRAM Control functions */
-
 
993
HAL_StatusTypeDef  FSMC_NORSRAM_WriteOperation_Enable(FSMC_NORSRAM_TypeDef *Device, uint32_t Bank);
879
HAL_StatusTypeDef  FSMC_NORSRAM_WriteOperation_Enable(FSMC_NORSRAM_TypeDef *Device, uint32_t Bank);
994
HAL_StatusTypeDef  FSMC_NORSRAM_WriteOperation_Disable(FSMC_NORSRAM_TypeDef *Device, uint32_t Bank);
880
HAL_StatusTypeDef  FSMC_NORSRAM_WriteOperation_Disable(FSMC_NORSRAM_TypeDef *Device, uint32_t Bank);
995
/**
881
/**
996
  * @}
882
  * @}
997
  */
883
  */
998
 
-
 
999
/**
884
/**
1000
  * @}
885
  * @}
1001
  */
886
  */
-
 
887
#endif /* FSMC_BANK1 */
1002
 
888
 
1003
#if (defined(STM32F101xE) || defined(STM32F103xE) || defined(STM32F101xG) || defined(STM32F103xG))
889
#if defined(FSMC_BANK3)
1004
/** @addtogroup FSMC_NAND
890
/** @defgroup FSMC_LL_NAND NAND
1005
  * @{
891
  *  @{
1006
  */
892
  */
1007
 
-
 
1008
/* FSMC_NAND Controller functions **********************************************/
-
 
1009
/* Initialization/de-initialization functions */
893
/** @defgroup FSMC_LL_NAND_Private_Functions_Group1 NAND Initialization/de-initialization functions
1010
/** @addtogroup FSMC_NAND_Exported_Functions_Group1
-
 
1011
  * @{
894
  *  @{
1012
  */
895
  */
1013
HAL_StatusTypeDef  FSMC_NAND_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_InitTypeDef *Init);
896
HAL_StatusTypeDef  FSMC_NAND_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_InitTypeDef *Init);
1014
HAL_StatusTypeDef  FSMC_NAND_CommonSpace_Timing_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
897
HAL_StatusTypeDef  FSMC_NAND_CommonSpace_Timing_Init(FSMC_NAND_TypeDef *Device,
-
 
898
                                                    FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
1015
HAL_StatusTypeDef  FSMC_NAND_AttributeSpace_Timing_Init(FSMC_NAND_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
899
HAL_StatusTypeDef  FSMC_NAND_AttributeSpace_Timing_Init(FSMC_NAND_TypeDef *Device,
-
 
900
                                                       FSMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);
1016
HAL_StatusTypeDef  FSMC_NAND_DeInit(FSMC_NAND_TypeDef *Device, uint32_t Bank);
901
HAL_StatusTypeDef  FSMC_NAND_DeInit(FSMC_NAND_TypeDef *Device, uint32_t Bank);
1017
/**
902
/**
1018
  * @}
903
  * @}
1019
  */
904
  */
1020
 
905
 
1021
/* FSMC_NAND Control functions */
-
 
1022
/** @addtogroup FSMC_NAND_Exported_Functions_Group2
906
/** @defgroup FSMC_LL_NAND_Private_Functions_Group2 NAND Control functions
1023
  * @{
907
  *  @{
1024
  */
908
  */
1025
HAL_StatusTypeDef  FSMC_NAND_ECC_Enable(FSMC_NAND_TypeDef *Device, uint32_t Bank);
909
HAL_StatusTypeDef  FSMC_NAND_ECC_Enable(FSMC_NAND_TypeDef *Device, uint32_t Bank);
1026
HAL_StatusTypeDef  FSMC_NAND_ECC_Disable(FSMC_NAND_TypeDef *Device, uint32_t Bank);
910
HAL_StatusTypeDef  FSMC_NAND_ECC_Disable(FSMC_NAND_TypeDef *Device, uint32_t Bank);
1027
HAL_StatusTypeDef  FSMC_NAND_GetECC(FSMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank, uint32_t Timeout);
911
HAL_StatusTypeDef  FSMC_NAND_GetECC(FSMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank,
-
 
912
                                   uint32_t Timeout);
1028
/**
913
/**
1029
  * @}
914
  * @}
1030
  */
915
  */
1031
 
-
 
1032
/**
916
/**
1033
  * @}
917
  * @}
1034
  */
918
  */
-
 
919
#endif /* FSMC_BANK3 */
1035
 
920
 
-
 
921
#if defined(FSMC_BANK4)
1036
/** @addtogroup FSMC_PCCARD
922
/** @defgroup FSMC_LL_PCCARD PCCARD
1037
  * @{
923
  *  @{
1038
  */
924
  */
1039
 
-
 
1040
/* FSMC_PCCARD Controller functions ********************************************/
-
 
1041
/* Initialization/de-initialization functions */
925
/** @defgroup FSMC_LL_PCCARD_Private_Functions_Group1 PCCARD Initialization/de-initialization functions
1042
/** @addtogroup FSMC_PCCARD_Exported_Functions_Group1
-
 
1043
  * @{
926
  *  @{
1044
  */
927
  */
1045
HAL_StatusTypeDef  FSMC_PCCARD_Init(FSMC_PCCARD_TypeDef *Device, FSMC_PCCARD_InitTypeDef *Init);
928
HAL_StatusTypeDef  FSMC_PCCARD_Init(FSMC_PCCARD_TypeDef *Device, FSMC_PCCARD_InitTypeDef *Init);
1046
HAL_StatusTypeDef  FSMC_PCCARD_CommonSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing);
929
HAL_StatusTypeDef  FSMC_PCCARD_CommonSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device,
-
 
930
                                                               FSMC_NAND_PCC_TimingTypeDef *Timing);
1047
HAL_StatusTypeDef  FSMC_PCCARD_AttributeSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing);
931
HAL_StatusTypeDef  FSMC_PCCARD_AttributeSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device,
-
 
932
                                                                  FSMC_NAND_PCC_TimingTypeDef *Timing);
1048
HAL_StatusTypeDef  FSMC_PCCARD_IOSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device, FSMC_NAND_PCC_TimingTypeDef *Timing);
933
HAL_StatusTypeDef  FSMC_PCCARD_IOSpace_Timing_Init(FSMC_PCCARD_TypeDef *Device,
-
 
934
                                                           FSMC_NAND_PCC_TimingTypeDef *Timing);
1049
HAL_StatusTypeDef  FSMC_PCCARD_DeInit(FSMC_PCCARD_TypeDef *Device);
935
HAL_StatusTypeDef  FSMC_PCCARD_DeInit(FSMC_PCCARD_TypeDef *Device);
1050
/**
936
/**
1051
  * @}
937
  * @}
1052
  */
938
  */
1053
 
-
 
1054
/**
939
/**
1055
  * @}
940
  * @}
1056
  */
941
  */
1057
#endif /* STM32F101xE || STM32F103xE || STM32F101xG || STM32F103xG */
942
#endif /* FSMC_BANK4 */
-
 
943
 
1058
 
944
 
1059
/**
945
/**
1060
  * @}
946
  * @}
1061
  */
947
  */
1062
 
948
 
1063
/**
949
/**
1064
  * @}
950
  * @}
1065
  */
951
  */
1066
#endif /* FSMC_BANK1 */
-
 
1067
 
952
 
1068
/**
953
/**
1069
  * @}
954
  * @}
1070
  */
955
  */
1071
 
956
 
1072
#ifdef __cplusplus
957
#ifdef __cplusplus
1073
}
958
}
1074
#endif
959
#endif
1075
 
960
 
1076
#endif /* __STM32F1xx_LL_FSMC_H */
961
#endif /* STM32F1xx_LL_FSMC_H */
1077
 
962
 
1078
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
963
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
1079
 
-