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