my fork
Fork of mbed by
TARGET_NUCLEO_L152RE/stm32l1xx_ll_fsmc.h@97:4298809c7c9e, 2015-04-08 (annotated)
- Committer:
- filartrix
- Date:
- Wed Apr 08 14:12:53 2015 +0000
- Revision:
- 97:4298809c7c9e
- Parent:
- 90:cb3d968589d8
First reale BlueNRG module for nucleo 401 board
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 stm32l1xx_ll_fsmc.h |
Kojto | 90:cb3d968589d8 | 4 | * @author MCD Application Team |
Kojto | 90:cb3d968589d8 | 5 | * @version V1.0.0 |
Kojto | 90:cb3d968589d8 | 6 | * @date 5-September-2014 |
Kojto | 90:cb3d968589d8 | 7 | * @brief Header file of FSMC 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 __STM32L1xx_LL_FSMC_H |
Kojto | 90:cb3d968589d8 | 40 | #define __STM32L1xx_LL_FSMC_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 (STM32L151xD) || defined (STM32L152xD) || defined (STM32L162xD) |
Kojto | 90:cb3d968589d8 | 47 | |
Kojto | 90:cb3d968589d8 | 48 | /* Includes ------------------------------------------------------------------*/ |
Kojto | 90:cb3d968589d8 | 49 | #include "stm32l1xx_hal_def.h" |
Kojto | 90:cb3d968589d8 | 50 | |
Kojto | 90:cb3d968589d8 | 51 | /** @addtogroup STM32L1xx_HAL_Driver |
Kojto | 90:cb3d968589d8 | 52 | * @{ |
Kojto | 90:cb3d968589d8 | 53 | */ |
Kojto | 90:cb3d968589d8 | 54 | |
Kojto | 90:cb3d968589d8 | 55 | /** @addtogroup FSMC_LL |
Kojto | 90:cb3d968589d8 | 56 | * @{ |
Kojto | 90:cb3d968589d8 | 57 | */ |
Kojto | 90:cb3d968589d8 | 58 | |
Kojto | 90:cb3d968589d8 | 59 | /* Exported typedef ----------------------------------------------------------*/ |
Kojto | 90:cb3d968589d8 | 60 | |
Kojto | 90:cb3d968589d8 | 61 | /** @defgroup FSMC_NORSRAM_Exported_typedef FSMC NOR/SRAM Exported typedef |
Kojto | 90:cb3d968589d8 | 62 | * @{ |
Kojto | 90:cb3d968589d8 | 63 | */ |
Kojto | 90:cb3d968589d8 | 64 | |
Kojto | 90:cb3d968589d8 | 65 | #define FSMC_NORSRAM_TYPEDEF FSMC_Bank1_TypeDef |
Kojto | 90:cb3d968589d8 | 66 | #define FSMC_NORSRAM_EXTENDED_TYPEDEF FSMC_Bank1E_TypeDef |
Kojto | 90:cb3d968589d8 | 67 | |
Kojto | 90:cb3d968589d8 | 68 | #define FSMC_NORSRAM_DEVICE FSMC_Bank1 |
Kojto | 90:cb3d968589d8 | 69 | #define FSMC_NORSRAM_EXTENDED_DEVICE FSMC_Bank1E |
Kojto | 90:cb3d968589d8 | 70 | |
Kojto | 90:cb3d968589d8 | 71 | /** |
Kojto | 90:cb3d968589d8 | 72 | * @brief FSMC_NORSRAM Configuration Structure definition |
Kojto | 90:cb3d968589d8 | 73 | */ |
Kojto | 90:cb3d968589d8 | 74 | typedef struct |
Kojto | 90:cb3d968589d8 | 75 | { |
Kojto | 90:cb3d968589d8 | 76 | uint32_t NSBank; /*!< Specifies the NORSRAM memory device that will be used. |
Kojto | 90:cb3d968589d8 | 77 | This parameter can be a value of @ref FSMC_NORSRAM_Bank */ |
Kojto | 90:cb3d968589d8 | 78 | |
Kojto | 90:cb3d968589d8 | 79 | uint32_t DataAddressMux; /*!< Specifies whether the address and data values are |
Kojto | 90:cb3d968589d8 | 80 | multiplexed on the data bus or not. |
Kojto | 90:cb3d968589d8 | 81 | This parameter can be a value of @ref FSMC_Data_Address_Bus_Multiplexing */ |
Kojto | 90:cb3d968589d8 | 82 | |
Kojto | 90:cb3d968589d8 | 83 | uint32_t MemoryType; /*!< Specifies the type of external memory attached to |
Kojto | 90:cb3d968589d8 | 84 | the corresponding memory device. |
Kojto | 90:cb3d968589d8 | 85 | This parameter can be a value of @ref FSMC_Memory_Type */ |
Kojto | 90:cb3d968589d8 | 86 | |
Kojto | 90:cb3d968589d8 | 87 | uint32_t MemoryDataWidth; /*!< Specifies the external memory device width. |
Kojto | 90:cb3d968589d8 | 88 | This parameter can be a value of @ref FSMC_NORSRAM_Data_Width */ |
Kojto | 90:cb3d968589d8 | 89 | |
Kojto | 90:cb3d968589d8 | 90 | uint32_t BurstAccessMode; /*!< Enables or disables the burst access mode for Flash memory, |
Kojto | 90:cb3d968589d8 | 91 | valid only with synchronous burst Flash memories. |
Kojto | 90:cb3d968589d8 | 92 | This parameter can be a value of @ref FSMC_Burst_Access_Mode */ |
Kojto | 90:cb3d968589d8 | 93 | |
Kojto | 90:cb3d968589d8 | 94 | uint32_t WaitSignalPolarity; /*!< Specifies the wait signal polarity, valid only when accessing |
Kojto | 90:cb3d968589d8 | 95 | the Flash memory in burst mode. |
Kojto | 90:cb3d968589d8 | 96 | This parameter can be a value of @ref FSMC_Wait_Signal_Polarity */ |
Kojto | 90:cb3d968589d8 | 97 | |
Kojto | 90:cb3d968589d8 | 98 | uint32_t WrapMode; /*!< Enables or disables the Wrapped burst access mode for Flash |
Kojto | 90:cb3d968589d8 | 99 | memory, valid only when accessing Flash memories in burst mode. |
Kojto | 90:cb3d968589d8 | 100 | This parameter can be a value of @ref FSMC_Wrap_Mode */ |
Kojto | 90:cb3d968589d8 | 101 | |
Kojto | 90:cb3d968589d8 | 102 | uint32_t WaitSignalActive; /*!< Specifies if the wait signal is asserted by the memory one |
Kojto | 90:cb3d968589d8 | 103 | clock cycle before the wait state or during the wait state, |
Kojto | 90:cb3d968589d8 | 104 | valid only when accessing memories in burst mode. |
Kojto | 90:cb3d968589d8 | 105 | This parameter can be a value of @ref FSMC_Wait_Timing */ |
Kojto | 90:cb3d968589d8 | 106 | |
Kojto | 90:cb3d968589d8 | 107 | uint32_t WriteOperation; /*!< Enables or disables the write operation in the selected device by the FSMC. |
Kojto | 90:cb3d968589d8 | 108 | This parameter can be a value of @ref FSMC_Write_Operation */ |
Kojto | 90:cb3d968589d8 | 109 | |
Kojto | 90:cb3d968589d8 | 110 | uint32_t WaitSignal; /*!< Enables or disables the wait state insertion via wait |
Kojto | 90:cb3d968589d8 | 111 | signal, valid for Flash memory access in burst mode. |
Kojto | 90:cb3d968589d8 | 112 | This parameter can be a value of @ref FSMC_Wait_Signal */ |
Kojto | 90:cb3d968589d8 | 113 | |
Kojto | 90:cb3d968589d8 | 114 | uint32_t ExtendedMode; /*!< Enables or disables the extended mode. |
Kojto | 90:cb3d968589d8 | 115 | This parameter can be a value of @ref FSMC_Extended_Mode */ |
Kojto | 90:cb3d968589d8 | 116 | |
Kojto | 90:cb3d968589d8 | 117 | uint32_t AsynchronousWait; /*!< Enables or disables wait signal during asynchronous transfers, |
Kojto | 90:cb3d968589d8 | 118 | valid only with asynchronous Flash memories. |
Kojto | 90:cb3d968589d8 | 119 | This parameter can be a value of @ref FSMC_AsynchronousWait */ |
Kojto | 90:cb3d968589d8 | 120 | |
Kojto | 90:cb3d968589d8 | 121 | uint32_t WriteBurst; /*!< Enables or disables the write burst operation. |
Kojto | 90:cb3d968589d8 | 122 | This parameter can be a value of @ref FSMC_Write_Burst */ |
Kojto | 90:cb3d968589d8 | 123 | |
Kojto | 90:cb3d968589d8 | 124 | }FSMC_NORSRAM_InitTypeDef; |
Kojto | 90:cb3d968589d8 | 125 | |
Kojto | 90:cb3d968589d8 | 126 | |
Kojto | 90:cb3d968589d8 | 127 | /** |
Kojto | 90:cb3d968589d8 | 128 | * @brief FSMC_NORSRAM Timing parameters structure definition |
Kojto | 90:cb3d968589d8 | 129 | */ |
Kojto | 90:cb3d968589d8 | 130 | typedef struct |
Kojto | 90:cb3d968589d8 | 131 | { |
Kojto | 90:cb3d968589d8 | 132 | uint32_t AddressSetupTime; /*!< Defines the number of HCLK cycles to configure |
Kojto | 90:cb3d968589d8 | 133 | the duration of the address setup time. |
Kojto | 90:cb3d968589d8 | 134 | This parameter can be a value between Min_Data = 0 and Max_Data = 15. |
Kojto | 90:cb3d968589d8 | 135 | @note This parameter is not used with synchronous NOR Flash memories. */ |
Kojto | 90:cb3d968589d8 | 136 | |
Kojto | 90:cb3d968589d8 | 137 | uint32_t AddressHoldTime; /*!< Defines the number of HCLK cycles to configure |
Kojto | 90:cb3d968589d8 | 138 | the duration of the address hold time. |
Kojto | 90:cb3d968589d8 | 139 | This parameter can be a value between Min_Data = 1 and Max_Data = 15. |
Kojto | 90:cb3d968589d8 | 140 | @note This parameter is not used with synchronous NOR Flash memories. */ |
Kojto | 90:cb3d968589d8 | 141 | |
Kojto | 90:cb3d968589d8 | 142 | uint32_t DataSetupTime; /*!< Defines the number of HCLK cycles to configure |
Kojto | 90:cb3d968589d8 | 143 | the duration of the data setup time. |
Kojto | 90:cb3d968589d8 | 144 | This parameter can be a value between Min_Data = 1 and Max_Data = 255. |
Kojto | 90:cb3d968589d8 | 145 | @note This parameter is used for SRAMs, ROMs and asynchronous multiplexed |
Kojto | 90:cb3d968589d8 | 146 | NOR Flash memories. */ |
Kojto | 90:cb3d968589d8 | 147 | |
Kojto | 90:cb3d968589d8 | 148 | uint32_t BusTurnAroundDuration; /*!< Defines the number of HCLK cycles to configure |
Kojto | 90:cb3d968589d8 | 149 | the duration of the bus turnaround. |
Kojto | 90:cb3d968589d8 | 150 | This parameter can be a value between Min_Data = 0 and Max_Data = 15. |
Kojto | 90:cb3d968589d8 | 151 | @note This parameter is only used for multiplexed NOR Flash memories. */ |
Kojto | 90:cb3d968589d8 | 152 | |
Kojto | 90:cb3d968589d8 | 153 | uint32_t CLKDivision; /*!< Defines the period of CLK clock output signal, expressed in number of |
Kojto | 90:cb3d968589d8 | 154 | HCLK cycles. This parameter can be a value between Min_Data = 2 and Max_Data = 16. |
Kojto | 90:cb3d968589d8 | 155 | @note This parameter is not used for asynchronous NOR Flash, SRAM or ROM |
Kojto | 90:cb3d968589d8 | 156 | accesses. */ |
Kojto | 90:cb3d968589d8 | 157 | |
Kojto | 90:cb3d968589d8 | 158 | uint32_t DataLatency; /*!< Defines the number of memory clock cycles to issue |
Kojto | 90:cb3d968589d8 | 159 | to the memory before getting the first data. |
Kojto | 90:cb3d968589d8 | 160 | The parameter value depends on the memory type as shown below: |
Kojto | 90:cb3d968589d8 | 161 | - It must be set to 0 in case of a CRAM |
Kojto | 90:cb3d968589d8 | 162 | - It is don't care in asynchronous NOR, SRAM or ROM accesses |
Kojto | 90:cb3d968589d8 | 163 | - It may assume a value between Min_Data = 2 and Max_Data = 17 in NOR Flash memories |
Kojto | 90:cb3d968589d8 | 164 | with synchronous burst mode enable */ |
Kojto | 90:cb3d968589d8 | 165 | |
Kojto | 90:cb3d968589d8 | 166 | uint32_t AccessMode; /*!< Specifies the asynchronous access mode. |
Kojto | 90:cb3d968589d8 | 167 | This parameter can be a value of @ref FSMC_Access_Mode */ |
Kojto | 90:cb3d968589d8 | 168 | |
Kojto | 90:cb3d968589d8 | 169 | }FSMC_NORSRAM_TimingTypeDef; |
Kojto | 90:cb3d968589d8 | 170 | |
Kojto | 90:cb3d968589d8 | 171 | /** |
Kojto | 90:cb3d968589d8 | 172 | * @} |
Kojto | 90:cb3d968589d8 | 173 | */ |
Kojto | 90:cb3d968589d8 | 174 | |
Kojto | 90:cb3d968589d8 | 175 | /* Exported constants --------------------------------------------------------*/ |
Kojto | 90:cb3d968589d8 | 176 | |
Kojto | 90:cb3d968589d8 | 177 | /** @defgroup FSMC_NORSRAM_Exported_constants FSMC NOR/SRAM Exported constants |
Kojto | 90:cb3d968589d8 | 178 | * @{ |
Kojto | 90:cb3d968589d8 | 179 | */ |
Kojto | 90:cb3d968589d8 | 180 | |
Kojto | 90:cb3d968589d8 | 181 | /** @defgroup FSMC_NORSRAM_Bank FSMC NOR/SRAM Bank |
Kojto | 90:cb3d968589d8 | 182 | * @{ |
Kojto | 90:cb3d968589d8 | 183 | */ |
Kojto | 90:cb3d968589d8 | 184 | #define FSMC_BANK1_NORSRAM1 ((uint32_t)0x00000000) |
Kojto | 90:cb3d968589d8 | 185 | #define FSMC_BANK1_NORSRAM2 ((uint32_t)0x00000002) |
Kojto | 90:cb3d968589d8 | 186 | #define FSMC_BANK1_NORSRAM3 ((uint32_t)0x00000004) |
Kojto | 90:cb3d968589d8 | 187 | #define FSMC_BANK1_NORSRAM4 ((uint32_t)0x00000006) |
Kojto | 90:cb3d968589d8 | 188 | |
Kojto | 90:cb3d968589d8 | 189 | /* To keep compatibility with previous families */ |
Kojto | 90:cb3d968589d8 | 190 | #define FSMC_NORSRAM_BANK1 FSMC_BANK1_NORSRAM1 |
Kojto | 90:cb3d968589d8 | 191 | #define FSMC_NORSRAM_BANK2 FSMC_BANK1_NORSRAM2 |
Kojto | 90:cb3d968589d8 | 192 | #define FSMC_NORSRAM_BANK3 FSMC_BANK1_NORSRAM3 |
Kojto | 90:cb3d968589d8 | 193 | #define FSMC_NORSRAM_BANK4 FSMC_BANK1_NORSRAM4 |
Kojto | 90:cb3d968589d8 | 194 | |
Kojto | 90:cb3d968589d8 | 195 | #define IS_FSMC_NORSRAM_BANK(__BANK__) (((__BANK__) == FSMC_BANK1_NORSRAM1) || \ |
Kojto | 90:cb3d968589d8 | 196 | ((__BANK__) == FSMC_BANK1_NORSRAM2) || \ |
Kojto | 90:cb3d968589d8 | 197 | ((__BANK__) == FSMC_BANK1_NORSRAM3) || \ |
Kojto | 90:cb3d968589d8 | 198 | ((__BANK__) == FSMC_BANK1_NORSRAM4)) |
Kojto | 90:cb3d968589d8 | 199 | /** |
Kojto | 90:cb3d968589d8 | 200 | * @} |
Kojto | 90:cb3d968589d8 | 201 | */ |
Kojto | 90:cb3d968589d8 | 202 | |
Kojto | 90:cb3d968589d8 | 203 | /** @defgroup FSMC_Data_Address_Bus_Multiplexing FSMC Data Address Bus Multiplexing |
Kojto | 90:cb3d968589d8 | 204 | * @{ |
Kojto | 90:cb3d968589d8 | 205 | */ |
Kojto | 90:cb3d968589d8 | 206 | |
Kojto | 90:cb3d968589d8 | 207 | #define FSMC_DATA_ADDRESS_MUX_DISABLE ((uint32_t)0x00000000) |
Kojto | 90:cb3d968589d8 | 208 | #define FSMC_DATA_ADDRESS_MUX_ENABLE ((uint32_t)FSMC_BCRx_MUXEN) |
Kojto | 90:cb3d968589d8 | 209 | |
Kojto | 90:cb3d968589d8 | 210 | #define IS_FSMC_MUX(__MUX__) (((__MUX__) == FSMC_DATA_ADDRESS_MUX_DISABLE) || \ |
Kojto | 90:cb3d968589d8 | 211 | ((__MUX__) == FSMC_DATA_ADDRESS_MUX_ENABLE)) |
Kojto | 90:cb3d968589d8 | 212 | /** |
Kojto | 90:cb3d968589d8 | 213 | * @} |
Kojto | 90:cb3d968589d8 | 214 | */ |
Kojto | 90:cb3d968589d8 | 215 | |
Kojto | 90:cb3d968589d8 | 216 | /** @defgroup FSMC_Memory_Type FSMC Memory Type |
Kojto | 90:cb3d968589d8 | 217 | * @{ |
Kojto | 90:cb3d968589d8 | 218 | */ |
Kojto | 90:cb3d968589d8 | 219 | |
Kojto | 90:cb3d968589d8 | 220 | #define FSMC_MEMORY_TYPE_SRAM ((uint32_t)0x00000000) |
Kojto | 90:cb3d968589d8 | 221 | #define FSMC_MEMORY_TYPE_PSRAM ((uint32_t)FSMC_BCRx_MTYP_0) |
Kojto | 90:cb3d968589d8 | 222 | #define FSMC_MEMORY_TYPE_NOR ((uint32_t)FSMC_BCRx_MTYP_1) |
Kojto | 90:cb3d968589d8 | 223 | |
Kojto | 90:cb3d968589d8 | 224 | |
Kojto | 90:cb3d968589d8 | 225 | #define IS_FSMC_MEMORY(__MEMORY__) (((__MEMORY__) == FSMC_MEMORY_TYPE_SRAM) || \ |
Kojto | 90:cb3d968589d8 | 226 | ((__MEMORY__) == FSMC_MEMORY_TYPE_PSRAM)|| \ |
Kojto | 90:cb3d968589d8 | 227 | ((__MEMORY__) == FSMC_MEMORY_TYPE_NOR)) |
Kojto | 90:cb3d968589d8 | 228 | /** |
Kojto | 90:cb3d968589d8 | 229 | * @} |
Kojto | 90:cb3d968589d8 | 230 | */ |
Kojto | 90:cb3d968589d8 | 231 | |
Kojto | 90:cb3d968589d8 | 232 | /** @defgroup FSMC_NORSRAM_Data_Width FSMC NOR/SRAM Data Width |
Kojto | 90:cb3d968589d8 | 233 | * @{ |
Kojto | 90:cb3d968589d8 | 234 | */ |
Kojto | 90:cb3d968589d8 | 235 | |
Kojto | 90:cb3d968589d8 | 236 | #define FSMC_NORSRAM_MEM_BUS_WIDTH_8 ((uint32_t)0x00000000) |
Kojto | 90:cb3d968589d8 | 237 | #define FSMC_NORSRAM_MEM_BUS_WIDTH_16 ((uint32_t)FSMC_BCRx_MWID_0) |
Kojto | 90:cb3d968589d8 | 238 | #define FSMC_NORSRAM_MEM_BUS_WIDTH_32 ((uint32_t)FSMC_BCRx_MWID_1) |
Kojto | 90:cb3d968589d8 | 239 | |
Kojto | 90:cb3d968589d8 | 240 | #define IS_FSMC_NORSRAM_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FSMC_NORSRAM_MEM_BUS_WIDTH_8) || \ |
Kojto | 90:cb3d968589d8 | 241 | ((__WIDTH__) == FSMC_NORSRAM_MEM_BUS_WIDTH_16) || \ |
Kojto | 90:cb3d968589d8 | 242 | ((__WIDTH__) == FSMC_NORSRAM_MEM_BUS_WIDTH_32)) |
Kojto | 90:cb3d968589d8 | 243 | /** |
Kojto | 90:cb3d968589d8 | 244 | * @} |
Kojto | 90:cb3d968589d8 | 245 | */ |
Kojto | 90:cb3d968589d8 | 246 | |
Kojto | 90:cb3d968589d8 | 247 | /** @defgroup FSMC_NORSRAM_Flash_Access FSMC NOR/SRAM Flash Access |
Kojto | 90:cb3d968589d8 | 248 | * @{ |
Kojto | 90:cb3d968589d8 | 249 | */ |
Kojto | 90:cb3d968589d8 | 250 | |
Kojto | 90:cb3d968589d8 | 251 | #define FSMC_NORSRAM_FLASH_ACCESS_ENABLE ((uint32_t)FSMC_BCRx_FACCEN) |
Kojto | 90:cb3d968589d8 | 252 | #define FSMC_NORSRAM_FLASH_ACCESS_DISABLE ((uint32_t)0x00000000) |
Kojto | 90:cb3d968589d8 | 253 | /** |
Kojto | 90:cb3d968589d8 | 254 | * @} |
Kojto | 90:cb3d968589d8 | 255 | */ |
Kojto | 90:cb3d968589d8 | 256 | |
Kojto | 90:cb3d968589d8 | 257 | /** @defgroup FSMC_Burst_Access_Mode FSMC Burst Access Mode |
Kojto | 90:cb3d968589d8 | 258 | * @{ |
Kojto | 90:cb3d968589d8 | 259 | */ |
Kojto | 90:cb3d968589d8 | 260 | |
Kojto | 90:cb3d968589d8 | 261 | #define FSMC_BURST_ACCESS_MODE_DISABLE ((uint32_t)0x00000000) |
Kojto | 90:cb3d968589d8 | 262 | #define FSMC_BURST_ACCESS_MODE_ENABLE ((uint32_t)FSMC_BCRx_BURSTEN) |
Kojto | 90:cb3d968589d8 | 263 | |
Kojto | 90:cb3d968589d8 | 264 | #define IS_FSMC_BURSTMODE(__STATE__) (((__STATE__) == FSMC_BURST_ACCESS_MODE_DISABLE) || \ |
Kojto | 90:cb3d968589d8 | 265 | ((__STATE__) == FSMC_BURST_ACCESS_MODE_ENABLE)) |
Kojto | 90:cb3d968589d8 | 266 | /** |
Kojto | 90:cb3d968589d8 | 267 | * @} |
Kojto | 90:cb3d968589d8 | 268 | */ |
Kojto | 90:cb3d968589d8 | 269 | |
Kojto | 90:cb3d968589d8 | 270 | |
Kojto | 90:cb3d968589d8 | 271 | /** @defgroup FSMC_Wait_Signal_Polarity FSMC Wait Signal Polarity |
Kojto | 90:cb3d968589d8 | 272 | * @{ |
Kojto | 90:cb3d968589d8 | 273 | */ |
Kojto | 90:cb3d968589d8 | 274 | |
Kojto | 90:cb3d968589d8 | 275 | #define FSMC_WAIT_SIGNAL_POLARITY_LOW ((uint32_t)0x00000000) |
Kojto | 90:cb3d968589d8 | 276 | #define FSMC_WAIT_SIGNAL_POLARITY_HIGH ((uint32_t)FSMC_BCRx_WAITPOL) |
Kojto | 90:cb3d968589d8 | 277 | |
Kojto | 90:cb3d968589d8 | 278 | #define IS_FSMC_WAIT_POLARITY(__POLARITY__) (((__POLARITY__) == FSMC_WAIT_SIGNAL_POLARITY_LOW) || \ |
Kojto | 90:cb3d968589d8 | 279 | ((__POLARITY__) == FSMC_WAIT_SIGNAL_POLARITY_HIGH)) |
Kojto | 90:cb3d968589d8 | 280 | /** |
Kojto | 90:cb3d968589d8 | 281 | * @} |
Kojto | 90:cb3d968589d8 | 282 | */ |
Kojto | 90:cb3d968589d8 | 283 | |
Kojto | 90:cb3d968589d8 | 284 | /** @defgroup FSMC_Wrap_Mode FSMC Wrap Mode |
Kojto | 90:cb3d968589d8 | 285 | * @{ |
Kojto | 90:cb3d968589d8 | 286 | */ |
Kojto | 90:cb3d968589d8 | 287 | |
Kojto | 90:cb3d968589d8 | 288 | #define FSMC_WRAP_MODE_DISABLE ((uint32_t)0x00000000) |
Kojto | 90:cb3d968589d8 | 289 | #define FSMC_WRAP_MODE_ENABLE ((uint32_t)FSMC_BCRx_WRAPMOD) |
Kojto | 90:cb3d968589d8 | 290 | |
Kojto | 90:cb3d968589d8 | 291 | #define IS_FSMC_WRAP_MODE(__MODE__) (((__MODE__) == FSMC_WRAP_MODE_DISABLE) || \ |
Kojto | 90:cb3d968589d8 | 292 | ((__MODE__) == FSMC_WRAP_MODE_ENABLE)) |
Kojto | 90:cb3d968589d8 | 293 | /** |
Kojto | 90:cb3d968589d8 | 294 | * @} |
Kojto | 90:cb3d968589d8 | 295 | */ |
Kojto | 90:cb3d968589d8 | 296 | |
Kojto | 90:cb3d968589d8 | 297 | /** @defgroup FSMC_Wait_Timing FSMC Wait Timing |
Kojto | 90:cb3d968589d8 | 298 | * @{ |
Kojto | 90:cb3d968589d8 | 299 | */ |
Kojto | 90:cb3d968589d8 | 300 | |
Kojto | 90:cb3d968589d8 | 301 | #define FSMC_WAIT_TIMING_BEFORE_WS ((uint32_t)0x00000000) |
Kojto | 90:cb3d968589d8 | 302 | #define FSMC_WAIT_TIMING_DURING_WS ((uint32_t)FSMC_BCRx_WAITCFG) |
Kojto | 90:cb3d968589d8 | 303 | |
Kojto | 90:cb3d968589d8 | 304 | #define IS_FSMC_WAIT_SIGNAL_ACTIVE(__ACTIVE__) (((__ACTIVE__) == FSMC_WAIT_TIMING_BEFORE_WS) || \ |
Kojto | 90:cb3d968589d8 | 305 | ((__ACTIVE__) == FSMC_WAIT_TIMING_DURING_WS)) |
Kojto | 90:cb3d968589d8 | 306 | /** |
Kojto | 90:cb3d968589d8 | 307 | * @} |
Kojto | 90:cb3d968589d8 | 308 | */ |
Kojto | 90:cb3d968589d8 | 309 | |
Kojto | 90:cb3d968589d8 | 310 | /** @defgroup FSMC_Write_Operation FSMC Write Operation |
Kojto | 90:cb3d968589d8 | 311 | * @{ |
Kojto | 90:cb3d968589d8 | 312 | */ |
Kojto | 90:cb3d968589d8 | 313 | |
Kojto | 90:cb3d968589d8 | 314 | #define FSMC_WRITE_OPERATION_DISABLE ((uint32_t)0x00000000) |
Kojto | 90:cb3d968589d8 | 315 | #define FSMC_WRITE_OPERATION_ENABLE ((uint32_t)FSMC_BCRx_WREN) |
Kojto | 90:cb3d968589d8 | 316 | |
Kojto | 90:cb3d968589d8 | 317 | #define IS_FSMC_WRITE_OPERATION(__OPERATION__) (((__OPERATION__) == FSMC_WRITE_OPERATION_DISABLE) || \ |
Kojto | 90:cb3d968589d8 | 318 | ((__OPERATION__) == FSMC_WRITE_OPERATION_ENABLE)) |
Kojto | 90:cb3d968589d8 | 319 | /** |
Kojto | 90:cb3d968589d8 | 320 | * @} |
Kojto | 90:cb3d968589d8 | 321 | */ |
Kojto | 90:cb3d968589d8 | 322 | |
Kojto | 90:cb3d968589d8 | 323 | /** @defgroup FSMC_Wait_Signal FSMC Wait Signal |
Kojto | 90:cb3d968589d8 | 324 | * @{ |
Kojto | 90:cb3d968589d8 | 325 | */ |
Kojto | 90:cb3d968589d8 | 326 | |
Kojto | 90:cb3d968589d8 | 327 | #define FSMC_WAIT_SIGNAL_DISABLE ((uint32_t)0x00000000) |
Kojto | 90:cb3d968589d8 | 328 | #define FSMC_WAIT_SIGNAL_ENABLE ((uint32_t)FSMC_BCRx_WAITEN) |
Kojto | 90:cb3d968589d8 | 329 | |
Kojto | 90:cb3d968589d8 | 330 | #define IS_FSMC_WAITE_SIGNAL(__SIGNAL__) (((__SIGNAL__) == FSMC_WAIT_SIGNAL_DISABLE) || \ |
Kojto | 90:cb3d968589d8 | 331 | ((__SIGNAL__) == FSMC_WAIT_SIGNAL_ENABLE)) |
Kojto | 90:cb3d968589d8 | 332 | |
Kojto | 90:cb3d968589d8 | 333 | /** |
Kojto | 90:cb3d968589d8 | 334 | * @} |
Kojto | 90:cb3d968589d8 | 335 | */ |
Kojto | 90:cb3d968589d8 | 336 | |
Kojto | 90:cb3d968589d8 | 337 | /** @defgroup FSMC_Extended_Mode FSMC Extended Mode |
Kojto | 90:cb3d968589d8 | 338 | * @{ |
Kojto | 90:cb3d968589d8 | 339 | */ |
Kojto | 90:cb3d968589d8 | 340 | |
Kojto | 90:cb3d968589d8 | 341 | #define FSMC_EXTENDED_MODE_DISABLE ((uint32_t)0x00000000) |
Kojto | 90:cb3d968589d8 | 342 | #define FSMC_EXTENDED_MODE_ENABLE ((uint32_t)FSMC_BCRx_EXTMOD) |
Kojto | 90:cb3d968589d8 | 343 | |
Kojto | 90:cb3d968589d8 | 344 | #define IS_FSMC_EXTENDED_MODE(__MODE__) (((__MODE__) == FSMC_EXTENDED_MODE_DISABLE) || \ |
Kojto | 90:cb3d968589d8 | 345 | ((__MODE__) == FSMC_EXTENDED_MODE_ENABLE)) |
Kojto | 90:cb3d968589d8 | 346 | /** |
Kojto | 90:cb3d968589d8 | 347 | * @} |
Kojto | 90:cb3d968589d8 | 348 | */ |
Kojto | 90:cb3d968589d8 | 349 | |
Kojto | 90:cb3d968589d8 | 350 | /** @defgroup FSMC_AsynchronousWait FSMC Asynchronous Wait |
Kojto | 90:cb3d968589d8 | 351 | * @{ |
Kojto | 90:cb3d968589d8 | 352 | */ |
Kojto | 90:cb3d968589d8 | 353 | |
Kojto | 90:cb3d968589d8 | 354 | #define FSMC_ASYNCHRONOUS_WAIT_DISABLE ((uint32_t)0x00000000) |
Kojto | 90:cb3d968589d8 | 355 | #define FSMC_ASYNCHRONOUS_WAIT_ENABLE ((uint32_t)FSMC_BCRx_ASYNCWAIT) |
Kojto | 90:cb3d968589d8 | 356 | |
Kojto | 90:cb3d968589d8 | 357 | #define IS_FSMC_ASYNWAIT(__STATE__) (((__STATE__) == FSMC_ASYNCHRONOUS_WAIT_DISABLE) || \ |
Kojto | 90:cb3d968589d8 | 358 | ((__STATE__) == FSMC_ASYNCHRONOUS_WAIT_ENABLE)) |
Kojto | 90:cb3d968589d8 | 359 | |
Kojto | 90:cb3d968589d8 | 360 | /** |
Kojto | 90:cb3d968589d8 | 361 | * @} |
Kojto | 90:cb3d968589d8 | 362 | */ |
Kojto | 90:cb3d968589d8 | 363 | |
Kojto | 90:cb3d968589d8 | 364 | /** @defgroup FSMC_Write_Burst FSMC Write Burst |
Kojto | 90:cb3d968589d8 | 365 | * @{ |
Kojto | 90:cb3d968589d8 | 366 | */ |
Kojto | 90:cb3d968589d8 | 367 | |
Kojto | 90:cb3d968589d8 | 368 | #define FSMC_WRITE_BURST_DISABLE ((uint32_t)0x00000000) |
Kojto | 90:cb3d968589d8 | 369 | #define FSMC_WRITE_BURST_ENABLE ((uint32_t)FSMC_BCRx_CBURSTRW) |
Kojto | 90:cb3d968589d8 | 370 | |
Kojto | 90:cb3d968589d8 | 371 | #define IS_FSMC_WRITE_BURST(__BURST__) (((__BURST__) == FSMC_WRITE_BURST_DISABLE) || \ |
Kojto | 90:cb3d968589d8 | 372 | ((__BURST__) == FSMC_WRITE_BURST_ENABLE)) |
Kojto | 90:cb3d968589d8 | 373 | /** |
Kojto | 90:cb3d968589d8 | 374 | * @} |
Kojto | 90:cb3d968589d8 | 375 | */ |
Kojto | 90:cb3d968589d8 | 376 | |
Kojto | 90:cb3d968589d8 | 377 | /** @defgroup FSMC_Address_Setup_Time FSMC Address Setup Time |
Kojto | 90:cb3d968589d8 | 378 | * @{ |
Kojto | 90:cb3d968589d8 | 379 | */ |
Kojto | 90:cb3d968589d8 | 380 | |
Kojto | 90:cb3d968589d8 | 381 | #define IS_FSMC_ADDRESS_SETUP_TIME(__TIME__) ((__TIME__) <= 15) |
Kojto | 90:cb3d968589d8 | 382 | /** |
Kojto | 90:cb3d968589d8 | 383 | * @} |
Kojto | 90:cb3d968589d8 | 384 | */ |
Kojto | 90:cb3d968589d8 | 385 | |
Kojto | 90:cb3d968589d8 | 386 | /** @defgroup FSMC_Address_Hold_Time FSMC Address Hold Time |
Kojto | 90:cb3d968589d8 | 387 | * @{ |
Kojto | 90:cb3d968589d8 | 388 | */ |
Kojto | 90:cb3d968589d8 | 389 | |
Kojto | 90:cb3d968589d8 | 390 | #define IS_FSMC_ADDRESS_HOLD_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 15)) |
Kojto | 90:cb3d968589d8 | 391 | /** |
Kojto | 90:cb3d968589d8 | 392 | * @} |
Kojto | 90:cb3d968589d8 | 393 | */ |
Kojto | 90:cb3d968589d8 | 394 | |
Kojto | 90:cb3d968589d8 | 395 | /** @defgroup FSMC_Data_Setup_Time FSMC Data Setup Time |
Kojto | 90:cb3d968589d8 | 396 | * @{ |
Kojto | 90:cb3d968589d8 | 397 | */ |
Kojto | 90:cb3d968589d8 | 398 | |
Kojto | 90:cb3d968589d8 | 399 | #define IS_FSMC_DATASETUP_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 255)) |
Kojto | 90:cb3d968589d8 | 400 | /** |
Kojto | 90:cb3d968589d8 | 401 | * @} |
Kojto | 90:cb3d968589d8 | 402 | */ |
Kojto | 90:cb3d968589d8 | 403 | |
Kojto | 90:cb3d968589d8 | 404 | /** @defgroup FSMC_Bus_Turn_around_Duration FSMC Bus Turn around Duration |
Kojto | 90:cb3d968589d8 | 405 | * @{ |
Kojto | 90:cb3d968589d8 | 406 | */ |
Kojto | 90:cb3d968589d8 | 407 | |
Kojto | 90:cb3d968589d8 | 408 | #define IS_FSMC_TURNAROUND_TIME(__TIME__) ((__TIME__) <= 15) |
Kojto | 90:cb3d968589d8 | 409 | /** |
Kojto | 90:cb3d968589d8 | 410 | * @} |
Kojto | 90:cb3d968589d8 | 411 | */ |
Kojto | 90:cb3d968589d8 | 412 | |
Kojto | 90:cb3d968589d8 | 413 | /** @defgroup FSMC_CLK_Division FSMC CLK Division |
Kojto | 90:cb3d968589d8 | 414 | * @{ |
Kojto | 90:cb3d968589d8 | 415 | */ |
Kojto | 90:cb3d968589d8 | 416 | |
Kojto | 90:cb3d968589d8 | 417 | #define FSMC_CLK_DIV2 ((uint32_t)0x00000002) |
Kojto | 90:cb3d968589d8 | 418 | #define FSMC_CLK_DIV3 ((uint32_t)0x00000003) |
Kojto | 90:cb3d968589d8 | 419 | #define FSMC_CLK_DIV4 ((uint32_t)0x00000004) |
Kojto | 90:cb3d968589d8 | 420 | #define FSMC_CLK_DIV5 ((uint32_t)0x00000005) |
Kojto | 90:cb3d968589d8 | 421 | #define FSMC_CLK_DIV6 ((uint32_t)0x00000006) |
Kojto | 90:cb3d968589d8 | 422 | #define FSMC_CLK_DIV7 ((uint32_t)0x00000007) |
Kojto | 90:cb3d968589d8 | 423 | #define FSMC_CLK_DIV8 ((uint32_t)0x00000008) |
Kojto | 90:cb3d968589d8 | 424 | #define FSMC_CLK_DIV9 ((uint32_t)0x00000009) |
Kojto | 90:cb3d968589d8 | 425 | #define FSMC_CLK_DIV10 ((uint32_t)0x0000000A) |
Kojto | 90:cb3d968589d8 | 426 | #define FSMC_CLK_DIV11 ((uint32_t)0x0000000B) |
Kojto | 90:cb3d968589d8 | 427 | #define FSMC_CLK_DIV12 ((uint32_t)0x0000000C) |
Kojto | 90:cb3d968589d8 | 428 | #define FSMC_CLK_DIV13 ((uint32_t)0x0000000D) |
Kojto | 90:cb3d968589d8 | 429 | #define FSMC_CLK_DIV14 ((uint32_t)0x0000000E) |
Kojto | 90:cb3d968589d8 | 430 | #define FSMC_CLK_DIV15 ((uint32_t)0x0000000F) |
Kojto | 90:cb3d968589d8 | 431 | #define FSMC_CLK_DIV16 ((uint32_t)0x00000010) |
Kojto | 90:cb3d968589d8 | 432 | #define IS_FSMC_CLK_DIV(__DIV__) (((__DIV__) > 1) && ((__DIV__) <= 16)) |
Kojto | 90:cb3d968589d8 | 433 | /** |
Kojto | 90:cb3d968589d8 | 434 | * @} |
Kojto | 90:cb3d968589d8 | 435 | */ |
Kojto | 90:cb3d968589d8 | 436 | |
Kojto | 90:cb3d968589d8 | 437 | /** @defgroup FSMC_Data_Latency FSMC Data Latency |
Kojto | 90:cb3d968589d8 | 438 | * @{ |
Kojto | 90:cb3d968589d8 | 439 | */ |
Kojto | 90:cb3d968589d8 | 440 | |
Kojto | 90:cb3d968589d8 | 441 | #define IS_FSMC_DATA_LATENCY(__LATENCY__) (((__LATENCY__) > 1) && ((__LATENCY__) <= 17)) |
Kojto | 90:cb3d968589d8 | 442 | /** |
Kojto | 90:cb3d968589d8 | 443 | * @} |
Kojto | 90:cb3d968589d8 | 444 | */ |
Kojto | 90:cb3d968589d8 | 445 | |
Kojto | 90:cb3d968589d8 | 446 | /** @defgroup FSMC_Access_Mode FSMC Access Mode |
Kojto | 90:cb3d968589d8 | 447 | * @{ |
Kojto | 90:cb3d968589d8 | 448 | */ |
Kojto | 90:cb3d968589d8 | 449 | |
Kojto | 90:cb3d968589d8 | 450 | #define FSMC_ACCESS_MODE_A ((uint32_t)0x00000000) |
Kojto | 90:cb3d968589d8 | 451 | #define FSMC_ACCESS_MODE_B ((uint32_t)FSMC_BTRx_ACCMOD_0) |
Kojto | 90:cb3d968589d8 | 452 | #define FSMC_ACCESS_MODE_C ((uint32_t)FSMC_BTRx_ACCMOD_1) |
Kojto | 90:cb3d968589d8 | 453 | #define FSMC_ACCESS_MODE_D ((uint32_t)(FSMC_BTRx_ACCMOD_0 | FSMC_BTRx_ACCMOD_1)) |
Kojto | 90:cb3d968589d8 | 454 | |
Kojto | 90:cb3d968589d8 | 455 | #define IS_FSMC_ACCESS_MODE(__MODE__) (((__MODE__) == FSMC_ACCESS_MODE_A) || \ |
Kojto | 90:cb3d968589d8 | 456 | ((__MODE__) == FSMC_ACCESS_MODE_B) || \ |
Kojto | 90:cb3d968589d8 | 457 | ((__MODE__) == FSMC_ACCESS_MODE_C) || \ |
Kojto | 90:cb3d968589d8 | 458 | ((__MODE__) == FSMC_ACCESS_MODE_D)) |
Kojto | 90:cb3d968589d8 | 459 | /** |
Kojto | 90:cb3d968589d8 | 460 | * @} |
Kojto | 90:cb3d968589d8 | 461 | */ |
Kojto | 90:cb3d968589d8 | 462 | |
Kojto | 90:cb3d968589d8 | 463 | /** @defgroup FSMC_NORSRAM_Device_Instance FSMC NOR/SRAM Device Instance |
Kojto | 90:cb3d968589d8 | 464 | * @{ |
Kojto | 90:cb3d968589d8 | 465 | */ |
Kojto | 90:cb3d968589d8 | 466 | |
Kojto | 90:cb3d968589d8 | 467 | #define IS_FSMC_NORSRAM_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_NORSRAM_DEVICE) |
Kojto | 90:cb3d968589d8 | 468 | |
Kojto | 90:cb3d968589d8 | 469 | /** |
Kojto | 90:cb3d968589d8 | 470 | * @} |
Kojto | 90:cb3d968589d8 | 471 | */ |
Kojto | 90:cb3d968589d8 | 472 | |
Kojto | 90:cb3d968589d8 | 473 | /** @defgroup FSMC_NORSRAM_EXTENDED_Device_Instance FSMC NOR/SRAM EXTENDED Device Instance |
Kojto | 90:cb3d968589d8 | 474 | * @{ |
Kojto | 90:cb3d968589d8 | 475 | */ |
Kojto | 90:cb3d968589d8 | 476 | |
Kojto | 90:cb3d968589d8 | 477 | #define IS_FSMC_NORSRAM_EXTENDED_DEVICE(__INSTANCE__) ((__INSTANCE__) == FSMC_NORSRAM_EXTENDED_DEVICE) |
Kojto | 90:cb3d968589d8 | 478 | |
Kojto | 90:cb3d968589d8 | 479 | /** |
Kojto | 90:cb3d968589d8 | 480 | * @} |
Kojto | 90:cb3d968589d8 | 481 | */ |
Kojto | 90:cb3d968589d8 | 482 | |
Kojto | 90:cb3d968589d8 | 483 | /** |
Kojto | 90:cb3d968589d8 | 484 | * @} |
Kojto | 90:cb3d968589d8 | 485 | */ |
Kojto | 90:cb3d968589d8 | 486 | |
Kojto | 90:cb3d968589d8 | 487 | /* Exported macro ------------------------------------------------------------*/ |
Kojto | 90:cb3d968589d8 | 488 | |
Kojto | 90:cb3d968589d8 | 489 | /** @defgroup FSMC_NOR_Macros FSMC NOR/SRAM Exported Macros |
Kojto | 90:cb3d968589d8 | 490 | * @brief macros to handle NOR device enable/disable and read/write operations |
Kojto | 90:cb3d968589d8 | 491 | * @{ |
Kojto | 90:cb3d968589d8 | 492 | */ |
Kojto | 90:cb3d968589d8 | 493 | |
Kojto | 90:cb3d968589d8 | 494 | /** |
Kojto | 90:cb3d968589d8 | 495 | * @brief Enable the NORSRAM device access. |
Kojto | 90:cb3d968589d8 | 496 | * @param __INSTANCE__: FSMC_NORSRAM Instance |
Kojto | 90:cb3d968589d8 | 497 | * @param __BANK__: FSMC_NORSRAM Bank |
Kojto | 90:cb3d968589d8 | 498 | * @retval none |
Kojto | 90:cb3d968589d8 | 499 | */ |
Kojto | 90:cb3d968589d8 | 500 | #define __FSMC_NORSRAM_ENABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->BTCR[(__BANK__)] |= FSMC_BCRx_MBKEN) |
Kojto | 90:cb3d968589d8 | 501 | |
Kojto | 90:cb3d968589d8 | 502 | /** |
Kojto | 90:cb3d968589d8 | 503 | * @brief Disable the NORSRAM device access. |
Kojto | 90:cb3d968589d8 | 504 | * @param __INSTANCE__: FSMC_NORSRAM Instance |
Kojto | 90:cb3d968589d8 | 505 | * @param __BANK__: FSMC_NORSRAM Bank |
Kojto | 90:cb3d968589d8 | 506 | * @retval none |
Kojto | 90:cb3d968589d8 | 507 | */ |
Kojto | 90:cb3d968589d8 | 508 | #define __FSMC_NORSRAM_DISABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->BTCR[(__BANK__)] &= ~FSMC_BCRx_MBKEN) |
Kojto | 90:cb3d968589d8 | 509 | |
Kojto | 90:cb3d968589d8 | 510 | /** |
Kojto | 90:cb3d968589d8 | 511 | * @} |
Kojto | 90:cb3d968589d8 | 512 | */ |
Kojto | 90:cb3d968589d8 | 513 | |
Kojto | 90:cb3d968589d8 | 514 | /* Exported functions --------------------------------------------------------*/ |
Kojto | 90:cb3d968589d8 | 515 | |
Kojto | 90:cb3d968589d8 | 516 | /** @addtogroup FSMC_Exported_Functions |
Kojto | 90:cb3d968589d8 | 517 | * @{ |
Kojto | 90:cb3d968589d8 | 518 | */ |
Kojto | 90:cb3d968589d8 | 519 | |
Kojto | 90:cb3d968589d8 | 520 | /** @addtogroup HAL_FSMC_NORSRAM_Group1 |
Kojto | 90:cb3d968589d8 | 521 | * @{ |
Kojto | 90:cb3d968589d8 | 522 | */ |
Kojto | 90:cb3d968589d8 | 523 | |
Kojto | 90:cb3d968589d8 | 524 | /* FSMC_NORSRAM Controller functions ******************************************/ |
Kojto | 90:cb3d968589d8 | 525 | /* Initialization/de-initialization functions */ |
Kojto | 90:cb3d968589d8 | 526 | HAL_StatusTypeDef FSMC_NORSRAM_Init(FSMC_NORSRAM_TYPEDEF *Device, FSMC_NORSRAM_InitTypeDef *Init); |
Kojto | 90:cb3d968589d8 | 527 | HAL_StatusTypeDef FSMC_NORSRAM_Timing_Init(FSMC_NORSRAM_TYPEDEF *Device, FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank); |
Kojto | 90:cb3d968589d8 | 528 | HAL_StatusTypeDef FSMC_NORSRAM_Extended_Timing_Init(FSMC_NORSRAM_EXTENDED_TYPEDEF *Device, FSMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode); |
Kojto | 90:cb3d968589d8 | 529 | HAL_StatusTypeDef FSMC_NORSRAM_DeInit(FSMC_NORSRAM_TYPEDEF *Device, FSMC_NORSRAM_EXTENDED_TYPEDEF *ExDevice, uint32_t Bank); |
Kojto | 90:cb3d968589d8 | 530 | |
Kojto | 90:cb3d968589d8 | 531 | /** |
Kojto | 90:cb3d968589d8 | 532 | * @} |
Kojto | 90:cb3d968589d8 | 533 | */ |
Kojto | 90:cb3d968589d8 | 534 | |
Kojto | 90:cb3d968589d8 | 535 | /** @addtogroup HAL_FSMC_NORSRAM_Group2 |
Kojto | 90:cb3d968589d8 | 536 | * @{ |
Kojto | 90:cb3d968589d8 | 537 | */ |
Kojto | 90:cb3d968589d8 | 538 | |
Kojto | 90:cb3d968589d8 | 539 | /* FSMC_NORSRAM Control functions */ |
Kojto | 90:cb3d968589d8 | 540 | HAL_StatusTypeDef FSMC_NORSRAM_WriteOperation_Enable(FSMC_NORSRAM_TYPEDEF *Device, uint32_t Bank); |
Kojto | 90:cb3d968589d8 | 541 | HAL_StatusTypeDef FSMC_NORSRAM_WriteOperation_Disable(FSMC_NORSRAM_TYPEDEF *Device, uint32_t Bank); |
Kojto | 90:cb3d968589d8 | 542 | |
Kojto | 90:cb3d968589d8 | 543 | /** |
Kojto | 90:cb3d968589d8 | 544 | * @} |
Kojto | 90:cb3d968589d8 | 545 | */ |
Kojto | 90:cb3d968589d8 | 546 | |
Kojto | 90:cb3d968589d8 | 547 | #endif /* STM32L151xD || STM32L152xD || STM32L162xD */ |
Kojto | 90:cb3d968589d8 | 548 | |
Kojto | 90:cb3d968589d8 | 549 | /** |
Kojto | 90:cb3d968589d8 | 550 | * @} |
Kojto | 90:cb3d968589d8 | 551 | */ |
Kojto | 90:cb3d968589d8 | 552 | |
Kojto | 90:cb3d968589d8 | 553 | /** |
Kojto | 90:cb3d968589d8 | 554 | * @} |
Kojto | 90:cb3d968589d8 | 555 | */ |
Kojto | 90:cb3d968589d8 | 556 | |
Kojto | 90:cb3d968589d8 | 557 | /** |
Kojto | 90:cb3d968589d8 | 558 | * @} |
Kojto | 90:cb3d968589d8 | 559 | */ |
Kojto | 90:cb3d968589d8 | 560 | |
Kojto | 90:cb3d968589d8 | 561 | #ifdef __cplusplus |
Kojto | 90:cb3d968589d8 | 562 | } |
Kojto | 90:cb3d968589d8 | 563 | #endif |
Kojto | 90:cb3d968589d8 | 564 | |
Kojto | 90:cb3d968589d8 | 565 | #endif /* __STM32L1xx_LL_FSMC_H */ |
Kojto | 90:cb3d968589d8 | 566 | |
Kojto | 90:cb3d968589d8 | 567 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |