rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | /** |
| 2 | ****************************************************************************** |
| 3 | * @file stm32f4xx.h |
| 4 | * @author MCD Application Team |
| 5 | * @version V1.5.0 |
| 6 | * @date 06-March-2015 |
| 7 | * @brief CMSIS Cortex-M4 Device Peripheral Access Layer Header File. |
| 8 | * This file contains all the peripheral register's definitions, bits |
| 9 | * definitions and memory mapping for STM32F4xx devices. |
| 10 | * |
| 11 | * The file is the unique include file that the application programmer |
| 12 | * is using in the C source code, usually in main.c. This file contains: |
| 13 | * - Configuration section that allows to select: |
| 14 | * - The device used in the target application |
| 15 | * - To use or not the peripherals drivers in application code(i.e. |
| 16 | * code will be based on direct access to peripherals registers |
| 17 | * rather than drivers API), this option is controlled by |
| 18 | * "#define USE_STDPERIPH_DRIVER" |
| 19 | * - To change few application-specific parameters such as the HSE |
| 20 | * crystal frequency |
| 21 | * - Data structures and the address mapping for all peripherals |
| 22 | * - Peripheral's registers declarations and bits definition |
| 23 | * - Macros to access peripherals registers hardware |
| 24 | * |
| 25 | ****************************************************************************** |
| 26 | * @attention |
| 27 | * |
| 28 | * <h2><center>© COPYRIGHT 2015 STMicroelectronics</center></h2> |
| 29 | * |
| 30 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); |
| 31 | * You may not use this file except in compliance with the License. |
| 32 | * You may obtain a copy of the License at: |
| 33 | * |
| 34 | * http://www.st.com/software_license_agreement_liberty_v2 |
| 35 | * |
| 36 | * Unless required by applicable law or agreed to in writing, software |
| 37 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 38 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 39 | * See the License for the specific language governing permissions and |
| 40 | * limitations under the License. |
| 41 | * |
| 42 | ****************************************************************************** |
| 43 | */ |
| 44 | |
| 45 | /** @addtogroup CMSIS |
| 46 | * @{ |
| 47 | */ |
| 48 | |
| 49 | /** @addtogroup stm32f4xx |
| 50 | * @{ |
| 51 | */ |
| 52 | |
| 53 | #ifndef __STM32F4xx_H |
| 54 | #define __STM32F4xx_H |
| 55 | |
| 56 | #ifdef __cplusplus |
| 57 | extern "C" { |
| 58 | #endif /* __cplusplus */ |
| 59 | |
| 60 | /* lk integration */ |
| 61 | |
| 62 | #ifdef STM32F40_41XXX |
| 63 | #define STM32F40_41xxx |
| 64 | #endif |
| 65 | |
| 66 | #define assert_param(x) |
| 67 | |
| 68 | /** @addtogroup Library_configuration_section |
| 69 | * @{ |
| 70 | */ |
| 71 | |
| 72 | /* Uncomment the line below according to the target STM32 device used in your |
| 73 | application |
| 74 | */ |
| 75 | |
| 76 | #if !defined(STM32F40_41xxx) && !defined(STM32F427_437xx) && !defined(STM32F429_439xx) && !defined(STM32F401xx) && !defined(STM32F411xE) && \ |
| 77 | !defined(STM32F446xx) |
| 78 | /* #define STM32F40_41xxx */ /*!< STM32F405RG, STM32F405VG, STM32F405ZG, STM32F415RG, STM32F415VG, STM32F415ZG, |
| 79 | STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG, STM32F407IE, |
| 80 | STM32F417VG, STM32F417VE, STM32F417ZG, STM32F417ZE, STM32F417IG and STM32F417IE Devices */ |
| 81 | |
| 82 | /* #define STM32F427_437xx */ /*!< STM32F427VG, STM32F427VI, STM32F427ZG, STM32F427ZI, STM32F427IG, STM32F427II, |
| 83 | STM32F437VG, STM32F437VI, STM32F437ZG, STM32F437ZI, STM32F437IG, STM32F437II Devices */ |
| 84 | |
| 85 | /* #define STM32F429_439xx */ /*!< STM32F429VG, STM32F429VI, STM32F429ZG, STM32F429ZI, STM32F429BG, STM32F429BI, |
| 86 | STM32F429NG, STM32F439NI, STM32F429IG, STM32F429II, STM32F439VG, STM32F439VI, |
| 87 | STM32F439ZG, STM32F439ZI, STM32F439BG, STM32F439BI, STM32F439NG, STM32F439NI, |
| 88 | STM32F439IG and STM32F439II Devices */ |
| 89 | |
| 90 | /* #define STM32F401xx */ /*!< STM32F401CB, STM32F401CC, STM32F401RB, STM32F401RC, STM32F401VB, STM32F401VC |
| 91 | STM32F401CD, STM32F401RD, STM32F401VD, STM32F401CExx, STM32F401RE and STM32F401VE Devices */ |
| 92 | |
| 93 | /* #define STM32F411xE */ /*!< STM32F411CD, STM32F411RD, STM32F411VD, STM32F411CE, STM32F411RE and STM32F411VE Devices */ |
| 94 | |
| 95 | /* #define STM32F446xx */ /*!< STM32F446MC, STM32F446ME, STM32F446RC, STM32F446RE, STM32F446VC, STM32F446VE, STM32F446ZC |
| 96 | and STM32F446ZE Devices */ |
| 97 | #endif |
| 98 | |
| 99 | /* Old STM32F40XX definition, maintained for legacy purpose */ |
| 100 | #ifdef STM32F40XX |
| 101 | #define STM32F40_41xxx |
| 102 | #endif /* STM32F40XX */ |
| 103 | |
| 104 | /* Old STM32F427X definition, maintained for legacy purpose */ |
| 105 | #ifdef STM32F427X |
| 106 | #define STM32F427_437xx |
| 107 | #endif /* STM32F427X */ |
| 108 | |
| 109 | /* Tip: To avoid modifying this file each time you need to switch between these |
| 110 | devices, you can define the device in your toolchain compiler preprocessor. |
| 111 | */ |
| 112 | |
| 113 | #if !defined(STM32F40_41xxx) && !defined(STM32F427_437xx) && !defined(STM32F429_439xx) && !defined(STM32F401xx) && !defined(STM32F411xE) && \ |
| 114 | !defined(STM32F446xx) |
| 115 | #error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)" |
| 116 | #endif |
| 117 | |
| 118 | #if !defined (USE_STDPERIPH_DRIVER) |
| 119 | /** |
| 120 | * @brief Comment the line below if you will not use the peripherals drivers. |
| 121 | In this case, these drivers will not be included and the application code will |
| 122 | be based on direct access to peripherals registers |
| 123 | */ |
| 124 | /*#define USE_STDPERIPH_DRIVER */ |
| 125 | #endif /* USE_STDPERIPH_DRIVER */ |
| 126 | |
| 127 | /** |
| 128 | * @brief In the following line adjust the value of External High Speed oscillator (HSE) |
| 129 | used in your application |
| 130 | |
| 131 | Tip: To avoid modifying this file each time you need to use different HSE, you |
| 132 | can define the HSE value in your toolchain compiler preprocessor. |
| 133 | */ |
| 134 | #if defined(STM32F40_41xxx) || defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F401xx) || defined(STM32F411xE) |
| 135 | #if !defined (HSE_VALUE) |
| 136 | #define HSE_VALUE ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */ |
| 137 | #endif /* HSE_VALUE */ |
| 138 | #elif defined(STM32F446xx) |
| 139 | #if !defined (HSE_VALUE) |
| 140 | #define HSE_VALUE ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */ |
| 141 | #endif /* HSE_VALUE */ |
| 142 | #endif /* STM32F40_41xxx || STM32F427_437xx || STM32F429_439xx || STM32F401xx || STM32F411xE */ |
| 143 | /** |
| 144 | * @brief In the following line adjust the External High Speed oscillator (HSE) Startup |
| 145 | Timeout value |
| 146 | */ |
| 147 | #if !defined (HSE_STARTUP_TIMEOUT) |
| 148 | #define HSE_STARTUP_TIMEOUT ((uint16_t)0x05000) /*!< Time out for HSE start up */ |
| 149 | #endif /* HSE_STARTUP_TIMEOUT */ |
| 150 | |
| 151 | #if !defined (HSI_VALUE) |
| 152 | #define HSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/ |
| 153 | #endif /* HSI_VALUE */ |
| 154 | |
| 155 | /** |
| 156 | * @brief STM32F4XX Standard Peripherals Library version number V1.5.0 |
| 157 | */ |
| 158 | #define __STM32F4XX_STDPERIPH_VERSION_MAIN (0x01) /*!< [31:24] main version */ |
| 159 | #define __STM32F4XX_STDPERIPH_VERSION_SUB1 (0x05) /*!< [23:16] sub1 version */ |
| 160 | #define __STM32F4XX_STDPERIPH_VERSION_SUB2 (0x00) /*!< [15:8] sub2 version */ |
| 161 | #define __STM32F4XX_STDPERIPH_VERSION_RC (0x00) /*!< [7:0] release candidate */ |
| 162 | #define __STM32F4XX_STDPERIPH_VERSION ((__STM32F4XX_STDPERIPH_VERSION_MAIN << 24)\ |
| 163 | |(__STM32F4XX_STDPERIPH_VERSION_SUB1 << 16)\ |
| 164 | |(__STM32F4XX_STDPERIPH_VERSION_SUB2 << 8)\ |
| 165 | |(__STM32F4XX_STDPERIPH_VERSION_RC)) |
| 166 | |
| 167 | /** |
| 168 | * @} |
| 169 | */ |
| 170 | |
| 171 | /** @addtogroup Configuration_section_for_CMSIS |
| 172 | * @{ |
| 173 | */ |
| 174 | |
| 175 | /** |
| 176 | * @brief Configuration of the Cortex-M4 Processor and Core Peripherals |
| 177 | */ |
| 178 | #define __CM4_REV 0x0001 /*!< Core revision r0p1 */ |
| 179 | #define __MPU_PRESENT 1 /*!< STM32F4XX provides an MPU */ |
| 180 | #define __NVIC_PRIO_BITS 4 /*!< STM32F4XX uses 4 Bits for the Priority Levels */ |
| 181 | #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */ |
| 182 | #define __FPU_PRESENT 1 /*!< FPU present */ |
| 183 | |
| 184 | /** |
| 185 | * @brief STM32F4XX Interrupt Number Definition, according to the selected device |
| 186 | * in @ref Library_configuration_section |
| 187 | */ |
| 188 | typedef enum IRQn |
| 189 | { |
| 190 | /****** Cortex-M4 Processor Exceptions Numbers ****************************************************************/ |
| 191 | NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */ |
| 192 | MemoryManagement_IRQn = -12, /*!< 4 Cortex-M4 Memory Management Interrupt */ |
| 193 | BusFault_IRQn = -11, /*!< 5 Cortex-M4 Bus Fault Interrupt */ |
| 194 | UsageFault_IRQn = -10, /*!< 6 Cortex-M4 Usage Fault Interrupt */ |
| 195 | SVCall_IRQn = -5, /*!< 11 Cortex-M4 SV Call Interrupt */ |
| 196 | DebugMonitor_IRQn = -4, /*!< 12 Cortex-M4 Debug Monitor Interrupt */ |
| 197 | PendSV_IRQn = -2, /*!< 14 Cortex-M4 Pend SV Interrupt */ |
| 198 | SysTick_IRQn = -1, /*!< 15 Cortex-M4 System Tick Interrupt */ |
| 199 | /****** STM32 specific Interrupt Numbers **********************************************************************/ |
| 200 | WWDG_IRQn = 0, /*!< Window WatchDog Interrupt */ |
| 201 | PVD_IRQn = 1, /*!< PVD through EXTI Line detection Interrupt */ |
| 202 | TAMP_STAMP_IRQn = 2, /*!< Tamper and TimeStamp interrupts through the EXTI line */ |
| 203 | RTC_WKUP_IRQn = 3, /*!< RTC Wakeup interrupt through the EXTI line */ |
| 204 | FLASH_IRQn = 4, /*!< FLASH global Interrupt */ |
| 205 | RCC_IRQn = 5, /*!< RCC global Interrupt */ |
| 206 | EXTI0_IRQn = 6, /*!< EXTI Line0 Interrupt */ |
| 207 | EXTI1_IRQn = 7, /*!< EXTI Line1 Interrupt */ |
| 208 | EXTI2_IRQn = 8, /*!< EXTI Line2 Interrupt */ |
| 209 | EXTI3_IRQn = 9, /*!< EXTI Line3 Interrupt */ |
| 210 | EXTI4_IRQn = 10, /*!< EXTI Line4 Interrupt */ |
| 211 | DMA1_Stream0_IRQn = 11, /*!< DMA1 Stream 0 global Interrupt */ |
| 212 | DMA1_Stream1_IRQn = 12, /*!< DMA1 Stream 1 global Interrupt */ |
| 213 | DMA1_Stream2_IRQn = 13, /*!< DMA1 Stream 2 global Interrupt */ |
| 214 | DMA1_Stream3_IRQn = 14, /*!< DMA1 Stream 3 global Interrupt */ |
| 215 | DMA1_Stream4_IRQn = 15, /*!< DMA1 Stream 4 global Interrupt */ |
| 216 | DMA1_Stream5_IRQn = 16, /*!< DMA1 Stream 5 global Interrupt */ |
| 217 | DMA1_Stream6_IRQn = 17, /*!< DMA1 Stream 6 global Interrupt */ |
| 218 | ADC_IRQn = 18, /*!< ADC1, ADC2 and ADC3 global Interrupts */ |
| 219 | |
| 220 | #if defined(STM32F40_41xxx) |
| 221 | CAN1_TX_IRQn = 19, /*!< CAN1 TX Interrupt */ |
| 222 | CAN1_RX0_IRQn = 20, /*!< CAN1 RX0 Interrupt */ |
| 223 | CAN1_RX1_IRQn = 21, /*!< CAN1 RX1 Interrupt */ |
| 224 | CAN1_SCE_IRQn = 22, /*!< CAN1 SCE Interrupt */ |
| 225 | EXTI9_5_IRQn = 23, /*!< External Line[9:5] Interrupts */ |
| 226 | TIM1_BRK_TIM9_IRQn = 24, /*!< TIM1 Break interrupt and TIM9 global interrupt */ |
| 227 | TIM1_UP_TIM10_IRQn = 25, /*!< TIM1 Update Interrupt and TIM10 global interrupt */ |
| 228 | TIM1_TRG_COM_TIM11_IRQn = 26, /*!< TIM1 Trigger and Commutation Interrupt and TIM11 global interrupt */ |
| 229 | TIM1_CC_IRQn = 27, /*!< TIM1 Capture Compare Interrupt */ |
| 230 | TIM2_IRQn = 28, /*!< TIM2 global Interrupt */ |
| 231 | TIM3_IRQn = 29, /*!< TIM3 global Interrupt */ |
| 232 | TIM4_IRQn = 30, /*!< TIM4 global Interrupt */ |
| 233 | I2C1_EV_IRQn = 31, /*!< I2C1 Event Interrupt */ |
| 234 | I2C1_ER_IRQn = 32, /*!< I2C1 Error Interrupt */ |
| 235 | I2C2_EV_IRQn = 33, /*!< I2C2 Event Interrupt */ |
| 236 | I2C2_ER_IRQn = 34, /*!< I2C2 Error Interrupt */ |
| 237 | SPI1_IRQn = 35, /*!< SPI1 global Interrupt */ |
| 238 | SPI2_IRQn = 36, /*!< SPI2 global Interrupt */ |
| 239 | USART1_IRQn = 37, /*!< USART1 global Interrupt */ |
| 240 | USART2_IRQn = 38, /*!< USART2 global Interrupt */ |
| 241 | USART3_IRQn = 39, /*!< USART3 global Interrupt */ |
| 242 | EXTI15_10_IRQn = 40, /*!< External Line[15:10] Interrupts */ |
| 243 | RTC_Alarm_IRQn = 41, /*!< RTC Alarm (A and B) through EXTI Line Interrupt */ |
| 244 | OTG_FS_WKUP_IRQn = 42, /*!< USB OTG FS Wakeup through EXTI line interrupt */ |
| 245 | TIM8_BRK_TIM12_IRQn = 43, /*!< TIM8 Break Interrupt and TIM12 global interrupt */ |
| 246 | TIM8_UP_TIM13_IRQn = 44, /*!< TIM8 Update Interrupt and TIM13 global interrupt */ |
| 247 | TIM8_TRG_COM_TIM14_IRQn = 45, /*!< TIM8 Trigger and Commutation Interrupt and TIM14 global interrupt */ |
| 248 | TIM8_CC_IRQn = 46, /*!< TIM8 Capture Compare Interrupt */ |
| 249 | DMA1_Stream7_IRQn = 47, /*!< DMA1 Stream7 Interrupt */ |
| 250 | FSMC_IRQn = 48, /*!< FSMC global Interrupt */ |
| 251 | SDIO_IRQn = 49, /*!< SDIO global Interrupt */ |
| 252 | TIM5_IRQn = 50, /*!< TIM5 global Interrupt */ |
| 253 | SPI3_IRQn = 51, /*!< SPI3 global Interrupt */ |
| 254 | UART4_IRQn = 52, /*!< UART4 global Interrupt */ |
| 255 | UART5_IRQn = 53, /*!< UART5 global Interrupt */ |
| 256 | TIM6_DAC_IRQn = 54, /*!< TIM6 global and DAC1&2 underrun error interrupts */ |
| 257 | TIM7_IRQn = 55, /*!< TIM7 global interrupt */ |
| 258 | DMA2_Stream0_IRQn = 56, /*!< DMA2 Stream 0 global Interrupt */ |
| 259 | DMA2_Stream1_IRQn = 57, /*!< DMA2 Stream 1 global Interrupt */ |
| 260 | DMA2_Stream2_IRQn = 58, /*!< DMA2 Stream 2 global Interrupt */ |
| 261 | DMA2_Stream3_IRQn = 59, /*!< DMA2 Stream 3 global Interrupt */ |
| 262 | DMA2_Stream4_IRQn = 60, /*!< DMA2 Stream 4 global Interrupt */ |
| 263 | ETH_IRQn = 61, /*!< Ethernet global Interrupt */ |
| 264 | ETH_WKUP_IRQn = 62, /*!< Ethernet Wakeup through EXTI line Interrupt */ |
| 265 | CAN2_TX_IRQn = 63, /*!< CAN2 TX Interrupt */ |
| 266 | CAN2_RX0_IRQn = 64, /*!< CAN2 RX0 Interrupt */ |
| 267 | CAN2_RX1_IRQn = 65, /*!< CAN2 RX1 Interrupt */ |
| 268 | CAN2_SCE_IRQn = 66, /*!< CAN2 SCE Interrupt */ |
| 269 | OTG_FS_IRQn = 67, /*!< USB OTG FS global Interrupt */ |
| 270 | DMA2_Stream5_IRQn = 68, /*!< DMA2 Stream 5 global interrupt */ |
| 271 | DMA2_Stream6_IRQn = 69, /*!< DMA2 Stream 6 global interrupt */ |
| 272 | DMA2_Stream7_IRQn = 70, /*!< DMA2 Stream 7 global interrupt */ |
| 273 | USART6_IRQn = 71, /*!< USART6 global interrupt */ |
| 274 | I2C3_EV_IRQn = 72, /*!< I2C3 event interrupt */ |
| 275 | I2C3_ER_IRQn = 73, /*!< I2C3 error interrupt */ |
| 276 | OTG_HS_EP1_OUT_IRQn = 74, /*!< USB OTG HS End Point 1 Out global interrupt */ |
| 277 | OTG_HS_EP1_IN_IRQn = 75, /*!< USB OTG HS End Point 1 In global interrupt */ |
| 278 | OTG_HS_WKUP_IRQn = 76, /*!< USB OTG HS Wakeup through EXTI interrupt */ |
| 279 | OTG_HS_IRQn = 77, /*!< USB OTG HS global interrupt */ |
| 280 | DCMI_IRQn = 78, /*!< DCMI global interrupt */ |
| 281 | CRYP_IRQn = 79, /*!< CRYP crypto global interrupt */ |
| 282 | HASH_RNG_IRQn = 80, /*!< Hash and Rng global interrupt */ |
| 283 | FPU_IRQn = 81 /*!< FPU global interrupt */ |
| 284 | #endif /* STM32F40_41xxx */ |
| 285 | |
| 286 | #if defined(STM32F427_437xx) |
| 287 | CAN1_TX_IRQn = 19, /*!< CAN1 TX Interrupt */ |
| 288 | CAN1_RX0_IRQn = 20, /*!< CAN1 RX0 Interrupt */ |
| 289 | CAN1_RX1_IRQn = 21, /*!< CAN1 RX1 Interrupt */ |
| 290 | CAN1_SCE_IRQn = 22, /*!< CAN1 SCE Interrupt */ |
| 291 | EXTI9_5_IRQn = 23, /*!< External Line[9:5] Interrupts */ |
| 292 | TIM1_BRK_TIM9_IRQn = 24, /*!< TIM1 Break interrupt and TIM9 global interrupt */ |
| 293 | TIM1_UP_TIM10_IRQn = 25, /*!< TIM1 Update Interrupt and TIM10 global interrupt */ |
| 294 | TIM1_TRG_COM_TIM11_IRQn = 26, /*!< TIM1 Trigger and Commutation Interrupt and TIM11 global interrupt */ |
| 295 | TIM1_CC_IRQn = 27, /*!< TIM1 Capture Compare Interrupt */ |
| 296 | TIM2_IRQn = 28, /*!< TIM2 global Interrupt */ |
| 297 | TIM3_IRQn = 29, /*!< TIM3 global Interrupt */ |
| 298 | TIM4_IRQn = 30, /*!< TIM4 global Interrupt */ |
| 299 | I2C1_EV_IRQn = 31, /*!< I2C1 Event Interrupt */ |
| 300 | I2C1_ER_IRQn = 32, /*!< I2C1 Error Interrupt */ |
| 301 | I2C2_EV_IRQn = 33, /*!< I2C2 Event Interrupt */ |
| 302 | I2C2_ER_IRQn = 34, /*!< I2C2 Error Interrupt */ |
| 303 | SPI1_IRQn = 35, /*!< SPI1 global Interrupt */ |
| 304 | SPI2_IRQn = 36, /*!< SPI2 global Interrupt */ |
| 305 | USART1_IRQn = 37, /*!< USART1 global Interrupt */ |
| 306 | USART2_IRQn = 38, /*!< USART2 global Interrupt */ |
| 307 | USART3_IRQn = 39, /*!< USART3 global Interrupt */ |
| 308 | EXTI15_10_IRQn = 40, /*!< External Line[15:10] Interrupts */ |
| 309 | RTC_Alarm_IRQn = 41, /*!< RTC Alarm (A and B) through EXTI Line Interrupt */ |
| 310 | OTG_FS_WKUP_IRQn = 42, /*!< USB OTG FS Wakeup through EXTI line interrupt */ |
| 311 | TIM8_BRK_TIM12_IRQn = 43, /*!< TIM8 Break Interrupt and TIM12 global interrupt */ |
| 312 | TIM8_UP_TIM13_IRQn = 44, /*!< TIM8 Update Interrupt and TIM13 global interrupt */ |
| 313 | TIM8_TRG_COM_TIM14_IRQn = 45, /*!< TIM8 Trigger and Commutation Interrupt and TIM14 global interrupt */ |
| 314 | TIM8_CC_IRQn = 46, /*!< TIM8 Capture Compare Interrupt */ |
| 315 | DMA1_Stream7_IRQn = 47, /*!< DMA1 Stream7 Interrupt */ |
| 316 | FMC_IRQn = 48, /*!< FMC global Interrupt */ |
| 317 | SDIO_IRQn = 49, /*!< SDIO global Interrupt */ |
| 318 | TIM5_IRQn = 50, /*!< TIM5 global Interrupt */ |
| 319 | SPI3_IRQn = 51, /*!< SPI3 global Interrupt */ |
| 320 | UART4_IRQn = 52, /*!< UART4 global Interrupt */ |
| 321 | UART5_IRQn = 53, /*!< UART5 global Interrupt */ |
| 322 | TIM6_DAC_IRQn = 54, /*!< TIM6 global and DAC1&2 underrun error interrupts */ |
| 323 | TIM7_IRQn = 55, /*!< TIM7 global interrupt */ |
| 324 | DMA2_Stream0_IRQn = 56, /*!< DMA2 Stream 0 global Interrupt */ |
| 325 | DMA2_Stream1_IRQn = 57, /*!< DMA2 Stream 1 global Interrupt */ |
| 326 | DMA2_Stream2_IRQn = 58, /*!< DMA2 Stream 2 global Interrupt */ |
| 327 | DMA2_Stream3_IRQn = 59, /*!< DMA2 Stream 3 global Interrupt */ |
| 328 | DMA2_Stream4_IRQn = 60, /*!< DMA2 Stream 4 global Interrupt */ |
| 329 | ETH_IRQn = 61, /*!< Ethernet global Interrupt */ |
| 330 | ETH_WKUP_IRQn = 62, /*!< Ethernet Wakeup through EXTI line Interrupt */ |
| 331 | CAN2_TX_IRQn = 63, /*!< CAN2 TX Interrupt */ |
| 332 | CAN2_RX0_IRQn = 64, /*!< CAN2 RX0 Interrupt */ |
| 333 | CAN2_RX1_IRQn = 65, /*!< CAN2 RX1 Interrupt */ |
| 334 | CAN2_SCE_IRQn = 66, /*!< CAN2 SCE Interrupt */ |
| 335 | OTG_FS_IRQn = 67, /*!< USB OTG FS global Interrupt */ |
| 336 | DMA2_Stream5_IRQn = 68, /*!< DMA2 Stream 5 global interrupt */ |
| 337 | DMA2_Stream6_IRQn = 69, /*!< DMA2 Stream 6 global interrupt */ |
| 338 | DMA2_Stream7_IRQn = 70, /*!< DMA2 Stream 7 global interrupt */ |
| 339 | USART6_IRQn = 71, /*!< USART6 global interrupt */ |
| 340 | I2C3_EV_IRQn = 72, /*!< I2C3 event interrupt */ |
| 341 | I2C3_ER_IRQn = 73, /*!< I2C3 error interrupt */ |
| 342 | OTG_HS_EP1_OUT_IRQn = 74, /*!< USB OTG HS End Point 1 Out global interrupt */ |
| 343 | OTG_HS_EP1_IN_IRQn = 75, /*!< USB OTG HS End Point 1 In global interrupt */ |
| 344 | OTG_HS_WKUP_IRQn = 76, /*!< USB OTG HS Wakeup through EXTI interrupt */ |
| 345 | OTG_HS_IRQn = 77, /*!< USB OTG HS global interrupt */ |
| 346 | DCMI_IRQn = 78, /*!< DCMI global interrupt */ |
| 347 | CRYP_IRQn = 79, /*!< CRYP crypto global interrupt */ |
| 348 | HASH_RNG_IRQn = 80, /*!< Hash and Rng global interrupt */ |
| 349 | FPU_IRQn = 81, /*!< FPU global interrupt */ |
| 350 | UART7_IRQn = 82, /*!< UART7 global interrupt */ |
| 351 | UART8_IRQn = 83, /*!< UART8 global interrupt */ |
| 352 | SPI4_IRQn = 84, /*!< SPI4 global Interrupt */ |
| 353 | SPI5_IRQn = 85, /*!< SPI5 global Interrupt */ |
| 354 | SPI6_IRQn = 86, /*!< SPI6 global Interrupt */ |
| 355 | SAI1_IRQn = 87, /*!< SAI1 global Interrupt */ |
| 356 | DMA2D_IRQn = 90 /*!< DMA2D global Interrupt */ |
| 357 | #endif /* STM32F427_437xx */ |
| 358 | |
| 359 | #if defined(STM32F429_439xx) |
| 360 | CAN1_TX_IRQn = 19, /*!< CAN1 TX Interrupt */ |
| 361 | CAN1_RX0_IRQn = 20, /*!< CAN1 RX0 Interrupt */ |
| 362 | CAN1_RX1_IRQn = 21, /*!< CAN1 RX1 Interrupt */ |
| 363 | CAN1_SCE_IRQn = 22, /*!< CAN1 SCE Interrupt */ |
| 364 | EXTI9_5_IRQn = 23, /*!< External Line[9:5] Interrupts */ |
| 365 | TIM1_BRK_TIM9_IRQn = 24, /*!< TIM1 Break interrupt and TIM9 global interrupt */ |
| 366 | TIM1_UP_TIM10_IRQn = 25, /*!< TIM1 Update Interrupt and TIM10 global interrupt */ |
| 367 | TIM1_TRG_COM_TIM11_IRQn = 26, /*!< TIM1 Trigger and Commutation Interrupt and TIM11 global interrupt */ |
| 368 | TIM1_CC_IRQn = 27, /*!< TIM1 Capture Compare Interrupt */ |
| 369 | TIM2_IRQn = 28, /*!< TIM2 global Interrupt */ |
| 370 | TIM3_IRQn = 29, /*!< TIM3 global Interrupt */ |
| 371 | TIM4_IRQn = 30, /*!< TIM4 global Interrupt */ |
| 372 | I2C1_EV_IRQn = 31, /*!< I2C1 Event Interrupt */ |
| 373 | I2C1_ER_IRQn = 32, /*!< I2C1 Error Interrupt */ |
| 374 | I2C2_EV_IRQn = 33, /*!< I2C2 Event Interrupt */ |
| 375 | I2C2_ER_IRQn = 34, /*!< I2C2 Error Interrupt */ |
| 376 | SPI1_IRQn = 35, /*!< SPI1 global Interrupt */ |
| 377 | SPI2_IRQn = 36, /*!< SPI2 global Interrupt */ |
| 378 | USART1_IRQn = 37, /*!< USART1 global Interrupt */ |
| 379 | USART2_IRQn = 38, /*!< USART2 global Interrupt */ |
| 380 | USART3_IRQn = 39, /*!< USART3 global Interrupt */ |
| 381 | EXTI15_10_IRQn = 40, /*!< External Line[15:10] Interrupts */ |
| 382 | RTC_Alarm_IRQn = 41, /*!< RTC Alarm (A and B) through EXTI Line Interrupt */ |
| 383 | OTG_FS_WKUP_IRQn = 42, /*!< USB OTG FS Wakeup through EXTI line interrupt */ |
| 384 | TIM8_BRK_TIM12_IRQn = 43, /*!< TIM8 Break Interrupt and TIM12 global interrupt */ |
| 385 | TIM8_UP_TIM13_IRQn = 44, /*!< TIM8 Update Interrupt and TIM13 global interrupt */ |
| 386 | TIM8_TRG_COM_TIM14_IRQn = 45, /*!< TIM8 Trigger and Commutation Interrupt and TIM14 global interrupt */ |
| 387 | TIM8_CC_IRQn = 46, /*!< TIM8 Capture Compare Interrupt */ |
| 388 | DMA1_Stream7_IRQn = 47, /*!< DMA1 Stream7 Interrupt */ |
| 389 | FMC_IRQn = 48, /*!< FMC global Interrupt */ |
| 390 | SDIO_IRQn = 49, /*!< SDIO global Interrupt */ |
| 391 | TIM5_IRQn = 50, /*!< TIM5 global Interrupt */ |
| 392 | SPI3_IRQn = 51, /*!< SPI3 global Interrupt */ |
| 393 | UART4_IRQn = 52, /*!< UART4 global Interrupt */ |
| 394 | UART5_IRQn = 53, /*!< UART5 global Interrupt */ |
| 395 | TIM6_DAC_IRQn = 54, /*!< TIM6 global and DAC1&2 underrun error interrupts */ |
| 396 | TIM7_IRQn = 55, /*!< TIM7 global interrupt */ |
| 397 | DMA2_Stream0_IRQn = 56, /*!< DMA2 Stream 0 global Interrupt */ |
| 398 | DMA2_Stream1_IRQn = 57, /*!< DMA2 Stream 1 global Interrupt */ |
| 399 | DMA2_Stream2_IRQn = 58, /*!< DMA2 Stream 2 global Interrupt */ |
| 400 | DMA2_Stream3_IRQn = 59, /*!< DMA2 Stream 3 global Interrupt */ |
| 401 | DMA2_Stream4_IRQn = 60, /*!< DMA2 Stream 4 global Interrupt */ |
| 402 | ETH_IRQn = 61, /*!< Ethernet global Interrupt */ |
| 403 | ETH_WKUP_IRQn = 62, /*!< Ethernet Wakeup through EXTI line Interrupt */ |
| 404 | CAN2_TX_IRQn = 63, /*!< CAN2 TX Interrupt */ |
| 405 | CAN2_RX0_IRQn = 64, /*!< CAN2 RX0 Interrupt */ |
| 406 | CAN2_RX1_IRQn = 65, /*!< CAN2 RX1 Interrupt */ |
| 407 | CAN2_SCE_IRQn = 66, /*!< CAN2 SCE Interrupt */ |
| 408 | OTG_FS_IRQn = 67, /*!< USB OTG FS global Interrupt */ |
| 409 | DMA2_Stream5_IRQn = 68, /*!< DMA2 Stream 5 global interrupt */ |
| 410 | DMA2_Stream6_IRQn = 69, /*!< DMA2 Stream 6 global interrupt */ |
| 411 | DMA2_Stream7_IRQn = 70, /*!< DMA2 Stream 7 global interrupt */ |
| 412 | USART6_IRQn = 71, /*!< USART6 global interrupt */ |
| 413 | I2C3_EV_IRQn = 72, /*!< I2C3 event interrupt */ |
| 414 | I2C3_ER_IRQn = 73, /*!< I2C3 error interrupt */ |
| 415 | OTG_HS_EP1_OUT_IRQn = 74, /*!< USB OTG HS End Point 1 Out global interrupt */ |
| 416 | OTG_HS_EP1_IN_IRQn = 75, /*!< USB OTG HS End Point 1 In global interrupt */ |
| 417 | OTG_HS_WKUP_IRQn = 76, /*!< USB OTG HS Wakeup through EXTI interrupt */ |
| 418 | OTG_HS_IRQn = 77, /*!< USB OTG HS global interrupt */ |
| 419 | DCMI_IRQn = 78, /*!< DCMI global interrupt */ |
| 420 | CRYP_IRQn = 79, /*!< CRYP crypto global interrupt */ |
| 421 | HASH_RNG_IRQn = 80, /*!< Hash and Rng global interrupt */ |
| 422 | FPU_IRQn = 81, /*!< FPU global interrupt */ |
| 423 | UART7_IRQn = 82, /*!< UART7 global interrupt */ |
| 424 | UART8_IRQn = 83, /*!< UART8 global interrupt */ |
| 425 | SPI4_IRQn = 84, /*!< SPI4 global Interrupt */ |
| 426 | SPI5_IRQn = 85, /*!< SPI5 global Interrupt */ |
| 427 | SPI6_IRQn = 86, /*!< SPI6 global Interrupt */ |
| 428 | SAI1_IRQn = 87, /*!< SAI1 global Interrupt */ |
| 429 | LTDC_IRQn = 88, /*!< LTDC global Interrupt */ |
| 430 | LTDC_ER_IRQn = 89, /*!< LTDC Error global Interrupt */ |
| 431 | DMA2D_IRQn = 90 /*!< DMA2D global Interrupt */ |
| 432 | #endif /* STM32F429_439xx */ |
| 433 | |
| 434 | #if defined(STM32F401xx) || defined(STM32F411xE) |
| 435 | EXTI9_5_IRQn = 23, /*!< External Line[9:5] Interrupts */ |
| 436 | TIM1_BRK_TIM9_IRQn = 24, /*!< TIM1 Break interrupt and TIM9 global interrupt */ |
| 437 | TIM1_UP_TIM10_IRQn = 25, /*!< TIM1 Update Interrupt and TIM10 global interrupt */ |
| 438 | TIM1_TRG_COM_TIM11_IRQn = 26, /*!< TIM1 Trigger and Commutation Interrupt and TIM11 global interrupt */ |
| 439 | TIM1_CC_IRQn = 27, /*!< TIM1 Capture Compare Interrupt */ |
| 440 | TIM2_IRQn = 28, /*!< TIM2 global Interrupt */ |
| 441 | TIM3_IRQn = 29, /*!< TIM3 global Interrupt */ |
| 442 | TIM4_IRQn = 30, /*!< TIM4 global Interrupt */ |
| 443 | I2C1_EV_IRQn = 31, /*!< I2C1 Event Interrupt */ |
| 444 | I2C1_ER_IRQn = 32, /*!< I2C1 Error Interrupt */ |
| 445 | I2C2_EV_IRQn = 33, /*!< I2C2 Event Interrupt */ |
| 446 | I2C2_ER_IRQn = 34, /*!< I2C2 Error Interrupt */ |
| 447 | SPI1_IRQn = 35, /*!< SPI1 global Interrupt */ |
| 448 | SPI2_IRQn = 36, /*!< SPI2 global Interrupt */ |
| 449 | USART1_IRQn = 37, /*!< USART1 global Interrupt */ |
| 450 | USART2_IRQn = 38, /*!< USART2 global Interrupt */ |
| 451 | EXTI15_10_IRQn = 40, /*!< External Line[15:10] Interrupts */ |
| 452 | RTC_Alarm_IRQn = 41, /*!< RTC Alarm (A and B) through EXTI Line Interrupt */ |
| 453 | OTG_FS_WKUP_IRQn = 42, /*!< USB OTG FS Wakeup through EXTI line interrupt */ |
| 454 | DMA1_Stream7_IRQn = 47, /*!< DMA1 Stream7 Interrupt */ |
| 455 | SDIO_IRQn = 49, /*!< SDIO global Interrupt */ |
| 456 | TIM5_IRQn = 50, /*!< TIM5 global Interrupt */ |
| 457 | SPI3_IRQn = 51, /*!< SPI3 global Interrupt */ |
| 458 | DMA2_Stream0_IRQn = 56, /*!< DMA2 Stream 0 global Interrupt */ |
| 459 | DMA2_Stream1_IRQn = 57, /*!< DMA2 Stream 1 global Interrupt */ |
| 460 | DMA2_Stream2_IRQn = 58, /*!< DMA2 Stream 2 global Interrupt */ |
| 461 | DMA2_Stream3_IRQn = 59, /*!< DMA2 Stream 3 global Interrupt */ |
| 462 | DMA2_Stream4_IRQn = 60, /*!< DMA2 Stream 4 global Interrupt */ |
| 463 | OTG_FS_IRQn = 67, /*!< USB OTG FS global Interrupt */ |
| 464 | DMA2_Stream5_IRQn = 68, /*!< DMA2 Stream 5 global interrupt */ |
| 465 | DMA2_Stream6_IRQn = 69, /*!< DMA2 Stream 6 global interrupt */ |
| 466 | DMA2_Stream7_IRQn = 70, /*!< DMA2 Stream 7 global interrupt */ |
| 467 | USART6_IRQn = 71, /*!< USART6 global interrupt */ |
| 468 | I2C3_EV_IRQn = 72, /*!< I2C3 event interrupt */ |
| 469 | I2C3_ER_IRQn = 73, /*!< I2C3 error interrupt */ |
| 470 | FPU_IRQn = 81, /*!< FPU global interrupt */ |
| 471 | #if defined(STM32F401xx) |
| 472 | SPI4_IRQn = 84 /*!< SPI4 global Interrupt */ |
| 473 | #endif /* STM32F411xE */ |
| 474 | #if defined(STM32F411xE) |
| 475 | SPI4_IRQn = 84, /*!< SPI4 global Interrupt */ |
| 476 | SPI5_IRQn = 85 /*!< SPI5 global Interrupt */ |
| 477 | #endif /* STM32F411xE */ |
| 478 | #endif /* STM32F401xx || STM32F411xE */ |
| 479 | |
| 480 | #if defined(STM32F446xx) |
| 481 | CAN1_TX_IRQn = 19, /*!< CAN1 TX Interrupt */ |
| 482 | CAN1_RX0_IRQn = 20, /*!< CAN1 RX0 Interrupt */ |
| 483 | CAN1_RX1_IRQn = 21, /*!< CAN1 RX1 Interrupt */ |
| 484 | CAN1_SCE_IRQn = 22, /*!< CAN1 SCE Interrupt */ |
| 485 | EXTI9_5_IRQn = 23, /*!< External Line[9:5] Interrupts */ |
| 486 | TIM1_BRK_TIM9_IRQn = 24, /*!< TIM1 Break interrupt and TIM9 global interrupt */ |
| 487 | TIM1_UP_TIM10_IRQn = 25, /*!< TIM1 Update Interrupt and TIM10 global interrupt */ |
| 488 | TIM1_TRG_COM_TIM11_IRQn = 26, /*!< TIM1 Trigger and Commutation Interrupt and TIM11 global interrupt */ |
| 489 | TIM1_CC_IRQn = 27, /*!< TIM1 Capture Compare Interrupt */ |
| 490 | TIM2_IRQn = 28, /*!< TIM2 global Interrupt */ |
| 491 | TIM3_IRQn = 29, /*!< TIM3 global Interrupt */ |
| 492 | TIM4_IRQn = 30, /*!< TIM4 global Interrupt */ |
| 493 | I2C1_EV_IRQn = 31, /*!< I2C1 Event Interrupt */ |
| 494 | I2C1_ER_IRQn = 32, /*!< I2C1 Error Interrupt */ |
| 495 | I2C2_EV_IRQn = 33, /*!< I2C2 Event Interrupt */ |
| 496 | I2C2_ER_IRQn = 34, /*!< I2C2 Error Interrupt */ |
| 497 | SPI1_IRQn = 35, /*!< SPI1 global Interrupt */ |
| 498 | SPI2_IRQn = 36, /*!< SPI2 global Interrupt */ |
| 499 | USART1_IRQn = 37, /*!< USART1 global Interrupt */ |
| 500 | USART2_IRQn = 38, /*!< USART2 global Interrupt */ |
| 501 | USART3_IRQn = 39, /*!< USART3 global Interrupt */ |
| 502 | EXTI15_10_IRQn = 40, /*!< External Line[15:10] Interrupts */ |
| 503 | RTC_Alarm_IRQn = 41, /*!< RTC Alarm (A and B) through EXTI Line Interrupt */ |
| 504 | OTG_FS_WKUP_IRQn = 42, /*!< USB OTG FS Wakeup through EXTI line interrupt */ |
| 505 | TIM8_BRK_IRQn = 43, /*!< TIM8 Break Interrupt */ |
| 506 | TIM8_BRK_TIM12_IRQn = 43, /*!< TIM8 Break Interrupt and TIM12 global interrupt */ |
| 507 | TIM8_UP_TIM13_IRQn = 44, /*!< TIM8 Update Interrupt and TIM13 global interrupt */ |
| 508 | TIM8_TRG_COM_TIM14_IRQn = 45, /*!< TIM8 Trigger and Commutation Interrupt and TIM14 global interrupt */ |
| 509 | DMA1_Stream7_IRQn = 47, /*!< DMA1 Stream7 Interrupt */ |
| 510 | FMC_IRQn = 48, /*!< FMC global Interrupt */ |
| 511 | SDIO_IRQn = 49, /*!< SDIO global Interrupt */ |
| 512 | TIM5_IRQn = 50, /*!< TIM5 global Interrupt */ |
| 513 | SPI3_IRQn = 51, /*!< SPI3 global Interrupt */ |
| 514 | UART4_IRQn = 52, /*!< UART4 global Interrupt */ |
| 515 | UART5_IRQn = 53, /*!< UART5 global Interrupt */ |
| 516 | TIM6_DAC_IRQn = 54, /*!< TIM6 global and DAC1&2 underrun error interrupts */ |
| 517 | TIM7_IRQn = 55, /*!< TIM7 global interrupt */ |
| 518 | DMA2_Stream0_IRQn = 56, /*!< DMA2 Stream 0 global Interrupt */ |
| 519 | DMA2_Stream1_IRQn = 57, /*!< DMA2 Stream 1 global Interrupt */ |
| 520 | DMA2_Stream2_IRQn = 58, /*!< DMA2 Stream 2 global Interrupt */ |
| 521 | DMA2_Stream3_IRQn = 59, /*!< DMA2 Stream 3 global Interrupt */ |
| 522 | DMA2_Stream4_IRQn = 60, /*!< DMA2 Stream 4 global Interrupt */ |
| 523 | CAN2_TX_IRQn = 63, /*!< CAN2 TX Interrupt */ |
| 524 | CAN2_RX0_IRQn = 64, /*!< CAN2 RX0 Interrupt */ |
| 525 | CAN2_RX1_IRQn = 65, /*!< CAN2 RX1 Interrupt */ |
| 526 | CAN2_SCE_IRQn = 66, /*!< CAN2 SCE Interrupt */ |
| 527 | OTG_FS_IRQn = 67, /*!< USB OTG FS global Interrupt */ |
| 528 | DMA2_Stream5_IRQn = 68, /*!< DMA2 Stream 5 global interrupt */ |
| 529 | DMA2_Stream6_IRQn = 69, /*!< DMA2 Stream 6 global interrupt */ |
| 530 | DMA2_Stream7_IRQn = 70, /*!< DMA2 Stream 7 global interrupt */ |
| 531 | USART6_IRQn = 71, /*!< USART6 global interrupt */ |
| 532 | I2C3_EV_IRQn = 72, /*!< I2C3 event interrupt */ |
| 533 | I2C3_ER_IRQn = 73, /*!< I2C3 error interrupt */ |
| 534 | OTG_HS_EP1_OUT_IRQn = 74, /*!< USB OTG HS End Point 1 Out global interrupt */ |
| 535 | OTG_HS_EP1_IN_IRQn = 75, /*!< USB OTG HS End Point 1 In global interrupt */ |
| 536 | OTG_HS_WKUP_IRQn = 76, /*!< USB OTG HS Wakeup through EXTI interrupt */ |
| 537 | OTG_HS_IRQn = 77, /*!< USB OTG HS global interrupt */ |
| 538 | DCMI_IRQn = 78, /*!< DCMI global interrupt */ |
| 539 | FPU_IRQn = 81, /*!< FPU global interrupt */ |
| 540 | SPI4_IRQn = 84, /*!< SPI4 global Interrupt */ |
| 541 | SAI1_IRQn = 87, /*!< SAI1 global Interrupt */ |
| 542 | SAI2_IRQn = 91, /*!< SAI2 global Interrupt */ |
| 543 | QUADSPI_IRQn = 92, /*!< QuadSPI global Interrupt */ |
| 544 | CEC_IRQn = 93, /*!< QuadSPI global Interrupt */ |
| 545 | SPDIF_RX_IRQn = 94, /*!< QuadSPI global Interrupt */ |
| 546 | FMPI2C1_EV_IRQn = 95, /*!< FMPI2C Event Interrupt */ |
| 547 | FMPI2C1_ER_IRQn = 96 /*!< FMPCI2C Error Interrupt */ |
| 548 | #endif /* STM32F446xx */ |
| 549 | } IRQn_Type; |
| 550 | |
| 551 | /** |
| 552 | * @} |
| 553 | */ |
| 554 | |
| 555 | #include "core_cm4.h" /* Cortex-M4 processor and core peripherals */ |
| 556 | #include "system_stm32f4xx.h" |
| 557 | #include <stdint.h> |
| 558 | |
| 559 | /** @addtogroup Exported_types |
| 560 | * @{ |
| 561 | */ |
| 562 | /*!< STM32F10x Standard Peripheral Library old types (maintained for legacy purpose) */ |
| 563 | typedef int32_t s32; |
| 564 | typedef int16_t s16; |
| 565 | typedef int8_t s8; |
| 566 | |
| 567 | typedef const int32_t sc32; /*!< Read Only */ |
| 568 | typedef const int16_t sc16; /*!< Read Only */ |
| 569 | typedef const int8_t sc8; /*!< Read Only */ |
| 570 | |
| 571 | typedef __IO int32_t vs32; |
| 572 | typedef __IO int16_t vs16; |
| 573 | typedef __IO int8_t vs8; |
| 574 | |
| 575 | typedef __I int32_t vsc32; /*!< Read Only */ |
| 576 | typedef __I int16_t vsc16; /*!< Read Only */ |
| 577 | typedef __I int8_t vsc8; /*!< Read Only */ |
| 578 | |
| 579 | typedef uint32_t u32; |
| 580 | typedef uint16_t u16; |
| 581 | typedef uint8_t u8; |
| 582 | |
| 583 | typedef const uint32_t uc32; /*!< Read Only */ |
| 584 | typedef const uint16_t uc16; /*!< Read Only */ |
| 585 | typedef const uint8_t uc8; /*!< Read Only */ |
| 586 | |
| 587 | typedef __IO uint32_t vu32; |
| 588 | typedef __IO uint16_t vu16; |
| 589 | typedef __IO uint8_t vu8; |
| 590 | |
| 591 | typedef __I uint32_t vuc32; /*!< Read Only */ |
| 592 | typedef __I uint16_t vuc16; /*!< Read Only */ |
| 593 | typedef __I uint8_t vuc8; /*!< Read Only */ |
| 594 | |
| 595 | typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus; |
| 596 | |
| 597 | typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState; |
| 598 | #define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE)) |
| 599 | |
| 600 | typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus; |
| 601 | |
| 602 | /** |
| 603 | * @} |
| 604 | */ |
| 605 | |
| 606 | /** @addtogroup Peripheral_registers_structures |
| 607 | * @{ |
| 608 | */ |
| 609 | |
| 610 | /** |
| 611 | * @brief Analog to Digital Converter |
| 612 | */ |
| 613 | |
| 614 | typedef struct |
| 615 | { |
| 616 | __IO uint32_t SR; /*!< ADC status register, Address offset: 0x00 */ |
| 617 | __IO uint32_t CR1; /*!< ADC control register 1, Address offset: 0x04 */ |
| 618 | __IO uint32_t CR2; /*!< ADC control register 2, Address offset: 0x08 */ |
| 619 | __IO uint32_t SMPR1; /*!< ADC sample time register 1, Address offset: 0x0C */ |
| 620 | __IO uint32_t SMPR2; /*!< ADC sample time register 2, Address offset: 0x10 */ |
| 621 | __IO uint32_t JOFR1; /*!< ADC injected channel data offset register 1, Address offset: 0x14 */ |
| 622 | __IO uint32_t JOFR2; /*!< ADC injected channel data offset register 2, Address offset: 0x18 */ |
| 623 | __IO uint32_t JOFR3; /*!< ADC injected channel data offset register 3, Address offset: 0x1C */ |
| 624 | __IO uint32_t JOFR4; /*!< ADC injected channel data offset register 4, Address offset: 0x20 */ |
| 625 | __IO uint32_t HTR; /*!< ADC watchdog higher threshold register, Address offset: 0x24 */ |
| 626 | __IO uint32_t LTR; /*!< ADC watchdog lower threshold register, Address offset: 0x28 */ |
| 627 | __IO uint32_t SQR1; /*!< ADC regular sequence register 1, Address offset: 0x2C */ |
| 628 | __IO uint32_t SQR2; /*!< ADC regular sequence register 2, Address offset: 0x30 */ |
| 629 | __IO uint32_t SQR3; /*!< ADC regular sequence register 3, Address offset: 0x34 */ |
| 630 | __IO uint32_t JSQR; /*!< ADC injected sequence register, Address offset: 0x38*/ |
| 631 | __IO uint32_t JDR1; /*!< ADC injected data register 1, Address offset: 0x3C */ |
| 632 | __IO uint32_t JDR2; /*!< ADC injected data register 2, Address offset: 0x40 */ |
| 633 | __IO uint32_t JDR3; /*!< ADC injected data register 3, Address offset: 0x44 */ |
| 634 | __IO uint32_t JDR4; /*!< ADC injected data register 4, Address offset: 0x48 */ |
| 635 | __IO uint32_t DR; /*!< ADC regular data register, Address offset: 0x4C */ |
| 636 | } ADC_TypeDef; |
| 637 | |
| 638 | typedef struct |
| 639 | { |
| 640 | __IO uint32_t CSR; /*!< ADC Common status register, Address offset: ADC1 base address + 0x300 */ |
| 641 | __IO uint32_t CCR; /*!< ADC common control register, Address offset: ADC1 base address + 0x304 */ |
| 642 | __IO uint32_t CDR; /*!< ADC common regular data register for dual |
| 643 | AND triple modes, Address offset: ADC1 base address + 0x308 */ |
| 644 | } ADC_Common_TypeDef; |
| 645 | |
| 646 | |
| 647 | /** |
| 648 | * @brief Controller Area Network TxMailBox |
| 649 | */ |
| 650 | |
| 651 | typedef struct |
| 652 | { |
| 653 | __IO uint32_t TIR; /*!< CAN TX mailbox identifier register */ |
| 654 | __IO uint32_t TDTR; /*!< CAN mailbox data length control and time stamp register */ |
| 655 | __IO uint32_t TDLR; /*!< CAN mailbox data low register */ |
| 656 | __IO uint32_t TDHR; /*!< CAN mailbox data high register */ |
| 657 | } CAN_TxMailBox_TypeDef; |
| 658 | |
| 659 | /** |
| 660 | * @brief Controller Area Network FIFOMailBox |
| 661 | */ |
| 662 | |
| 663 | typedef struct |
| 664 | { |
| 665 | __IO uint32_t RIR; /*!< CAN receive FIFO mailbox identifier register */ |
| 666 | __IO uint32_t RDTR; /*!< CAN receive FIFO mailbox data length control and time stamp register */ |
| 667 | __IO uint32_t RDLR; /*!< CAN receive FIFO mailbox data low register */ |
| 668 | __IO uint32_t RDHR; /*!< CAN receive FIFO mailbox data high register */ |
| 669 | } CAN_FIFOMailBox_TypeDef; |
| 670 | |
| 671 | /** |
| 672 | * @brief Controller Area Network FilterRegister |
| 673 | */ |
| 674 | |
| 675 | typedef struct |
| 676 | { |
| 677 | __IO uint32_t FR1; /*!< CAN Filter bank register 1 */ |
| 678 | __IO uint32_t FR2; /*!< CAN Filter bank register 1 */ |
| 679 | } CAN_FilterRegister_TypeDef; |
| 680 | |
| 681 | /** |
| 682 | * @brief Controller Area Network |
| 683 | */ |
| 684 | |
| 685 | typedef struct |
| 686 | { |
| 687 | __IO uint32_t MCR; /*!< CAN master control register, Address offset: 0x00 */ |
| 688 | __IO uint32_t MSR; /*!< CAN master status register, Address offset: 0x04 */ |
| 689 | __IO uint32_t TSR; /*!< CAN transmit status register, Address offset: 0x08 */ |
| 690 | __IO uint32_t RF0R; /*!< CAN receive FIFO 0 register, Address offset: 0x0C */ |
| 691 | __IO uint32_t RF1R; /*!< CAN receive FIFO 1 register, Address offset: 0x10 */ |
| 692 | __IO uint32_t IER; /*!< CAN interrupt enable register, Address offset: 0x14 */ |
| 693 | __IO uint32_t ESR; /*!< CAN error status register, Address offset: 0x18 */ |
| 694 | __IO uint32_t BTR; /*!< CAN bit timing register, Address offset: 0x1C */ |
| 695 | uint32_t RESERVED0[88]; /*!< Reserved, 0x020 - 0x17F */ |
| 696 | CAN_TxMailBox_TypeDef sTxMailBox[3]; /*!< CAN Tx MailBox, Address offset: 0x180 - 0x1AC */ |
| 697 | CAN_FIFOMailBox_TypeDef sFIFOMailBox[2]; /*!< CAN FIFO MailBox, Address offset: 0x1B0 - 0x1CC */ |
| 698 | uint32_t RESERVED1[12]; /*!< Reserved, 0x1D0 - 0x1FF */ |
| 699 | __IO uint32_t FMR; /*!< CAN filter master register, Address offset: 0x200 */ |
| 700 | __IO uint32_t FM1R; /*!< CAN filter mode register, Address offset: 0x204 */ |
| 701 | uint32_t RESERVED2; /*!< Reserved, 0x208 */ |
| 702 | __IO uint32_t FS1R; /*!< CAN filter scale register, Address offset: 0x20C */ |
| 703 | uint32_t RESERVED3; /*!< Reserved, 0x210 */ |
| 704 | __IO uint32_t FFA1R; /*!< CAN filter FIFO assignment register, Address offset: 0x214 */ |
| 705 | uint32_t RESERVED4; /*!< Reserved, 0x218 */ |
| 706 | __IO uint32_t FA1R; /*!< CAN filter activation register, Address offset: 0x21C */ |
| 707 | uint32_t RESERVED5[8]; /*!< Reserved, 0x220-0x23F */ |
| 708 | CAN_FilterRegister_TypeDef sFilterRegister[28]; /*!< CAN Filter Register, Address offset: 0x240-0x31C */ |
| 709 | } CAN_TypeDef; |
| 710 | |
| 711 | #if defined(STM32F446xx) |
| 712 | /** |
| 713 | * @brief Consumer Electronics Control |
| 714 | */ |
| 715 | typedef struct |
| 716 | { |
| 717 | __IO uint32_t CR; /*!< CEC control register, Address offset:0x00 */ |
| 718 | __IO uint32_t CFGR; /*!< CEC configuration register, Address offset:0x04 */ |
| 719 | __IO uint32_t TXDR; /*!< CEC Tx data register , Address offset:0x08 */ |
| 720 | __IO uint32_t RXDR; /*!< CEC Rx Data Register, Address offset:0x0C */ |
| 721 | __IO uint32_t ISR; /*!< CEC Interrupt and Status Register, Address offset:0x10 */ |
| 722 | __IO uint32_t IER; /*!< CEC interrupt enable register, Address offset:0x14 */ |
| 723 | }CEC_TypeDef; |
| 724 | #endif /* STM32F446xx */ |
| 725 | |
| 726 | /** |
| 727 | * @brief CRC calculation unit |
| 728 | */ |
| 729 | |
| 730 | typedef struct |
| 731 | { |
| 732 | __IO uint32_t DR; /*!< CRC Data register, Address offset: 0x00 */ |
| 733 | __IO uint8_t IDR; /*!< CRC Independent data register, Address offset: 0x04 */ |
| 734 | uint8_t RESERVED0; /*!< Reserved, 0x05 */ |
| 735 | uint16_t RESERVED1; /*!< Reserved, 0x06 */ |
| 736 | __IO uint32_t CR; /*!< CRC Control register, Address offset: 0x08 */ |
| 737 | } CRC_TypeDef; |
| 738 | |
| 739 | /** |
| 740 | * @brief Digital to Analog Converter |
| 741 | */ |
| 742 | |
| 743 | typedef struct |
| 744 | { |
| 745 | __IO uint32_t CR; /*!< DAC control register, Address offset: 0x00 */ |
| 746 | __IO uint32_t SWTRIGR; /*!< DAC software trigger register, Address offset: 0x04 */ |
| 747 | __IO uint32_t DHR12R1; /*!< DAC channel1 12-bit right-aligned data holding register, Address offset: 0x08 */ |
| 748 | __IO uint32_t DHR12L1; /*!< DAC channel1 12-bit left aligned data holding register, Address offset: 0x0C */ |
| 749 | __IO uint32_t DHR8R1; /*!< DAC channel1 8-bit right aligned data holding register, Address offset: 0x10 */ |
| 750 | __IO uint32_t DHR12R2; /*!< DAC channel2 12-bit right aligned data holding register, Address offset: 0x14 */ |
| 751 | __IO uint32_t DHR12L2; /*!< DAC channel2 12-bit left aligned data holding register, Address offset: 0x18 */ |
| 752 | __IO uint32_t DHR8R2; /*!< DAC channel2 8-bit right-aligned data holding register, Address offset: 0x1C */ |
| 753 | __IO uint32_t DHR12RD; /*!< Dual DAC 12-bit right-aligned data holding register, Address offset: 0x20 */ |
| 754 | __IO uint32_t DHR12LD; /*!< DUAL DAC 12-bit left aligned data holding register, Address offset: 0x24 */ |
| 755 | __IO uint32_t DHR8RD; /*!< DUAL DAC 8-bit right aligned data holding register, Address offset: 0x28 */ |
| 756 | __IO uint32_t DOR1; /*!< DAC channel1 data output register, Address offset: 0x2C */ |
| 757 | __IO uint32_t DOR2; /*!< DAC channel2 data output register, Address offset: 0x30 */ |
| 758 | __IO uint32_t SR; /*!< DAC status register, Address offset: 0x34 */ |
| 759 | } DAC_TypeDef; |
| 760 | |
| 761 | /** |
| 762 | * @brief Debug MCU |
| 763 | */ |
| 764 | |
| 765 | typedef struct |
| 766 | { |
| 767 | __IO uint32_t IDCODE; /*!< MCU device ID code, Address offset: 0x00 */ |
| 768 | __IO uint32_t CR; /*!< Debug MCU configuration register, Address offset: 0x04 */ |
| 769 | __IO uint32_t APB1FZ; /*!< Debug MCU APB1 freeze register, Address offset: 0x08 */ |
| 770 | __IO uint32_t APB2FZ; /*!< Debug MCU APB2 freeze register, Address offset: 0x0C */ |
| 771 | }DBGMCU_TypeDef; |
| 772 | |
| 773 | /** |
| 774 | * @brief DCMI |
| 775 | */ |
| 776 | |
| 777 | typedef struct |
| 778 | { |
| 779 | __IO uint32_t CR; /*!< DCMI control register 1, Address offset: 0x00 */ |
| 780 | __IO uint32_t SR; /*!< DCMI status register, Address offset: 0x04 */ |
| 781 | __IO uint32_t RISR; /*!< DCMI raw interrupt status register, Address offset: 0x08 */ |
| 782 | __IO uint32_t IER; /*!< DCMI interrupt enable register, Address offset: 0x0C */ |
| 783 | __IO uint32_t MISR; /*!< DCMI masked interrupt status register, Address offset: 0x10 */ |
| 784 | __IO uint32_t ICR; /*!< DCMI interrupt clear register, Address offset: 0x14 */ |
| 785 | __IO uint32_t ESCR; /*!< DCMI embedded synchronization code register, Address offset: 0x18 */ |
| 786 | __IO uint32_t ESUR; /*!< DCMI embedded synchronization unmask register, Address offset: 0x1C */ |
| 787 | __IO uint32_t CWSTRTR; /*!< DCMI crop window start, Address offset: 0x20 */ |
| 788 | __IO uint32_t CWSIZER; /*!< DCMI crop window size, Address offset: 0x24 */ |
| 789 | __IO uint32_t DR; /*!< DCMI data register, Address offset: 0x28 */ |
| 790 | } DCMI_TypeDef; |
| 791 | |
| 792 | /** |
| 793 | * @brief DMA Controller |
| 794 | */ |
| 795 | |
| 796 | typedef struct |
| 797 | { |
| 798 | __IO uint32_t CR; /*!< DMA stream x configuration register */ |
| 799 | __IO uint32_t NDTR; /*!< DMA stream x number of data register */ |
| 800 | __IO uint32_t PAR; /*!< DMA stream x peripheral address register */ |
| 801 | __IO uint32_t M0AR; /*!< DMA stream x memory 0 address register */ |
| 802 | __IO uint32_t M1AR; /*!< DMA stream x memory 1 address register */ |
| 803 | __IO uint32_t FCR; /*!< DMA stream x FIFO control register */ |
| 804 | } DMA_Stream_TypeDef; |
| 805 | |
| 806 | typedef struct |
| 807 | { |
| 808 | __IO uint32_t LISR; /*!< DMA low interrupt status register, Address offset: 0x00 */ |
| 809 | __IO uint32_t HISR; /*!< DMA high interrupt status register, Address offset: 0x04 */ |
| 810 | __IO uint32_t LIFCR; /*!< DMA low interrupt flag clear register, Address offset: 0x08 */ |
| 811 | __IO uint32_t HIFCR; /*!< DMA high interrupt flag clear register, Address offset: 0x0C */ |
| 812 | } DMA_TypeDef; |
| 813 | |
| 814 | /** |
| 815 | * @brief DMA2D Controller |
| 816 | */ |
| 817 | |
| 818 | typedef struct |
| 819 | { |
| 820 | __IO uint32_t CR; /*!< DMA2D Control Register, Address offset: 0x00 */ |
| 821 | __IO uint32_t ISR; /*!< DMA2D Interrupt Status Register, Address offset: 0x04 */ |
| 822 | __IO uint32_t IFCR; /*!< DMA2D Interrupt Flag Clear Register, Address offset: 0x08 */ |
| 823 | __IO uint32_t FGMAR; /*!< DMA2D Foreground Memory Address Register, Address offset: 0x0C */ |
| 824 | __IO uint32_t FGOR; /*!< DMA2D Foreground Offset Register, Address offset: 0x10 */ |
| 825 | __IO uint32_t BGMAR; /*!< DMA2D Background Memory Address Register, Address offset: 0x14 */ |
| 826 | __IO uint32_t BGOR; /*!< DMA2D Background Offset Register, Address offset: 0x18 */ |
| 827 | __IO uint32_t FGPFCCR; /*!< DMA2D Foreground PFC Control Register, Address offset: 0x1C */ |
| 828 | __IO uint32_t FGCOLR; /*!< DMA2D Foreground Color Register, Address offset: 0x20 */ |
| 829 | __IO uint32_t BGPFCCR; /*!< DMA2D Background PFC Control Register, Address offset: 0x24 */ |
| 830 | __IO uint32_t BGCOLR; /*!< DMA2D Background Color Register, Address offset: 0x28 */ |
| 831 | __IO uint32_t FGCMAR; /*!< DMA2D Foreground CLUT Memory Address Register, Address offset: 0x2C */ |
| 832 | __IO uint32_t BGCMAR; /*!< DMA2D Background CLUT Memory Address Register, Address offset: 0x30 */ |
| 833 | __IO uint32_t OPFCCR; /*!< DMA2D Output PFC Control Register, Address offset: 0x34 */ |
| 834 | __IO uint32_t OCOLR; /*!< DMA2D Output Color Register, Address offset: 0x38 */ |
| 835 | __IO uint32_t OMAR; /*!< DMA2D Output Memory Address Register, Address offset: 0x3C */ |
| 836 | __IO uint32_t OOR; /*!< DMA2D Output Offset Register, Address offset: 0x40 */ |
| 837 | __IO uint32_t NLR; /*!< DMA2D Number of Line Register, Address offset: 0x44 */ |
| 838 | __IO uint32_t LWR; /*!< DMA2D Line Watermark Register, Address offset: 0x48 */ |
| 839 | __IO uint32_t AMTCR; /*!< DMA2D AHB Master Timer Configuration Register, Address offset: 0x4C */ |
| 840 | uint32_t RESERVED[236]; /*!< Reserved, 0x50-0x3FF */ |
| 841 | __IO uint32_t FGCLUT[256]; /*!< DMA2D Foreground CLUT, Address offset:400-7FF */ |
| 842 | __IO uint32_t BGCLUT[256]; /*!< DMA2D Background CLUT, Address offset:800-BFF */ |
| 843 | } DMA2D_TypeDef; |
| 844 | |
| 845 | /** |
| 846 | * @brief Ethernet MAC |
| 847 | */ |
| 848 | |
| 849 | typedef struct |
| 850 | { |
| 851 | __IO uint32_t MACCR; |
| 852 | __IO uint32_t MACFFR; |
| 853 | __IO uint32_t MACHTHR; |
| 854 | __IO uint32_t MACHTLR; |
| 855 | __IO uint32_t MACMIIAR; |
| 856 | __IO uint32_t MACMIIDR; |
| 857 | __IO uint32_t MACFCR; |
| 858 | __IO uint32_t MACVLANTR; /* 8 */ |
| 859 | uint32_t RESERVED0[2]; |
| 860 | __IO uint32_t MACRWUFFR; /* 11 */ |
| 861 | __IO uint32_t MACPMTCSR; |
| 862 | uint32_t RESERVED1[2]; |
| 863 | __IO uint32_t MACSR; /* 15 */ |
| 864 | __IO uint32_t MACIMR; |
| 865 | __IO uint32_t MACA0HR; |
| 866 | __IO uint32_t MACA0LR; |
| 867 | __IO uint32_t MACA1HR; |
| 868 | __IO uint32_t MACA1LR; |
| 869 | __IO uint32_t MACA2HR; |
| 870 | __IO uint32_t MACA2LR; |
| 871 | __IO uint32_t MACA3HR; |
| 872 | __IO uint32_t MACA3LR; /* 24 */ |
| 873 | uint32_t RESERVED2[40]; |
| 874 | __IO uint32_t MMCCR; /* 65 */ |
| 875 | __IO uint32_t MMCRIR; |
| 876 | __IO uint32_t MMCTIR; |
| 877 | __IO uint32_t MMCRIMR; |
| 878 | __IO uint32_t MMCTIMR; /* 69 */ |
| 879 | uint32_t RESERVED3[14]; |
| 880 | __IO uint32_t MMCTGFSCCR; /* 84 */ |
| 881 | __IO uint32_t MMCTGFMSCCR; |
| 882 | uint32_t RESERVED4[5]; |
| 883 | __IO uint32_t MMCTGFCR; |
| 884 | uint32_t RESERVED5[10]; |
| 885 | __IO uint32_t MMCRFCECR; |
| 886 | __IO uint32_t MMCRFAECR; |
| 887 | uint32_t RESERVED6[10]; |
| 888 | __IO uint32_t MMCRGUFCR; |
| 889 | uint32_t RESERVED7[334]; |
| 890 | __IO uint32_t PTPTSCR; |
| 891 | __IO uint32_t PTPSSIR; |
| 892 | __IO uint32_t PTPTSHR; |
| 893 | __IO uint32_t PTPTSLR; |
| 894 | __IO uint32_t PTPTSHUR; |
| 895 | __IO uint32_t PTPTSLUR; |
| 896 | __IO uint32_t PTPTSAR; |
| 897 | __IO uint32_t PTPTTHR; |
| 898 | __IO uint32_t PTPTTLR; |
| 899 | __IO uint32_t RESERVED8; |
| 900 | __IO uint32_t PTPTSSR; |
| 901 | uint32_t RESERVED9[565]; |
| 902 | __IO uint32_t DMABMR; |
| 903 | __IO uint32_t DMATPDR; |
| 904 | __IO uint32_t DMARPDR; |
| 905 | __IO uint32_t DMARDLAR; |
| 906 | __IO uint32_t DMATDLAR; |
| 907 | __IO uint32_t DMASR; |
| 908 | __IO uint32_t DMAOMR; |
| 909 | __IO uint32_t DMAIER; |
| 910 | __IO uint32_t DMAMFBOCR; |
| 911 | __IO uint32_t DMARSWTR; |
| 912 | uint32_t RESERVED10[8]; |
| 913 | __IO uint32_t DMACHTDR; |
| 914 | __IO uint32_t DMACHRDR; |
| 915 | __IO uint32_t DMACHTBAR; |
| 916 | __IO uint32_t DMACHRBAR; |
| 917 | } ETH_TypeDef; |
| 918 | |
| 919 | /** |
| 920 | * @brief External Interrupt/Event Controller |
| 921 | */ |
| 922 | |
| 923 | typedef struct |
| 924 | { |
| 925 | __IO uint32_t IMR; /*!< EXTI Interrupt mask register, Address offset: 0x00 */ |
| 926 | __IO uint32_t EMR; /*!< EXTI Event mask register, Address offset: 0x04 */ |
| 927 | __IO uint32_t RTSR; /*!< EXTI Rising trigger selection register, Address offset: 0x08 */ |
| 928 | __IO uint32_t FTSR; /*!< EXTI Falling trigger selection register, Address offset: 0x0C */ |
| 929 | __IO uint32_t SWIER; /*!< EXTI Software interrupt event register, Address offset: 0x10 */ |
| 930 | __IO uint32_t PR; /*!< EXTI Pending register, Address offset: 0x14 */ |
| 931 | } EXTI_TypeDef; |
| 932 | |
| 933 | /** |
| 934 | * @brief FLASH Registers |
| 935 | */ |
| 936 | |
| 937 | typedef struct |
| 938 | { |
| 939 | __IO uint32_t ACR; /*!< FLASH access control register, Address offset: 0x00 */ |
| 940 | __IO uint32_t KEYR; /*!< FLASH key register, Address offset: 0x04 */ |
| 941 | __IO uint32_t OPTKEYR; /*!< FLASH option key register, Address offset: 0x08 */ |
| 942 | __IO uint32_t SR; /*!< FLASH status register, Address offset: 0x0C */ |
| 943 | __IO uint32_t CR; /*!< FLASH control register, Address offset: 0x10 */ |
| 944 | __IO uint32_t OPTCR; /*!< FLASH option control register , Address offset: 0x14 */ |
| 945 | __IO uint32_t OPTCR1; /*!< FLASH option control register 1, Address offset: 0x18 */ |
| 946 | } FLASH_TypeDef; |
| 947 | |
| 948 | #if defined(STM32F40_41xxx) |
| 949 | /** |
| 950 | * @brief Flexible Static Memory Controller |
| 951 | */ |
| 952 | |
| 953 | typedef struct |
| 954 | { |
| 955 | __IO uint32_t BTCR[8]; /*!< NOR/PSRAM chip-select control register(BCR) and chip-select timing register(BTR), Address offset: 0x00-1C */ |
| 956 | } FSMC_Bank1_TypeDef; |
| 957 | |
| 958 | /** |
| 959 | * @brief Flexible Static Memory Controller Bank1E |
| 960 | */ |
| 961 | |
| 962 | typedef struct |
| 963 | { |
| 964 | __IO uint32_t BWTR[7]; /*!< NOR/PSRAM write timing registers, Address offset: 0x104-0x11C */ |
| 965 | } FSMC_Bank1E_TypeDef; |
| 966 | |
| 967 | /** |
| 968 | * @brief Flexible Static Memory Controller Bank2 |
| 969 | */ |
| 970 | |
| 971 | typedef struct |
| 972 | { |
| 973 | __IO uint32_t PCR2; /*!< NAND Flash control register 2, Address offset: 0x60 */ |
| 974 | __IO uint32_t SR2; /*!< NAND Flash FIFO status and interrupt register 2, Address offset: 0x64 */ |
| 975 | __IO uint32_t PMEM2; /*!< NAND Flash Common memory space timing register 2, Address offset: 0x68 */ |
| 976 | __IO uint32_t PATT2; /*!< NAND Flash Attribute memory space timing register 2, Address offset: 0x6C */ |
| 977 | uint32_t RESERVED0; /*!< Reserved, 0x70 */ |
| 978 | __IO uint32_t ECCR2; /*!< NAND Flash ECC result registers 2, Address offset: 0x74 */ |
| 979 | } FSMC_Bank2_TypeDef; |
| 980 | |
| 981 | /** |
| 982 | * @brief Flexible Static Memory Controller Bank3 |
| 983 | */ |
| 984 | |
| 985 | typedef struct |
| 986 | { |
| 987 | __IO uint32_t PCR3; /*!< NAND Flash control register 3, Address offset: 0x80 */ |
| 988 | __IO uint32_t SR3; /*!< NAND Flash FIFO status and interrupt register 3, Address offset: 0x84 */ |
| 989 | __IO uint32_t PMEM3; /*!< NAND Flash Common memory space timing register 3, Address offset: 0x88 */ |
| 990 | __IO uint32_t PATT3; /*!< NAND Flash Attribute memory space timing register 3, Address offset: 0x8C */ |
| 991 | uint32_t RESERVED0; /*!< Reserved, 0x90 */ |
| 992 | __IO uint32_t ECCR3; /*!< NAND Flash ECC result registers 3, Address offset: 0x94 */ |
| 993 | } FSMC_Bank3_TypeDef; |
| 994 | |
| 995 | /** |
| 996 | * @brief Flexible Static Memory Controller Bank4 |
| 997 | */ |
| 998 | |
| 999 | typedef struct |
| 1000 | { |
| 1001 | __IO uint32_t PCR4; /*!< PC Card control register 4, Address offset: 0xA0 */ |
| 1002 | __IO uint32_t SR4; /*!< PC Card FIFO status and interrupt register 4, Address offset: 0xA4 */ |
| 1003 | __IO uint32_t PMEM4; /*!< PC Card Common memory space timing register 4, Address offset: 0xA8 */ |
| 1004 | __IO uint32_t PATT4; /*!< PC Card Attribute memory space timing register 4, Address offset: 0xAC */ |
| 1005 | __IO uint32_t PIO4; /*!< PC Card I/O space timing register 4, Address offset: 0xB0 */ |
| 1006 | } FSMC_Bank4_TypeDef; |
| 1007 | #endif /* STM32F40_41xxx */ |
| 1008 | |
| 1009 | #if defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F446xx) |
| 1010 | /** |
| 1011 | * @brief Flexible Memory Controller |
| 1012 | */ |
| 1013 | |
| 1014 | typedef struct |
| 1015 | { |
| 1016 | __IO uint32_t BTCR[8]; /*!< NOR/PSRAM chip-select control register(BCR) and chip-select timing register(BTR), Address offset: 0x00-1C */ |
| 1017 | } FMC_Bank1_TypeDef; |
| 1018 | |
| 1019 | /** |
| 1020 | * @brief Flexible Memory Controller Bank1E |
| 1021 | */ |
| 1022 | |
| 1023 | typedef struct |
| 1024 | { |
| 1025 | __IO uint32_t BWTR[7]; /*!< NOR/PSRAM write timing registers, Address offset: 0x104-0x11C */ |
| 1026 | } FMC_Bank1E_TypeDef; |
| 1027 | |
| 1028 | /** |
| 1029 | * @brief Flexible Memory Controller Bank2 |
| 1030 | */ |
| 1031 | |
| 1032 | typedef struct |
| 1033 | { |
| 1034 | __IO uint32_t PCR2; /*!< NAND Flash control register 2, Address offset: 0x60 */ |
| 1035 | __IO uint32_t SR2; /*!< NAND Flash FIFO status and interrupt register 2, Address offset: 0x64 */ |
| 1036 | __IO uint32_t PMEM2; /*!< NAND Flash Common memory space timing register 2, Address offset: 0x68 */ |
| 1037 | __IO uint32_t PATT2; /*!< NAND Flash Attribute memory space timing register 2, Address offset: 0x6C */ |
| 1038 | uint32_t RESERVED0; /*!< Reserved, 0x70 */ |
| 1039 | __IO uint32_t ECCR2; /*!< NAND Flash ECC result registers 2, Address offset: 0x74 */ |
| 1040 | } FMC_Bank2_TypeDef; |
| 1041 | |
| 1042 | /** |
| 1043 | * @brief Flexible Memory Controller Bank3 |
| 1044 | */ |
| 1045 | |
| 1046 | typedef struct |
| 1047 | { |
| 1048 | __IO uint32_t PCR3; /*!< NAND Flash control register 3, Address offset: 0x80 */ |
| 1049 | __IO uint32_t SR3; /*!< NAND Flash FIFO status and interrupt register 3, Address offset: 0x84 */ |
| 1050 | __IO uint32_t PMEM3; /*!< NAND Flash Common memory space timing register 3, Address offset: 0x88 */ |
| 1051 | __IO uint32_t PATT3; /*!< NAND Flash Attribute memory space timing register 3, Address offset: 0x8C */ |
| 1052 | uint32_t RESERVED0; /*!< Reserved, 0x90 */ |
| 1053 | __IO uint32_t ECCR3; /*!< NAND Flash ECC result registers 3, Address offset: 0x94 */ |
| 1054 | } FMC_Bank3_TypeDef; |
| 1055 | |
| 1056 | /** |
| 1057 | * @brief Flexible Memory Controller Bank4 |
| 1058 | */ |
| 1059 | |
| 1060 | typedef struct |
| 1061 | { |
| 1062 | __IO uint32_t PCR4; /*!< PC Card control register 4, Address offset: 0xA0 */ |
| 1063 | __IO uint32_t SR4; /*!< PC Card FIFO status and interrupt register 4, Address offset: 0xA4 */ |
| 1064 | __IO uint32_t PMEM4; /*!< PC Card Common memory space timing register 4, Address offset: 0xA8 */ |
| 1065 | __IO uint32_t PATT4; /*!< PC Card Attribute memory space timing register 4, Address offset: 0xAC */ |
| 1066 | __IO uint32_t PIO4; /*!< PC Card I/O space timing register 4, Address offset: 0xB0 */ |
| 1067 | } FMC_Bank4_TypeDef; |
| 1068 | |
| 1069 | /** |
| 1070 | * @brief Flexible Memory Controller Bank5_6 |
| 1071 | */ |
| 1072 | |
| 1073 | typedef struct |
| 1074 | { |
| 1075 | __IO uint32_t SDCR[2]; /*!< SDRAM Control registers , Address offset: 0x140-0x144 */ |
| 1076 | __IO uint32_t SDTR[2]; /*!< SDRAM Timing registers , Address offset: 0x148-0x14C */ |
| 1077 | __IO uint32_t SDCMR; /*!< SDRAM Command Mode register, Address offset: 0x150 */ |
| 1078 | __IO uint32_t SDRTR; /*!< SDRAM Refresh Timer register, Address offset: 0x154 */ |
| 1079 | __IO uint32_t SDSR; /*!< SDRAM Status register, Address offset: 0x158 */ |
| 1080 | } FMC_Bank5_6_TypeDef; |
| 1081 | #endif /* STM32F427_437xx || STM32F429_439xx || STM32F446xx */ |
| 1082 | |
| 1083 | /** |
| 1084 | * @brief General Purpose I/O |
| 1085 | */ |
| 1086 | |
| 1087 | typedef struct |
| 1088 | { |
| 1089 | __IO uint32_t MODER; /*!< GPIO port mode register, Address offset: 0x00 */ |
| 1090 | __IO uint32_t OTYPER; /*!< GPIO port output type register, Address offset: 0x04 */ |
| 1091 | __IO uint32_t OSPEEDR; /*!< GPIO port output speed register, Address offset: 0x08 */ |
| 1092 | __IO uint32_t PUPDR; /*!< GPIO port pull-up/pull-down register, Address offset: 0x0C */ |
| 1093 | __IO uint32_t IDR; /*!< GPIO port input data register, Address offset: 0x10 */ |
| 1094 | __IO uint32_t ODR; /*!< GPIO port output data register, Address offset: 0x14 */ |
| 1095 | __IO uint16_t BSRRL; /*!< GPIO port bit set/reset low register, Address offset: 0x18 */ |
| 1096 | __IO uint16_t BSRRH; /*!< GPIO port bit set/reset high register, Address offset: 0x1A */ |
| 1097 | __IO uint32_t LCKR; /*!< GPIO port configuration lock register, Address offset: 0x1C */ |
| 1098 | __IO uint32_t AFR[2]; /*!< GPIO alternate function registers, Address offset: 0x20-0x24 */ |
| 1099 | } GPIO_TypeDef; |
| 1100 | |
| 1101 | /** |
| 1102 | * @brief System configuration controller |
| 1103 | */ |
| 1104 | |
| 1105 | typedef struct |
| 1106 | { |
| 1107 | __IO uint32_t MEMRMP; /*!< SYSCFG memory remap register, Address offset: 0x00 */ |
| 1108 | __IO uint32_t PMC; /*!< SYSCFG peripheral mode configuration register, Address offset: 0x04 */ |
| 1109 | __IO uint32_t EXTICR[4]; /*!< SYSCFG external interrupt configuration registers, Address offset: 0x08-0x14 */ |
| 1110 | uint32_t RESERVED[2]; /*!< Reserved, 0x18-0x1C */ |
| 1111 | __IO uint32_t CMPCR; /*!< SYSCFG Compensation cell control register, Address offset: 0x20 */ |
| 1112 | } SYSCFG_TypeDef; |
| 1113 | |
| 1114 | /** |
| 1115 | * @brief Inter-integrated Circuit Interface |
| 1116 | */ |
| 1117 | |
| 1118 | typedef struct |
| 1119 | { |
| 1120 | __IO uint16_t CR1; /*!< I2C Control register 1, Address offset: 0x00 */ |
| 1121 | uint16_t RESERVED0; /*!< Reserved, 0x02 */ |
| 1122 | __IO uint16_t CR2; /*!< I2C Control register 2, Address offset: 0x04 */ |
| 1123 | uint16_t RESERVED1; /*!< Reserved, 0x06 */ |
| 1124 | __IO uint16_t OAR1; /*!< I2C Own address register 1, Address offset: 0x08 */ |
| 1125 | uint16_t RESERVED2; /*!< Reserved, 0x0A */ |
| 1126 | __IO uint16_t OAR2; /*!< I2C Own address register 2, Address offset: 0x0C */ |
| 1127 | uint16_t RESERVED3; /*!< Reserved, 0x0E */ |
| 1128 | __IO uint16_t DR; /*!< I2C Data register, Address offset: 0x10 */ |
| 1129 | uint16_t RESERVED4; /*!< Reserved, 0x12 */ |
| 1130 | __IO uint16_t SR1; /*!< I2C Status register 1, Address offset: 0x14 */ |
| 1131 | uint16_t RESERVED5; /*!< Reserved, 0x16 */ |
| 1132 | __IO uint16_t SR2; /*!< I2C Status register 2, Address offset: 0x18 */ |
| 1133 | uint16_t RESERVED6; /*!< Reserved, 0x1A */ |
| 1134 | __IO uint16_t CCR; /*!< I2C Clock control register, Address offset: 0x1C */ |
| 1135 | uint16_t RESERVED7; /*!< Reserved, 0x1E */ |
| 1136 | __IO uint16_t TRISE; /*!< I2C TRISE register, Address offset: 0x20 */ |
| 1137 | uint16_t RESERVED8; /*!< Reserved, 0x22 */ |
| 1138 | __IO uint16_t FLTR; /*!< I2C FLTR register, Address offset: 0x24 */ |
| 1139 | uint16_t RESERVED9; /*!< Reserved, 0x26 */ |
| 1140 | } I2C_TypeDef; |
| 1141 | |
| 1142 | #if defined(STM32F446xx) |
| 1143 | /** |
| 1144 | * @brief Inter-integrated Circuit Interface |
| 1145 | */ |
| 1146 | |
| 1147 | typedef struct |
| 1148 | { |
| 1149 | __IO uint32_t CR1; /*!< FMPI2C Control register 1, Address offset: 0x00 */ |
| 1150 | __IO uint32_t CR2; /*!< FMPI2C Control register 2, Address offset: 0x04 */ |
| 1151 | __IO uint32_t OAR1; /*!< FMPI2C Own address 1 register, Address offset: 0x08 */ |
| 1152 | __IO uint32_t OAR2; /*!< FMPI2C Own address 2 register, Address offset: 0x0C */ |
| 1153 | __IO uint32_t TIMINGR; /*!< FMPI2C Timing register, Address offset: 0x10 */ |
| 1154 | __IO uint32_t TIMEOUTR; /*!< FMPI2C Timeout register, Address offset: 0x14 */ |
| 1155 | __IO uint32_t ISR; /*!< FMPI2C Interrupt and status register, Address offset: 0x18 */ |
| 1156 | __IO uint32_t ICR; /*!< FMPI2C Interrupt clear register, Address offset: 0x1C */ |
| 1157 | __IO uint32_t PECR; /*!< FMPI2C PEC register, Address offset: 0x20 */ |
| 1158 | __IO uint32_t RXDR; /*!< FMPI2C Receive data register, Address offset: 0x24 */ |
| 1159 | __IO uint32_t TXDR; /*!< FMPI2C Transmit data register, Address offset: 0x28 */ |
| 1160 | }FMPI2C_TypeDef; |
| 1161 | #endif /* STM32F446xx */ |
| 1162 | |
| 1163 | /** |
| 1164 | * @brief Independent WATCHDOG |
| 1165 | */ |
| 1166 | |
| 1167 | typedef struct |
| 1168 | { |
| 1169 | __IO uint32_t KR; /*!< IWDG Key register, Address offset: 0x00 */ |
| 1170 | __IO uint32_t PR; /*!< IWDG Prescaler register, Address offset: 0x04 */ |
| 1171 | __IO uint32_t RLR; /*!< IWDG Reload register, Address offset: 0x08 */ |
| 1172 | __IO uint32_t SR; /*!< IWDG Status register, Address offset: 0x0C */ |
| 1173 | } IWDG_TypeDef; |
| 1174 | |
| 1175 | /** |
| 1176 | * @brief LCD-TFT Display Controller |
| 1177 | */ |
| 1178 | |
| 1179 | typedef struct |
| 1180 | { |
| 1181 | uint32_t RESERVED0[2]; /*!< Reserved, 0x00-0x04 */ |
| 1182 | __IO uint32_t SSCR; /*!< LTDC Synchronization Size Configuration Register, Address offset: 0x08 */ |
| 1183 | __IO uint32_t BPCR; /*!< LTDC Back Porch Configuration Register, Address offset: 0x0C */ |
| 1184 | __IO uint32_t AWCR; /*!< LTDC Active Width Configuration Register, Address offset: 0x10 */ |
| 1185 | __IO uint32_t TWCR; /*!< LTDC Total Width Configuration Register, Address offset: 0x14 */ |
| 1186 | __IO uint32_t GCR; /*!< LTDC Global Control Register, Address offset: 0x18 */ |
| 1187 | uint32_t RESERVED1[2]; /*!< Reserved, 0x1C-0x20 */ |
| 1188 | __IO uint32_t SRCR; /*!< LTDC Shadow Reload Configuration Register, Address offset: 0x24 */ |
| 1189 | uint32_t RESERVED2[1]; /*!< Reserved, 0x28 */ |
| 1190 | __IO uint32_t BCCR; /*!< LTDC Background Color Configuration Register, Address offset: 0x2C */ |
| 1191 | uint32_t RESERVED3[1]; /*!< Reserved, 0x30 */ |
| 1192 | __IO uint32_t IER; /*!< LTDC Interrupt Enable Register, Address offset: 0x34 */ |
| 1193 | __IO uint32_t ISR; /*!< LTDC Interrupt Status Register, Address offset: 0x38 */ |
| 1194 | __IO uint32_t ICR; /*!< LTDC Interrupt Clear Register, Address offset: 0x3C */ |
| 1195 | __IO uint32_t LIPCR; /*!< LTDC Line Interrupt Position Configuration Register, Address offset: 0x40 */ |
| 1196 | __IO uint32_t CPSR; /*!< LTDC Current Position Status Register, Address offset: 0x44 */ |
| 1197 | __IO uint32_t CDSR; /*!< LTDC Current Display Status Register, Address offset: 0x48 */ |
| 1198 | } LTDC_TypeDef; |
| 1199 | |
| 1200 | /** |
| 1201 | * @brief LCD-TFT Display layer x Controller |
| 1202 | */ |
| 1203 | |
| 1204 | typedef struct |
| 1205 | { |
| 1206 | __IO uint32_t CR; /*!< LTDC Layerx Control Register Address offset: 0x84 */ |
| 1207 | __IO uint32_t WHPCR; /*!< LTDC Layerx Window Horizontal Position Configuration Register Address offset: 0x88 */ |
| 1208 | __IO uint32_t WVPCR; /*!< LTDC Layerx Window Vertical Position Configuration Register Address offset: 0x8C */ |
| 1209 | __IO uint32_t CKCR; /*!< LTDC Layerx Color Keying Configuration Register Address offset: 0x90 */ |
| 1210 | __IO uint32_t PFCR; /*!< LTDC Layerx Pixel Format Configuration Register Address offset: 0x94 */ |
| 1211 | __IO uint32_t CACR; /*!< LTDC Layerx Constant Alpha Configuration Register Address offset: 0x98 */ |
| 1212 | __IO uint32_t DCCR; /*!< LTDC Layerx Default Color Configuration Register Address offset: 0x9C */ |
| 1213 | __IO uint32_t BFCR; /*!< LTDC Layerx Blending Factors Configuration Register Address offset: 0xA0 */ |
| 1214 | uint32_t RESERVED0[2]; /*!< Reserved */ |
| 1215 | __IO uint32_t CFBAR; /*!< LTDC Layerx Color Frame Buffer Address Register Address offset: 0xAC */ |
| 1216 | __IO uint32_t CFBLR; /*!< LTDC Layerx Color Frame Buffer Length Register Address offset: 0xB0 */ |
| 1217 | __IO uint32_t CFBLNR; /*!< LTDC Layerx ColorFrame Buffer Line Number Register Address offset: 0xB4 */ |
| 1218 | uint32_t RESERVED1[3]; /*!< Reserved */ |
| 1219 | __IO uint32_t CLUTWR; /*!< LTDC Layerx CLUT Write Register Address offset: 0x144 */ |
| 1220 | |
| 1221 | } LTDC_Layer_TypeDef; |
| 1222 | |
| 1223 | /** |
| 1224 | * @brief Power Control |
| 1225 | */ |
| 1226 | |
| 1227 | typedef struct |
| 1228 | { |
| 1229 | __IO uint32_t CR; /*!< PWR power control register, Address offset: 0x00 */ |
| 1230 | __IO uint32_t CSR; /*!< PWR power control/status register, Address offset: 0x04 */ |
| 1231 | } PWR_TypeDef; |
| 1232 | |
| 1233 | /** |
| 1234 | * @brief Reset and Clock Control |
| 1235 | */ |
| 1236 | |
| 1237 | typedef struct |
| 1238 | { |
| 1239 | __IO uint32_t CR; /*!< RCC clock control register, Address offset: 0x00 */ |
| 1240 | __IO uint32_t PLLCFGR; /*!< RCC PLL configuration register, Address offset: 0x04 */ |
| 1241 | __IO uint32_t CFGR; /*!< RCC clock configuration register, Address offset: 0x08 */ |
| 1242 | __IO uint32_t CIR; /*!< RCC clock interrupt register, Address offset: 0x0C */ |
| 1243 | __IO uint32_t AHB1RSTR; /*!< RCC AHB1 peripheral reset register, Address offset: 0x10 */ |
| 1244 | __IO uint32_t AHB2RSTR; /*!< RCC AHB2 peripheral reset register, Address offset: 0x14 */ |
| 1245 | __IO uint32_t AHB3RSTR; /*!< RCC AHB3 peripheral reset register, Address offset: 0x18 */ |
| 1246 | uint32_t RESERVED0; /*!< Reserved, 0x1C */ |
| 1247 | __IO uint32_t APB1RSTR; /*!< RCC APB1 peripheral reset register, Address offset: 0x20 */ |
| 1248 | __IO uint32_t APB2RSTR; /*!< RCC APB2 peripheral reset register, Address offset: 0x24 */ |
| 1249 | uint32_t RESERVED1[2]; /*!< Reserved, 0x28-0x2C */ |
| 1250 | __IO uint32_t AHB1ENR; /*!< RCC AHB1 peripheral clock register, Address offset: 0x30 */ |
| 1251 | __IO uint32_t AHB2ENR; /*!< RCC AHB2 peripheral clock register, Address offset: 0x34 */ |
| 1252 | __IO uint32_t AHB3ENR; /*!< RCC AHB3 peripheral clock register, Address offset: 0x38 */ |
| 1253 | uint32_t RESERVED2; /*!< Reserved, 0x3C */ |
| 1254 | __IO uint32_t APB1ENR; /*!< RCC APB1 peripheral clock enable register, Address offset: 0x40 */ |
| 1255 | __IO uint32_t APB2ENR; /*!< RCC APB2 peripheral clock enable register, Address offset: 0x44 */ |
| 1256 | uint32_t RESERVED3[2]; /*!< Reserved, 0x48-0x4C */ |
| 1257 | __IO uint32_t AHB1LPENR; /*!< RCC AHB1 peripheral clock enable in low power mode register, Address offset: 0x50 */ |
| 1258 | __IO uint32_t AHB2LPENR; /*!< RCC AHB2 peripheral clock enable in low power mode register, Address offset: 0x54 */ |
| 1259 | __IO uint32_t AHB3LPENR; /*!< RCC AHB3 peripheral clock enable in low power mode register, Address offset: 0x58 */ |
| 1260 | uint32_t RESERVED4; /*!< Reserved, 0x5C */ |
| 1261 | __IO uint32_t APB1LPENR; /*!< RCC APB1 peripheral clock enable in low power mode register, Address offset: 0x60 */ |
| 1262 | __IO uint32_t APB2LPENR; /*!< RCC APB2 peripheral clock enable in low power mode register, Address offset: 0x64 */ |
| 1263 | uint32_t RESERVED5[2]; /*!< Reserved, 0x68-0x6C */ |
| 1264 | __IO uint32_t BDCR; /*!< RCC Backup domain control register, Address offset: 0x70 */ |
| 1265 | __IO uint32_t CSR; /*!< RCC clock control & status register, Address offset: 0x74 */ |
| 1266 | uint32_t RESERVED6[2]; /*!< Reserved, 0x78-0x7C */ |
| 1267 | __IO uint32_t SSCGR; /*!< RCC spread spectrum clock generation register, Address offset: 0x80 */ |
| 1268 | __IO uint32_t PLLI2SCFGR; /*!< RCC PLLI2S configuration register, Address offset: 0x84 */ |
| 1269 | __IO uint32_t PLLSAICFGR; /*!< RCC PLLSAI configuration register, Address offset: 0x88 */ |
| 1270 | __IO uint32_t DCKCFGR; /*!< RCC Dedicated Clocks configuration register, Address offset: 0x8C */ |
| 1271 | __IO uint32_t CKGATENR; /*!< RCC Clocks Gated Enable Register, Address offset: 0x90 */ /* Only for STM32F446xx devices */ |
| 1272 | __IO uint32_t DCKCFGR2; /*!< RCC Dedicated Clocks configuration register 2, Address offset: 0x94 */ /* Only for STM32F446xx devices */ |
| 1273 | |
| 1274 | } RCC_TypeDef; |
| 1275 | |
| 1276 | /** |
| 1277 | * @brief Real-Time Clock |
| 1278 | */ |
| 1279 | |
| 1280 | typedef struct |
| 1281 | { |
| 1282 | __IO uint32_t TR; /*!< RTC time register, Address offset: 0x00 */ |
| 1283 | __IO uint32_t DR; /*!< RTC date register, Address offset: 0x04 */ |
| 1284 | __IO uint32_t CR; /*!< RTC control register, Address offset: 0x08 */ |
| 1285 | __IO uint32_t ISR; /*!< RTC initialization and status register, Address offset: 0x0C */ |
| 1286 | __IO uint32_t PRER; /*!< RTC prescaler register, Address offset: 0x10 */ |
| 1287 | __IO uint32_t WUTR; /*!< RTC wakeup timer register, Address offset: 0x14 */ |
| 1288 | __IO uint32_t CALIBR; /*!< RTC calibration register, Address offset: 0x18 */ |
| 1289 | __IO uint32_t ALRMAR; /*!< RTC alarm A register, Address offset: 0x1C */ |
| 1290 | __IO uint32_t ALRMBR; /*!< RTC alarm B register, Address offset: 0x20 */ |
| 1291 | __IO uint32_t WPR; /*!< RTC write protection register, Address offset: 0x24 */ |
| 1292 | __IO uint32_t SSR; /*!< RTC sub second register, Address offset: 0x28 */ |
| 1293 | __IO uint32_t SHIFTR; /*!< RTC shift control register, Address offset: 0x2C */ |
| 1294 | __IO uint32_t TSTR; /*!< RTC time stamp time register, Address offset: 0x30 */ |
| 1295 | __IO uint32_t TSDR; /*!< RTC time stamp date register, Address offset: 0x34 */ |
| 1296 | __IO uint32_t TSSSR; /*!< RTC time-stamp sub second register, Address offset: 0x38 */ |
| 1297 | __IO uint32_t CALR; /*!< RTC calibration register, Address offset: 0x3C */ |
| 1298 | __IO uint32_t TAFCR; /*!< RTC tamper and alternate function configuration register, Address offset: 0x40 */ |
| 1299 | __IO uint32_t ALRMASSR;/*!< RTC alarm A sub second register, Address offset: 0x44 */ |
| 1300 | __IO uint32_t ALRMBSSR;/*!< RTC alarm B sub second register, Address offset: 0x48 */ |
| 1301 | uint32_t RESERVED7; /*!< Reserved, 0x4C */ |
| 1302 | __IO uint32_t BKP0R; /*!< RTC backup register 1, Address offset: 0x50 */ |
| 1303 | __IO uint32_t BKP1R; /*!< RTC backup register 1, Address offset: 0x54 */ |
| 1304 | __IO uint32_t BKP2R; /*!< RTC backup register 2, Address offset: 0x58 */ |
| 1305 | __IO uint32_t BKP3R; /*!< RTC backup register 3, Address offset: 0x5C */ |
| 1306 | __IO uint32_t BKP4R; /*!< RTC backup register 4, Address offset: 0x60 */ |
| 1307 | __IO uint32_t BKP5R; /*!< RTC backup register 5, Address offset: 0x64 */ |
| 1308 | __IO uint32_t BKP6R; /*!< RTC backup register 6, Address offset: 0x68 */ |
| 1309 | __IO uint32_t BKP7R; /*!< RTC backup register 7, Address offset: 0x6C */ |
| 1310 | __IO uint32_t BKP8R; /*!< RTC backup register 8, Address offset: 0x70 */ |
| 1311 | __IO uint32_t BKP9R; /*!< RTC backup register 9, Address offset: 0x74 */ |
| 1312 | __IO uint32_t BKP10R; /*!< RTC backup register 10, Address offset: 0x78 */ |
| 1313 | __IO uint32_t BKP11R; /*!< RTC backup register 11, Address offset: 0x7C */ |
| 1314 | __IO uint32_t BKP12R; /*!< RTC backup register 12, Address offset: 0x80 */ |
| 1315 | __IO uint32_t BKP13R; /*!< RTC backup register 13, Address offset: 0x84 */ |
| 1316 | __IO uint32_t BKP14R; /*!< RTC backup register 14, Address offset: 0x88 */ |
| 1317 | __IO uint32_t BKP15R; /*!< RTC backup register 15, Address offset: 0x8C */ |
| 1318 | __IO uint32_t BKP16R; /*!< RTC backup register 16, Address offset: 0x90 */ |
| 1319 | __IO uint32_t BKP17R; /*!< RTC backup register 17, Address offset: 0x94 */ |
| 1320 | __IO uint32_t BKP18R; /*!< RTC backup register 18, Address offset: 0x98 */ |
| 1321 | __IO uint32_t BKP19R; /*!< RTC backup register 19, Address offset: 0x9C */ |
| 1322 | } RTC_TypeDef; |
| 1323 | |
| 1324 | |
| 1325 | /** |
| 1326 | * @brief Serial Audio Interface |
| 1327 | */ |
| 1328 | |
| 1329 | typedef struct |
| 1330 | { |
| 1331 | __IO uint32_t GCR; /*!< SAI global configuration register, Address offset: 0x00 */ |
| 1332 | } SAI_TypeDef; |
| 1333 | |
| 1334 | typedef struct |
| 1335 | { |
| 1336 | __IO uint32_t CR1; /*!< SAI block x configuration register 1, Address offset: 0x04 */ |
| 1337 | __IO uint32_t CR2; /*!< SAI block x configuration register 2, Address offset: 0x08 */ |
| 1338 | __IO uint32_t FRCR; /*!< SAI block x frame configuration register, Address offset: 0x0C */ |
| 1339 | __IO uint32_t SLOTR; /*!< SAI block x slot register, Address offset: 0x10 */ |
| 1340 | __IO uint32_t IMR; /*!< SAI block x interrupt mask register, Address offset: 0x14 */ |
| 1341 | __IO uint32_t SR; /*!< SAI block x status register, Address offset: 0x18 */ |
| 1342 | __IO uint32_t CLRFR; /*!< SAI block x clear flag register, Address offset: 0x1C */ |
| 1343 | __IO uint32_t DR; /*!< SAI block x data register, Address offset: 0x20 */ |
| 1344 | } SAI_Block_TypeDef; |
| 1345 | |
| 1346 | /** |
| 1347 | * @brief SD host Interface |
| 1348 | */ |
| 1349 | |
| 1350 | typedef struct |
| 1351 | { |
| 1352 | __IO uint32_t POWER; /*!< SDIO power control register, Address offset: 0x00 */ |
| 1353 | __IO uint32_t CLKCR; /*!< SDI clock control register, Address offset: 0x04 */ |
| 1354 | __IO uint32_t ARG; /*!< SDIO argument register, Address offset: 0x08 */ |
| 1355 | __IO uint32_t CMD; /*!< SDIO command register, Address offset: 0x0C */ |
| 1356 | __I uint32_t RESPCMD; /*!< SDIO command response register, Address offset: 0x10 */ |
| 1357 | __I uint32_t RESP1; /*!< SDIO response 1 register, Address offset: 0x14 */ |
| 1358 | __I uint32_t RESP2; /*!< SDIO response 2 register, Address offset: 0x18 */ |
| 1359 | __I uint32_t RESP3; /*!< SDIO response 3 register, Address offset: 0x1C */ |
| 1360 | __I uint32_t RESP4; /*!< SDIO response 4 register, Address offset: 0x20 */ |
| 1361 | __IO uint32_t DTIMER; /*!< SDIO data timer register, Address offset: 0x24 */ |
| 1362 | __IO uint32_t DLEN; /*!< SDIO data length register, Address offset: 0x28 */ |
| 1363 | __IO uint32_t DCTRL; /*!< SDIO data control register, Address offset: 0x2C */ |
| 1364 | __I uint32_t DCOUNT; /*!< SDIO data counter register, Address offset: 0x30 */ |
| 1365 | __I uint32_t STA; /*!< SDIO status register, Address offset: 0x34 */ |
| 1366 | __IO uint32_t ICR; /*!< SDIO interrupt clear register, Address offset: 0x38 */ |
| 1367 | __IO uint32_t MASK; /*!< SDIO mask register, Address offset: 0x3C */ |
| 1368 | uint32_t RESERVED0[2]; /*!< Reserved, 0x40-0x44 */ |
| 1369 | __I uint32_t FIFOCNT; /*!< SDIO FIFO counter register, Address offset: 0x48 */ |
| 1370 | uint32_t RESERVED1[13]; /*!< Reserved, 0x4C-0x7C */ |
| 1371 | __IO uint32_t FIFO; /*!< SDIO data FIFO register, Address offset: 0x80 */ |
| 1372 | } SDIO_TypeDef; |
| 1373 | |
| 1374 | /** |
| 1375 | * @brief Serial Peripheral Interface |
| 1376 | */ |
| 1377 | |
| 1378 | typedef struct |
| 1379 | { |
| 1380 | __IO uint16_t CR1; /*!< SPI control register 1 (not used in I2S mode), Address offset: 0x00 */ |
| 1381 | uint16_t RESERVED0; /*!< Reserved, 0x02 */ |
| 1382 | __IO uint16_t CR2; /*!< SPI control register 2, Address offset: 0x04 */ |
| 1383 | uint16_t RESERVED1; /*!< Reserved, 0x06 */ |
| 1384 | __IO uint16_t SR; /*!< SPI status register, Address offset: 0x08 */ |
| 1385 | uint16_t RESERVED2; /*!< Reserved, 0x0A */ |
| 1386 | __IO uint16_t DR; /*!< SPI data register, Address offset: 0x0C */ |
| 1387 | uint16_t RESERVED3; /*!< Reserved, 0x0E */ |
| 1388 | __IO uint16_t CRCPR; /*!< SPI CRC polynomial register (not used in I2S mode), Address offset: 0x10 */ |
| 1389 | uint16_t RESERVED4; /*!< Reserved, 0x12 */ |
| 1390 | __IO uint16_t RXCRCR; /*!< SPI RX CRC register (not used in I2S mode), Address offset: 0x14 */ |
| 1391 | uint16_t RESERVED5; /*!< Reserved, 0x16 */ |
| 1392 | __IO uint16_t TXCRCR; /*!< SPI TX CRC register (not used in I2S mode), Address offset: 0x18 */ |
| 1393 | uint16_t RESERVED6; /*!< Reserved, 0x1A */ |
| 1394 | __IO uint16_t I2SCFGR; /*!< SPI_I2S configuration register, Address offset: 0x1C */ |
| 1395 | uint16_t RESERVED7; /*!< Reserved, 0x1E */ |
| 1396 | __IO uint16_t I2SPR; /*!< SPI_I2S prescaler register, Address offset: 0x20 */ |
| 1397 | uint16_t RESERVED8; /*!< Reserved, 0x22 */ |
| 1398 | } SPI_TypeDef; |
| 1399 | |
| 1400 | #if defined(STM32F446xx) |
| 1401 | /** |
| 1402 | * @brief SPDIFRX Interface |
| 1403 | */ |
| 1404 | typedef struct |
| 1405 | { |
| 1406 | __IO uint32_t CR; /*!< Control register, Address offset: 0x00 */ |
| 1407 | __IO uint16_t IMR; /*!< Interrupt mask register, Address offset: 0x04 */ |
| 1408 | uint16_t RESERVED0; /*!< Reserved, 0x06 */ |
| 1409 | __IO uint32_t SR; /*!< Status register, Address offset: 0x08 */ |
| 1410 | __IO uint16_t IFCR; /*!< Interrupt Flag Clear register, Address offset: 0x0C */ |
| 1411 | uint16_t RESERVED1; /*!< Reserved, 0x0E */ |
| 1412 | __IO uint32_t DR; /*!< Data input register, Address offset: 0x10 */ |
| 1413 | __IO uint32_t CSR; /*!< Channel Status register, Address offset: 0x14 */ |
| 1414 | __IO uint32_t DIR; /*!< Debug Information register, Address offset: 0x18 */ |
| 1415 | uint16_t RESERVED2; /*!< Reserved, 0x1A */ |
| 1416 | } SPDIFRX_TypeDef; |
| 1417 | |
| 1418 | /** |
| 1419 | * @brief QUAD Serial Peripheral Interface |
| 1420 | */ |
| 1421 | typedef struct |
| 1422 | { |
| 1423 | __IO uint32_t CR; /*!< QUADSPI Control register, Address offset: 0x00 */ |
| 1424 | __IO uint32_t DCR; /*!< QUADSPI Device Configuration register, Address offset: 0x04 */ |
| 1425 | __IO uint32_t SR; /*!< QUADSPI Status register, Address offset: 0x08 */ |
| 1426 | __IO uint32_t FCR; /*!< QUADSPI Flag Clear register, Address offset: 0x0C */ |
| 1427 | __IO uint32_t DLR; /*!< QUADSPI Data Length register, Address offset: 0x10 */ |
| 1428 | __IO uint32_t CCR; /*!< QUADSPI Communication Configuration register, Address offset: 0x14 */ |
| 1429 | __IO uint32_t AR; /*!< QUADSPI Address register, Address offset: 0x18 */ |
| 1430 | __IO uint32_t ABR; /*!< QUADSPI Alternate Bytes register, Address offset: 0x1C */ |
| 1431 | __IO uint32_t DR; /*!< QUADSPI Data register, Address offset: 0x20 */ |
| 1432 | __IO uint32_t PSMKR; /*!< QUADSPI Polling Status Mask register, Address offset: 0x24 */ |
| 1433 | __IO uint32_t PSMAR; /*!< QUADSPI Polling Status Match register, Address offset: 0x28 */ |
| 1434 | __IO uint32_t PIR; /*!< QUADSPI Polling Interval register, Address offset: 0x2C */ |
| 1435 | __IO uint32_t LPTR; /*!< QUADSPI Low Power Timeout register, Address offset: 0x30 */ |
| 1436 | } QUADSPI_TypeDef; |
| 1437 | #endif /* STM32F446xx */ |
| 1438 | |
| 1439 | #if defined(STM32F446xx) |
| 1440 | /** |
| 1441 | * @brief SPDIF-RX Interface |
| 1442 | */ |
| 1443 | typedef struct |
| 1444 | { |
| 1445 | __IO uint32_t CR; /*!< Control register, Address offset: 0x00 */ |
| 1446 | __IO uint16_t IMR; /*!< Interrupt mask register, Address offset: 0x04 */ |
| 1447 | uint16_t RESERVED0; /*!< Reserved, 0x06 */ |
| 1448 | __IO uint32_t SR; /*!< Status register, Address offset: 0x08 */ |
| 1449 | __IO uint16_t IFCR; /*!< Interrupt Flag Clear register, Address offset: 0x0C */ |
| 1450 | uint16_t RESERVED1; /*!< Reserved, 0x0E */ |
| 1451 | __IO uint32_t DR; /*!< Data input register, Address offset: 0x10 */ |
| 1452 | __IO uint32_t CSR; /*!< Channel Status register, Address offset: 0x14 */ |
| 1453 | __IO uint32_t DIR; /*!< Debug Information register, Address offset: 0x18 */ |
| 1454 | uint16_t RESERVED2; /*!< Reserved, 0x1A */ |
| 1455 | } SPDIF_TypeDef; |
| 1456 | #endif /* STM32F446xx */ |
| 1457 | |
| 1458 | /** |
| 1459 | * @brief TIM |
| 1460 | */ |
| 1461 | |
| 1462 | typedef struct |
| 1463 | { |
| 1464 | __IO uint16_t CR1; /*!< TIM control register 1, Address offset: 0x00 */ |
| 1465 | uint16_t RESERVED0; /*!< Reserved, 0x02 */ |
| 1466 | __IO uint16_t CR2; /*!< TIM control register 2, Address offset: 0x04 */ |
| 1467 | uint16_t RESERVED1; /*!< Reserved, 0x06 */ |
| 1468 | __IO uint16_t SMCR; /*!< TIM slave mode control register, Address offset: 0x08 */ |
| 1469 | uint16_t RESERVED2; /*!< Reserved, 0x0A */ |
| 1470 | __IO uint16_t DIER; /*!< TIM DMA/interrupt enable register, Address offset: 0x0C */ |
| 1471 | uint16_t RESERVED3; /*!< Reserved, 0x0E */ |
| 1472 | __IO uint16_t SR; /*!< TIM status register, Address offset: 0x10 */ |
| 1473 | uint16_t RESERVED4; /*!< Reserved, 0x12 */ |
| 1474 | __IO uint16_t EGR; /*!< TIM event generation register, Address offset: 0x14 */ |
| 1475 | uint16_t RESERVED5; /*!< Reserved, 0x16 */ |
| 1476 | __IO uint16_t CCMR1; /*!< TIM capture/compare mode register 1, Address offset: 0x18 */ |
| 1477 | uint16_t RESERVED6; /*!< Reserved, 0x1A */ |
| 1478 | __IO uint16_t CCMR2; /*!< TIM capture/compare mode register 2, Address offset: 0x1C */ |
| 1479 | uint16_t RESERVED7; /*!< Reserved, 0x1E */ |
| 1480 | __IO uint16_t CCER; /*!< TIM capture/compare enable register, Address offset: 0x20 */ |
| 1481 | uint16_t RESERVED8; /*!< Reserved, 0x22 */ |
| 1482 | __IO uint32_t CNT; /*!< TIM counter register, Address offset: 0x24 */ |
| 1483 | __IO uint16_t PSC; /*!< TIM prescaler, Address offset: 0x28 */ |
| 1484 | uint16_t RESERVED9; /*!< Reserved, 0x2A */ |
| 1485 | __IO uint32_t ARR; /*!< TIM auto-reload register, Address offset: 0x2C */ |
| 1486 | __IO uint16_t RCR; /*!< TIM repetition counter register, Address offset: 0x30 */ |
| 1487 | uint16_t RESERVED10; /*!< Reserved, 0x32 */ |
| 1488 | __IO uint32_t CCR1; /*!< TIM capture/compare register 1, Address offset: 0x34 */ |
| 1489 | __IO uint32_t CCR2; /*!< TIM capture/compare register 2, Address offset: 0x38 */ |
| 1490 | __IO uint32_t CCR3; /*!< TIM capture/compare register 3, Address offset: 0x3C */ |
| 1491 | __IO uint32_t CCR4; /*!< TIM capture/compare register 4, Address offset: 0x40 */ |
| 1492 | __IO uint16_t BDTR; /*!< TIM break and dead-time register, Address offset: 0x44 */ |
| 1493 | uint16_t RESERVED11; /*!< Reserved, 0x46 */ |
| 1494 | __IO uint16_t DCR; /*!< TIM DMA control register, Address offset: 0x48 */ |
| 1495 | uint16_t RESERVED12; /*!< Reserved, 0x4A */ |
| 1496 | __IO uint16_t DMAR; /*!< TIM DMA address for full transfer, Address offset: 0x4C */ |
| 1497 | uint16_t RESERVED13; /*!< Reserved, 0x4E */ |
| 1498 | __IO uint16_t OR; /*!< TIM option register, Address offset: 0x50 */ |
| 1499 | uint16_t RESERVED14; /*!< Reserved, 0x52 */ |
| 1500 | } TIM_TypeDef; |
| 1501 | |
| 1502 | /** |
| 1503 | * @brief Universal Synchronous Asynchronous Receiver Transmitter |
| 1504 | */ |
| 1505 | |
| 1506 | typedef struct |
| 1507 | { |
| 1508 | __IO uint16_t SR; /*!< USART Status register, Address offset: 0x00 */ |
| 1509 | uint16_t RESERVED0; /*!< Reserved, 0x02 */ |
| 1510 | __IO uint16_t DR; /*!< USART Data register, Address offset: 0x04 */ |
| 1511 | uint16_t RESERVED1; /*!< Reserved, 0x06 */ |
| 1512 | __IO uint16_t BRR; /*!< USART Baud rate register, Address offset: 0x08 */ |
| 1513 | uint16_t RESERVED2; /*!< Reserved, 0x0A */ |
| 1514 | __IO uint16_t CR1; /*!< USART Control register 1, Address offset: 0x0C */ |
| 1515 | uint16_t RESERVED3; /*!< Reserved, 0x0E */ |
| 1516 | __IO uint16_t CR2; /*!< USART Control register 2, Address offset: 0x10 */ |
| 1517 | uint16_t RESERVED4; /*!< Reserved, 0x12 */ |
| 1518 | __IO uint16_t CR3; /*!< USART Control register 3, Address offset: 0x14 */ |
| 1519 | uint16_t RESERVED5; /*!< Reserved, 0x16 */ |
| 1520 | __IO uint16_t GTPR; /*!< USART Guard time and prescaler register, Address offset: 0x18 */ |
| 1521 | uint16_t RESERVED6; /*!< Reserved, 0x1A */ |
| 1522 | } USART_TypeDef; |
| 1523 | |
| 1524 | /** |
| 1525 | * @brief Window WATCHDOG |
| 1526 | */ |
| 1527 | |
| 1528 | typedef struct |
| 1529 | { |
| 1530 | __IO uint32_t CR; /*!< WWDG Control register, Address offset: 0x00 */ |
| 1531 | __IO uint32_t CFR; /*!< WWDG Configuration register, Address offset: 0x04 */ |
| 1532 | __IO uint32_t SR; /*!< WWDG Status register, Address offset: 0x08 */ |
| 1533 | } WWDG_TypeDef; |
| 1534 | |
| 1535 | /** |
| 1536 | * @brief Crypto Processor |
| 1537 | */ |
| 1538 | |
| 1539 | typedef struct |
| 1540 | { |
| 1541 | __IO uint32_t CR; /*!< CRYP control register, Address offset: 0x00 */ |
| 1542 | __IO uint32_t SR; /*!< CRYP status register, Address offset: 0x04 */ |
| 1543 | __IO uint32_t DR; /*!< CRYP data input register, Address offset: 0x08 */ |
| 1544 | __IO uint32_t DOUT; /*!< CRYP data output register, Address offset: 0x0C */ |
| 1545 | __IO uint32_t DMACR; /*!< CRYP DMA control register, Address offset: 0x10 */ |
| 1546 | __IO uint32_t IMSCR; /*!< CRYP interrupt mask set/clear register, Address offset: 0x14 */ |
| 1547 | __IO uint32_t RISR; /*!< CRYP raw interrupt status register, Address offset: 0x18 */ |
| 1548 | __IO uint32_t MISR; /*!< CRYP masked interrupt status register, Address offset: 0x1C */ |
| 1549 | __IO uint32_t K0LR; /*!< CRYP key left register 0, Address offset: 0x20 */ |
| 1550 | __IO uint32_t K0RR; /*!< CRYP key right register 0, Address offset: 0x24 */ |
| 1551 | __IO uint32_t K1LR; /*!< CRYP key left register 1, Address offset: 0x28 */ |
| 1552 | __IO uint32_t K1RR; /*!< CRYP key right register 1, Address offset: 0x2C */ |
| 1553 | __IO uint32_t K2LR; /*!< CRYP key left register 2, Address offset: 0x30 */ |
| 1554 | __IO uint32_t K2RR; /*!< CRYP key right register 2, Address offset: 0x34 */ |
| 1555 | __IO uint32_t K3LR; /*!< CRYP key left register 3, Address offset: 0x38 */ |
| 1556 | __IO uint32_t K3RR; /*!< CRYP key right register 3, Address offset: 0x3C */ |
| 1557 | __IO uint32_t IV0LR; /*!< CRYP initialization vector left-word register 0, Address offset: 0x40 */ |
| 1558 | __IO uint32_t IV0RR; /*!< CRYP initialization vector right-word register 0, Address offset: 0x44 */ |
| 1559 | __IO uint32_t IV1LR; /*!< CRYP initialization vector left-word register 1, Address offset: 0x48 */ |
| 1560 | __IO uint32_t IV1RR; /*!< CRYP initialization vector right-word register 1, Address offset: 0x4C */ |
| 1561 | __IO uint32_t CSGCMCCM0R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 0, Address offset: 0x50 */ |
| 1562 | __IO uint32_t CSGCMCCM1R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 1, Address offset: 0x54 */ |
| 1563 | __IO uint32_t CSGCMCCM2R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 2, Address offset: 0x58 */ |
| 1564 | __IO uint32_t CSGCMCCM3R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 3, Address offset: 0x5C */ |
| 1565 | __IO uint32_t CSGCMCCM4R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 4, Address offset: 0x60 */ |
| 1566 | __IO uint32_t CSGCMCCM5R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 5, Address offset: 0x64 */ |
| 1567 | __IO uint32_t CSGCMCCM6R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 6, Address offset: 0x68 */ |
| 1568 | __IO uint32_t CSGCMCCM7R; /*!< CRYP GCM/GMAC or CCM/CMAC context swap register 7, Address offset: 0x6C */ |
| 1569 | __IO uint32_t CSGCM0R; /*!< CRYP GCM/GMAC context swap register 0, Address offset: 0x70 */ |
| 1570 | __IO uint32_t CSGCM1R; /*!< CRYP GCM/GMAC context swap register 1, Address offset: 0x74 */ |
| 1571 | __IO uint32_t CSGCM2R; /*!< CRYP GCM/GMAC context swap register 2, Address offset: 0x78 */ |
| 1572 | __IO uint32_t CSGCM3R; /*!< CRYP GCM/GMAC context swap register 3, Address offset: 0x7C */ |
| 1573 | __IO uint32_t CSGCM4R; /*!< CRYP GCM/GMAC context swap register 4, Address offset: 0x80 */ |
| 1574 | __IO uint32_t CSGCM5R; /*!< CRYP GCM/GMAC context swap register 5, Address offset: 0x84 */ |
| 1575 | __IO uint32_t CSGCM6R; /*!< CRYP GCM/GMAC context swap register 6, Address offset: 0x88 */ |
| 1576 | __IO uint32_t CSGCM7R; /*!< CRYP GCM/GMAC context swap register 7, Address offset: 0x8C */ |
| 1577 | } CRYP_TypeDef; |
| 1578 | |
| 1579 | /** |
| 1580 | * @brief HASH |
| 1581 | */ |
| 1582 | |
| 1583 | typedef struct |
| 1584 | { |
| 1585 | __IO uint32_t CR; /*!< HASH control register, Address offset: 0x00 */ |
| 1586 | __IO uint32_t DIN; /*!< HASH data input register, Address offset: 0x04 */ |
| 1587 | __IO uint32_t STR; /*!< HASH start register, Address offset: 0x08 */ |
| 1588 | __IO uint32_t HR[5]; /*!< HASH digest registers, Address offset: 0x0C-0x1C */ |
| 1589 | __IO uint32_t IMR; /*!< HASH interrupt enable register, Address offset: 0x20 */ |
| 1590 | __IO uint32_t SR; /*!< HASH status register, Address offset: 0x24 */ |
| 1591 | uint32_t RESERVED[52]; /*!< Reserved, 0x28-0xF4 */ |
| 1592 | __IO uint32_t CSR[54]; /*!< HASH context swap registers, Address offset: 0x0F8-0x1CC */ |
| 1593 | } HASH_TypeDef; |
| 1594 | |
| 1595 | /** |
| 1596 | * @brief HASH_DIGEST |
| 1597 | */ |
| 1598 | |
| 1599 | typedef struct |
| 1600 | { |
| 1601 | __IO uint32_t HR[8]; /*!< HASH digest registers, Address offset: 0x310-0x32C */ |
| 1602 | } HASH_DIGEST_TypeDef; |
| 1603 | |
| 1604 | /** |
| 1605 | * @brief RNG |
| 1606 | */ |
| 1607 | |
| 1608 | typedef struct |
| 1609 | { |
| 1610 | __IO uint32_t CR; /*!< RNG control register, Address offset: 0x00 */ |
| 1611 | __IO uint32_t SR; /*!< RNG status register, Address offset: 0x04 */ |
| 1612 | __IO uint32_t DR; /*!< RNG data register, Address offset: 0x08 */ |
| 1613 | } RNG_TypeDef; |
| 1614 | |
| 1615 | /** |
| 1616 | * @} |
| 1617 | */ |
| 1618 | |
| 1619 | /** @addtogroup Peripheral_memory_map |
| 1620 | * @{ |
| 1621 | */ |
| 1622 | #define FLASH_BASE ((uint32_t)0x08000000) /*!< FLASH(up to 1 MB) base address in the alias region */ |
| 1623 | #define CCMDATARAM_BASE ((uint32_t)0x10000000) /*!< CCM(core coupled memory) data RAM(64 KB) base address in the alias region */ |
| 1624 | #define SRAM1_BASE ((uint32_t)0x20000000) /*!< SRAM1(112 KB) base address in the alias region */ |
| 1625 | #define SRAM2_BASE ((uint32_t)0x2001C000) /*!< SRAM2(16 KB) base address in the alias region */ |
| 1626 | #define SRAM3_BASE ((uint32_t)0x20020000) /*!< SRAM3(64 KB) base address in the alias region */ |
| 1627 | #define PERIPH_BASE ((uint32_t)0x40000000) /*!< Peripheral base address in the alias region */ |
| 1628 | #define BKPSRAM_BASE ((uint32_t)0x40024000) /*!< Backup SRAM(4 KB) base address in the alias region */ |
| 1629 | |
| 1630 | #if defined(STM32F40_41xxx) |
| 1631 | #define FSMC_R_BASE ((uint32_t)0xA0000000) /*!< FSMC registers base address */ |
| 1632 | #endif /* STM32F40_41xxx */ |
| 1633 | |
| 1634 | #if defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F446xx) |
| 1635 | #define FMC_R_BASE ((uint32_t)0xA0000000) /*!< FMC registers base address */ |
| 1636 | #endif /* STM32F427_437xx || STM32F429_439xx || STM32F446xx */ |
| 1637 | |
| 1638 | #if defined(STM32F446xx) |
| 1639 | #define QSPI_R_BASE ((uint32_t)0xA0001000) /*!< QuadSPI registers base address */ |
| 1640 | #endif /* STM32F446xx */ |
| 1641 | |
| 1642 | #define CCMDATARAM_BB_BASE ((uint32_t)0x12000000) /*!< CCM(core coupled memory) data RAM(64 KB) base address in the bit-band region */ |
| 1643 | #define SRAM1_BB_BASE ((uint32_t)0x22000000) /*!< SRAM1(112 KB) base address in the bit-band region */ |
| 1644 | #define SRAM2_BB_BASE ((uint32_t)0x2201C000) /*!< SRAM2(16 KB) base address in the bit-band region */ |
| 1645 | #define SRAM3_BB_BASE ((uint32_t)0x22400000) /*!< SRAM3(64 KB) base address in the bit-band region */ |
| 1646 | #define PERIPH_BB_BASE ((uint32_t)0x42000000) /*!< Peripheral base address in the bit-band region */ |
| 1647 | #define BKPSRAM_BB_BASE ((uint32_t)0x42024000) /*!< Backup SRAM(4 KB) base address in the bit-band region */ |
| 1648 | |
| 1649 | /* Legacy defines */ |
| 1650 | #define SRAM_BASE SRAM1_BASE |
| 1651 | #define SRAM_BB_BASE SRAM1_BB_BASE |
| 1652 | |
| 1653 | |
| 1654 | /*!< Peripheral memory map */ |
| 1655 | #define APB1PERIPH_BASE PERIPH_BASE |
| 1656 | #define APB2PERIPH_BASE (PERIPH_BASE + 0x00010000) |
| 1657 | #define AHB1PERIPH_BASE (PERIPH_BASE + 0x00020000) |
| 1658 | #define AHB2PERIPH_BASE (PERIPH_BASE + 0x10000000) |
| 1659 | |
| 1660 | /*!< APB1 peripherals */ |
| 1661 | #define TIM2_BASE (APB1PERIPH_BASE + 0x0000) |
| 1662 | #define TIM3_BASE (APB1PERIPH_BASE + 0x0400) |
| 1663 | #define TIM4_BASE (APB1PERIPH_BASE + 0x0800) |
| 1664 | #define TIM5_BASE (APB1PERIPH_BASE + 0x0C00) |
| 1665 | #define TIM6_BASE (APB1PERIPH_BASE + 0x1000) |
| 1666 | #define TIM7_BASE (APB1PERIPH_BASE + 0x1400) |
| 1667 | #define TIM12_BASE (APB1PERIPH_BASE + 0x1800) |
| 1668 | #define TIM13_BASE (APB1PERIPH_BASE + 0x1C00) |
| 1669 | #define TIM14_BASE (APB1PERIPH_BASE + 0x2000) |
| 1670 | #define RTC_BASE (APB1PERIPH_BASE + 0x2800) |
| 1671 | #define WWDG_BASE (APB1PERIPH_BASE + 0x2C00) |
| 1672 | #define IWDG_BASE (APB1PERIPH_BASE + 0x3000) |
| 1673 | #define I2S2ext_BASE (APB1PERIPH_BASE + 0x3400) |
| 1674 | #define SPI2_BASE (APB1PERIPH_BASE + 0x3800) |
| 1675 | #define SPI3_BASE (APB1PERIPH_BASE + 0x3C00) |
| 1676 | #if defined(STM32F446xx) |
| 1677 | #define SPDIFRX_BASE (APB1PERIPH_BASE + 0x4000) |
| 1678 | #endif /* STM32F446xx */ |
| 1679 | #define I2S3ext_BASE (APB1PERIPH_BASE + 0x4000) |
| 1680 | #define USART2_BASE (APB1PERIPH_BASE + 0x4400) |
| 1681 | #define USART3_BASE (APB1PERIPH_BASE + 0x4800) |
| 1682 | #define UART4_BASE (APB1PERIPH_BASE + 0x4C00) |
| 1683 | #define UART5_BASE (APB1PERIPH_BASE + 0x5000) |
| 1684 | #define I2C1_BASE (APB1PERIPH_BASE + 0x5400) |
| 1685 | #define I2C2_BASE (APB1PERIPH_BASE + 0x5800) |
| 1686 | #define I2C3_BASE (APB1PERIPH_BASE + 0x5C00) |
| 1687 | #if defined(STM32F446xx) |
| 1688 | #define FMPI2C1_BASE (APB1PERIPH_BASE + 0x6000) |
| 1689 | #endif /* STM32F446xx */ |
| 1690 | #define CAN1_BASE (APB1PERIPH_BASE + 0x6400) |
| 1691 | #define CAN2_BASE (APB1PERIPH_BASE + 0x6800) |
| 1692 | #if defined(STM32F446xx) |
| 1693 | #define CEC_BASE (APB1PERIPH_BASE + 0x6C00) |
| 1694 | #endif /* STM32F446xx */ |
| 1695 | #define PWR_BASE (APB1PERIPH_BASE + 0x7000) |
| 1696 | #define DAC_BASE (APB1PERIPH_BASE + 0x7400) |
| 1697 | #define UART7_BASE (APB1PERIPH_BASE + 0x7800) |
| 1698 | #define UART8_BASE (APB1PERIPH_BASE + 0x7C00) |
| 1699 | |
| 1700 | /*!< APB2 peripherals */ |
| 1701 | #define TIM1_BASE (APB2PERIPH_BASE + 0x0000) |
| 1702 | #define TIM8_BASE (APB2PERIPH_BASE + 0x0400) |
| 1703 | #define USART1_BASE (APB2PERIPH_BASE + 0x1000) |
| 1704 | #define USART6_BASE (APB2PERIPH_BASE + 0x1400) |
| 1705 | #define ADC1_BASE (APB2PERIPH_BASE + 0x2000) |
| 1706 | #define ADC2_BASE (APB2PERIPH_BASE + 0x2100) |
| 1707 | #define ADC3_BASE (APB2PERIPH_BASE + 0x2200) |
| 1708 | #define ADC_BASE (APB2PERIPH_BASE + 0x2300) |
| 1709 | #define SDIO_BASE (APB2PERIPH_BASE + 0x2C00) |
| 1710 | #define SPI1_BASE (APB2PERIPH_BASE + 0x3000) |
| 1711 | #define SPI4_BASE (APB2PERIPH_BASE + 0x3400) |
| 1712 | #define SYSCFG_BASE (APB2PERIPH_BASE + 0x3800) |
| 1713 | #define EXTI_BASE (APB2PERIPH_BASE + 0x3C00) |
| 1714 | #define TIM9_BASE (APB2PERIPH_BASE + 0x4000) |
| 1715 | #define TIM10_BASE (APB2PERIPH_BASE + 0x4400) |
| 1716 | #define TIM11_BASE (APB2PERIPH_BASE + 0x4800) |
| 1717 | #define SPI5_BASE (APB2PERIPH_BASE + 0x5000) |
| 1718 | #define SPI6_BASE (APB2PERIPH_BASE + 0x5400) |
| 1719 | #define SAI1_BASE (APB2PERIPH_BASE + 0x5800) |
| 1720 | #define SAI1_Block_A_BASE (SAI1_BASE + 0x004) |
| 1721 | #define SAI1_Block_B_BASE (SAI1_BASE + 0x024) |
| 1722 | #if defined(STM32F446xx) |
| 1723 | #define SAI2_BASE (APB2PERIPH_BASE + 0x5C00) |
| 1724 | #define SAI2_Block_A_BASE (SAI2_BASE + 0x004) |
| 1725 | #define SAI2_Block_B_BASE (SAI2_BASE + 0x024) |
| 1726 | #endif /* STM32F446xx */ |
| 1727 | #define LTDC_BASE (APB2PERIPH_BASE + 0x6800) |
| 1728 | #define LTDC_Layer1_BASE (LTDC_BASE + 0x84) |
| 1729 | #define LTDC_Layer2_BASE (LTDC_BASE + 0x104) |
| 1730 | |
| 1731 | /*!< AHB1 peripherals */ |
| 1732 | #define GPIOA_BASE (AHB1PERIPH_BASE + 0x0000) |
| 1733 | #define GPIOB_BASE (AHB1PERIPH_BASE + 0x0400) |
| 1734 | #define GPIOC_BASE (AHB1PERIPH_BASE + 0x0800) |
| 1735 | #define GPIOD_BASE (AHB1PERIPH_BASE + 0x0C00) |
| 1736 | #define GPIOE_BASE (AHB1PERIPH_BASE + 0x1000) |
| 1737 | #define GPIOF_BASE (AHB1PERIPH_BASE + 0x1400) |
| 1738 | #define GPIOG_BASE (AHB1PERIPH_BASE + 0x1800) |
| 1739 | #define GPIOH_BASE (AHB1PERIPH_BASE + 0x1C00) |
| 1740 | #define GPIOI_BASE (AHB1PERIPH_BASE + 0x2000) |
| 1741 | #define GPIOJ_BASE (AHB1PERIPH_BASE + 0x2400) |
| 1742 | #define GPIOK_BASE (AHB1PERIPH_BASE + 0x2800) |
| 1743 | #define CRC_BASE (AHB1PERIPH_BASE + 0x3000) |
| 1744 | #define RCC_BASE (AHB1PERIPH_BASE + 0x3800) |
| 1745 | #define FLASH_R_BASE (AHB1PERIPH_BASE + 0x3C00) |
| 1746 | #define DMA1_BASE (AHB1PERIPH_BASE + 0x6000) |
| 1747 | #define DMA1_Stream0_BASE (DMA1_BASE + 0x010) |
| 1748 | #define DMA1_Stream1_BASE (DMA1_BASE + 0x028) |
| 1749 | #define DMA1_Stream2_BASE (DMA1_BASE + 0x040) |
| 1750 | #define DMA1_Stream3_BASE (DMA1_BASE + 0x058) |
| 1751 | #define DMA1_Stream4_BASE (DMA1_BASE + 0x070) |
| 1752 | #define DMA1_Stream5_BASE (DMA1_BASE + 0x088) |
| 1753 | #define DMA1_Stream6_BASE (DMA1_BASE + 0x0A0) |
| 1754 | #define DMA1_Stream7_BASE (DMA1_BASE + 0x0B8) |
| 1755 | #define DMA2_BASE (AHB1PERIPH_BASE + 0x6400) |
| 1756 | #define DMA2_Stream0_BASE (DMA2_BASE + 0x010) |
| 1757 | #define DMA2_Stream1_BASE (DMA2_BASE + 0x028) |
| 1758 | #define DMA2_Stream2_BASE (DMA2_BASE + 0x040) |
| 1759 | #define DMA2_Stream3_BASE (DMA2_BASE + 0x058) |
| 1760 | #define DMA2_Stream4_BASE (DMA2_BASE + 0x070) |
| 1761 | #define DMA2_Stream5_BASE (DMA2_BASE + 0x088) |
| 1762 | #define DMA2_Stream6_BASE (DMA2_BASE + 0x0A0) |
| 1763 | #define DMA2_Stream7_BASE (DMA2_BASE + 0x0B8) |
| 1764 | #define ETH_BASE (AHB1PERIPH_BASE + 0x8000) |
| 1765 | #define ETH_MAC_BASE (ETH_BASE) |
| 1766 | #define ETH_MMC_BASE (ETH_BASE + 0x0100) |
| 1767 | #define ETH_PTP_BASE (ETH_BASE + 0x0700) |
| 1768 | #define ETH_DMA_BASE (ETH_BASE + 0x1000) |
| 1769 | #define DMA2D_BASE (AHB1PERIPH_BASE + 0xB000) |
| 1770 | |
| 1771 | /*!< AHB2 peripherals */ |
| 1772 | #define DCMI_BASE (AHB2PERIPH_BASE + 0x50000) |
| 1773 | #define CRYP_BASE (AHB2PERIPH_BASE + 0x60000) |
| 1774 | #define HASH_BASE (AHB2PERIPH_BASE + 0x60400) |
| 1775 | #define HASH_DIGEST_BASE (AHB2PERIPH_BASE + 0x60710) |
| 1776 | #define RNG_BASE (AHB2PERIPH_BASE + 0x60800) |
| 1777 | |
| 1778 | #if defined(STM32F40_41xxx) |
| 1779 | /*!< FSMC Bankx registers base address */ |
| 1780 | #define FSMC_Bank1_R_BASE (FSMC_R_BASE + 0x0000) |
| 1781 | #define FSMC_Bank1E_R_BASE (FSMC_R_BASE + 0x0104) |
| 1782 | #define FSMC_Bank2_R_BASE (FSMC_R_BASE + 0x0060) |
| 1783 | #define FSMC_Bank3_R_BASE (FSMC_R_BASE + 0x0080) |
| 1784 | #define FSMC_Bank4_R_BASE (FSMC_R_BASE + 0x00A0) |
| 1785 | #endif /* STM32F40_41xxx */ |
| 1786 | |
| 1787 | #if defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F446xx) |
| 1788 | /*!< FMC Bankx registers base address */ |
| 1789 | #define FMC_Bank1_R_BASE (FMC_R_BASE + 0x0000) |
| 1790 | #define FMC_Bank1E_R_BASE (FMC_R_BASE + 0x0104) |
| 1791 | #define FMC_Bank2_R_BASE (FMC_R_BASE + 0x0060) |
| 1792 | #define FMC_Bank3_R_BASE (FMC_R_BASE + 0x0080) |
| 1793 | #define FMC_Bank4_R_BASE (FMC_R_BASE + 0x00A0) |
| 1794 | #define FMC_Bank5_6_R_BASE (FMC_R_BASE + 0x0140) |
| 1795 | #endif /* STM32F427_437xx || STM32F429_439xx || STM32F446xx */ |
| 1796 | |
| 1797 | /* Debug MCU registers base address */ |
| 1798 | #define DBGMCU_BASE ((uint32_t )0xE0042000) |
| 1799 | |
| 1800 | /** |
| 1801 | * @} |
| 1802 | */ |
| 1803 | |
| 1804 | /** @addtogroup Peripheral_declaration |
| 1805 | * @{ |
| 1806 | */ |
| 1807 | #if defined(STM32F446xx) |
| 1808 | #define QUADSPI ((QUADSPI_TypeDef *) QSPI_R_BASE) |
| 1809 | #endif /* STM32F446xx */ |
| 1810 | #define TIM2 ((TIM_TypeDef *) TIM2_BASE) |
| 1811 | #define TIM3 ((TIM_TypeDef *) TIM3_BASE) |
| 1812 | #define TIM4 ((TIM_TypeDef *) TIM4_BASE) |
| 1813 | #define TIM5 ((TIM_TypeDef *) TIM5_BASE) |
| 1814 | #define TIM6 ((TIM_TypeDef *) TIM6_BASE) |
| 1815 | #define TIM7 ((TIM_TypeDef *) TIM7_BASE) |
| 1816 | #define TIM12 ((TIM_TypeDef *) TIM12_BASE) |
| 1817 | #define TIM13 ((TIM_TypeDef *) TIM13_BASE) |
| 1818 | #define TIM14 ((TIM_TypeDef *) TIM14_BASE) |
| 1819 | #define RTC ((RTC_TypeDef *) RTC_BASE) |
| 1820 | #define WWDG ((WWDG_TypeDef *) WWDG_BASE) |
| 1821 | #define IWDG ((IWDG_TypeDef *) IWDG_BASE) |
| 1822 | #define I2S2ext ((SPI_TypeDef *) I2S2ext_BASE) |
| 1823 | #define SPI2 ((SPI_TypeDef *) SPI2_BASE) |
| 1824 | #define SPI3 ((SPI_TypeDef *) SPI3_BASE) |
| 1825 | #if defined(STM32F446xx) |
| 1826 | #define SPDIFRX ((SPDIFRX_TypeDef *) SPDIFRX_BASE) |
| 1827 | #endif /* STM32F446xx */ |
| 1828 | #define I2S3ext ((SPI_TypeDef *) I2S3ext_BASE) |
| 1829 | #define USART2 ((USART_TypeDef *) USART2_BASE) |
| 1830 | #define USART3 ((USART_TypeDef *) USART3_BASE) |
| 1831 | #define UART4 ((USART_TypeDef *) UART4_BASE) |
| 1832 | #define UART5 ((USART_TypeDef *) UART5_BASE) |
| 1833 | #define I2C1 ((I2C_TypeDef *) I2C1_BASE) |
| 1834 | #define I2C2 ((I2C_TypeDef *) I2C2_BASE) |
| 1835 | #define I2C3 ((I2C_TypeDef *) I2C3_BASE) |
| 1836 | #if defined(STM32F446xx) |
| 1837 | #define FMPI2C1 ((FMPI2C_TypeDef *) FMPI2C1_BASE) |
| 1838 | #endif /* STM32F446xx */ |
| 1839 | #define CAN1 ((CAN_TypeDef *) CAN1_BASE) |
| 1840 | #define CAN2 ((CAN_TypeDef *) CAN2_BASE) |
| 1841 | #if defined(STM32F446xx) |
| 1842 | #define CEC ((CEC_TypeDef *) CEC_BASE) |
| 1843 | #endif /* STM32F446xx */ |
| 1844 | #define PWR ((PWR_TypeDef *) PWR_BASE) |
| 1845 | #define DAC ((DAC_TypeDef *) DAC_BASE) |
| 1846 | #define UART7 ((USART_TypeDef *) UART7_BASE) |
| 1847 | #define UART8 ((USART_TypeDef *) UART8_BASE) |
| 1848 | #define TIM1 ((TIM_TypeDef *) TIM1_BASE) |
| 1849 | #define TIM8 ((TIM_TypeDef *) TIM8_BASE) |
| 1850 | #define USART1 ((USART_TypeDef *) USART1_BASE) |
| 1851 | #define USART6 ((USART_TypeDef *) USART6_BASE) |
| 1852 | #define ADC ((ADC_Common_TypeDef *) ADC_BASE) |
| 1853 | #define ADC1 ((ADC_TypeDef *) ADC1_BASE) |
| 1854 | #define ADC2 ((ADC_TypeDef *) ADC2_BASE) |
| 1855 | #define ADC3 ((ADC_TypeDef *) ADC3_BASE) |
| 1856 | #define SDIO ((SDIO_TypeDef *) SDIO_BASE) |
| 1857 | #define SPI1 ((SPI_TypeDef *) SPI1_BASE) |
| 1858 | #define SPI4 ((SPI_TypeDef *) SPI4_BASE) |
| 1859 | #define SYSCFG ((SYSCFG_TypeDef *) SYSCFG_BASE) |
| 1860 | #define EXTI ((EXTI_TypeDef *) EXTI_BASE) |
| 1861 | #define TIM9 ((TIM_TypeDef *) TIM9_BASE) |
| 1862 | #define TIM10 ((TIM_TypeDef *) TIM10_BASE) |
| 1863 | #define TIM11 ((TIM_TypeDef *) TIM11_BASE) |
| 1864 | #define SPI5 ((SPI_TypeDef *) SPI5_BASE) |
| 1865 | #define SPI6 ((SPI_TypeDef *) SPI6_BASE) |
| 1866 | #define SAI1 ((SAI_TypeDef *) SAI1_BASE) |
| 1867 | #define SAI1_Block_A ((SAI_Block_TypeDef *)SAI1_Block_A_BASE) |
| 1868 | #define SAI1_Block_B ((SAI_Block_TypeDef *)SAI1_Block_B_BASE) |
| 1869 | #if defined(STM32F446xx) |
| 1870 | #define SAI2 ((SAI_TypeDef *) SAI2_BASE) |
| 1871 | #define SAI2_Block_A ((SAI_Block_TypeDef *)SAI2_Block_A_BASE) |
| 1872 | #define SAI2_Block_B ((SAI_Block_TypeDef *)SAI2_Block_B_BASE) |
| 1873 | #endif /* STM32F446xx */ |
| 1874 | #define LTDC ((LTDC_TypeDef *)LTDC_BASE) |
| 1875 | #define LTDC_Layer1 ((LTDC_Layer_TypeDef *)LTDC_Layer1_BASE) |
| 1876 | #define LTDC_Layer2 ((LTDC_Layer_TypeDef *)LTDC_Layer2_BASE) |
| 1877 | #define GPIOA ((GPIO_TypeDef *) GPIOA_BASE) |
| 1878 | #define GPIOB ((GPIO_TypeDef *) GPIOB_BASE) |
| 1879 | #define GPIOC ((GPIO_TypeDef *) GPIOC_BASE) |
| 1880 | #define GPIOD ((GPIO_TypeDef *) GPIOD_BASE) |
| 1881 | #define GPIOE ((GPIO_TypeDef *) GPIOE_BASE) |
| 1882 | #define GPIOF ((GPIO_TypeDef *) GPIOF_BASE) |
| 1883 | #define GPIOG ((GPIO_TypeDef *) GPIOG_BASE) |
| 1884 | #define GPIOH ((GPIO_TypeDef *) GPIOH_BASE) |
| 1885 | #define GPIOI ((GPIO_TypeDef *) GPIOI_BASE) |
| 1886 | #define GPIOJ ((GPIO_TypeDef *) GPIOJ_BASE) |
| 1887 | #define GPIOK ((GPIO_TypeDef *) GPIOK_BASE) |
| 1888 | #define CRC ((CRC_TypeDef *) CRC_BASE) |
| 1889 | #define RCC ((RCC_TypeDef *) RCC_BASE) |
| 1890 | #define FLASH ((FLASH_TypeDef *) FLASH_R_BASE) |
| 1891 | #define DMA1 ((DMA_TypeDef *) DMA1_BASE) |
| 1892 | #define DMA1_Stream0 ((DMA_Stream_TypeDef *) DMA1_Stream0_BASE) |
| 1893 | #define DMA1_Stream1 ((DMA_Stream_TypeDef *) DMA1_Stream1_BASE) |
| 1894 | #define DMA1_Stream2 ((DMA_Stream_TypeDef *) DMA1_Stream2_BASE) |
| 1895 | #define DMA1_Stream3 ((DMA_Stream_TypeDef *) DMA1_Stream3_BASE) |
| 1896 | #define DMA1_Stream4 ((DMA_Stream_TypeDef *) DMA1_Stream4_BASE) |
| 1897 | #define DMA1_Stream5 ((DMA_Stream_TypeDef *) DMA1_Stream5_BASE) |
| 1898 | #define DMA1_Stream6 ((DMA_Stream_TypeDef *) DMA1_Stream6_BASE) |
| 1899 | #define DMA1_Stream7 ((DMA_Stream_TypeDef *) DMA1_Stream7_BASE) |
| 1900 | #define DMA2 ((DMA_TypeDef *) DMA2_BASE) |
| 1901 | #define DMA2_Stream0 ((DMA_Stream_TypeDef *) DMA2_Stream0_BASE) |
| 1902 | #define DMA2_Stream1 ((DMA_Stream_TypeDef *) DMA2_Stream1_BASE) |
| 1903 | #define DMA2_Stream2 ((DMA_Stream_TypeDef *) DMA2_Stream2_BASE) |
| 1904 | #define DMA2_Stream3 ((DMA_Stream_TypeDef *) DMA2_Stream3_BASE) |
| 1905 | #define DMA2_Stream4 ((DMA_Stream_TypeDef *) DMA2_Stream4_BASE) |
| 1906 | #define DMA2_Stream5 ((DMA_Stream_TypeDef *) DMA2_Stream5_BASE) |
| 1907 | #define DMA2_Stream6 ((DMA_Stream_TypeDef *) DMA2_Stream6_BASE) |
| 1908 | #define DMA2_Stream7 ((DMA_Stream_TypeDef *) DMA2_Stream7_BASE) |
| 1909 | #define ETH ((ETH_TypeDef *) ETH_BASE) |
| 1910 | #define DMA2D ((DMA2D_TypeDef *)DMA2D_BASE) |
| 1911 | #define DCMI ((DCMI_TypeDef *) DCMI_BASE) |
| 1912 | #define CRYP ((CRYP_TypeDef *) CRYP_BASE) |
| 1913 | #define HASH ((HASH_TypeDef *) HASH_BASE) |
| 1914 | #define HASH_DIGEST ((HASH_DIGEST_TypeDef *) HASH_DIGEST_BASE) |
| 1915 | #define RNG ((RNG_TypeDef *) RNG_BASE) |
| 1916 | |
| 1917 | #if defined(STM32F40_41xxx) |
| 1918 | #define FSMC_Bank1 ((FSMC_Bank1_TypeDef *) FSMC_Bank1_R_BASE) |
| 1919 | #define FSMC_Bank1E ((FSMC_Bank1E_TypeDef *) FSMC_Bank1E_R_BASE) |
| 1920 | #define FSMC_Bank2 ((FSMC_Bank2_TypeDef *) FSMC_Bank2_R_BASE) |
| 1921 | #define FSMC_Bank3 ((FSMC_Bank3_TypeDef *) FSMC_Bank3_R_BASE) |
| 1922 | #define FSMC_Bank4 ((FSMC_Bank4_TypeDef *) FSMC_Bank4_R_BASE) |
| 1923 | #endif /* STM32F40_41xxx */ |
| 1924 | |
| 1925 | #if defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F446xx) |
| 1926 | #define FMC_Bank1 ((FMC_Bank1_TypeDef *) FMC_Bank1_R_BASE) |
| 1927 | #define FMC_Bank1E ((FMC_Bank1E_TypeDef *) FMC_Bank1E_R_BASE) |
| 1928 | #define FMC_Bank2 ((FMC_Bank2_TypeDef *) FMC_Bank2_R_BASE) |
| 1929 | #define FMC_Bank3 ((FMC_Bank3_TypeDef *) FMC_Bank3_R_BASE) |
| 1930 | #define FMC_Bank4 ((FMC_Bank4_TypeDef *) FMC_Bank4_R_BASE) |
| 1931 | #define FMC_Bank5_6 ((FMC_Bank5_6_TypeDef *) FMC_Bank5_6_R_BASE) |
| 1932 | #endif /* STM32F427_437xx || STM32F429_439xx || STM32F446xx */ |
| 1933 | |
| 1934 | #define DBGMCU ((DBGMCU_TypeDef *) DBGMCU_BASE) |
| 1935 | |
| 1936 | /** |
| 1937 | * @} |
| 1938 | */ |
| 1939 | |
| 1940 | /** @addtogroup Exported_constants |
| 1941 | * @{ |
| 1942 | */ |
| 1943 | |
| 1944 | /** @addtogroup Peripheral_Registers_Bits_Definition |
| 1945 | * @{ |
| 1946 | */ |
| 1947 | |
| 1948 | /******************************************************************************/ |
| 1949 | /* Peripheral Registers_Bits_Definition */ |
| 1950 | /******************************************************************************/ |
| 1951 | |
| 1952 | /******************************************************************************/ |
| 1953 | /* */ |
| 1954 | /* Analog to Digital Converter */ |
| 1955 | /* */ |
| 1956 | /******************************************************************************/ |
| 1957 | /******************** Bit definition for ADC_SR register ********************/ |
| 1958 | #define ADC_SR_AWD ((uint8_t)0x01) /*!<Analog watchdog flag */ |
| 1959 | #define ADC_SR_EOC ((uint8_t)0x02) /*!<End of conversion */ |
| 1960 | #define ADC_SR_JEOC ((uint8_t)0x04) /*!<Injected channel end of conversion */ |
| 1961 | #define ADC_SR_JSTRT ((uint8_t)0x08) /*!<Injected channel Start flag */ |
| 1962 | #define ADC_SR_STRT ((uint8_t)0x10) /*!<Regular channel Start flag */ |
| 1963 | #define ADC_SR_OVR ((uint8_t)0x20) /*!<Overrun flag */ |
| 1964 | |
| 1965 | /******************* Bit definition for ADC_CR1 register ********************/ |
| 1966 | #define ADC_CR1_AWDCH ((uint32_t)0x0000001F) /*!<AWDCH[4:0] bits (Analog watchdog channel select bits) */ |
| 1967 | #define ADC_CR1_AWDCH_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 1968 | #define ADC_CR1_AWDCH_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 1969 | #define ADC_CR1_AWDCH_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 1970 | #define ADC_CR1_AWDCH_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 1971 | #define ADC_CR1_AWDCH_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 1972 | #define ADC_CR1_EOCIE ((uint32_t)0x00000020) /*!<Interrupt enable for EOC */ |
| 1973 | #define ADC_CR1_AWDIE ((uint32_t)0x00000040) /*!<AAnalog Watchdog interrupt enable */ |
| 1974 | #define ADC_CR1_JEOCIE ((uint32_t)0x00000080) /*!<Interrupt enable for injected channels */ |
| 1975 | #define ADC_CR1_SCAN ((uint32_t)0x00000100) /*!<Scan mode */ |
| 1976 | #define ADC_CR1_AWDSGL ((uint32_t)0x00000200) /*!<Enable the watchdog on a single channel in scan mode */ |
| 1977 | #define ADC_CR1_JAUTO ((uint32_t)0x00000400) /*!<Automatic injected group conversion */ |
| 1978 | #define ADC_CR1_DISCEN ((uint32_t)0x00000800) /*!<Discontinuous mode on regular channels */ |
| 1979 | #define ADC_CR1_JDISCEN ((uint32_t)0x00001000) /*!<Discontinuous mode on injected channels */ |
| 1980 | #define ADC_CR1_DISCNUM ((uint32_t)0x0000E000) /*!<DISCNUM[2:0] bits (Discontinuous mode channel count) */ |
| 1981 | #define ADC_CR1_DISCNUM_0 ((uint32_t)0x00002000) /*!<Bit 0 */ |
| 1982 | #define ADC_CR1_DISCNUM_1 ((uint32_t)0x00004000) /*!<Bit 1 */ |
| 1983 | #define ADC_CR1_DISCNUM_2 ((uint32_t)0x00008000) /*!<Bit 2 */ |
| 1984 | #define ADC_CR1_JAWDEN ((uint32_t)0x00400000) /*!<Analog watchdog enable on injected channels */ |
| 1985 | #define ADC_CR1_AWDEN ((uint32_t)0x00800000) /*!<Analog watchdog enable on regular channels */ |
| 1986 | #define ADC_CR1_RES ((uint32_t)0x03000000) /*!<RES[2:0] bits (Resolution) */ |
| 1987 | #define ADC_CR1_RES_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 1988 | #define ADC_CR1_RES_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 1989 | #define ADC_CR1_OVRIE ((uint32_t)0x04000000) /*!<overrun interrupt enable */ |
| 1990 | |
| 1991 | /******************* Bit definition for ADC_CR2 register ********************/ |
| 1992 | #define ADC_CR2_ADON ((uint32_t)0x00000001) /*!<A/D Converter ON / OFF */ |
| 1993 | #define ADC_CR2_CONT ((uint32_t)0x00000002) /*!<Continuous Conversion */ |
| 1994 | #define ADC_CR2_DMA ((uint32_t)0x00000100) /*!<Direct Memory access mode */ |
| 1995 | #define ADC_CR2_DDS ((uint32_t)0x00000200) /*!<DMA disable selection (Single ADC) */ |
| 1996 | #define ADC_CR2_EOCS ((uint32_t)0x00000400) /*!<End of conversion selection */ |
| 1997 | #define ADC_CR2_ALIGN ((uint32_t)0x00000800) /*!<Data Alignment */ |
| 1998 | #define ADC_CR2_JEXTSEL ((uint32_t)0x000F0000) /*!<JEXTSEL[3:0] bits (External event select for injected group) */ |
| 1999 | #define ADC_CR2_JEXTSEL_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 2000 | #define ADC_CR2_JEXTSEL_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 2001 | #define ADC_CR2_JEXTSEL_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 2002 | #define ADC_CR2_JEXTSEL_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 2003 | #define ADC_CR2_JEXTEN ((uint32_t)0x00300000) /*!<JEXTEN[1:0] bits (External Trigger Conversion mode for injected channelsp) */ |
| 2004 | #define ADC_CR2_JEXTEN_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 2005 | #define ADC_CR2_JEXTEN_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 2006 | #define ADC_CR2_JSWSTART ((uint32_t)0x00400000) /*!<Start Conversion of injected channels */ |
| 2007 | #define ADC_CR2_EXTSEL ((uint32_t)0x0F000000) /*!<EXTSEL[3:0] bits (External Event Select for regular group) */ |
| 2008 | #define ADC_CR2_EXTSEL_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 2009 | #define ADC_CR2_EXTSEL_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 2010 | #define ADC_CR2_EXTSEL_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 2011 | #define ADC_CR2_EXTSEL_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 2012 | #define ADC_CR2_EXTEN ((uint32_t)0x30000000) /*!<EXTEN[1:0] bits (External Trigger Conversion mode for regular channelsp) */ |
| 2013 | #define ADC_CR2_EXTEN_0 ((uint32_t)0x10000000) /*!<Bit 0 */ |
| 2014 | #define ADC_CR2_EXTEN_1 ((uint32_t)0x20000000) /*!<Bit 1 */ |
| 2015 | #define ADC_CR2_SWSTART ((uint32_t)0x40000000) /*!<Start Conversion of regular channels */ |
| 2016 | |
| 2017 | /****************** Bit definition for ADC_SMPR1 register *******************/ |
| 2018 | #define ADC_SMPR1_SMP10 ((uint32_t)0x00000007) /*!<SMP10[2:0] bits (Channel 10 Sample time selection) */ |
| 2019 | #define ADC_SMPR1_SMP10_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 2020 | #define ADC_SMPR1_SMP10_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 2021 | #define ADC_SMPR1_SMP10_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 2022 | #define ADC_SMPR1_SMP11 ((uint32_t)0x00000038) /*!<SMP11[2:0] bits (Channel 11 Sample time selection) */ |
| 2023 | #define ADC_SMPR1_SMP11_0 ((uint32_t)0x00000008) /*!<Bit 0 */ |
| 2024 | #define ADC_SMPR1_SMP11_1 ((uint32_t)0x00000010) /*!<Bit 1 */ |
| 2025 | #define ADC_SMPR1_SMP11_2 ((uint32_t)0x00000020) /*!<Bit 2 */ |
| 2026 | #define ADC_SMPR1_SMP12 ((uint32_t)0x000001C0) /*!<SMP12[2:0] bits (Channel 12 Sample time selection) */ |
| 2027 | #define ADC_SMPR1_SMP12_0 ((uint32_t)0x00000040) /*!<Bit 0 */ |
| 2028 | #define ADC_SMPR1_SMP12_1 ((uint32_t)0x00000080) /*!<Bit 1 */ |
| 2029 | #define ADC_SMPR1_SMP12_2 ((uint32_t)0x00000100) /*!<Bit 2 */ |
| 2030 | #define ADC_SMPR1_SMP13 ((uint32_t)0x00000E00) /*!<SMP13[2:0] bits (Channel 13 Sample time selection) */ |
| 2031 | #define ADC_SMPR1_SMP13_0 ((uint32_t)0x00000200) /*!<Bit 0 */ |
| 2032 | #define ADC_SMPR1_SMP13_1 ((uint32_t)0x00000400) /*!<Bit 1 */ |
| 2033 | #define ADC_SMPR1_SMP13_2 ((uint32_t)0x00000800) /*!<Bit 2 */ |
| 2034 | #define ADC_SMPR1_SMP14 ((uint32_t)0x00007000) /*!<SMP14[2:0] bits (Channel 14 Sample time selection) */ |
| 2035 | #define ADC_SMPR1_SMP14_0 ((uint32_t)0x00001000) /*!<Bit 0 */ |
| 2036 | #define ADC_SMPR1_SMP14_1 ((uint32_t)0x00002000) /*!<Bit 1 */ |
| 2037 | #define ADC_SMPR1_SMP14_2 ((uint32_t)0x00004000) /*!<Bit 2 */ |
| 2038 | #define ADC_SMPR1_SMP15 ((uint32_t)0x00038000) /*!<SMP15[2:0] bits (Channel 15 Sample time selection) */ |
| 2039 | #define ADC_SMPR1_SMP15_0 ((uint32_t)0x00008000) /*!<Bit 0 */ |
| 2040 | #define ADC_SMPR1_SMP15_1 ((uint32_t)0x00010000) /*!<Bit 1 */ |
| 2041 | #define ADC_SMPR1_SMP15_2 ((uint32_t)0x00020000) /*!<Bit 2 */ |
| 2042 | #define ADC_SMPR1_SMP16 ((uint32_t)0x001C0000) /*!<SMP16[2:0] bits (Channel 16 Sample time selection) */ |
| 2043 | #define ADC_SMPR1_SMP16_0 ((uint32_t)0x00040000) /*!<Bit 0 */ |
| 2044 | #define ADC_SMPR1_SMP16_1 ((uint32_t)0x00080000) /*!<Bit 1 */ |
| 2045 | #define ADC_SMPR1_SMP16_2 ((uint32_t)0x00100000) /*!<Bit 2 */ |
| 2046 | #define ADC_SMPR1_SMP17 ((uint32_t)0x00E00000) /*!<SMP17[2:0] bits (Channel 17 Sample time selection) */ |
| 2047 | #define ADC_SMPR1_SMP17_0 ((uint32_t)0x00200000) /*!<Bit 0 */ |
| 2048 | #define ADC_SMPR1_SMP17_1 ((uint32_t)0x00400000) /*!<Bit 1 */ |
| 2049 | #define ADC_SMPR1_SMP17_2 ((uint32_t)0x00800000) /*!<Bit 2 */ |
| 2050 | #define ADC_SMPR1_SMP18 ((uint32_t)0x07000000) /*!<SMP18[2:0] bits (Channel 18 Sample time selection) */ |
| 2051 | #define ADC_SMPR1_SMP18_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 2052 | #define ADC_SMPR1_SMP18_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 2053 | #define ADC_SMPR1_SMP18_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 2054 | |
| 2055 | /****************** Bit definition for ADC_SMPR2 register *******************/ |
| 2056 | #define ADC_SMPR2_SMP0 ((uint32_t)0x00000007) /*!<SMP0[2:0] bits (Channel 0 Sample time selection) */ |
| 2057 | #define ADC_SMPR2_SMP0_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 2058 | #define ADC_SMPR2_SMP0_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 2059 | #define ADC_SMPR2_SMP0_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 2060 | #define ADC_SMPR2_SMP1 ((uint32_t)0x00000038) /*!<SMP1[2:0] bits (Channel 1 Sample time selection) */ |
| 2061 | #define ADC_SMPR2_SMP1_0 ((uint32_t)0x00000008) /*!<Bit 0 */ |
| 2062 | #define ADC_SMPR2_SMP1_1 ((uint32_t)0x00000010) /*!<Bit 1 */ |
| 2063 | #define ADC_SMPR2_SMP1_2 ((uint32_t)0x00000020) /*!<Bit 2 */ |
| 2064 | #define ADC_SMPR2_SMP2 ((uint32_t)0x000001C0) /*!<SMP2[2:0] bits (Channel 2 Sample time selection) */ |
| 2065 | #define ADC_SMPR2_SMP2_0 ((uint32_t)0x00000040) /*!<Bit 0 */ |
| 2066 | #define ADC_SMPR2_SMP2_1 ((uint32_t)0x00000080) /*!<Bit 1 */ |
| 2067 | #define ADC_SMPR2_SMP2_2 ((uint32_t)0x00000100) /*!<Bit 2 */ |
| 2068 | #define ADC_SMPR2_SMP3 ((uint32_t)0x00000E00) /*!<SMP3[2:0] bits (Channel 3 Sample time selection) */ |
| 2069 | #define ADC_SMPR2_SMP3_0 ((uint32_t)0x00000200) /*!<Bit 0 */ |
| 2070 | #define ADC_SMPR2_SMP3_1 ((uint32_t)0x00000400) /*!<Bit 1 */ |
| 2071 | #define ADC_SMPR2_SMP3_2 ((uint32_t)0x00000800) /*!<Bit 2 */ |
| 2072 | #define ADC_SMPR2_SMP4 ((uint32_t)0x00007000) /*!<SMP4[2:0] bits (Channel 4 Sample time selection) */ |
| 2073 | #define ADC_SMPR2_SMP4_0 ((uint32_t)0x00001000) /*!<Bit 0 */ |
| 2074 | #define ADC_SMPR2_SMP4_1 ((uint32_t)0x00002000) /*!<Bit 1 */ |
| 2075 | #define ADC_SMPR2_SMP4_2 ((uint32_t)0x00004000) /*!<Bit 2 */ |
| 2076 | #define ADC_SMPR2_SMP5 ((uint32_t)0x00038000) /*!<SMP5[2:0] bits (Channel 5 Sample time selection) */ |
| 2077 | #define ADC_SMPR2_SMP5_0 ((uint32_t)0x00008000) /*!<Bit 0 */ |
| 2078 | #define ADC_SMPR2_SMP5_1 ((uint32_t)0x00010000) /*!<Bit 1 */ |
| 2079 | #define ADC_SMPR2_SMP5_2 ((uint32_t)0x00020000) /*!<Bit 2 */ |
| 2080 | #define ADC_SMPR2_SMP6 ((uint32_t)0x001C0000) /*!<SMP6[2:0] bits (Channel 6 Sample time selection) */ |
| 2081 | #define ADC_SMPR2_SMP6_0 ((uint32_t)0x00040000) /*!<Bit 0 */ |
| 2082 | #define ADC_SMPR2_SMP6_1 ((uint32_t)0x00080000) /*!<Bit 1 */ |
| 2083 | #define ADC_SMPR2_SMP6_2 ((uint32_t)0x00100000) /*!<Bit 2 */ |
| 2084 | #define ADC_SMPR2_SMP7 ((uint32_t)0x00E00000) /*!<SMP7[2:0] bits (Channel 7 Sample time selection) */ |
| 2085 | #define ADC_SMPR2_SMP7_0 ((uint32_t)0x00200000) /*!<Bit 0 */ |
| 2086 | #define ADC_SMPR2_SMP7_1 ((uint32_t)0x00400000) /*!<Bit 1 */ |
| 2087 | #define ADC_SMPR2_SMP7_2 ((uint32_t)0x00800000) /*!<Bit 2 */ |
| 2088 | #define ADC_SMPR2_SMP8 ((uint32_t)0x07000000) /*!<SMP8[2:0] bits (Channel 8 Sample time selection) */ |
| 2089 | #define ADC_SMPR2_SMP8_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 2090 | #define ADC_SMPR2_SMP8_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 2091 | #define ADC_SMPR2_SMP8_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 2092 | #define ADC_SMPR2_SMP9 ((uint32_t)0x38000000) /*!<SMP9[2:0] bits (Channel 9 Sample time selection) */ |
| 2093 | #define ADC_SMPR2_SMP9_0 ((uint32_t)0x08000000) /*!<Bit 0 */ |
| 2094 | #define ADC_SMPR2_SMP9_1 ((uint32_t)0x10000000) /*!<Bit 1 */ |
| 2095 | #define ADC_SMPR2_SMP9_2 ((uint32_t)0x20000000) /*!<Bit 2 */ |
| 2096 | |
| 2097 | /****************** Bit definition for ADC_JOFR1 register *******************/ |
| 2098 | #define ADC_JOFR1_JOFFSET1 ((uint16_t)0x0FFF) /*!<Data offset for injected channel 1 */ |
| 2099 | |
| 2100 | /****************** Bit definition for ADC_JOFR2 register *******************/ |
| 2101 | #define ADC_JOFR2_JOFFSET2 ((uint16_t)0x0FFF) /*!<Data offset for injected channel 2 */ |
| 2102 | |
| 2103 | /****************** Bit definition for ADC_JOFR3 register *******************/ |
| 2104 | #define ADC_JOFR3_JOFFSET3 ((uint16_t)0x0FFF) /*!<Data offset for injected channel 3 */ |
| 2105 | |
| 2106 | /****************** Bit definition for ADC_JOFR4 register *******************/ |
| 2107 | #define ADC_JOFR4_JOFFSET4 ((uint16_t)0x0FFF) /*!<Data offset for injected channel 4 */ |
| 2108 | |
| 2109 | /******************* Bit definition for ADC_HTR register ********************/ |
| 2110 | #define ADC_HTR_HT ((uint16_t)0x0FFF) /*!<Analog watchdog high threshold */ |
| 2111 | |
| 2112 | /******************* Bit definition for ADC_LTR register ********************/ |
| 2113 | #define ADC_LTR_LT ((uint16_t)0x0FFF) /*!<Analog watchdog low threshold */ |
| 2114 | |
| 2115 | /******************* Bit definition for ADC_SQR1 register *******************/ |
| 2116 | #define ADC_SQR1_SQ13 ((uint32_t)0x0000001F) /*!<SQ13[4:0] bits (13th conversion in regular sequence) */ |
| 2117 | #define ADC_SQR1_SQ13_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 2118 | #define ADC_SQR1_SQ13_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 2119 | #define ADC_SQR1_SQ13_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 2120 | #define ADC_SQR1_SQ13_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 2121 | #define ADC_SQR1_SQ13_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 2122 | #define ADC_SQR1_SQ14 ((uint32_t)0x000003E0) /*!<SQ14[4:0] bits (14th conversion in regular sequence) */ |
| 2123 | #define ADC_SQR1_SQ14_0 ((uint32_t)0x00000020) /*!<Bit 0 */ |
| 2124 | #define ADC_SQR1_SQ14_1 ((uint32_t)0x00000040) /*!<Bit 1 */ |
| 2125 | #define ADC_SQR1_SQ14_2 ((uint32_t)0x00000080) /*!<Bit 2 */ |
| 2126 | #define ADC_SQR1_SQ14_3 ((uint32_t)0x00000100) /*!<Bit 3 */ |
| 2127 | #define ADC_SQR1_SQ14_4 ((uint32_t)0x00000200) /*!<Bit 4 */ |
| 2128 | #define ADC_SQR1_SQ15 ((uint32_t)0x00007C00) /*!<SQ15[4:0] bits (15th conversion in regular sequence) */ |
| 2129 | #define ADC_SQR1_SQ15_0 ((uint32_t)0x00000400) /*!<Bit 0 */ |
| 2130 | #define ADC_SQR1_SQ15_1 ((uint32_t)0x00000800) /*!<Bit 1 */ |
| 2131 | #define ADC_SQR1_SQ15_2 ((uint32_t)0x00001000) /*!<Bit 2 */ |
| 2132 | #define ADC_SQR1_SQ15_3 ((uint32_t)0x00002000) /*!<Bit 3 */ |
| 2133 | #define ADC_SQR1_SQ15_4 ((uint32_t)0x00004000) /*!<Bit 4 */ |
| 2134 | #define ADC_SQR1_SQ16 ((uint32_t)0x000F8000) /*!<SQ16[4:0] bits (16th conversion in regular sequence) */ |
| 2135 | #define ADC_SQR1_SQ16_0 ((uint32_t)0x00008000) /*!<Bit 0 */ |
| 2136 | #define ADC_SQR1_SQ16_1 ((uint32_t)0x00010000) /*!<Bit 1 */ |
| 2137 | #define ADC_SQR1_SQ16_2 ((uint32_t)0x00020000) /*!<Bit 2 */ |
| 2138 | #define ADC_SQR1_SQ16_3 ((uint32_t)0x00040000) /*!<Bit 3 */ |
| 2139 | #define ADC_SQR1_SQ16_4 ((uint32_t)0x00080000) /*!<Bit 4 */ |
| 2140 | #define ADC_SQR1_L ((uint32_t)0x00F00000) /*!<L[3:0] bits (Regular channel sequence length) */ |
| 2141 | #define ADC_SQR1_L_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 2142 | #define ADC_SQR1_L_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 2143 | #define ADC_SQR1_L_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 2144 | #define ADC_SQR1_L_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 2145 | |
| 2146 | /******************* Bit definition for ADC_SQR2 register *******************/ |
| 2147 | #define ADC_SQR2_SQ7 ((uint32_t)0x0000001F) /*!<SQ7[4:0] bits (7th conversion in regular sequence) */ |
| 2148 | #define ADC_SQR2_SQ7_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 2149 | #define ADC_SQR2_SQ7_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 2150 | #define ADC_SQR2_SQ7_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 2151 | #define ADC_SQR2_SQ7_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 2152 | #define ADC_SQR2_SQ7_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 2153 | #define ADC_SQR2_SQ8 ((uint32_t)0x000003E0) /*!<SQ8[4:0] bits (8th conversion in regular sequence) */ |
| 2154 | #define ADC_SQR2_SQ8_0 ((uint32_t)0x00000020) /*!<Bit 0 */ |
| 2155 | #define ADC_SQR2_SQ8_1 ((uint32_t)0x00000040) /*!<Bit 1 */ |
| 2156 | #define ADC_SQR2_SQ8_2 ((uint32_t)0x00000080) /*!<Bit 2 */ |
| 2157 | #define ADC_SQR2_SQ8_3 ((uint32_t)0x00000100) /*!<Bit 3 */ |
| 2158 | #define ADC_SQR2_SQ8_4 ((uint32_t)0x00000200) /*!<Bit 4 */ |
| 2159 | #define ADC_SQR2_SQ9 ((uint32_t)0x00007C00) /*!<SQ9[4:0] bits (9th conversion in regular sequence) */ |
| 2160 | #define ADC_SQR2_SQ9_0 ((uint32_t)0x00000400) /*!<Bit 0 */ |
| 2161 | #define ADC_SQR2_SQ9_1 ((uint32_t)0x00000800) /*!<Bit 1 */ |
| 2162 | #define ADC_SQR2_SQ9_2 ((uint32_t)0x00001000) /*!<Bit 2 */ |
| 2163 | #define ADC_SQR2_SQ9_3 ((uint32_t)0x00002000) /*!<Bit 3 */ |
| 2164 | #define ADC_SQR2_SQ9_4 ((uint32_t)0x00004000) /*!<Bit 4 */ |
| 2165 | #define ADC_SQR2_SQ10 ((uint32_t)0x000F8000) /*!<SQ10[4:0] bits (10th conversion in regular sequence) */ |
| 2166 | #define ADC_SQR2_SQ10_0 ((uint32_t)0x00008000) /*!<Bit 0 */ |
| 2167 | #define ADC_SQR2_SQ10_1 ((uint32_t)0x00010000) /*!<Bit 1 */ |
| 2168 | #define ADC_SQR2_SQ10_2 ((uint32_t)0x00020000) /*!<Bit 2 */ |
| 2169 | #define ADC_SQR2_SQ10_3 ((uint32_t)0x00040000) /*!<Bit 3 */ |
| 2170 | #define ADC_SQR2_SQ10_4 ((uint32_t)0x00080000) /*!<Bit 4 */ |
| 2171 | #define ADC_SQR2_SQ11 ((uint32_t)0x01F00000) /*!<SQ11[4:0] bits (11th conversion in regular sequence) */ |
| 2172 | #define ADC_SQR2_SQ11_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 2173 | #define ADC_SQR2_SQ11_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 2174 | #define ADC_SQR2_SQ11_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 2175 | #define ADC_SQR2_SQ11_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 2176 | #define ADC_SQR2_SQ11_4 ((uint32_t)0x01000000) /*!<Bit 4 */ |
| 2177 | #define ADC_SQR2_SQ12 ((uint32_t)0x3E000000) /*!<SQ12[4:0] bits (12th conversion in regular sequence) */ |
| 2178 | #define ADC_SQR2_SQ12_0 ((uint32_t)0x02000000) /*!<Bit 0 */ |
| 2179 | #define ADC_SQR2_SQ12_1 ((uint32_t)0x04000000) /*!<Bit 1 */ |
| 2180 | #define ADC_SQR2_SQ12_2 ((uint32_t)0x08000000) /*!<Bit 2 */ |
| 2181 | #define ADC_SQR2_SQ12_3 ((uint32_t)0x10000000) /*!<Bit 3 */ |
| 2182 | #define ADC_SQR2_SQ12_4 ((uint32_t)0x20000000) /*!<Bit 4 */ |
| 2183 | |
| 2184 | /******************* Bit definition for ADC_SQR3 register *******************/ |
| 2185 | #define ADC_SQR3_SQ1 ((uint32_t)0x0000001F) /*!<SQ1[4:0] bits (1st conversion in regular sequence) */ |
| 2186 | #define ADC_SQR3_SQ1_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 2187 | #define ADC_SQR3_SQ1_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 2188 | #define ADC_SQR3_SQ1_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 2189 | #define ADC_SQR3_SQ1_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 2190 | #define ADC_SQR3_SQ1_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 2191 | #define ADC_SQR3_SQ2 ((uint32_t)0x000003E0) /*!<SQ2[4:0] bits (2nd conversion in regular sequence) */ |
| 2192 | #define ADC_SQR3_SQ2_0 ((uint32_t)0x00000020) /*!<Bit 0 */ |
| 2193 | #define ADC_SQR3_SQ2_1 ((uint32_t)0x00000040) /*!<Bit 1 */ |
| 2194 | #define ADC_SQR3_SQ2_2 ((uint32_t)0x00000080) /*!<Bit 2 */ |
| 2195 | #define ADC_SQR3_SQ2_3 ((uint32_t)0x00000100) /*!<Bit 3 */ |
| 2196 | #define ADC_SQR3_SQ2_4 ((uint32_t)0x00000200) /*!<Bit 4 */ |
| 2197 | #define ADC_SQR3_SQ3 ((uint32_t)0x00007C00) /*!<SQ3[4:0] bits (3rd conversion in regular sequence) */ |
| 2198 | #define ADC_SQR3_SQ3_0 ((uint32_t)0x00000400) /*!<Bit 0 */ |
| 2199 | #define ADC_SQR3_SQ3_1 ((uint32_t)0x00000800) /*!<Bit 1 */ |
| 2200 | #define ADC_SQR3_SQ3_2 ((uint32_t)0x00001000) /*!<Bit 2 */ |
| 2201 | #define ADC_SQR3_SQ3_3 ((uint32_t)0x00002000) /*!<Bit 3 */ |
| 2202 | #define ADC_SQR3_SQ3_4 ((uint32_t)0x00004000) /*!<Bit 4 */ |
| 2203 | #define ADC_SQR3_SQ4 ((uint32_t)0x000F8000) /*!<SQ4[4:0] bits (4th conversion in regular sequence) */ |
| 2204 | #define ADC_SQR3_SQ4_0 ((uint32_t)0x00008000) /*!<Bit 0 */ |
| 2205 | #define ADC_SQR3_SQ4_1 ((uint32_t)0x00010000) /*!<Bit 1 */ |
| 2206 | #define ADC_SQR3_SQ4_2 ((uint32_t)0x00020000) /*!<Bit 2 */ |
| 2207 | #define ADC_SQR3_SQ4_3 ((uint32_t)0x00040000) /*!<Bit 3 */ |
| 2208 | #define ADC_SQR3_SQ4_4 ((uint32_t)0x00080000) /*!<Bit 4 */ |
| 2209 | #define ADC_SQR3_SQ5 ((uint32_t)0x01F00000) /*!<SQ5[4:0] bits (5th conversion in regular sequence) */ |
| 2210 | #define ADC_SQR3_SQ5_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 2211 | #define ADC_SQR3_SQ5_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 2212 | #define ADC_SQR3_SQ5_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 2213 | #define ADC_SQR3_SQ5_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 2214 | #define ADC_SQR3_SQ5_4 ((uint32_t)0x01000000) /*!<Bit 4 */ |
| 2215 | #define ADC_SQR3_SQ6 ((uint32_t)0x3E000000) /*!<SQ6[4:0] bits (6th conversion in regular sequence) */ |
| 2216 | #define ADC_SQR3_SQ6_0 ((uint32_t)0x02000000) /*!<Bit 0 */ |
| 2217 | #define ADC_SQR3_SQ6_1 ((uint32_t)0x04000000) /*!<Bit 1 */ |
| 2218 | #define ADC_SQR3_SQ6_2 ((uint32_t)0x08000000) /*!<Bit 2 */ |
| 2219 | #define ADC_SQR3_SQ6_3 ((uint32_t)0x10000000) /*!<Bit 3 */ |
| 2220 | #define ADC_SQR3_SQ6_4 ((uint32_t)0x20000000) /*!<Bit 4 */ |
| 2221 | |
| 2222 | /******************* Bit definition for ADC_JSQR register *******************/ |
| 2223 | #define ADC_JSQR_JSQ1 ((uint32_t)0x0000001F) /*!<JSQ1[4:0] bits (1st conversion in injected sequence) */ |
| 2224 | #define ADC_JSQR_JSQ1_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 2225 | #define ADC_JSQR_JSQ1_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 2226 | #define ADC_JSQR_JSQ1_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 2227 | #define ADC_JSQR_JSQ1_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 2228 | #define ADC_JSQR_JSQ1_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 2229 | #define ADC_JSQR_JSQ2 ((uint32_t)0x000003E0) /*!<JSQ2[4:0] bits (2nd conversion in injected sequence) */ |
| 2230 | #define ADC_JSQR_JSQ2_0 ((uint32_t)0x00000020) /*!<Bit 0 */ |
| 2231 | #define ADC_JSQR_JSQ2_1 ((uint32_t)0x00000040) /*!<Bit 1 */ |
| 2232 | #define ADC_JSQR_JSQ2_2 ((uint32_t)0x00000080) /*!<Bit 2 */ |
| 2233 | #define ADC_JSQR_JSQ2_3 ((uint32_t)0x00000100) /*!<Bit 3 */ |
| 2234 | #define ADC_JSQR_JSQ2_4 ((uint32_t)0x00000200) /*!<Bit 4 */ |
| 2235 | #define ADC_JSQR_JSQ3 ((uint32_t)0x00007C00) /*!<JSQ3[4:0] bits (3rd conversion in injected sequence) */ |
| 2236 | #define ADC_JSQR_JSQ3_0 ((uint32_t)0x00000400) /*!<Bit 0 */ |
| 2237 | #define ADC_JSQR_JSQ3_1 ((uint32_t)0x00000800) /*!<Bit 1 */ |
| 2238 | #define ADC_JSQR_JSQ3_2 ((uint32_t)0x00001000) /*!<Bit 2 */ |
| 2239 | #define ADC_JSQR_JSQ3_3 ((uint32_t)0x00002000) /*!<Bit 3 */ |
| 2240 | #define ADC_JSQR_JSQ3_4 ((uint32_t)0x00004000) /*!<Bit 4 */ |
| 2241 | #define ADC_JSQR_JSQ4 ((uint32_t)0x000F8000) /*!<JSQ4[4:0] bits (4th conversion in injected sequence) */ |
| 2242 | #define ADC_JSQR_JSQ4_0 ((uint32_t)0x00008000) /*!<Bit 0 */ |
| 2243 | #define ADC_JSQR_JSQ4_1 ((uint32_t)0x00010000) /*!<Bit 1 */ |
| 2244 | #define ADC_JSQR_JSQ4_2 ((uint32_t)0x00020000) /*!<Bit 2 */ |
| 2245 | #define ADC_JSQR_JSQ4_3 ((uint32_t)0x00040000) /*!<Bit 3 */ |
| 2246 | #define ADC_JSQR_JSQ4_4 ((uint32_t)0x00080000) /*!<Bit 4 */ |
| 2247 | #define ADC_JSQR_JL ((uint32_t)0x00300000) /*!<JL[1:0] bits (Injected Sequence length) */ |
| 2248 | #define ADC_JSQR_JL_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 2249 | #define ADC_JSQR_JL_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 2250 | |
| 2251 | /******************* Bit definition for ADC_JDR1 register *******************/ |
| 2252 | #define ADC_JDR1_JDATA ((uint16_t)0xFFFF) /*!<Injected data */ |
| 2253 | |
| 2254 | /******************* Bit definition for ADC_JDR2 register *******************/ |
| 2255 | #define ADC_JDR2_JDATA ((uint16_t)0xFFFF) /*!<Injected data */ |
| 2256 | |
| 2257 | /******************* Bit definition for ADC_JDR3 register *******************/ |
| 2258 | #define ADC_JDR3_JDATA ((uint16_t)0xFFFF) /*!<Injected data */ |
| 2259 | |
| 2260 | /******************* Bit definition for ADC_JDR4 register *******************/ |
| 2261 | #define ADC_JDR4_JDATA ((uint16_t)0xFFFF) /*!<Injected data */ |
| 2262 | |
| 2263 | /******************** Bit definition for ADC_DR register ********************/ |
| 2264 | #define ADC_DR_DATA ((uint32_t)0x0000FFFF) /*!<Regular data */ |
| 2265 | #define ADC_DR_ADC2DATA ((uint32_t)0xFFFF0000) /*!<ADC2 data */ |
| 2266 | |
| 2267 | /******************* Bit definition for ADC_CSR register ********************/ |
| 2268 | #define ADC_CSR_AWD1 ((uint32_t)0x00000001) /*!<ADC1 Analog watchdog flag */ |
| 2269 | #define ADC_CSR_EOC1 ((uint32_t)0x00000002) /*!<ADC1 End of conversion */ |
| 2270 | #define ADC_CSR_JEOC1 ((uint32_t)0x00000004) /*!<ADC1 Injected channel end of conversion */ |
| 2271 | #define ADC_CSR_JSTRT1 ((uint32_t)0x00000008) /*!<ADC1 Injected channel Start flag */ |
| 2272 | #define ADC_CSR_STRT1 ((uint32_t)0x00000010) /*!<ADC1 Regular channel Start flag */ |
| 2273 | #define ADC_CSR_DOVR1 ((uint32_t)0x00000020) /*!<ADC1 DMA overrun flag */ |
| 2274 | #define ADC_CSR_AWD2 ((uint32_t)0x00000100) /*!<ADC2 Analog watchdog flag */ |
| 2275 | #define ADC_CSR_EOC2 ((uint32_t)0x00000200) /*!<ADC2 End of conversion */ |
| 2276 | #define ADC_CSR_JEOC2 ((uint32_t)0x00000400) /*!<ADC2 Injected channel end of conversion */ |
| 2277 | #define ADC_CSR_JSTRT2 ((uint32_t)0x00000800) /*!<ADC2 Injected channel Start flag */ |
| 2278 | #define ADC_CSR_STRT2 ((uint32_t)0x00001000) /*!<ADC2 Regular channel Start flag */ |
| 2279 | #define ADC_CSR_DOVR2 ((uint32_t)0x00002000) /*!<ADC2 DMA overrun flag */ |
| 2280 | #define ADC_CSR_AWD3 ((uint32_t)0x00010000) /*!<ADC3 Analog watchdog flag */ |
| 2281 | #define ADC_CSR_EOC3 ((uint32_t)0x00020000) /*!<ADC3 End of conversion */ |
| 2282 | #define ADC_CSR_JEOC3 ((uint32_t)0x00040000) /*!<ADC3 Injected channel end of conversion */ |
| 2283 | #define ADC_CSR_JSTRT3 ((uint32_t)0x00080000) /*!<ADC3 Injected channel Start flag */ |
| 2284 | #define ADC_CSR_STRT3 ((uint32_t)0x00100000) /*!<ADC3 Regular channel Start flag */ |
| 2285 | #define ADC_CSR_DOVR3 ((uint32_t)0x00200000) /*!<ADC3 DMA overrun flag */ |
| 2286 | |
| 2287 | /******************* Bit definition for ADC_CCR register ********************/ |
| 2288 | #define ADC_CCR_MULTI ((uint32_t)0x0000001F) /*!<MULTI[4:0] bits (Multi-ADC mode selection) */ |
| 2289 | #define ADC_CCR_MULTI_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 2290 | #define ADC_CCR_MULTI_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 2291 | #define ADC_CCR_MULTI_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 2292 | #define ADC_CCR_MULTI_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 2293 | #define ADC_CCR_MULTI_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 2294 | #define ADC_CCR_DELAY ((uint32_t)0x00000F00) /*!<DELAY[3:0] bits (Delay between 2 sampling phases) */ |
| 2295 | #define ADC_CCR_DELAY_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 2296 | #define ADC_CCR_DELAY_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 2297 | #define ADC_CCR_DELAY_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 2298 | #define ADC_CCR_DELAY_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 2299 | #define ADC_CCR_DDS ((uint32_t)0x00002000) /*!<DMA disable selection (Multi-ADC mode) */ |
| 2300 | #define ADC_CCR_DMA ((uint32_t)0x0000C000) /*!<DMA[1:0] bits (Direct Memory Access mode for multimode) */ |
| 2301 | #define ADC_CCR_DMA_0 ((uint32_t)0x00004000) /*!<Bit 0 */ |
| 2302 | #define ADC_CCR_DMA_1 ((uint32_t)0x00008000) /*!<Bit 1 */ |
| 2303 | #define ADC_CCR_ADCPRE ((uint32_t)0x00030000) /*!<ADCPRE[1:0] bits (ADC prescaler) */ |
| 2304 | #define ADC_CCR_ADCPRE_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 2305 | #define ADC_CCR_ADCPRE_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 2306 | #define ADC_CCR_VBATE ((uint32_t)0x00400000) /*!<VBAT Enable */ |
| 2307 | #define ADC_CCR_TSVREFE ((uint32_t)0x00800000) /*!<Temperature Sensor and VREFINT Enable */ |
| 2308 | |
| 2309 | /******************* Bit definition for ADC_CDR register ********************/ |
| 2310 | #define ADC_CDR_DATA1 ((uint32_t)0x0000FFFF) /*!<1st data of a pair of regular conversions */ |
| 2311 | #define ADC_CDR_DATA2 ((uint32_t)0xFFFF0000) /*!<2nd data of a pair of regular conversions */ |
| 2312 | |
| 2313 | /******************************************************************************/ |
| 2314 | /* */ |
| 2315 | /* Controller Area Network */ |
| 2316 | /* */ |
| 2317 | /******************************************************************************/ |
| 2318 | /*!<CAN control and status registers */ |
| 2319 | /******************* Bit definition for CAN_MCR register ********************/ |
| 2320 | #define CAN_MCR_INRQ ((uint16_t)0x0001) /*!<Initialization Request */ |
| 2321 | #define CAN_MCR_SLEEP ((uint16_t)0x0002) /*!<Sleep Mode Request */ |
| 2322 | #define CAN_MCR_TXFP ((uint16_t)0x0004) /*!<Transmit FIFO Priority */ |
| 2323 | #define CAN_MCR_RFLM ((uint16_t)0x0008) /*!<Receive FIFO Locked Mode */ |
| 2324 | #define CAN_MCR_NART ((uint16_t)0x0010) /*!<No Automatic Retransmission */ |
| 2325 | #define CAN_MCR_AWUM ((uint16_t)0x0020) /*!<Automatic Wakeup Mode */ |
| 2326 | #define CAN_MCR_ABOM ((uint16_t)0x0040) /*!<Automatic Bus-Off Management */ |
| 2327 | #define CAN_MCR_TTCM ((uint16_t)0x0080) /*!<Time Triggered Communication Mode */ |
| 2328 | #define CAN_MCR_RESET ((uint16_t)0x8000) /*!<bxCAN software master reset */ |
| 2329 | |
| 2330 | /******************* Bit definition for CAN_MSR register ********************/ |
| 2331 | #define CAN_MSR_INAK ((uint16_t)0x0001) /*!<Initialization Acknowledge */ |
| 2332 | #define CAN_MSR_SLAK ((uint16_t)0x0002) /*!<Sleep Acknowledge */ |
| 2333 | #define CAN_MSR_ERRI ((uint16_t)0x0004) /*!<Error Interrupt */ |
| 2334 | #define CAN_MSR_WKUI ((uint16_t)0x0008) /*!<Wakeup Interrupt */ |
| 2335 | #define CAN_MSR_SLAKI ((uint16_t)0x0010) /*!<Sleep Acknowledge Interrupt */ |
| 2336 | #define CAN_MSR_TXM ((uint16_t)0x0100) /*!<Transmit Mode */ |
| 2337 | #define CAN_MSR_RXM ((uint16_t)0x0200) /*!<Receive Mode */ |
| 2338 | #define CAN_MSR_SAMP ((uint16_t)0x0400) /*!<Last Sample Point */ |
| 2339 | #define CAN_MSR_RX ((uint16_t)0x0800) /*!<CAN Rx Signal */ |
| 2340 | |
| 2341 | /******************* Bit definition for CAN_TSR register ********************/ |
| 2342 | #define CAN_TSR_RQCP0 ((uint32_t)0x00000001) /*!<Request Completed Mailbox0 */ |
| 2343 | #define CAN_TSR_TXOK0 ((uint32_t)0x00000002) /*!<Transmission OK of Mailbox0 */ |
| 2344 | #define CAN_TSR_ALST0 ((uint32_t)0x00000004) /*!<Arbitration Lost for Mailbox0 */ |
| 2345 | #define CAN_TSR_TERR0 ((uint32_t)0x00000008) /*!<Transmission Error of Mailbox0 */ |
| 2346 | #define CAN_TSR_ABRQ0 ((uint32_t)0x00000080) /*!<Abort Request for Mailbox0 */ |
| 2347 | #define CAN_TSR_RQCP1 ((uint32_t)0x00000100) /*!<Request Completed Mailbox1 */ |
| 2348 | #define CAN_TSR_TXOK1 ((uint32_t)0x00000200) /*!<Transmission OK of Mailbox1 */ |
| 2349 | #define CAN_TSR_ALST1 ((uint32_t)0x00000400) /*!<Arbitration Lost for Mailbox1 */ |
| 2350 | #define CAN_TSR_TERR1 ((uint32_t)0x00000800) /*!<Transmission Error of Mailbox1 */ |
| 2351 | #define CAN_TSR_ABRQ1 ((uint32_t)0x00008000) /*!<Abort Request for Mailbox 1 */ |
| 2352 | #define CAN_TSR_RQCP2 ((uint32_t)0x00010000) /*!<Request Completed Mailbox2 */ |
| 2353 | #define CAN_TSR_TXOK2 ((uint32_t)0x00020000) /*!<Transmission OK of Mailbox 2 */ |
| 2354 | #define CAN_TSR_ALST2 ((uint32_t)0x00040000) /*!<Arbitration Lost for mailbox 2 */ |
| 2355 | #define CAN_TSR_TERR2 ((uint32_t)0x00080000) /*!<Transmission Error of Mailbox 2 */ |
| 2356 | #define CAN_TSR_ABRQ2 ((uint32_t)0x00800000) /*!<Abort Request for Mailbox 2 */ |
| 2357 | #define CAN_TSR_CODE ((uint32_t)0x03000000) /*!<Mailbox Code */ |
| 2358 | |
| 2359 | #define CAN_TSR_TME ((uint32_t)0x1C000000) /*!<TME[2:0] bits */ |
| 2360 | #define CAN_TSR_TME0 ((uint32_t)0x04000000) /*!<Transmit Mailbox 0 Empty */ |
| 2361 | #define CAN_TSR_TME1 ((uint32_t)0x08000000) /*!<Transmit Mailbox 1 Empty */ |
| 2362 | #define CAN_TSR_TME2 ((uint32_t)0x10000000) /*!<Transmit Mailbox 2 Empty */ |
| 2363 | |
| 2364 | #define CAN_TSR_LOW ((uint32_t)0xE0000000) /*!<LOW[2:0] bits */ |
| 2365 | #define CAN_TSR_LOW0 ((uint32_t)0x20000000) /*!<Lowest Priority Flag for Mailbox 0 */ |
| 2366 | #define CAN_TSR_LOW1 ((uint32_t)0x40000000) /*!<Lowest Priority Flag for Mailbox 1 */ |
| 2367 | #define CAN_TSR_LOW2 ((uint32_t)0x80000000) /*!<Lowest Priority Flag for Mailbox 2 */ |
| 2368 | |
| 2369 | /******************* Bit definition for CAN_RF0R register *******************/ |
| 2370 | #define CAN_RF0R_FMP0 ((uint8_t)0x03) /*!<FIFO 0 Message Pending */ |
| 2371 | #define CAN_RF0R_FULL0 ((uint8_t)0x08) /*!<FIFO 0 Full */ |
| 2372 | #define CAN_RF0R_FOVR0 ((uint8_t)0x10) /*!<FIFO 0 Overrun */ |
| 2373 | #define CAN_RF0R_RFOM0 ((uint8_t)0x20) /*!<Release FIFO 0 Output Mailbox */ |
| 2374 | |
| 2375 | /******************* Bit definition for CAN_RF1R register *******************/ |
| 2376 | #define CAN_RF1R_FMP1 ((uint8_t)0x03) /*!<FIFO 1 Message Pending */ |
| 2377 | #define CAN_RF1R_FULL1 ((uint8_t)0x08) /*!<FIFO 1 Full */ |
| 2378 | #define CAN_RF1R_FOVR1 ((uint8_t)0x10) /*!<FIFO 1 Overrun */ |
| 2379 | #define CAN_RF1R_RFOM1 ((uint8_t)0x20) /*!<Release FIFO 1 Output Mailbox */ |
| 2380 | |
| 2381 | /******************** Bit definition for CAN_IER register *******************/ |
| 2382 | #define CAN_IER_TMEIE ((uint32_t)0x00000001) /*!<Transmit Mailbox Empty Interrupt Enable */ |
| 2383 | #define CAN_IER_FMPIE0 ((uint32_t)0x00000002) /*!<FIFO Message Pending Interrupt Enable */ |
| 2384 | #define CAN_IER_FFIE0 ((uint32_t)0x00000004) /*!<FIFO Full Interrupt Enable */ |
| 2385 | #define CAN_IER_FOVIE0 ((uint32_t)0x00000008) /*!<FIFO Overrun Interrupt Enable */ |
| 2386 | #define CAN_IER_FMPIE1 ((uint32_t)0x00000010) /*!<FIFO Message Pending Interrupt Enable */ |
| 2387 | #define CAN_IER_FFIE1 ((uint32_t)0x00000020) /*!<FIFO Full Interrupt Enable */ |
| 2388 | #define CAN_IER_FOVIE1 ((uint32_t)0x00000040) /*!<FIFO Overrun Interrupt Enable */ |
| 2389 | #define CAN_IER_EWGIE ((uint32_t)0x00000100) /*!<Error Warning Interrupt Enable */ |
| 2390 | #define CAN_IER_EPVIE ((uint32_t)0x00000200) /*!<Error Passive Interrupt Enable */ |
| 2391 | #define CAN_IER_BOFIE ((uint32_t)0x00000400) /*!<Bus-Off Interrupt Enable */ |
| 2392 | #define CAN_IER_LECIE ((uint32_t)0x00000800) /*!<Last Error Code Interrupt Enable */ |
| 2393 | #define CAN_IER_ERRIE ((uint32_t)0x00008000) /*!<Error Interrupt Enable */ |
| 2394 | #define CAN_IER_WKUIE ((uint32_t)0x00010000) /*!<Wakeup Interrupt Enable */ |
| 2395 | #define CAN_IER_SLKIE ((uint32_t)0x00020000) /*!<Sleep Interrupt Enable */ |
| 2396 | |
| 2397 | /******************** Bit definition for CAN_ESR register *******************/ |
| 2398 | #define CAN_ESR_EWGF ((uint32_t)0x00000001) /*!<Error Warning Flag */ |
| 2399 | #define CAN_ESR_EPVF ((uint32_t)0x00000002) /*!<Error Passive Flag */ |
| 2400 | #define CAN_ESR_BOFF ((uint32_t)0x00000004) /*!<Bus-Off Flag */ |
| 2401 | |
| 2402 | #define CAN_ESR_LEC ((uint32_t)0x00000070) /*!<LEC[2:0] bits (Last Error Code) */ |
| 2403 | #define CAN_ESR_LEC_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 2404 | #define CAN_ESR_LEC_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 2405 | #define CAN_ESR_LEC_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 2406 | |
| 2407 | #define CAN_ESR_TEC ((uint32_t)0x00FF0000) /*!<Least significant byte of the 9-bit Transmit Error Counter */ |
| 2408 | #define CAN_ESR_REC ((uint32_t)0xFF000000) /*!<Receive Error Counter */ |
| 2409 | |
| 2410 | /******************* Bit definition for CAN_BTR register ********************/ |
| 2411 | #define CAN_BTR_BRP ((uint32_t)0x000003FF) /*!<Baud Rate Prescaler */ |
| 2412 | #define CAN_BTR_TS1 ((uint32_t)0x000F0000) /*!<Time Segment 1 */ |
| 2413 | #define CAN_BTR_TS2 ((uint32_t)0x00700000) /*!<Time Segment 2 */ |
| 2414 | #define CAN_BTR_SJW ((uint32_t)0x03000000) /*!<Resynchronization Jump Width */ |
| 2415 | #define CAN_BTR_LBKM ((uint32_t)0x40000000) /*!<Loop Back Mode (Debug) */ |
| 2416 | #define CAN_BTR_SILM ((uint32_t)0x80000000) /*!<Silent Mode */ |
| 2417 | |
| 2418 | /*!<Mailbox registers */ |
| 2419 | /****************** Bit definition for CAN_TI0R register ********************/ |
| 2420 | #define CAN_TI0R_TXRQ ((uint32_t)0x00000001) /*!<Transmit Mailbox Request */ |
| 2421 | #define CAN_TI0R_RTR ((uint32_t)0x00000002) /*!<Remote Transmission Request */ |
| 2422 | #define CAN_TI0R_IDE ((uint32_t)0x00000004) /*!<Identifier Extension */ |
| 2423 | #define CAN_TI0R_EXID ((uint32_t)0x001FFFF8) /*!<Extended Identifier */ |
| 2424 | #define CAN_TI0R_STID ((uint32_t)0xFFE00000) /*!<Standard Identifier or Extended Identifier */ |
| 2425 | |
| 2426 | /****************** Bit definition for CAN_TDT0R register *******************/ |
| 2427 | #define CAN_TDT0R_DLC ((uint32_t)0x0000000F) /*!<Data Length Code */ |
| 2428 | #define CAN_TDT0R_TGT ((uint32_t)0x00000100) /*!<Transmit Global Time */ |
| 2429 | #define CAN_TDT0R_TIME ((uint32_t)0xFFFF0000) /*!<Message Time Stamp */ |
| 2430 | |
| 2431 | /****************** Bit definition for CAN_TDL0R register *******************/ |
| 2432 | #define CAN_TDL0R_DATA0 ((uint32_t)0x000000FF) /*!<Data byte 0 */ |
| 2433 | #define CAN_TDL0R_DATA1 ((uint32_t)0x0000FF00) /*!<Data byte 1 */ |
| 2434 | #define CAN_TDL0R_DATA2 ((uint32_t)0x00FF0000) /*!<Data byte 2 */ |
| 2435 | #define CAN_TDL0R_DATA3 ((uint32_t)0xFF000000) /*!<Data byte 3 */ |
| 2436 | |
| 2437 | /****************** Bit definition for CAN_TDH0R register *******************/ |
| 2438 | #define CAN_TDH0R_DATA4 ((uint32_t)0x000000FF) /*!<Data byte 4 */ |
| 2439 | #define CAN_TDH0R_DATA5 ((uint32_t)0x0000FF00) /*!<Data byte 5 */ |
| 2440 | #define CAN_TDH0R_DATA6 ((uint32_t)0x00FF0000) /*!<Data byte 6 */ |
| 2441 | #define CAN_TDH0R_DATA7 ((uint32_t)0xFF000000) /*!<Data byte 7 */ |
| 2442 | |
| 2443 | /******************* Bit definition for CAN_TI1R register *******************/ |
| 2444 | #define CAN_TI1R_TXRQ ((uint32_t)0x00000001) /*!<Transmit Mailbox Request */ |
| 2445 | #define CAN_TI1R_RTR ((uint32_t)0x00000002) /*!<Remote Transmission Request */ |
| 2446 | #define CAN_TI1R_IDE ((uint32_t)0x00000004) /*!<Identifier Extension */ |
| 2447 | #define CAN_TI1R_EXID ((uint32_t)0x001FFFF8) /*!<Extended Identifier */ |
| 2448 | #define CAN_TI1R_STID ((uint32_t)0xFFE00000) /*!<Standard Identifier or Extended Identifier */ |
| 2449 | |
| 2450 | /******************* Bit definition for CAN_TDT1R register ******************/ |
| 2451 | #define CAN_TDT1R_DLC ((uint32_t)0x0000000F) /*!<Data Length Code */ |
| 2452 | #define CAN_TDT1R_TGT ((uint32_t)0x00000100) /*!<Transmit Global Time */ |
| 2453 | #define CAN_TDT1R_TIME ((uint32_t)0xFFFF0000) /*!<Message Time Stamp */ |
| 2454 | |
| 2455 | /******************* Bit definition for CAN_TDL1R register ******************/ |
| 2456 | #define CAN_TDL1R_DATA0 ((uint32_t)0x000000FF) /*!<Data byte 0 */ |
| 2457 | #define CAN_TDL1R_DATA1 ((uint32_t)0x0000FF00) /*!<Data byte 1 */ |
| 2458 | #define CAN_TDL1R_DATA2 ((uint32_t)0x00FF0000) /*!<Data byte 2 */ |
| 2459 | #define CAN_TDL1R_DATA3 ((uint32_t)0xFF000000) /*!<Data byte 3 */ |
| 2460 | |
| 2461 | /******************* Bit definition for CAN_TDH1R register ******************/ |
| 2462 | #define CAN_TDH1R_DATA4 ((uint32_t)0x000000FF) /*!<Data byte 4 */ |
| 2463 | #define CAN_TDH1R_DATA5 ((uint32_t)0x0000FF00) /*!<Data byte 5 */ |
| 2464 | #define CAN_TDH1R_DATA6 ((uint32_t)0x00FF0000) /*!<Data byte 6 */ |
| 2465 | #define CAN_TDH1R_DATA7 ((uint32_t)0xFF000000) /*!<Data byte 7 */ |
| 2466 | |
| 2467 | /******************* Bit definition for CAN_TI2R register *******************/ |
| 2468 | #define CAN_TI2R_TXRQ ((uint32_t)0x00000001) /*!<Transmit Mailbox Request */ |
| 2469 | #define CAN_TI2R_RTR ((uint32_t)0x00000002) /*!<Remote Transmission Request */ |
| 2470 | #define CAN_TI2R_IDE ((uint32_t)0x00000004) /*!<Identifier Extension */ |
| 2471 | #define CAN_TI2R_EXID ((uint32_t)0x001FFFF8) /*!<Extended identifier */ |
| 2472 | #define CAN_TI2R_STID ((uint32_t)0xFFE00000) /*!<Standard Identifier or Extended Identifier */ |
| 2473 | |
| 2474 | /******************* Bit definition for CAN_TDT2R register ******************/ |
| 2475 | #define CAN_TDT2R_DLC ((uint32_t)0x0000000F) /*!<Data Length Code */ |
| 2476 | #define CAN_TDT2R_TGT ((uint32_t)0x00000100) /*!<Transmit Global Time */ |
| 2477 | #define CAN_TDT2R_TIME ((uint32_t)0xFFFF0000) /*!<Message Time Stamp */ |
| 2478 | |
| 2479 | /******************* Bit definition for CAN_TDL2R register ******************/ |
| 2480 | #define CAN_TDL2R_DATA0 ((uint32_t)0x000000FF) /*!<Data byte 0 */ |
| 2481 | #define CAN_TDL2R_DATA1 ((uint32_t)0x0000FF00) /*!<Data byte 1 */ |
| 2482 | #define CAN_TDL2R_DATA2 ((uint32_t)0x00FF0000) /*!<Data byte 2 */ |
| 2483 | #define CAN_TDL2R_DATA3 ((uint32_t)0xFF000000) /*!<Data byte 3 */ |
| 2484 | |
| 2485 | /******************* Bit definition for CAN_TDH2R register ******************/ |
| 2486 | #define CAN_TDH2R_DATA4 ((uint32_t)0x000000FF) /*!<Data byte 4 */ |
| 2487 | #define CAN_TDH2R_DATA5 ((uint32_t)0x0000FF00) /*!<Data byte 5 */ |
| 2488 | #define CAN_TDH2R_DATA6 ((uint32_t)0x00FF0000) /*!<Data byte 6 */ |
| 2489 | #define CAN_TDH2R_DATA7 ((uint32_t)0xFF000000) /*!<Data byte 7 */ |
| 2490 | |
| 2491 | /******************* Bit definition for CAN_RI0R register *******************/ |
| 2492 | #define CAN_RI0R_RTR ((uint32_t)0x00000002) /*!<Remote Transmission Request */ |
| 2493 | #define CAN_RI0R_IDE ((uint32_t)0x00000004) /*!<Identifier Extension */ |
| 2494 | #define CAN_RI0R_EXID ((uint32_t)0x001FFFF8) /*!<Extended Identifier */ |
| 2495 | #define CAN_RI0R_STID ((uint32_t)0xFFE00000) /*!<Standard Identifier or Extended Identifier */ |
| 2496 | |
| 2497 | /******************* Bit definition for CAN_RDT0R register ******************/ |
| 2498 | #define CAN_RDT0R_DLC ((uint32_t)0x0000000F) /*!<Data Length Code */ |
| 2499 | #define CAN_RDT0R_FMI ((uint32_t)0x0000FF00) /*!<Filter Match Index */ |
| 2500 | #define CAN_RDT0R_TIME ((uint32_t)0xFFFF0000) /*!<Message Time Stamp */ |
| 2501 | |
| 2502 | /******************* Bit definition for CAN_RDL0R register ******************/ |
| 2503 | #define CAN_RDL0R_DATA0 ((uint32_t)0x000000FF) /*!<Data byte 0 */ |
| 2504 | #define CAN_RDL0R_DATA1 ((uint32_t)0x0000FF00) /*!<Data byte 1 */ |
| 2505 | #define CAN_RDL0R_DATA2 ((uint32_t)0x00FF0000) /*!<Data byte 2 */ |
| 2506 | #define CAN_RDL0R_DATA3 ((uint32_t)0xFF000000) /*!<Data byte 3 */ |
| 2507 | |
| 2508 | /******************* Bit definition for CAN_RDH0R register ******************/ |
| 2509 | #define CAN_RDH0R_DATA4 ((uint32_t)0x000000FF) /*!<Data byte 4 */ |
| 2510 | #define CAN_RDH0R_DATA5 ((uint32_t)0x0000FF00) /*!<Data byte 5 */ |
| 2511 | #define CAN_RDH0R_DATA6 ((uint32_t)0x00FF0000) /*!<Data byte 6 */ |
| 2512 | #define CAN_RDH0R_DATA7 ((uint32_t)0xFF000000) /*!<Data byte 7 */ |
| 2513 | |
| 2514 | /******************* Bit definition for CAN_RI1R register *******************/ |
| 2515 | #define CAN_RI1R_RTR ((uint32_t)0x00000002) /*!<Remote Transmission Request */ |
| 2516 | #define CAN_RI1R_IDE ((uint32_t)0x00000004) /*!<Identifier Extension */ |
| 2517 | #define CAN_RI1R_EXID ((uint32_t)0x001FFFF8) /*!<Extended identifier */ |
| 2518 | #define CAN_RI1R_STID ((uint32_t)0xFFE00000) /*!<Standard Identifier or Extended Identifier */ |
| 2519 | |
| 2520 | /******************* Bit definition for CAN_RDT1R register ******************/ |
| 2521 | #define CAN_RDT1R_DLC ((uint32_t)0x0000000F) /*!<Data Length Code */ |
| 2522 | #define CAN_RDT1R_FMI ((uint32_t)0x0000FF00) /*!<Filter Match Index */ |
| 2523 | #define CAN_RDT1R_TIME ((uint32_t)0xFFFF0000) /*!<Message Time Stamp */ |
| 2524 | |
| 2525 | /******************* Bit definition for CAN_RDL1R register ******************/ |
| 2526 | #define CAN_RDL1R_DATA0 ((uint32_t)0x000000FF) /*!<Data byte 0 */ |
| 2527 | #define CAN_RDL1R_DATA1 ((uint32_t)0x0000FF00) /*!<Data byte 1 */ |
| 2528 | #define CAN_RDL1R_DATA2 ((uint32_t)0x00FF0000) /*!<Data byte 2 */ |
| 2529 | #define CAN_RDL1R_DATA3 ((uint32_t)0xFF000000) /*!<Data byte 3 */ |
| 2530 | |
| 2531 | /******************* Bit definition for CAN_RDH1R register ******************/ |
| 2532 | #define CAN_RDH1R_DATA4 ((uint32_t)0x000000FF) /*!<Data byte 4 */ |
| 2533 | #define CAN_RDH1R_DATA5 ((uint32_t)0x0000FF00) /*!<Data byte 5 */ |
| 2534 | #define CAN_RDH1R_DATA6 ((uint32_t)0x00FF0000) /*!<Data byte 6 */ |
| 2535 | #define CAN_RDH1R_DATA7 ((uint32_t)0xFF000000) /*!<Data byte 7 */ |
| 2536 | |
| 2537 | /*!<CAN filter registers */ |
| 2538 | /******************* Bit definition for CAN_FMR register ********************/ |
| 2539 | #define CAN_FMR_FINIT ((uint8_t)0x01) /*!<Filter Init Mode */ |
| 2540 | |
| 2541 | /******************* Bit definition for CAN_FM1R register *******************/ |
| 2542 | #define CAN_FM1R_FBM ((uint16_t)0x3FFF) /*!<Filter Mode */ |
| 2543 | #define CAN_FM1R_FBM0 ((uint16_t)0x0001) /*!<Filter Init Mode bit 0 */ |
| 2544 | #define CAN_FM1R_FBM1 ((uint16_t)0x0002) /*!<Filter Init Mode bit 1 */ |
| 2545 | #define CAN_FM1R_FBM2 ((uint16_t)0x0004) /*!<Filter Init Mode bit 2 */ |
| 2546 | #define CAN_FM1R_FBM3 ((uint16_t)0x0008) /*!<Filter Init Mode bit 3 */ |
| 2547 | #define CAN_FM1R_FBM4 ((uint16_t)0x0010) /*!<Filter Init Mode bit 4 */ |
| 2548 | #define CAN_FM1R_FBM5 ((uint16_t)0x0020) /*!<Filter Init Mode bit 5 */ |
| 2549 | #define CAN_FM1R_FBM6 ((uint16_t)0x0040) /*!<Filter Init Mode bit 6 */ |
| 2550 | #define CAN_FM1R_FBM7 ((uint16_t)0x0080) /*!<Filter Init Mode bit 7 */ |
| 2551 | #define CAN_FM1R_FBM8 ((uint16_t)0x0100) /*!<Filter Init Mode bit 8 */ |
| 2552 | #define CAN_FM1R_FBM9 ((uint16_t)0x0200) /*!<Filter Init Mode bit 9 */ |
| 2553 | #define CAN_FM1R_FBM10 ((uint16_t)0x0400) /*!<Filter Init Mode bit 10 */ |
| 2554 | #define CAN_FM1R_FBM11 ((uint16_t)0x0800) /*!<Filter Init Mode bit 11 */ |
| 2555 | #define CAN_FM1R_FBM12 ((uint16_t)0x1000) /*!<Filter Init Mode bit 12 */ |
| 2556 | #define CAN_FM1R_FBM13 ((uint16_t)0x2000) /*!<Filter Init Mode bit 13 */ |
| 2557 | |
| 2558 | /******************* Bit definition for CAN_FS1R register *******************/ |
| 2559 | #define CAN_FS1R_FSC ((uint16_t)0x3FFF) /*!<Filter Scale Configuration */ |
| 2560 | #define CAN_FS1R_FSC0 ((uint16_t)0x0001) /*!<Filter Scale Configuration bit 0 */ |
| 2561 | #define CAN_FS1R_FSC1 ((uint16_t)0x0002) /*!<Filter Scale Configuration bit 1 */ |
| 2562 | #define CAN_FS1R_FSC2 ((uint16_t)0x0004) /*!<Filter Scale Configuration bit 2 */ |
| 2563 | #define CAN_FS1R_FSC3 ((uint16_t)0x0008) /*!<Filter Scale Configuration bit 3 */ |
| 2564 | #define CAN_FS1R_FSC4 ((uint16_t)0x0010) /*!<Filter Scale Configuration bit 4 */ |
| 2565 | #define CAN_FS1R_FSC5 ((uint16_t)0x0020) /*!<Filter Scale Configuration bit 5 */ |
| 2566 | #define CAN_FS1R_FSC6 ((uint16_t)0x0040) /*!<Filter Scale Configuration bit 6 */ |
| 2567 | #define CAN_FS1R_FSC7 ((uint16_t)0x0080) /*!<Filter Scale Configuration bit 7 */ |
| 2568 | #define CAN_FS1R_FSC8 ((uint16_t)0x0100) /*!<Filter Scale Configuration bit 8 */ |
| 2569 | #define CAN_FS1R_FSC9 ((uint16_t)0x0200) /*!<Filter Scale Configuration bit 9 */ |
| 2570 | #define CAN_FS1R_FSC10 ((uint16_t)0x0400) /*!<Filter Scale Configuration bit 10 */ |
| 2571 | #define CAN_FS1R_FSC11 ((uint16_t)0x0800) /*!<Filter Scale Configuration bit 11 */ |
| 2572 | #define CAN_FS1R_FSC12 ((uint16_t)0x1000) /*!<Filter Scale Configuration bit 12 */ |
| 2573 | #define CAN_FS1R_FSC13 ((uint16_t)0x2000) /*!<Filter Scale Configuration bit 13 */ |
| 2574 | |
| 2575 | /****************** Bit definition for CAN_FFA1R register *******************/ |
| 2576 | #define CAN_FFA1R_FFA ((uint16_t)0x3FFF) /*!<Filter FIFO Assignment */ |
| 2577 | #define CAN_FFA1R_FFA0 ((uint16_t)0x0001) /*!<Filter FIFO Assignment for Filter 0 */ |
| 2578 | #define CAN_FFA1R_FFA1 ((uint16_t)0x0002) /*!<Filter FIFO Assignment for Filter 1 */ |
| 2579 | #define CAN_FFA1R_FFA2 ((uint16_t)0x0004) /*!<Filter FIFO Assignment for Filter 2 */ |
| 2580 | #define CAN_FFA1R_FFA3 ((uint16_t)0x0008) /*!<Filter FIFO Assignment for Filter 3 */ |
| 2581 | #define CAN_FFA1R_FFA4 ((uint16_t)0x0010) /*!<Filter FIFO Assignment for Filter 4 */ |
| 2582 | #define CAN_FFA1R_FFA5 ((uint16_t)0x0020) /*!<Filter FIFO Assignment for Filter 5 */ |
| 2583 | #define CAN_FFA1R_FFA6 ((uint16_t)0x0040) /*!<Filter FIFO Assignment for Filter 6 */ |
| 2584 | #define CAN_FFA1R_FFA7 ((uint16_t)0x0080) /*!<Filter FIFO Assignment for Filter 7 */ |
| 2585 | #define CAN_FFA1R_FFA8 ((uint16_t)0x0100) /*!<Filter FIFO Assignment for Filter 8 */ |
| 2586 | #define CAN_FFA1R_FFA9 ((uint16_t)0x0200) /*!<Filter FIFO Assignment for Filter 9 */ |
| 2587 | #define CAN_FFA1R_FFA10 ((uint16_t)0x0400) /*!<Filter FIFO Assignment for Filter 10 */ |
| 2588 | #define CAN_FFA1R_FFA11 ((uint16_t)0x0800) /*!<Filter FIFO Assignment for Filter 11 */ |
| 2589 | #define CAN_FFA1R_FFA12 ((uint16_t)0x1000) /*!<Filter FIFO Assignment for Filter 12 */ |
| 2590 | #define CAN_FFA1R_FFA13 ((uint16_t)0x2000) /*!<Filter FIFO Assignment for Filter 13 */ |
| 2591 | |
| 2592 | /******************* Bit definition for CAN_FA1R register *******************/ |
| 2593 | #define CAN_FA1R_FACT ((uint16_t)0x3FFF) /*!<Filter Active */ |
| 2594 | #define CAN_FA1R_FACT0 ((uint16_t)0x0001) /*!<Filter 0 Active */ |
| 2595 | #define CAN_FA1R_FACT1 ((uint16_t)0x0002) /*!<Filter 1 Active */ |
| 2596 | #define CAN_FA1R_FACT2 ((uint16_t)0x0004) /*!<Filter 2 Active */ |
| 2597 | #define CAN_FA1R_FACT3 ((uint16_t)0x0008) /*!<Filter 3 Active */ |
| 2598 | #define CAN_FA1R_FACT4 ((uint16_t)0x0010) /*!<Filter 4 Active */ |
| 2599 | #define CAN_FA1R_FACT5 ((uint16_t)0x0020) /*!<Filter 5 Active */ |
| 2600 | #define CAN_FA1R_FACT6 ((uint16_t)0x0040) /*!<Filter 6 Active */ |
| 2601 | #define CAN_FA1R_FACT7 ((uint16_t)0x0080) /*!<Filter 7 Active */ |
| 2602 | #define CAN_FA1R_FACT8 ((uint16_t)0x0100) /*!<Filter 8 Active */ |
| 2603 | #define CAN_FA1R_FACT9 ((uint16_t)0x0200) /*!<Filter 9 Active */ |
| 2604 | #define CAN_FA1R_FACT10 ((uint16_t)0x0400) /*!<Filter 10 Active */ |
| 2605 | #define CAN_FA1R_FACT11 ((uint16_t)0x0800) /*!<Filter 11 Active */ |
| 2606 | #define CAN_FA1R_FACT12 ((uint16_t)0x1000) /*!<Filter 12 Active */ |
| 2607 | #define CAN_FA1R_FACT13 ((uint16_t)0x2000) /*!<Filter 13 Active */ |
| 2608 | |
| 2609 | /******************* Bit definition for CAN_F0R1 register *******************/ |
| 2610 | #define CAN_F0R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 2611 | #define CAN_F0R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 2612 | #define CAN_F0R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 2613 | #define CAN_F0R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 2614 | #define CAN_F0R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 2615 | #define CAN_F0R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 2616 | #define CAN_F0R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 2617 | #define CAN_F0R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 2618 | #define CAN_F0R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 2619 | #define CAN_F0R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 2620 | #define CAN_F0R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 2621 | #define CAN_F0R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 2622 | #define CAN_F0R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 2623 | #define CAN_F0R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 2624 | #define CAN_F0R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 2625 | #define CAN_F0R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 2626 | #define CAN_F0R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 2627 | #define CAN_F0R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 2628 | #define CAN_F0R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 2629 | #define CAN_F0R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 2630 | #define CAN_F0R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 2631 | #define CAN_F0R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 2632 | #define CAN_F0R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 2633 | #define CAN_F0R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 2634 | #define CAN_F0R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 2635 | #define CAN_F0R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 2636 | #define CAN_F0R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 2637 | #define CAN_F0R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 2638 | #define CAN_F0R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 2639 | #define CAN_F0R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 2640 | #define CAN_F0R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 2641 | #define CAN_F0R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 2642 | |
| 2643 | /******************* Bit definition for CAN_F1R1 register *******************/ |
| 2644 | #define CAN_F1R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 2645 | #define CAN_F1R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 2646 | #define CAN_F1R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 2647 | #define CAN_F1R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 2648 | #define CAN_F1R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 2649 | #define CAN_F1R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 2650 | #define CAN_F1R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 2651 | #define CAN_F1R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 2652 | #define CAN_F1R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 2653 | #define CAN_F1R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 2654 | #define CAN_F1R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 2655 | #define CAN_F1R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 2656 | #define CAN_F1R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 2657 | #define CAN_F1R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 2658 | #define CAN_F1R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 2659 | #define CAN_F1R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 2660 | #define CAN_F1R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 2661 | #define CAN_F1R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 2662 | #define CAN_F1R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 2663 | #define CAN_F1R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 2664 | #define CAN_F1R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 2665 | #define CAN_F1R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 2666 | #define CAN_F1R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 2667 | #define CAN_F1R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 2668 | #define CAN_F1R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 2669 | #define CAN_F1R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 2670 | #define CAN_F1R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 2671 | #define CAN_F1R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 2672 | #define CAN_F1R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 2673 | #define CAN_F1R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 2674 | #define CAN_F1R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 2675 | #define CAN_F1R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 2676 | |
| 2677 | /******************* Bit definition for CAN_F2R1 register *******************/ |
| 2678 | #define CAN_F2R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 2679 | #define CAN_F2R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 2680 | #define CAN_F2R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 2681 | #define CAN_F2R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 2682 | #define CAN_F2R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 2683 | #define CAN_F2R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 2684 | #define CAN_F2R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 2685 | #define CAN_F2R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 2686 | #define CAN_F2R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 2687 | #define CAN_F2R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 2688 | #define CAN_F2R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 2689 | #define CAN_F2R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 2690 | #define CAN_F2R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 2691 | #define CAN_F2R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 2692 | #define CAN_F2R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 2693 | #define CAN_F2R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 2694 | #define CAN_F2R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 2695 | #define CAN_F2R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 2696 | #define CAN_F2R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 2697 | #define CAN_F2R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 2698 | #define CAN_F2R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 2699 | #define CAN_F2R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 2700 | #define CAN_F2R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 2701 | #define CAN_F2R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 2702 | #define CAN_F2R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 2703 | #define CAN_F2R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 2704 | #define CAN_F2R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 2705 | #define CAN_F2R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 2706 | #define CAN_F2R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 2707 | #define CAN_F2R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 2708 | #define CAN_F2R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 2709 | #define CAN_F2R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 2710 | |
| 2711 | /******************* Bit definition for CAN_F3R1 register *******************/ |
| 2712 | #define CAN_F3R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 2713 | #define CAN_F3R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 2714 | #define CAN_F3R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 2715 | #define CAN_F3R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 2716 | #define CAN_F3R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 2717 | #define CAN_F3R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 2718 | #define CAN_F3R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 2719 | #define CAN_F3R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 2720 | #define CAN_F3R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 2721 | #define CAN_F3R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 2722 | #define CAN_F3R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 2723 | #define CAN_F3R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 2724 | #define CAN_F3R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 2725 | #define CAN_F3R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 2726 | #define CAN_F3R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 2727 | #define CAN_F3R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 2728 | #define CAN_F3R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 2729 | #define CAN_F3R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 2730 | #define CAN_F3R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 2731 | #define CAN_F3R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 2732 | #define CAN_F3R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 2733 | #define CAN_F3R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 2734 | #define CAN_F3R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 2735 | #define CAN_F3R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 2736 | #define CAN_F3R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 2737 | #define CAN_F3R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 2738 | #define CAN_F3R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 2739 | #define CAN_F3R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 2740 | #define CAN_F3R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 2741 | #define CAN_F3R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 2742 | #define CAN_F3R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 2743 | #define CAN_F3R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 2744 | |
| 2745 | /******************* Bit definition for CAN_F4R1 register *******************/ |
| 2746 | #define CAN_F4R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 2747 | #define CAN_F4R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 2748 | #define CAN_F4R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 2749 | #define CAN_F4R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 2750 | #define CAN_F4R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 2751 | #define CAN_F4R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 2752 | #define CAN_F4R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 2753 | #define CAN_F4R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 2754 | #define CAN_F4R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 2755 | #define CAN_F4R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 2756 | #define CAN_F4R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 2757 | #define CAN_F4R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 2758 | #define CAN_F4R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 2759 | #define CAN_F4R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 2760 | #define CAN_F4R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 2761 | #define CAN_F4R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 2762 | #define CAN_F4R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 2763 | #define CAN_F4R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 2764 | #define CAN_F4R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 2765 | #define CAN_F4R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 2766 | #define CAN_F4R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 2767 | #define CAN_F4R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 2768 | #define CAN_F4R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 2769 | #define CAN_F4R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 2770 | #define CAN_F4R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 2771 | #define CAN_F4R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 2772 | #define CAN_F4R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 2773 | #define CAN_F4R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 2774 | #define CAN_F4R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 2775 | #define CAN_F4R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 2776 | #define CAN_F4R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 2777 | #define CAN_F4R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 2778 | |
| 2779 | /******************* Bit definition for CAN_F5R1 register *******************/ |
| 2780 | #define CAN_F5R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 2781 | #define CAN_F5R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 2782 | #define CAN_F5R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 2783 | #define CAN_F5R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 2784 | #define CAN_F5R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 2785 | #define CAN_F5R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 2786 | #define CAN_F5R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 2787 | #define CAN_F5R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 2788 | #define CAN_F5R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 2789 | #define CAN_F5R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 2790 | #define CAN_F5R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 2791 | #define CAN_F5R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 2792 | #define CAN_F5R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 2793 | #define CAN_F5R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 2794 | #define CAN_F5R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 2795 | #define CAN_F5R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 2796 | #define CAN_F5R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 2797 | #define CAN_F5R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 2798 | #define CAN_F5R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 2799 | #define CAN_F5R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 2800 | #define CAN_F5R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 2801 | #define CAN_F5R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 2802 | #define CAN_F5R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 2803 | #define CAN_F5R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 2804 | #define CAN_F5R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 2805 | #define CAN_F5R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 2806 | #define CAN_F5R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 2807 | #define CAN_F5R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 2808 | #define CAN_F5R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 2809 | #define CAN_F5R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 2810 | #define CAN_F5R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 2811 | #define CAN_F5R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 2812 | |
| 2813 | /******************* Bit definition for CAN_F6R1 register *******************/ |
| 2814 | #define CAN_F6R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 2815 | #define CAN_F6R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 2816 | #define CAN_F6R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 2817 | #define CAN_F6R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 2818 | #define CAN_F6R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 2819 | #define CAN_F6R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 2820 | #define CAN_F6R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 2821 | #define CAN_F6R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 2822 | #define CAN_F6R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 2823 | #define CAN_F6R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 2824 | #define CAN_F6R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 2825 | #define CAN_F6R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 2826 | #define CAN_F6R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 2827 | #define CAN_F6R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 2828 | #define CAN_F6R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 2829 | #define CAN_F6R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 2830 | #define CAN_F6R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 2831 | #define CAN_F6R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 2832 | #define CAN_F6R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 2833 | #define CAN_F6R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 2834 | #define CAN_F6R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 2835 | #define CAN_F6R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 2836 | #define CAN_F6R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 2837 | #define CAN_F6R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 2838 | #define CAN_F6R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 2839 | #define CAN_F6R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 2840 | #define CAN_F6R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 2841 | #define CAN_F6R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 2842 | #define CAN_F6R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 2843 | #define CAN_F6R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 2844 | #define CAN_F6R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 2845 | #define CAN_F6R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 2846 | |
| 2847 | /******************* Bit definition for CAN_F7R1 register *******************/ |
| 2848 | #define CAN_F7R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 2849 | #define CAN_F7R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 2850 | #define CAN_F7R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 2851 | #define CAN_F7R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 2852 | #define CAN_F7R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 2853 | #define CAN_F7R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 2854 | #define CAN_F7R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 2855 | #define CAN_F7R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 2856 | #define CAN_F7R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 2857 | #define CAN_F7R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 2858 | #define CAN_F7R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 2859 | #define CAN_F7R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 2860 | #define CAN_F7R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 2861 | #define CAN_F7R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 2862 | #define CAN_F7R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 2863 | #define CAN_F7R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 2864 | #define CAN_F7R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 2865 | #define CAN_F7R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 2866 | #define CAN_F7R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 2867 | #define CAN_F7R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 2868 | #define CAN_F7R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 2869 | #define CAN_F7R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 2870 | #define CAN_F7R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 2871 | #define CAN_F7R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 2872 | #define CAN_F7R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 2873 | #define CAN_F7R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 2874 | #define CAN_F7R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 2875 | #define CAN_F7R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 2876 | #define CAN_F7R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 2877 | #define CAN_F7R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 2878 | #define CAN_F7R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 2879 | #define CAN_F7R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 2880 | |
| 2881 | /******************* Bit definition for CAN_F8R1 register *******************/ |
| 2882 | #define CAN_F8R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 2883 | #define CAN_F8R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 2884 | #define CAN_F8R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 2885 | #define CAN_F8R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 2886 | #define CAN_F8R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 2887 | #define CAN_F8R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 2888 | #define CAN_F8R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 2889 | #define CAN_F8R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 2890 | #define CAN_F8R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 2891 | #define CAN_F8R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 2892 | #define CAN_F8R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 2893 | #define CAN_F8R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 2894 | #define CAN_F8R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 2895 | #define CAN_F8R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 2896 | #define CAN_F8R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 2897 | #define CAN_F8R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 2898 | #define CAN_F8R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 2899 | #define CAN_F8R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 2900 | #define CAN_F8R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 2901 | #define CAN_F8R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 2902 | #define CAN_F8R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 2903 | #define CAN_F8R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 2904 | #define CAN_F8R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 2905 | #define CAN_F8R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 2906 | #define CAN_F8R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 2907 | #define CAN_F8R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 2908 | #define CAN_F8R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 2909 | #define CAN_F8R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 2910 | #define CAN_F8R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 2911 | #define CAN_F8R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 2912 | #define CAN_F8R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 2913 | #define CAN_F8R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 2914 | |
| 2915 | /******************* Bit definition for CAN_F9R1 register *******************/ |
| 2916 | #define CAN_F9R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 2917 | #define CAN_F9R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 2918 | #define CAN_F9R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 2919 | #define CAN_F9R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 2920 | #define CAN_F9R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 2921 | #define CAN_F9R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 2922 | #define CAN_F9R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 2923 | #define CAN_F9R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 2924 | #define CAN_F9R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 2925 | #define CAN_F9R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 2926 | #define CAN_F9R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 2927 | #define CAN_F9R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 2928 | #define CAN_F9R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 2929 | #define CAN_F9R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 2930 | #define CAN_F9R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 2931 | #define CAN_F9R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 2932 | #define CAN_F9R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 2933 | #define CAN_F9R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 2934 | #define CAN_F9R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 2935 | #define CAN_F9R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 2936 | #define CAN_F9R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 2937 | #define CAN_F9R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 2938 | #define CAN_F9R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 2939 | #define CAN_F9R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 2940 | #define CAN_F9R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 2941 | #define CAN_F9R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 2942 | #define CAN_F9R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 2943 | #define CAN_F9R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 2944 | #define CAN_F9R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 2945 | #define CAN_F9R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 2946 | #define CAN_F9R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 2947 | #define CAN_F9R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 2948 | |
| 2949 | /******************* Bit definition for CAN_F10R1 register ******************/ |
| 2950 | #define CAN_F10R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 2951 | #define CAN_F10R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 2952 | #define CAN_F10R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 2953 | #define CAN_F10R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 2954 | #define CAN_F10R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 2955 | #define CAN_F10R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 2956 | #define CAN_F10R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 2957 | #define CAN_F10R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 2958 | #define CAN_F10R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 2959 | #define CAN_F10R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 2960 | #define CAN_F10R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 2961 | #define CAN_F10R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 2962 | #define CAN_F10R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 2963 | #define CAN_F10R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 2964 | #define CAN_F10R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 2965 | #define CAN_F10R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 2966 | #define CAN_F10R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 2967 | #define CAN_F10R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 2968 | #define CAN_F10R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 2969 | #define CAN_F10R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 2970 | #define CAN_F10R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 2971 | #define CAN_F10R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 2972 | #define CAN_F10R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 2973 | #define CAN_F10R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 2974 | #define CAN_F10R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 2975 | #define CAN_F10R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 2976 | #define CAN_F10R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 2977 | #define CAN_F10R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 2978 | #define CAN_F10R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 2979 | #define CAN_F10R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 2980 | #define CAN_F10R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 2981 | #define CAN_F10R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 2982 | |
| 2983 | /******************* Bit definition for CAN_F11R1 register ******************/ |
| 2984 | #define CAN_F11R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 2985 | #define CAN_F11R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 2986 | #define CAN_F11R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 2987 | #define CAN_F11R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 2988 | #define CAN_F11R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 2989 | #define CAN_F11R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 2990 | #define CAN_F11R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 2991 | #define CAN_F11R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 2992 | #define CAN_F11R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 2993 | #define CAN_F11R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 2994 | #define CAN_F11R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 2995 | #define CAN_F11R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 2996 | #define CAN_F11R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 2997 | #define CAN_F11R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 2998 | #define CAN_F11R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 2999 | #define CAN_F11R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 3000 | #define CAN_F11R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 3001 | #define CAN_F11R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 3002 | #define CAN_F11R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 3003 | #define CAN_F11R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 3004 | #define CAN_F11R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 3005 | #define CAN_F11R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 3006 | #define CAN_F11R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 3007 | #define CAN_F11R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 3008 | #define CAN_F11R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 3009 | #define CAN_F11R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 3010 | #define CAN_F11R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 3011 | #define CAN_F11R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 3012 | #define CAN_F11R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 3013 | #define CAN_F11R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 3014 | #define CAN_F11R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 3015 | #define CAN_F11R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 3016 | |
| 3017 | /******************* Bit definition for CAN_F12R1 register ******************/ |
| 3018 | #define CAN_F12R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 3019 | #define CAN_F12R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 3020 | #define CAN_F12R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 3021 | #define CAN_F12R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 3022 | #define CAN_F12R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 3023 | #define CAN_F12R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 3024 | #define CAN_F12R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 3025 | #define CAN_F12R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 3026 | #define CAN_F12R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 3027 | #define CAN_F12R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 3028 | #define CAN_F12R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 3029 | #define CAN_F12R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 3030 | #define CAN_F12R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 3031 | #define CAN_F12R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 3032 | #define CAN_F12R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 3033 | #define CAN_F12R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 3034 | #define CAN_F12R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 3035 | #define CAN_F12R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 3036 | #define CAN_F12R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 3037 | #define CAN_F12R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 3038 | #define CAN_F12R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 3039 | #define CAN_F12R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 3040 | #define CAN_F12R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 3041 | #define CAN_F12R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 3042 | #define CAN_F12R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 3043 | #define CAN_F12R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 3044 | #define CAN_F12R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 3045 | #define CAN_F12R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 3046 | #define CAN_F12R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 3047 | #define CAN_F12R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 3048 | #define CAN_F12R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 3049 | #define CAN_F12R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 3050 | |
| 3051 | /******************* Bit definition for CAN_F13R1 register ******************/ |
| 3052 | #define CAN_F13R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 3053 | #define CAN_F13R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 3054 | #define CAN_F13R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 3055 | #define CAN_F13R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 3056 | #define CAN_F13R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 3057 | #define CAN_F13R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 3058 | #define CAN_F13R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 3059 | #define CAN_F13R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 3060 | #define CAN_F13R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 3061 | #define CAN_F13R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 3062 | #define CAN_F13R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 3063 | #define CAN_F13R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 3064 | #define CAN_F13R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 3065 | #define CAN_F13R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 3066 | #define CAN_F13R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 3067 | #define CAN_F13R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 3068 | #define CAN_F13R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 3069 | #define CAN_F13R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 3070 | #define CAN_F13R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 3071 | #define CAN_F13R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 3072 | #define CAN_F13R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 3073 | #define CAN_F13R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 3074 | #define CAN_F13R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 3075 | #define CAN_F13R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 3076 | #define CAN_F13R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 3077 | #define CAN_F13R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 3078 | #define CAN_F13R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 3079 | #define CAN_F13R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 3080 | #define CAN_F13R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 3081 | #define CAN_F13R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 3082 | #define CAN_F13R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 3083 | #define CAN_F13R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 3084 | |
| 3085 | /******************* Bit definition for CAN_F0R2 register *******************/ |
| 3086 | #define CAN_F0R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 3087 | #define CAN_F0R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 3088 | #define CAN_F0R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 3089 | #define CAN_F0R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 3090 | #define CAN_F0R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 3091 | #define CAN_F0R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 3092 | #define CAN_F0R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 3093 | #define CAN_F0R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 3094 | #define CAN_F0R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 3095 | #define CAN_F0R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 3096 | #define CAN_F0R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 3097 | #define CAN_F0R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 3098 | #define CAN_F0R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 3099 | #define CAN_F0R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 3100 | #define CAN_F0R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 3101 | #define CAN_F0R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 3102 | #define CAN_F0R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 3103 | #define CAN_F0R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 3104 | #define CAN_F0R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 3105 | #define CAN_F0R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 3106 | #define CAN_F0R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 3107 | #define CAN_F0R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 3108 | #define CAN_F0R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 3109 | #define CAN_F0R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 3110 | #define CAN_F0R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 3111 | #define CAN_F0R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 3112 | #define CAN_F0R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 3113 | #define CAN_F0R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 3114 | #define CAN_F0R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 3115 | #define CAN_F0R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 3116 | #define CAN_F0R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 3117 | #define CAN_F0R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 3118 | |
| 3119 | /******************* Bit definition for CAN_F1R2 register *******************/ |
| 3120 | #define CAN_F1R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 3121 | #define CAN_F1R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 3122 | #define CAN_F1R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 3123 | #define CAN_F1R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 3124 | #define CAN_F1R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 3125 | #define CAN_F1R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 3126 | #define CAN_F1R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 3127 | #define CAN_F1R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 3128 | #define CAN_F1R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 3129 | #define CAN_F1R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 3130 | #define CAN_F1R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 3131 | #define CAN_F1R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 3132 | #define CAN_F1R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 3133 | #define CAN_F1R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 3134 | #define CAN_F1R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 3135 | #define CAN_F1R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 3136 | #define CAN_F1R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 3137 | #define CAN_F1R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 3138 | #define CAN_F1R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 3139 | #define CAN_F1R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 3140 | #define CAN_F1R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 3141 | #define CAN_F1R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 3142 | #define CAN_F1R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 3143 | #define CAN_F1R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 3144 | #define CAN_F1R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 3145 | #define CAN_F1R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 3146 | #define CAN_F1R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 3147 | #define CAN_F1R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 3148 | #define CAN_F1R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 3149 | #define CAN_F1R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 3150 | #define CAN_F1R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 3151 | #define CAN_F1R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 3152 | |
| 3153 | /******************* Bit definition for CAN_F2R2 register *******************/ |
| 3154 | #define CAN_F2R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 3155 | #define CAN_F2R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 3156 | #define CAN_F2R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 3157 | #define CAN_F2R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 3158 | #define CAN_F2R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 3159 | #define CAN_F2R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 3160 | #define CAN_F2R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 3161 | #define CAN_F2R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 3162 | #define CAN_F2R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 3163 | #define CAN_F2R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 3164 | #define CAN_F2R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 3165 | #define CAN_F2R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 3166 | #define CAN_F2R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 3167 | #define CAN_F2R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 3168 | #define CAN_F2R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 3169 | #define CAN_F2R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 3170 | #define CAN_F2R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 3171 | #define CAN_F2R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 3172 | #define CAN_F2R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 3173 | #define CAN_F2R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 3174 | #define CAN_F2R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 3175 | #define CAN_F2R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 3176 | #define CAN_F2R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 3177 | #define CAN_F2R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 3178 | #define CAN_F2R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 3179 | #define CAN_F2R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 3180 | #define CAN_F2R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 3181 | #define CAN_F2R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 3182 | #define CAN_F2R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 3183 | #define CAN_F2R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 3184 | #define CAN_F2R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 3185 | #define CAN_F2R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 3186 | |
| 3187 | /******************* Bit definition for CAN_F3R2 register *******************/ |
| 3188 | #define CAN_F3R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 3189 | #define CAN_F3R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 3190 | #define CAN_F3R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 3191 | #define CAN_F3R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 3192 | #define CAN_F3R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 3193 | #define CAN_F3R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 3194 | #define CAN_F3R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 3195 | #define CAN_F3R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 3196 | #define CAN_F3R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 3197 | #define CAN_F3R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 3198 | #define CAN_F3R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 3199 | #define CAN_F3R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 3200 | #define CAN_F3R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 3201 | #define CAN_F3R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 3202 | #define CAN_F3R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 3203 | #define CAN_F3R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 3204 | #define CAN_F3R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 3205 | #define CAN_F3R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 3206 | #define CAN_F3R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 3207 | #define CAN_F3R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 3208 | #define CAN_F3R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 3209 | #define CAN_F3R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 3210 | #define CAN_F3R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 3211 | #define CAN_F3R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 3212 | #define CAN_F3R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 3213 | #define CAN_F3R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 3214 | #define CAN_F3R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 3215 | #define CAN_F3R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 3216 | #define CAN_F3R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 3217 | #define CAN_F3R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 3218 | #define CAN_F3R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 3219 | #define CAN_F3R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 3220 | |
| 3221 | /******************* Bit definition for CAN_F4R2 register *******************/ |
| 3222 | #define CAN_F4R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 3223 | #define CAN_F4R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 3224 | #define CAN_F4R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 3225 | #define CAN_F4R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 3226 | #define CAN_F4R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 3227 | #define CAN_F4R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 3228 | #define CAN_F4R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 3229 | #define CAN_F4R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 3230 | #define CAN_F4R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 3231 | #define CAN_F4R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 3232 | #define CAN_F4R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 3233 | #define CAN_F4R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 3234 | #define CAN_F4R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 3235 | #define CAN_F4R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 3236 | #define CAN_F4R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 3237 | #define CAN_F4R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 3238 | #define CAN_F4R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 3239 | #define CAN_F4R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 3240 | #define CAN_F4R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 3241 | #define CAN_F4R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 3242 | #define CAN_F4R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 3243 | #define CAN_F4R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 3244 | #define CAN_F4R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 3245 | #define CAN_F4R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 3246 | #define CAN_F4R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 3247 | #define CAN_F4R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 3248 | #define CAN_F4R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 3249 | #define CAN_F4R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 3250 | #define CAN_F4R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 3251 | #define CAN_F4R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 3252 | #define CAN_F4R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 3253 | #define CAN_F4R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 3254 | |
| 3255 | /******************* Bit definition for CAN_F5R2 register *******************/ |
| 3256 | #define CAN_F5R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 3257 | #define CAN_F5R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 3258 | #define CAN_F5R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 3259 | #define CAN_F5R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 3260 | #define CAN_F5R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 3261 | #define CAN_F5R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 3262 | #define CAN_F5R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 3263 | #define CAN_F5R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 3264 | #define CAN_F5R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 3265 | #define CAN_F5R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 3266 | #define CAN_F5R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 3267 | #define CAN_F5R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 3268 | #define CAN_F5R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 3269 | #define CAN_F5R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 3270 | #define CAN_F5R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 3271 | #define CAN_F5R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 3272 | #define CAN_F5R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 3273 | #define CAN_F5R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 3274 | #define CAN_F5R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 3275 | #define CAN_F5R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 3276 | #define CAN_F5R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 3277 | #define CAN_F5R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 3278 | #define CAN_F5R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 3279 | #define CAN_F5R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 3280 | #define CAN_F5R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 3281 | #define CAN_F5R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 3282 | #define CAN_F5R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 3283 | #define CAN_F5R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 3284 | #define CAN_F5R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 3285 | #define CAN_F5R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 3286 | #define CAN_F5R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 3287 | #define CAN_F5R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 3288 | |
| 3289 | /******************* Bit definition for CAN_F6R2 register *******************/ |
| 3290 | #define CAN_F6R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 3291 | #define CAN_F6R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 3292 | #define CAN_F6R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 3293 | #define CAN_F6R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 3294 | #define CAN_F6R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 3295 | #define CAN_F6R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 3296 | #define CAN_F6R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 3297 | #define CAN_F6R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 3298 | #define CAN_F6R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 3299 | #define CAN_F6R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 3300 | #define CAN_F6R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 3301 | #define CAN_F6R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 3302 | #define CAN_F6R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 3303 | #define CAN_F6R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 3304 | #define CAN_F6R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 3305 | #define CAN_F6R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 3306 | #define CAN_F6R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 3307 | #define CAN_F6R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 3308 | #define CAN_F6R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 3309 | #define CAN_F6R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 3310 | #define CAN_F6R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 3311 | #define CAN_F6R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 3312 | #define CAN_F6R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 3313 | #define CAN_F6R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 3314 | #define CAN_F6R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 3315 | #define CAN_F6R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 3316 | #define CAN_F6R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 3317 | #define CAN_F6R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 3318 | #define CAN_F6R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 3319 | #define CAN_F6R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 3320 | #define CAN_F6R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 3321 | #define CAN_F6R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 3322 | |
| 3323 | /******************* Bit definition for CAN_F7R2 register *******************/ |
| 3324 | #define CAN_F7R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 3325 | #define CAN_F7R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 3326 | #define CAN_F7R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 3327 | #define CAN_F7R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 3328 | #define CAN_F7R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 3329 | #define CAN_F7R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 3330 | #define CAN_F7R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 3331 | #define CAN_F7R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 3332 | #define CAN_F7R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 3333 | #define CAN_F7R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 3334 | #define CAN_F7R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 3335 | #define CAN_F7R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 3336 | #define CAN_F7R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 3337 | #define CAN_F7R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 3338 | #define CAN_F7R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 3339 | #define CAN_F7R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 3340 | #define CAN_F7R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 3341 | #define CAN_F7R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 3342 | #define CAN_F7R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 3343 | #define CAN_F7R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 3344 | #define CAN_F7R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 3345 | #define CAN_F7R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 3346 | #define CAN_F7R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 3347 | #define CAN_F7R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 3348 | #define CAN_F7R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 3349 | #define CAN_F7R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 3350 | #define CAN_F7R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 3351 | #define CAN_F7R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 3352 | #define CAN_F7R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 3353 | #define CAN_F7R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 3354 | #define CAN_F7R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 3355 | #define CAN_F7R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 3356 | |
| 3357 | /******************* Bit definition for CAN_F8R2 register *******************/ |
| 3358 | #define CAN_F8R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 3359 | #define CAN_F8R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 3360 | #define CAN_F8R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 3361 | #define CAN_F8R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 3362 | #define CAN_F8R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 3363 | #define CAN_F8R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 3364 | #define CAN_F8R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 3365 | #define CAN_F8R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 3366 | #define CAN_F8R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 3367 | #define CAN_F8R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 3368 | #define CAN_F8R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 3369 | #define CAN_F8R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 3370 | #define CAN_F8R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 3371 | #define CAN_F8R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 3372 | #define CAN_F8R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 3373 | #define CAN_F8R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 3374 | #define CAN_F8R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 3375 | #define CAN_F8R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 3376 | #define CAN_F8R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 3377 | #define CAN_F8R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 3378 | #define CAN_F8R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 3379 | #define CAN_F8R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 3380 | #define CAN_F8R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 3381 | #define CAN_F8R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 3382 | #define CAN_F8R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 3383 | #define CAN_F8R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 3384 | #define CAN_F8R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 3385 | #define CAN_F8R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 3386 | #define CAN_F8R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 3387 | #define CAN_F8R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 3388 | #define CAN_F8R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 3389 | #define CAN_F8R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 3390 | |
| 3391 | /******************* Bit definition for CAN_F9R2 register *******************/ |
| 3392 | #define CAN_F9R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 3393 | #define CAN_F9R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 3394 | #define CAN_F9R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 3395 | #define CAN_F9R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 3396 | #define CAN_F9R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 3397 | #define CAN_F9R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 3398 | #define CAN_F9R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 3399 | #define CAN_F9R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 3400 | #define CAN_F9R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 3401 | #define CAN_F9R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 3402 | #define CAN_F9R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 3403 | #define CAN_F9R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 3404 | #define CAN_F9R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 3405 | #define CAN_F9R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 3406 | #define CAN_F9R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 3407 | #define CAN_F9R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 3408 | #define CAN_F9R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 3409 | #define CAN_F9R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 3410 | #define CAN_F9R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 3411 | #define CAN_F9R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 3412 | #define CAN_F9R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 3413 | #define CAN_F9R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 3414 | #define CAN_F9R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 3415 | #define CAN_F9R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 3416 | #define CAN_F9R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 3417 | #define CAN_F9R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 3418 | #define CAN_F9R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 3419 | #define CAN_F9R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 3420 | #define CAN_F9R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 3421 | #define CAN_F9R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 3422 | #define CAN_F9R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 3423 | #define CAN_F9R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 3424 | |
| 3425 | /******************* Bit definition for CAN_F10R2 register ******************/ |
| 3426 | #define CAN_F10R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 3427 | #define CAN_F10R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 3428 | #define CAN_F10R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 3429 | #define CAN_F10R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 3430 | #define CAN_F10R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 3431 | #define CAN_F10R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 3432 | #define CAN_F10R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 3433 | #define CAN_F10R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 3434 | #define CAN_F10R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 3435 | #define CAN_F10R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 3436 | #define CAN_F10R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 3437 | #define CAN_F10R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 3438 | #define CAN_F10R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 3439 | #define CAN_F10R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 3440 | #define CAN_F10R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 3441 | #define CAN_F10R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 3442 | #define CAN_F10R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 3443 | #define CAN_F10R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 3444 | #define CAN_F10R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 3445 | #define CAN_F10R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 3446 | #define CAN_F10R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 3447 | #define CAN_F10R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 3448 | #define CAN_F10R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 3449 | #define CAN_F10R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 3450 | #define CAN_F10R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 3451 | #define CAN_F10R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 3452 | #define CAN_F10R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 3453 | #define CAN_F10R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 3454 | #define CAN_F10R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 3455 | #define CAN_F10R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 3456 | #define CAN_F10R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 3457 | #define CAN_F10R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 3458 | |
| 3459 | /******************* Bit definition for CAN_F11R2 register ******************/ |
| 3460 | #define CAN_F11R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 3461 | #define CAN_F11R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 3462 | #define CAN_F11R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 3463 | #define CAN_F11R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 3464 | #define CAN_F11R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 3465 | #define CAN_F11R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 3466 | #define CAN_F11R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 3467 | #define CAN_F11R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 3468 | #define CAN_F11R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 3469 | #define CAN_F11R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 3470 | #define CAN_F11R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 3471 | #define CAN_F11R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 3472 | #define CAN_F11R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 3473 | #define CAN_F11R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 3474 | #define CAN_F11R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 3475 | #define CAN_F11R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 3476 | #define CAN_F11R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 3477 | #define CAN_F11R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 3478 | #define CAN_F11R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 3479 | #define CAN_F11R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 3480 | #define CAN_F11R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 3481 | #define CAN_F11R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 3482 | #define CAN_F11R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 3483 | #define CAN_F11R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 3484 | #define CAN_F11R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 3485 | #define CAN_F11R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 3486 | #define CAN_F11R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 3487 | #define CAN_F11R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 3488 | #define CAN_F11R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 3489 | #define CAN_F11R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 3490 | #define CAN_F11R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 3491 | #define CAN_F11R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 3492 | |
| 3493 | /******************* Bit definition for CAN_F12R2 register ******************/ |
| 3494 | #define CAN_F12R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 3495 | #define CAN_F12R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 3496 | #define CAN_F12R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 3497 | #define CAN_F12R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 3498 | #define CAN_F12R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 3499 | #define CAN_F12R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 3500 | #define CAN_F12R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 3501 | #define CAN_F12R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 3502 | #define CAN_F12R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 3503 | #define CAN_F12R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 3504 | #define CAN_F12R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 3505 | #define CAN_F12R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 3506 | #define CAN_F12R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 3507 | #define CAN_F12R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 3508 | #define CAN_F12R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 3509 | #define CAN_F12R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 3510 | #define CAN_F12R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 3511 | #define CAN_F12R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 3512 | #define CAN_F12R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 3513 | #define CAN_F12R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 3514 | #define CAN_F12R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 3515 | #define CAN_F12R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 3516 | #define CAN_F12R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 3517 | #define CAN_F12R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 3518 | #define CAN_F12R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 3519 | #define CAN_F12R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 3520 | #define CAN_F12R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 3521 | #define CAN_F12R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 3522 | #define CAN_F12R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 3523 | #define CAN_F12R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 3524 | #define CAN_F12R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 3525 | #define CAN_F12R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 3526 | |
| 3527 | /******************* Bit definition for CAN_F13R2 register ******************/ |
| 3528 | #define CAN_F13R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */ |
| 3529 | #define CAN_F13R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */ |
| 3530 | #define CAN_F13R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */ |
| 3531 | #define CAN_F13R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */ |
| 3532 | #define CAN_F13R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */ |
| 3533 | #define CAN_F13R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */ |
| 3534 | #define CAN_F13R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */ |
| 3535 | #define CAN_F13R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */ |
| 3536 | #define CAN_F13R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */ |
| 3537 | #define CAN_F13R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */ |
| 3538 | #define CAN_F13R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */ |
| 3539 | #define CAN_F13R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */ |
| 3540 | #define CAN_F13R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */ |
| 3541 | #define CAN_F13R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */ |
| 3542 | #define CAN_F13R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */ |
| 3543 | #define CAN_F13R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */ |
| 3544 | #define CAN_F13R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */ |
| 3545 | #define CAN_F13R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */ |
| 3546 | #define CAN_F13R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */ |
| 3547 | #define CAN_F13R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */ |
| 3548 | #define CAN_F13R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */ |
| 3549 | #define CAN_F13R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */ |
| 3550 | #define CAN_F13R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */ |
| 3551 | #define CAN_F13R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */ |
| 3552 | #define CAN_F13R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */ |
| 3553 | #define CAN_F13R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */ |
| 3554 | #define CAN_F13R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */ |
| 3555 | #define CAN_F13R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */ |
| 3556 | #define CAN_F13R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */ |
| 3557 | #define CAN_F13R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */ |
| 3558 | #define CAN_F13R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */ |
| 3559 | #define CAN_F13R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */ |
| 3560 | |
| 3561 | #if defined(STM32F446xx) |
| 3562 | /******************************************************************************/ |
| 3563 | /* */ |
| 3564 | /* HDMI-CEC (CEC) */ |
| 3565 | /* */ |
| 3566 | /******************************************************************************/ |
| 3567 | |
| 3568 | /******************* Bit definition for CEC_CR register *********************/ |
| 3569 | #define CEC_CR_CECEN ((uint32_t)0x00000001) /*!< CEC Enable */ |
| 3570 | #define CEC_CR_TXSOM ((uint32_t)0x00000002) /*!< CEC Tx Start Of Message */ |
| 3571 | #define CEC_CR_TXEOM ((uint32_t)0x00000004) /*!< CEC Tx End Of Message */ |
| 3572 | |
| 3573 | /******************* Bit definition for CEC_CFGR register *******************/ |
| 3574 | #define CEC_CFGR_SFT ((uint32_t)0x00000007) /*!< CEC Signal Free Time */ |
| 3575 | #define CEC_CFGR_RXTOL ((uint32_t)0x00000008) /*!< CEC Tolerance */ |
| 3576 | #define CEC_CFGR_BRESTP ((uint32_t)0x00000010) /*!< CEC Rx Stop */ |
| 3577 | #define CEC_CFGR_BREGEN ((uint32_t)0x00000020) /*!< CEC Bit Rising Error generation */ |
| 3578 | #define CEC_CFGR_LREGEN ((uint32_t)0x00000040) /*!< CEC Long Period Error generation */ |
| 3579 | #define CEC_CFGR_SFTOPT ((uint32_t)0x00000100) /*!< CEC Signal Free Time optional */ |
| 3580 | #define CEC_CFGR_BRDNOGEN ((uint32_t)0x00000080) /*!< CEC Broadcast No error generation */ |
| 3581 | #define CEC_CFGR_OAR ((uint32_t)0x7FFF0000) /*!< CEC Own Address */ |
| 3582 | #define CEC_CFGR_LSTN ((uint32_t)0x80000000) /*!< CEC Listen mode */ |
| 3583 | |
| 3584 | /******************* Bit definition for CEC_TXDR register *******************/ |
| 3585 | #define CEC_TXDR_TXD ((uint32_t)0x000000FF) /*!< CEC Tx Data */ |
| 3586 | |
| 3587 | /******************* Bit definition for CEC_RXDR register *******************/ |
| 3588 | #define CEC_TXDR_RXD ((uint32_t)0x000000FF) /*!< CEC Rx Data */ |
| 3589 | |
| 3590 | /******************* Bit definition for CEC_ISR register ********************/ |
| 3591 | #define CEC_ISR_RXBR ((uint32_t)0x00000001) /*!< CEC Rx-Byte Received */ |
| 3592 | #define CEC_ISR_RXEND ((uint32_t)0x00000002) /*!< CEC End Of Reception */ |
| 3593 | #define CEC_ISR_RXOVR ((uint32_t)0x00000004) /*!< CEC Rx-Overrun */ |
| 3594 | #define CEC_ISR_BRE ((uint32_t)0x00000008) /*!< CEC Rx Bit Rising Error */ |
| 3595 | #define CEC_ISR_SBPE ((uint32_t)0x00000010) /*!< CEC Rx Short Bit period Error */ |
| 3596 | #define CEC_ISR_LBPE ((uint32_t)0x00000020) /*!< CEC Rx Long Bit period Error */ |
| 3597 | #define CEC_ISR_RXACKE ((uint32_t)0x00000040) /*!< CEC Rx Missing Acknowledge */ |
| 3598 | #define CEC_ISR_ARBLST ((uint32_t)0x00000080) /*!< CEC Arbitration Lost */ |
| 3599 | #define CEC_ISR_TXBR ((uint32_t)0x00000100) /*!< CEC Tx Byte Request */ |
| 3600 | #define CEC_ISR_TXEND ((uint32_t)0x00000200) /*!< CEC End of Transmission */ |
| 3601 | #define CEC_ISR_TXUDR ((uint32_t)0x00000400) /*!< CEC Tx-Buffer Underrun */ |
| 3602 | #define CEC_ISR_TXERR ((uint32_t)0x00000800) /*!< CEC Tx-Error */ |
| 3603 | #define CEC_ISR_TXACKE ((uint32_t)0x00001000) /*!< CEC Tx Missing Acknowledge */ |
| 3604 | |
| 3605 | /******************* Bit definition for CEC_IER register ********************/ |
| 3606 | #define CEC_IER_RXBRIE ((uint32_t)0x00000001) /*!< CEC Rx-Byte Received IT Enable */ |
| 3607 | #define CEC_IER_RXENDIE ((uint32_t)0x00000002) /*!< CEC End Of Reception IT Enable */ |
| 3608 | #define CEC_IER_RXOVRIE ((uint32_t)0x00000004) /*!< CEC Rx-Overrun IT Enable */ |
| 3609 | #define CEC_IER_BREIEIE ((uint32_t)0x00000008) /*!< CEC Rx Bit Rising Error IT Enable */ |
| 3610 | #define CEC_IER_SBPEIE ((uint32_t)0x00000010) /*!< CEC Rx Short Bit period Error IT Enable */ |
| 3611 | #define CEC_IER_LBPEIE ((uint32_t)0x00000020) /*!< CEC Rx Long Bit period Error IT Enable */ |
| 3612 | #define CEC_IER_RXACKEIE ((uint32_t)0x00000040) /*!< CEC Rx Missing Acknowledge IT Enable */ |
| 3613 | #define CEC_IER_ARBLSTIE ((uint32_t)0x00000080) /*!< CEC Arbitration Lost IT Enable */ |
| 3614 | #define CEC_IER_TXBRIE ((uint32_t)0x00000100) /*!< CEC Tx Byte Request IT Enable */ |
| 3615 | #define CEC_IER_TXENDIE ((uint32_t)0x00000200) /*!< CEC End of Transmission IT Enable */ |
| 3616 | #define CEC_IER_TXUDRIE ((uint32_t)0x00000400) /*!< CEC Tx-Buffer Underrun IT Enable */ |
| 3617 | #define CEC_IER_TXERRIE ((uint32_t)0x00000800) /*!< CEC Tx-Error IT Enable */ |
| 3618 | #define CEC_IER_TXACKEIE ((uint32_t)0x00001000) /*!< CEC Tx Missing Acknowledge IT Enable */ |
| 3619 | #endif /* STM32F446xx */ |
| 3620 | |
| 3621 | /******************************************************************************/ |
| 3622 | /* */ |
| 3623 | /* CRC calculation unit */ |
| 3624 | /* */ |
| 3625 | /******************************************************************************/ |
| 3626 | /******************* Bit definition for CRC_DR register *********************/ |
| 3627 | #define CRC_DR_DR ((uint32_t)0xFFFFFFFF) /*!< Data register bits */ |
| 3628 | |
| 3629 | |
| 3630 | /******************* Bit definition for CRC_IDR register ********************/ |
| 3631 | #define CRC_IDR_IDR ((uint8_t)0xFF) /*!< General-purpose 8-bit data register bits */ |
| 3632 | |
| 3633 | |
| 3634 | /******************** Bit definition for CRC_CR register ********************/ |
| 3635 | #define CRC_CR_RESET ((uint8_t)0x01) /*!< RESET bit */ |
| 3636 | |
| 3637 | /******************************************************************************/ |
| 3638 | /* */ |
| 3639 | /* Crypto Processor */ |
| 3640 | /* */ |
| 3641 | /******************************************************************************/ |
| 3642 | /******************* Bits definition for CRYP_CR register ********************/ |
| 3643 | #define CRYP_CR_ALGODIR ((uint32_t)0x00000004) |
| 3644 | |
| 3645 | #define CRYP_CR_ALGOMODE ((uint32_t)0x00080038) |
| 3646 | #define CRYP_CR_ALGOMODE_0 ((uint32_t)0x00000008) |
| 3647 | #define CRYP_CR_ALGOMODE_1 ((uint32_t)0x00000010) |
| 3648 | #define CRYP_CR_ALGOMODE_2 ((uint32_t)0x00000020) |
| 3649 | #define CRYP_CR_ALGOMODE_TDES_ECB ((uint32_t)0x00000000) |
| 3650 | #define CRYP_CR_ALGOMODE_TDES_CBC ((uint32_t)0x00000008) |
| 3651 | #define CRYP_CR_ALGOMODE_DES_ECB ((uint32_t)0x00000010) |
| 3652 | #define CRYP_CR_ALGOMODE_DES_CBC ((uint32_t)0x00000018) |
| 3653 | #define CRYP_CR_ALGOMODE_AES_ECB ((uint32_t)0x00000020) |
| 3654 | #define CRYP_CR_ALGOMODE_AES_CBC ((uint32_t)0x00000028) |
| 3655 | #define CRYP_CR_ALGOMODE_AES_CTR ((uint32_t)0x00000030) |
| 3656 | #define CRYP_CR_ALGOMODE_AES_KEY ((uint32_t)0x00000038) |
| 3657 | |
| 3658 | #define CRYP_CR_DATATYPE ((uint32_t)0x000000C0) |
| 3659 | #define CRYP_CR_DATATYPE_0 ((uint32_t)0x00000040) |
| 3660 | #define CRYP_CR_DATATYPE_1 ((uint32_t)0x00000080) |
| 3661 | #define CRYP_CR_KEYSIZE ((uint32_t)0x00000300) |
| 3662 | #define CRYP_CR_KEYSIZE_0 ((uint32_t)0x00000100) |
| 3663 | #define CRYP_CR_KEYSIZE_1 ((uint32_t)0x00000200) |
| 3664 | #define CRYP_CR_FFLUSH ((uint32_t)0x00004000) |
| 3665 | #define CRYP_CR_CRYPEN ((uint32_t)0x00008000) |
| 3666 | |
| 3667 | #define CRYP_CR_GCM_CCMPH ((uint32_t)0x00030000) |
| 3668 | #define CRYP_CR_GCM_CCMPH_0 ((uint32_t)0x00010000) |
| 3669 | #define CRYP_CR_GCM_CCMPH_1 ((uint32_t)0x00020000) |
| 3670 | #define CRYP_CR_ALGOMODE_3 ((uint32_t)0x00080000) |
| 3671 | |
| 3672 | /****************** Bits definition for CRYP_SR register *********************/ |
| 3673 | #define CRYP_SR_IFEM ((uint32_t)0x00000001) |
| 3674 | #define CRYP_SR_IFNF ((uint32_t)0x00000002) |
| 3675 | #define CRYP_SR_OFNE ((uint32_t)0x00000004) |
| 3676 | #define CRYP_SR_OFFU ((uint32_t)0x00000008) |
| 3677 | #define CRYP_SR_BUSY ((uint32_t)0x00000010) |
| 3678 | /****************** Bits definition for CRYP_DMACR register ******************/ |
| 3679 | #define CRYP_DMACR_DIEN ((uint32_t)0x00000001) |
| 3680 | #define CRYP_DMACR_DOEN ((uint32_t)0x00000002) |
| 3681 | /***************** Bits definition for CRYP_IMSCR register ******************/ |
| 3682 | #define CRYP_IMSCR_INIM ((uint32_t)0x00000001) |
| 3683 | #define CRYP_IMSCR_OUTIM ((uint32_t)0x00000002) |
| 3684 | /****************** Bits definition for CRYP_RISR register *******************/ |
| 3685 | #define CRYP_RISR_OUTRIS ((uint32_t)0x00000001) |
| 3686 | #define CRYP_RISR_INRIS ((uint32_t)0x00000002) |
| 3687 | /****************** Bits definition for CRYP_MISR register *******************/ |
| 3688 | #define CRYP_MISR_INMIS ((uint32_t)0x00000001) |
| 3689 | #define CRYP_MISR_OUTMIS ((uint32_t)0x00000002) |
| 3690 | |
| 3691 | /******************************************************************************/ |
| 3692 | /* */ |
| 3693 | /* Digital to Analog Converter */ |
| 3694 | /* */ |
| 3695 | /******************************************************************************/ |
| 3696 | /******************** Bit definition for DAC_CR register ********************/ |
| 3697 | #define DAC_CR_EN1 ((uint32_t)0x00000001) /*!<DAC channel1 enable */ |
| 3698 | #define DAC_CR_BOFF1 ((uint32_t)0x00000002) /*!<DAC channel1 output buffer disable */ |
| 3699 | #define DAC_CR_TEN1 ((uint32_t)0x00000004) /*!<DAC channel1 Trigger enable */ |
| 3700 | |
| 3701 | #define DAC_CR_TSEL1 ((uint32_t)0x00000038) /*!<TSEL1[2:0] (DAC channel1 Trigger selection) */ |
| 3702 | #define DAC_CR_TSEL1_0 ((uint32_t)0x00000008) /*!<Bit 0 */ |
| 3703 | #define DAC_CR_TSEL1_1 ((uint32_t)0x00000010) /*!<Bit 1 */ |
| 3704 | #define DAC_CR_TSEL1_2 ((uint32_t)0x00000020) /*!<Bit 2 */ |
| 3705 | |
| 3706 | #define DAC_CR_WAVE1 ((uint32_t)0x000000C0) /*!<WAVE1[1:0] (DAC channel1 noise/triangle wave generation enable) */ |
| 3707 | #define DAC_CR_WAVE1_0 ((uint32_t)0x00000040) /*!<Bit 0 */ |
| 3708 | #define DAC_CR_WAVE1_1 ((uint32_t)0x00000080) /*!<Bit 1 */ |
| 3709 | |
| 3710 | #define DAC_CR_MAMP1 ((uint32_t)0x00000F00) /*!<MAMP1[3:0] (DAC channel1 Mask/Amplitude selector) */ |
| 3711 | #define DAC_CR_MAMP1_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 3712 | #define DAC_CR_MAMP1_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 3713 | #define DAC_CR_MAMP1_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 3714 | #define DAC_CR_MAMP1_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 3715 | |
| 3716 | #define DAC_CR_DMAEN1 ((uint32_t)0x00001000) /*!<DAC channel1 DMA enable */ |
| 3717 | #define DAC_CR_EN2 ((uint32_t)0x00010000) /*!<DAC channel2 enable */ |
| 3718 | #define DAC_CR_BOFF2 ((uint32_t)0x00020000) /*!<DAC channel2 output buffer disable */ |
| 3719 | #define DAC_CR_TEN2 ((uint32_t)0x00040000) /*!<DAC channel2 Trigger enable */ |
| 3720 | |
| 3721 | #define DAC_CR_TSEL2 ((uint32_t)0x00380000) /*!<TSEL2[2:0] (DAC channel2 Trigger selection) */ |
| 3722 | #define DAC_CR_TSEL2_0 ((uint32_t)0x00080000) /*!<Bit 0 */ |
| 3723 | #define DAC_CR_TSEL2_1 ((uint32_t)0x00100000) /*!<Bit 1 */ |
| 3724 | #define DAC_CR_TSEL2_2 ((uint32_t)0x00200000) /*!<Bit 2 */ |
| 3725 | |
| 3726 | #define DAC_CR_WAVE2 ((uint32_t)0x00C00000) /*!<WAVE2[1:0] (DAC channel2 noise/triangle wave generation enable) */ |
| 3727 | #define DAC_CR_WAVE2_0 ((uint32_t)0x00400000) /*!<Bit 0 */ |
| 3728 | #define DAC_CR_WAVE2_1 ((uint32_t)0x00800000) /*!<Bit 1 */ |
| 3729 | |
| 3730 | #define DAC_CR_MAMP2 ((uint32_t)0x0F000000) /*!<MAMP2[3:0] (DAC channel2 Mask/Amplitude selector) */ |
| 3731 | #define DAC_CR_MAMP2_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 3732 | #define DAC_CR_MAMP2_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 3733 | #define DAC_CR_MAMP2_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 3734 | #define DAC_CR_MAMP2_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 3735 | |
| 3736 | #define DAC_CR_DMAEN2 ((uint32_t)0x10000000) /*!<DAC channel2 DMA enabled */ |
| 3737 | |
| 3738 | /***************** Bit definition for DAC_SWTRIGR register ******************/ |
| 3739 | #define DAC_SWTRIGR_SWTRIG1 ((uint8_t)0x01) /*!<DAC channel1 software trigger */ |
| 3740 | #define DAC_SWTRIGR_SWTRIG2 ((uint8_t)0x02) /*!<DAC channel2 software trigger */ |
| 3741 | |
| 3742 | /***************** Bit definition for DAC_DHR12R1 register ******************/ |
| 3743 | #define DAC_DHR12R1_DACC1DHR ((uint16_t)0x0FFF) /*!<DAC channel1 12-bit Right aligned data */ |
| 3744 | |
| 3745 | /***************** Bit definition for DAC_DHR12L1 register ******************/ |
| 3746 | #define DAC_DHR12L1_DACC1DHR ((uint16_t)0xFFF0) /*!<DAC channel1 12-bit Left aligned data */ |
| 3747 | |
| 3748 | /****************** Bit definition for DAC_DHR8R1 register ******************/ |
| 3749 | #define DAC_DHR8R1_DACC1DHR ((uint8_t)0xFF) /*!<DAC channel1 8-bit Right aligned data */ |
| 3750 | |
| 3751 | /***************** Bit definition for DAC_DHR12R2 register ******************/ |
| 3752 | #define DAC_DHR12R2_DACC2DHR ((uint16_t)0x0FFF) /*!<DAC channel2 12-bit Right aligned data */ |
| 3753 | |
| 3754 | /***************** Bit definition for DAC_DHR12L2 register ******************/ |
| 3755 | #define DAC_DHR12L2_DACC2DHR ((uint16_t)0xFFF0) /*!<DAC channel2 12-bit Left aligned data */ |
| 3756 | |
| 3757 | /****************** Bit definition for DAC_DHR8R2 register ******************/ |
| 3758 | #define DAC_DHR8R2_DACC2DHR ((uint8_t)0xFF) /*!<DAC channel2 8-bit Right aligned data */ |
| 3759 | |
| 3760 | /***************** Bit definition for DAC_DHR12RD register ******************/ |
| 3761 | #define DAC_DHR12RD_DACC1DHR ((uint32_t)0x00000FFF) /*!<DAC channel1 12-bit Right aligned data */ |
| 3762 | #define DAC_DHR12RD_DACC2DHR ((uint32_t)0x0FFF0000) /*!<DAC channel2 12-bit Right aligned data */ |
| 3763 | |
| 3764 | /***************** Bit definition for DAC_DHR12LD register ******************/ |
| 3765 | #define DAC_DHR12LD_DACC1DHR ((uint32_t)0x0000FFF0) /*!<DAC channel1 12-bit Left aligned data */ |
| 3766 | #define DAC_DHR12LD_DACC2DHR ((uint32_t)0xFFF00000) /*!<DAC channel2 12-bit Left aligned data */ |
| 3767 | |
| 3768 | /****************** Bit definition for DAC_DHR8RD register ******************/ |
| 3769 | #define DAC_DHR8RD_DACC1DHR ((uint16_t)0x00FF) /*!<DAC channel1 8-bit Right aligned data */ |
| 3770 | #define DAC_DHR8RD_DACC2DHR ((uint16_t)0xFF00) /*!<DAC channel2 8-bit Right aligned data */ |
| 3771 | |
| 3772 | /******************* Bit definition for DAC_DOR1 register *******************/ |
| 3773 | #define DAC_DOR1_DACC1DOR ((uint16_t)0x0FFF) /*!<DAC channel1 data output */ |
| 3774 | |
| 3775 | /******************* Bit definition for DAC_DOR2 register *******************/ |
| 3776 | #define DAC_DOR2_DACC2DOR ((uint16_t)0x0FFF) /*!<DAC channel2 data output */ |
| 3777 | |
| 3778 | /******************** Bit definition for DAC_SR register ********************/ |
| 3779 | #define DAC_SR_DMAUDR1 ((uint32_t)0x00002000) /*!<DAC channel1 DMA underrun flag */ |
| 3780 | #define DAC_SR_DMAUDR2 ((uint32_t)0x20000000) /*!<DAC channel2 DMA underrun flag */ |
| 3781 | |
| 3782 | /******************************************************************************/ |
| 3783 | /* */ |
| 3784 | /* Debug MCU */ |
| 3785 | /* */ |
| 3786 | /******************************************************************************/ |
| 3787 | |
| 3788 | /******************************************************************************/ |
| 3789 | /* */ |
| 3790 | /* DCMI */ |
| 3791 | /* */ |
| 3792 | /******************************************************************************/ |
| 3793 | /******************** Bits definition for DCMI_CR register ******************/ |
| 3794 | #define DCMI_CR_CAPTURE ((uint32_t)0x00000001) |
| 3795 | #define DCMI_CR_CM ((uint32_t)0x00000002) |
| 3796 | #define DCMI_CR_CROP ((uint32_t)0x00000004) |
| 3797 | #define DCMI_CR_JPEG ((uint32_t)0x00000008) |
| 3798 | #define DCMI_CR_ESS ((uint32_t)0x00000010) |
| 3799 | #define DCMI_CR_PCKPOL ((uint32_t)0x00000020) |
| 3800 | #define DCMI_CR_HSPOL ((uint32_t)0x00000040) |
| 3801 | #define DCMI_CR_VSPOL ((uint32_t)0x00000080) |
| 3802 | #define DCMI_CR_FCRC_0 ((uint32_t)0x00000100) |
| 3803 | #define DCMI_CR_FCRC_1 ((uint32_t)0x00000200) |
| 3804 | #define DCMI_CR_EDM_0 ((uint32_t)0x00000400) |
| 3805 | #define DCMI_CR_EDM_1 ((uint32_t)0x00000800) |
| 3806 | #define DCMI_CR_CRE ((uint32_t)0x00001000) |
| 3807 | #define DCMI_CR_ENABLE ((uint32_t)0x00004000) |
| 3808 | |
| 3809 | /******************** Bits definition for DCMI_SR register ******************/ |
| 3810 | #define DCMI_SR_HSYNC ((uint32_t)0x00000001) |
| 3811 | #define DCMI_SR_VSYNC ((uint32_t)0x00000002) |
| 3812 | #define DCMI_SR_FNE ((uint32_t)0x00000004) |
| 3813 | |
| 3814 | /******************** Bits definition for DCMI_RISR register ****************/ |
| 3815 | #define DCMI_RISR_FRAME_RIS ((uint32_t)0x00000001) |
| 3816 | #define DCMI_RISR_OVF_RIS ((uint32_t)0x00000002) |
| 3817 | #define DCMI_RISR_ERR_RIS ((uint32_t)0x00000004) |
| 3818 | #define DCMI_RISR_VSYNC_RIS ((uint32_t)0x00000008) |
| 3819 | #define DCMI_RISR_LINE_RIS ((uint32_t)0x00000010) |
| 3820 | |
| 3821 | /******************** Bits definition for DCMI_IER register *****************/ |
| 3822 | #define DCMI_IER_FRAME_IE ((uint32_t)0x00000001) |
| 3823 | #define DCMI_IER_OVF_IE ((uint32_t)0x00000002) |
| 3824 | #define DCMI_IER_ERR_IE ((uint32_t)0x00000004) |
| 3825 | #define DCMI_IER_VSYNC_IE ((uint32_t)0x00000008) |
| 3826 | #define DCMI_IER_LINE_IE ((uint32_t)0x00000010) |
| 3827 | |
| 3828 | /******************** Bits definition for DCMI_MISR register ****************/ |
| 3829 | #define DCMI_MISR_FRAME_MIS ((uint32_t)0x00000001) |
| 3830 | #define DCMI_MISR_OVF_MIS ((uint32_t)0x00000002) |
| 3831 | #define DCMI_MISR_ERR_MIS ((uint32_t)0x00000004) |
| 3832 | #define DCMI_MISR_VSYNC_MIS ((uint32_t)0x00000008) |
| 3833 | #define DCMI_MISR_LINE_MIS ((uint32_t)0x00000010) |
| 3834 | |
| 3835 | /******************** Bits definition for DCMI_ICR register *****************/ |
| 3836 | #define DCMI_ICR_FRAME_ISC ((uint32_t)0x00000001) |
| 3837 | #define DCMI_ICR_OVF_ISC ((uint32_t)0x00000002) |
| 3838 | #define DCMI_ICR_ERR_ISC ((uint32_t)0x00000004) |
| 3839 | #define DCMI_ICR_VSYNC_ISC ((uint32_t)0x00000008) |
| 3840 | #define DCMI_ICR_LINE_ISC ((uint32_t)0x00000010) |
| 3841 | |
| 3842 | /******************************************************************************/ |
| 3843 | /* */ |
| 3844 | /* DMA Controller */ |
| 3845 | /* */ |
| 3846 | /******************************************************************************/ |
| 3847 | /******************** Bits definition for DMA_SxCR register *****************/ |
| 3848 | #define DMA_SxCR_CHSEL ((uint32_t)0x0E000000) |
| 3849 | #define DMA_SxCR_CHSEL_0 ((uint32_t)0x02000000) |
| 3850 | #define DMA_SxCR_CHSEL_1 ((uint32_t)0x04000000) |
| 3851 | #define DMA_SxCR_CHSEL_2 ((uint32_t)0x08000000) |
| 3852 | #define DMA_SxCR_MBURST ((uint32_t)0x01800000) |
| 3853 | #define DMA_SxCR_MBURST_0 ((uint32_t)0x00800000) |
| 3854 | #define DMA_SxCR_MBURST_1 ((uint32_t)0x01000000) |
| 3855 | #define DMA_SxCR_PBURST ((uint32_t)0x00600000) |
| 3856 | #define DMA_SxCR_PBURST_0 ((uint32_t)0x00200000) |
| 3857 | #define DMA_SxCR_PBURST_1 ((uint32_t)0x00400000) |
| 3858 | #define DMA_SxCR_ACK ((uint32_t)0x00100000) |
| 3859 | #define DMA_SxCR_CT ((uint32_t)0x00080000) |
| 3860 | #define DMA_SxCR_DBM ((uint32_t)0x00040000) |
| 3861 | #define DMA_SxCR_PL ((uint32_t)0x00030000) |
| 3862 | #define DMA_SxCR_PL_0 ((uint32_t)0x00010000) |
| 3863 | #define DMA_SxCR_PL_1 ((uint32_t)0x00020000) |
| 3864 | #define DMA_SxCR_PINCOS ((uint32_t)0x00008000) |
| 3865 | #define DMA_SxCR_MSIZE ((uint32_t)0x00006000) |
| 3866 | #define DMA_SxCR_MSIZE_0 ((uint32_t)0x00002000) |
| 3867 | #define DMA_SxCR_MSIZE_1 ((uint32_t)0x00004000) |
| 3868 | #define DMA_SxCR_PSIZE ((uint32_t)0x00001800) |
| 3869 | #define DMA_SxCR_PSIZE_0 ((uint32_t)0x00000800) |
| 3870 | #define DMA_SxCR_PSIZE_1 ((uint32_t)0x00001000) |
| 3871 | #define DMA_SxCR_MINC ((uint32_t)0x00000400) |
| 3872 | #define DMA_SxCR_PINC ((uint32_t)0x00000200) |
| 3873 | #define DMA_SxCR_CIRC ((uint32_t)0x00000100) |
| 3874 | #define DMA_SxCR_DIR ((uint32_t)0x000000C0) |
| 3875 | #define DMA_SxCR_DIR_0 ((uint32_t)0x00000040) |
| 3876 | #define DMA_SxCR_DIR_1 ((uint32_t)0x00000080) |
| 3877 | #define DMA_SxCR_PFCTRL ((uint32_t)0x00000020) |
| 3878 | #define DMA_SxCR_TCIE ((uint32_t)0x00000010) |
| 3879 | #define DMA_SxCR_HTIE ((uint32_t)0x00000008) |
| 3880 | #define DMA_SxCR_TEIE ((uint32_t)0x00000004) |
| 3881 | #define DMA_SxCR_DMEIE ((uint32_t)0x00000002) |
| 3882 | #define DMA_SxCR_EN ((uint32_t)0x00000001) |
| 3883 | |
| 3884 | /******************** Bits definition for DMA_SxCNDTR register **************/ |
| 3885 | #define DMA_SxNDT ((uint32_t)0x0000FFFF) |
| 3886 | #define DMA_SxNDT_0 ((uint32_t)0x00000001) |
| 3887 | #define DMA_SxNDT_1 ((uint32_t)0x00000002) |
| 3888 | #define DMA_SxNDT_2 ((uint32_t)0x00000004) |
| 3889 | #define DMA_SxNDT_3 ((uint32_t)0x00000008) |
| 3890 | #define DMA_SxNDT_4 ((uint32_t)0x00000010) |
| 3891 | #define DMA_SxNDT_5 ((uint32_t)0x00000020) |
| 3892 | #define DMA_SxNDT_6 ((uint32_t)0x00000040) |
| 3893 | #define DMA_SxNDT_7 ((uint32_t)0x00000080) |
| 3894 | #define DMA_SxNDT_8 ((uint32_t)0x00000100) |
| 3895 | #define DMA_SxNDT_9 ((uint32_t)0x00000200) |
| 3896 | #define DMA_SxNDT_10 ((uint32_t)0x00000400) |
| 3897 | #define DMA_SxNDT_11 ((uint32_t)0x00000800) |
| 3898 | #define DMA_SxNDT_12 ((uint32_t)0x00001000) |
| 3899 | #define DMA_SxNDT_13 ((uint32_t)0x00002000) |
| 3900 | #define DMA_SxNDT_14 ((uint32_t)0x00004000) |
| 3901 | #define DMA_SxNDT_15 ((uint32_t)0x00008000) |
| 3902 | |
| 3903 | /******************** Bits definition for DMA_SxFCR register ****************/ |
| 3904 | #define DMA_SxFCR_FEIE ((uint32_t)0x00000080) |
| 3905 | #define DMA_SxFCR_FS ((uint32_t)0x00000038) |
| 3906 | #define DMA_SxFCR_FS_0 ((uint32_t)0x00000008) |
| 3907 | #define DMA_SxFCR_FS_1 ((uint32_t)0x00000010) |
| 3908 | #define DMA_SxFCR_FS_2 ((uint32_t)0x00000020) |
| 3909 | #define DMA_SxFCR_DMDIS ((uint32_t)0x00000004) |
| 3910 | #define DMA_SxFCR_FTH ((uint32_t)0x00000003) |
| 3911 | #define DMA_SxFCR_FTH_0 ((uint32_t)0x00000001) |
| 3912 | #define DMA_SxFCR_FTH_1 ((uint32_t)0x00000002) |
| 3913 | |
| 3914 | /******************** Bits definition for DMA_LISR register *****************/ |
| 3915 | #define DMA_LISR_TCIF3 ((uint32_t)0x08000000) |
| 3916 | #define DMA_LISR_HTIF3 ((uint32_t)0x04000000) |
| 3917 | #define DMA_LISR_TEIF3 ((uint32_t)0x02000000) |
| 3918 | #define DMA_LISR_DMEIF3 ((uint32_t)0x01000000) |
| 3919 | #define DMA_LISR_FEIF3 ((uint32_t)0x00400000) |
| 3920 | #define DMA_LISR_TCIF2 ((uint32_t)0x00200000) |
| 3921 | #define DMA_LISR_HTIF2 ((uint32_t)0x00100000) |
| 3922 | #define DMA_LISR_TEIF2 ((uint32_t)0x00080000) |
| 3923 | #define DMA_LISR_DMEIF2 ((uint32_t)0x00040000) |
| 3924 | #define DMA_LISR_FEIF2 ((uint32_t)0x00010000) |
| 3925 | #define DMA_LISR_TCIF1 ((uint32_t)0x00000800) |
| 3926 | #define DMA_LISR_HTIF1 ((uint32_t)0x00000400) |
| 3927 | #define DMA_LISR_TEIF1 ((uint32_t)0x00000200) |
| 3928 | #define DMA_LISR_DMEIF1 ((uint32_t)0x00000100) |
| 3929 | #define DMA_LISR_FEIF1 ((uint32_t)0x00000040) |
| 3930 | #define DMA_LISR_TCIF0 ((uint32_t)0x00000020) |
| 3931 | #define DMA_LISR_HTIF0 ((uint32_t)0x00000010) |
| 3932 | #define DMA_LISR_TEIF0 ((uint32_t)0x00000008) |
| 3933 | #define DMA_LISR_DMEIF0 ((uint32_t)0x00000004) |
| 3934 | #define DMA_LISR_FEIF0 ((uint32_t)0x00000001) |
| 3935 | |
| 3936 | /******************** Bits definition for DMA_HISR register *****************/ |
| 3937 | #define DMA_HISR_TCIF7 ((uint32_t)0x08000000) |
| 3938 | #define DMA_HISR_HTIF7 ((uint32_t)0x04000000) |
| 3939 | #define DMA_HISR_TEIF7 ((uint32_t)0x02000000) |
| 3940 | #define DMA_HISR_DMEIF7 ((uint32_t)0x01000000) |
| 3941 | #define DMA_HISR_FEIF7 ((uint32_t)0x00400000) |
| 3942 | #define DMA_HISR_TCIF6 ((uint32_t)0x00200000) |
| 3943 | #define DMA_HISR_HTIF6 ((uint32_t)0x00100000) |
| 3944 | #define DMA_HISR_TEIF6 ((uint32_t)0x00080000) |
| 3945 | #define DMA_HISR_DMEIF6 ((uint32_t)0x00040000) |
| 3946 | #define DMA_HISR_FEIF6 ((uint32_t)0x00010000) |
| 3947 | #define DMA_HISR_TCIF5 ((uint32_t)0x00000800) |
| 3948 | #define DMA_HISR_HTIF5 ((uint32_t)0x00000400) |
| 3949 | #define DMA_HISR_TEIF5 ((uint32_t)0x00000200) |
| 3950 | #define DMA_HISR_DMEIF5 ((uint32_t)0x00000100) |
| 3951 | #define DMA_HISR_FEIF5 ((uint32_t)0x00000040) |
| 3952 | #define DMA_HISR_TCIF4 ((uint32_t)0x00000020) |
| 3953 | #define DMA_HISR_HTIF4 ((uint32_t)0x00000010) |
| 3954 | #define DMA_HISR_TEIF4 ((uint32_t)0x00000008) |
| 3955 | #define DMA_HISR_DMEIF4 ((uint32_t)0x00000004) |
| 3956 | #define DMA_HISR_FEIF4 ((uint32_t)0x00000001) |
| 3957 | |
| 3958 | /******************** Bits definition for DMA_LIFCR register ****************/ |
| 3959 | #define DMA_LIFCR_CTCIF3 ((uint32_t)0x08000000) |
| 3960 | #define DMA_LIFCR_CHTIF3 ((uint32_t)0x04000000) |
| 3961 | #define DMA_LIFCR_CTEIF3 ((uint32_t)0x02000000) |
| 3962 | #define DMA_LIFCR_CDMEIF3 ((uint32_t)0x01000000) |
| 3963 | #define DMA_LIFCR_CFEIF3 ((uint32_t)0x00400000) |
| 3964 | #define DMA_LIFCR_CTCIF2 ((uint32_t)0x00200000) |
| 3965 | #define DMA_LIFCR_CHTIF2 ((uint32_t)0x00100000) |
| 3966 | #define DMA_LIFCR_CTEIF2 ((uint32_t)0x00080000) |
| 3967 | #define DMA_LIFCR_CDMEIF2 ((uint32_t)0x00040000) |
| 3968 | #define DMA_LIFCR_CFEIF2 ((uint32_t)0x00010000) |
| 3969 | #define DMA_LIFCR_CTCIF1 ((uint32_t)0x00000800) |
| 3970 | #define DMA_LIFCR_CHTIF1 ((uint32_t)0x00000400) |
| 3971 | #define DMA_LIFCR_CTEIF1 ((uint32_t)0x00000200) |
| 3972 | #define DMA_LIFCR_CDMEIF1 ((uint32_t)0x00000100) |
| 3973 | #define DMA_LIFCR_CFEIF1 ((uint32_t)0x00000040) |
| 3974 | #define DMA_LIFCR_CTCIF0 ((uint32_t)0x00000020) |
| 3975 | #define DMA_LIFCR_CHTIF0 ((uint32_t)0x00000010) |
| 3976 | #define DMA_LIFCR_CTEIF0 ((uint32_t)0x00000008) |
| 3977 | #define DMA_LIFCR_CDMEIF0 ((uint32_t)0x00000004) |
| 3978 | #define DMA_LIFCR_CFEIF0 ((uint32_t)0x00000001) |
| 3979 | |
| 3980 | /******************** Bits definition for DMA_HIFCR register ****************/ |
| 3981 | #define DMA_HIFCR_CTCIF7 ((uint32_t)0x08000000) |
| 3982 | #define DMA_HIFCR_CHTIF7 ((uint32_t)0x04000000) |
| 3983 | #define DMA_HIFCR_CTEIF7 ((uint32_t)0x02000000) |
| 3984 | #define DMA_HIFCR_CDMEIF7 ((uint32_t)0x01000000) |
| 3985 | #define DMA_HIFCR_CFEIF7 ((uint32_t)0x00400000) |
| 3986 | #define DMA_HIFCR_CTCIF6 ((uint32_t)0x00200000) |
| 3987 | #define DMA_HIFCR_CHTIF6 ((uint32_t)0x00100000) |
| 3988 | #define DMA_HIFCR_CTEIF6 ((uint32_t)0x00080000) |
| 3989 | #define DMA_HIFCR_CDMEIF6 ((uint32_t)0x00040000) |
| 3990 | #define DMA_HIFCR_CFEIF6 ((uint32_t)0x00010000) |
| 3991 | #define DMA_HIFCR_CTCIF5 ((uint32_t)0x00000800) |
| 3992 | #define DMA_HIFCR_CHTIF5 ((uint32_t)0x00000400) |
| 3993 | #define DMA_HIFCR_CTEIF5 ((uint32_t)0x00000200) |
| 3994 | #define DMA_HIFCR_CDMEIF5 ((uint32_t)0x00000100) |
| 3995 | #define DMA_HIFCR_CFEIF5 ((uint32_t)0x00000040) |
| 3996 | #define DMA_HIFCR_CTCIF4 ((uint32_t)0x00000020) |
| 3997 | #define DMA_HIFCR_CHTIF4 ((uint32_t)0x00000010) |
| 3998 | #define DMA_HIFCR_CTEIF4 ((uint32_t)0x00000008) |
| 3999 | #define DMA_HIFCR_CDMEIF4 ((uint32_t)0x00000004) |
| 4000 | #define DMA_HIFCR_CFEIF4 ((uint32_t)0x00000001) |
| 4001 | |
| 4002 | /******************************************************************************/ |
| 4003 | /* */ |
| 4004 | /* AHB Master DMA2D Controller (DMA2D) */ |
| 4005 | /* */ |
| 4006 | /******************************************************************************/ |
| 4007 | |
| 4008 | /******************** Bit definition for DMA2D_CR register ******************/ |
| 4009 | |
| 4010 | #define DMA2D_CR_START ((uint32_t)0x00000001) /*!< Start transfer */ |
| 4011 | #define DMA2D_CR_SUSP ((uint32_t)0x00000002) /*!< Suspend transfer */ |
| 4012 | #define DMA2D_CR_ABORT ((uint32_t)0x00000004) /*!< Abort transfer */ |
| 4013 | #define DMA2D_CR_TEIE ((uint32_t)0x00000100) /*!< Transfer Error Interrupt Enable */ |
| 4014 | #define DMA2D_CR_TCIE ((uint32_t)0x00000200) /*!< Transfer Complete Interrupt Enable */ |
| 4015 | #define DMA2D_CR_TWIE ((uint32_t)0x00000400) /*!< Transfer Watermark Interrupt Enable */ |
| 4016 | #define DMA2D_CR_CAEIE ((uint32_t)0x00000800) /*!< CLUT Access Error Interrupt Enable */ |
| 4017 | #define DMA2D_CR_CTCIE ((uint32_t)0x00001000) /*!< CLUT Transfer Complete Interrupt Enable */ |
| 4018 | #define DMA2D_CR_CEIE ((uint32_t)0x00002000) /*!< Configuration Error Interrupt Enable */ |
| 4019 | #define DMA2D_CR_MODE ((uint32_t)0x00030000) /*!< DMA2D Mode */ |
| 4020 | |
| 4021 | /******************** Bit definition for DMA2D_ISR register *****************/ |
| 4022 | |
| 4023 | #define DMA2D_ISR_TEIF ((uint32_t)0x00000001) /*!< Transfer Error Interrupt Flag */ |
| 4024 | #define DMA2D_ISR_TCIF ((uint32_t)0x00000002) /*!< Transfer Complete Interrupt Flag */ |
| 4025 | #define DMA2D_ISR_TWIF ((uint32_t)0x00000004) /*!< Transfer Watermark Interrupt Flag */ |
| 4026 | #define DMA2D_ISR_CAEIF ((uint32_t)0x00000008) /*!< CLUT Access Error Interrupt Flag */ |
| 4027 | #define DMA2D_ISR_CTCIF ((uint32_t)0x00000010) /*!< CLUT Transfer Complete Interrupt Flag */ |
| 4028 | #define DMA2D_ISR_CEIF ((uint32_t)0x00000020) /*!< Configuration Error Interrupt Flag */ |
| 4029 | |
| 4030 | /******************** Bit definition for DMA2D_IFSR register ****************/ |
| 4031 | |
| 4032 | #define DMA2D_IFSR_CTEIF ((uint32_t)0x00000001) /*!< Clears Transfer Error Interrupt Flag */ |
| 4033 | #define DMA2D_IFSR_CTCIF ((uint32_t)0x00000002) /*!< Clears Transfer Complete Interrupt Flag */ |
| 4034 | #define DMA2D_IFSR_CTWIF ((uint32_t)0x00000004) /*!< Clears Transfer Watermark Interrupt Flag */ |
| 4035 | #define DMA2D_IFSR_CCAEIF ((uint32_t)0x00000008) /*!< Clears CLUT Access Error Interrupt Flag */ |
| 4036 | #define DMA2D_IFSR_CCTCIF ((uint32_t)0x00000010) /*!< Clears CLUT Transfer Complete Interrupt Flag */ |
| 4037 | #define DMA2D_IFSR_CCEIF ((uint32_t)0x00000020) /*!< Clears Configuration Error Interrupt Flag */ |
| 4038 | |
| 4039 | /******************** Bit definition for DMA2D_FGMAR register ***************/ |
| 4040 | |
| 4041 | #define DMA2D_FGMAR_MA ((uint32_t)0xFFFFFFFF) /*!< Memory Address */ |
| 4042 | |
| 4043 | /******************** Bit definition for DMA2D_FGOR register ****************/ |
| 4044 | |
| 4045 | #define DMA2D_FGOR_LO ((uint32_t)0x00003FFF) /*!< Line Offset */ |
| 4046 | |
| 4047 | /******************** Bit definition for DMA2D_BGMAR register ***************/ |
| 4048 | |
| 4049 | #define DMA2D_BGMAR_MA ((uint32_t)0xFFFFFFFF) /*!< Memory Address */ |
| 4050 | |
| 4051 | /******************** Bit definition for DMA2D_BGOR register ****************/ |
| 4052 | |
| 4053 | #define DMA2D_BGOR_LO ((uint32_t)0x00003FFF) /*!< Line Offset */ |
| 4054 | |
| 4055 | /******************** Bit definition for DMA2D_FGPFCCR register *************/ |
| 4056 | |
| 4057 | #define DMA2D_FGPFCCR_CM ((uint32_t)0x0000000F) /*!< Color mode */ |
| 4058 | #define DMA2D_FGPFCCR_CCM ((uint32_t)0x00000010) /*!< CLUT Color mode */ |
| 4059 | #define DMA2D_FGPFCCR_START ((uint32_t)0x00000020) /*!< Start */ |
| 4060 | #define DMA2D_FGPFCCR_CS ((uint32_t)0x0000FF00) /*!< CLUT size */ |
| 4061 | #define DMA2D_FGPFCCR_AM ((uint32_t)0x00030000) /*!< Alpha mode */ |
| 4062 | #define DMA2D_FGPFCCR_ALPHA ((uint32_t)0xFF000000) /*!< Alpha value */ |
| 4063 | |
| 4064 | /******************** Bit definition for DMA2D_FGCOLR register **************/ |
| 4065 | |
| 4066 | #define DMA2D_FGCOLR_BLUE ((uint32_t)0x000000FF) /*!< Blue Value */ |
| 4067 | #define DMA2D_FGCOLR_GREEN ((uint32_t)0x0000FF00) /*!< Green Value */ |
| 4068 | #define DMA2D_FGCOLR_RED ((uint32_t)0x00FF0000) /*!< Red Value */ |
| 4069 | |
| 4070 | /******************** Bit definition for DMA2D_BGPFCCR register *************/ |
| 4071 | |
| 4072 | #define DMA2D_BGPFCCR_CM ((uint32_t)0x0000000F) /*!< Color mode */ |
| 4073 | #define DMA2D_BGPFCCR_CCM ((uint32_t)0x00000010) /*!< CLUT Color mode */ |
| 4074 | #define DMA2D_BGPFCCR_START ((uint32_t)0x00000020) /*!< Start */ |
| 4075 | #define DMA2D_BGPFCCR_CS ((uint32_t)0x0000FF00) /*!< CLUT size */ |
| 4076 | #define DMA2D_BGPFCCR_AM ((uint32_t)0x00030000) /*!< Alpha Mode */ |
| 4077 | #define DMA2D_BGPFCCR_ALPHA ((uint32_t)0xFF000000) /*!< Alpha value */ |
| 4078 | |
| 4079 | /******************** Bit definition for DMA2D_BGCOLR register **************/ |
| 4080 | |
| 4081 | #define DMA2D_BGCOLR_BLUE ((uint32_t)0x000000FF) /*!< Blue Value */ |
| 4082 | #define DMA2D_BGCOLR_GREEN ((uint32_t)0x0000FF00) /*!< Green Value */ |
| 4083 | #define DMA2D_BGCOLR_RED ((uint32_t)0x00FF0000) /*!< Red Value */ |
| 4084 | |
| 4085 | /******************** Bit definition for DMA2D_FGCMAR register **************/ |
| 4086 | |
| 4087 | #define DMA2D_FGCMAR_MA ((uint32_t)0xFFFFFFFF) /*!< Memory Address */ |
| 4088 | |
| 4089 | /******************** Bit definition for DMA2D_BGCMAR register **************/ |
| 4090 | |
| 4091 | #define DMA2D_BGCMAR_MA ((uint32_t)0xFFFFFFFF) /*!< Memory Address */ |
| 4092 | |
| 4093 | /******************** Bit definition for DMA2D_OPFCCR register **************/ |
| 4094 | |
| 4095 | #define DMA2D_OPFCCR_CM ((uint32_t)0x00000007) /*!< Color mode */ |
| 4096 | |
| 4097 | /******************** Bit definition for DMA2D_OCOLR register ***************/ |
| 4098 | |
| 4099 | /*!<Mode_ARGB8888/RGB888 */ |
| 4100 | |
| 4101 | #define DMA2D_OCOLR_BLUE_1 ((uint32_t)0x000000FF) /*!< BLUE Value */ |
| 4102 | #define DMA2D_OCOLR_GREEN_1 ((uint32_t)0x0000FF00) /*!< GREEN Value */ |
| 4103 | #define DMA2D_OCOLR_RED_1 ((uint32_t)0x00FF0000) /*!< Red Value */ |
| 4104 | #define DMA2D_OCOLR_ALPHA_1 ((uint32_t)0xFF000000) /*!< Alpha Channel Value */ |
| 4105 | |
| 4106 | /*!<Mode_RGB565 */ |
| 4107 | #define DMA2D_OCOLR_BLUE_2 ((uint32_t)0x0000001F) /*!< BLUE Value */ |
| 4108 | #define DMA2D_OCOLR_GREEN_2 ((uint32_t)0x000007E0) /*!< GREEN Value */ |
| 4109 | #define DMA2D_OCOLR_RED_2 ((uint32_t)0x0000F800) /*!< Red Value */ |
| 4110 | |
| 4111 | /*!<Mode_ARGB1555 */ |
| 4112 | #define DMA2D_OCOLR_BLUE_3 ((uint32_t)0x0000001F) /*!< BLUE Value */ |
| 4113 | #define DMA2D_OCOLR_GREEN_3 ((uint32_t)0x000003E0) /*!< GREEN Value */ |
| 4114 | #define DMA2D_OCOLR_RED_3 ((uint32_t)0x00007C00) /*!< Red Value */ |
| 4115 | #define DMA2D_OCOLR_ALPHA_3 ((uint32_t)0x00008000) /*!< Alpha Channel Value */ |
| 4116 | |
| 4117 | /*!<Mode_ARGB4444 */ |
| 4118 | #define DMA2D_OCOLR_BLUE_4 ((uint32_t)0x0000000F) /*!< BLUE Value */ |
| 4119 | #define DMA2D_OCOLR_GREEN_4 ((uint32_t)0x000000F0) /*!< GREEN Value */ |
| 4120 | #define DMA2D_OCOLR_RED_4 ((uint32_t)0x00000F00) /*!< Red Value */ |
| 4121 | #define DMA2D_OCOLR_ALPHA_4 ((uint32_t)0x0000F000) /*!< Alpha Channel Value */ |
| 4122 | |
| 4123 | /******************** Bit definition for DMA2D_OMAR register ****************/ |
| 4124 | |
| 4125 | #define DMA2D_OMAR_MA ((uint32_t)0xFFFFFFFF) /*!< Memory Address */ |
| 4126 | |
| 4127 | /******************** Bit definition for DMA2D_OOR register *****************/ |
| 4128 | |
| 4129 | #define DMA2D_OOR_LO ((uint32_t)0x00003FFF) /*!< Line Offset */ |
| 4130 | |
| 4131 | /******************** Bit definition for DMA2D_NLR register *****************/ |
| 4132 | |
| 4133 | #define DMA2D_NLR_NL ((uint32_t)0x0000FFFF) /*!< Number of Lines */ |
| 4134 | #define DMA2D_NLR_PL ((uint32_t)0x3FFF0000) /*!< Pixel per Lines */ |
| 4135 | |
| 4136 | /******************** Bit definition for DMA2D_LWR register *****************/ |
| 4137 | |
| 4138 | #define DMA2D_LWR_LW ((uint32_t)0x0000FFFF) /*!< Line Watermark */ |
| 4139 | |
| 4140 | /******************** Bit definition for DMA2D_AMTCR register ***************/ |
| 4141 | |
| 4142 | #define DMA2D_AMTCR_EN ((uint32_t)0x00000001) /*!< Enable */ |
| 4143 | #define DMA2D_AMTCR_DT ((uint32_t)0x0000FF00) /*!< Dead Time */ |
| 4144 | |
| 4145 | |
| 4146 | |
| 4147 | /******************** Bit definition for DMA2D_FGCLUT register **************/ |
| 4148 | |
| 4149 | /******************** Bit definition for DMA2D_BGCLUT register **************/ |
| 4150 | |
| 4151 | |
| 4152 | /******************************************************************************/ |
| 4153 | /* */ |
| 4154 | /* External Interrupt/Event Controller */ |
| 4155 | /* */ |
| 4156 | /******************************************************************************/ |
| 4157 | /******************* Bit definition for EXTI_IMR register *******************/ |
| 4158 | #define EXTI_IMR_MR0 ((uint32_t)0x00000001) /*!< Interrupt Mask on line 0 */ |
| 4159 | #define EXTI_IMR_MR1 ((uint32_t)0x00000002) /*!< Interrupt Mask on line 1 */ |
| 4160 | #define EXTI_IMR_MR2 ((uint32_t)0x00000004) /*!< Interrupt Mask on line 2 */ |
| 4161 | #define EXTI_IMR_MR3 ((uint32_t)0x00000008) /*!< Interrupt Mask on line 3 */ |
| 4162 | #define EXTI_IMR_MR4 ((uint32_t)0x00000010) /*!< Interrupt Mask on line 4 */ |
| 4163 | #define EXTI_IMR_MR5 ((uint32_t)0x00000020) /*!< Interrupt Mask on line 5 */ |
| 4164 | #define EXTI_IMR_MR6 ((uint32_t)0x00000040) /*!< Interrupt Mask on line 6 */ |
| 4165 | #define EXTI_IMR_MR7 ((uint32_t)0x00000080) /*!< Interrupt Mask on line 7 */ |
| 4166 | #define EXTI_IMR_MR8 ((uint32_t)0x00000100) /*!< Interrupt Mask on line 8 */ |
| 4167 | #define EXTI_IMR_MR9 ((uint32_t)0x00000200) /*!< Interrupt Mask on line 9 */ |
| 4168 | #define EXTI_IMR_MR10 ((uint32_t)0x00000400) /*!< Interrupt Mask on line 10 */ |
| 4169 | #define EXTI_IMR_MR11 ((uint32_t)0x00000800) /*!< Interrupt Mask on line 11 */ |
| 4170 | #define EXTI_IMR_MR12 ((uint32_t)0x00001000) /*!< Interrupt Mask on line 12 */ |
| 4171 | #define EXTI_IMR_MR13 ((uint32_t)0x00002000) /*!< Interrupt Mask on line 13 */ |
| 4172 | #define EXTI_IMR_MR14 ((uint32_t)0x00004000) /*!< Interrupt Mask on line 14 */ |
| 4173 | #define EXTI_IMR_MR15 ((uint32_t)0x00008000) /*!< Interrupt Mask on line 15 */ |
| 4174 | #define EXTI_IMR_MR16 ((uint32_t)0x00010000) /*!< Interrupt Mask on line 16 */ |
| 4175 | #define EXTI_IMR_MR17 ((uint32_t)0x00020000) /*!< Interrupt Mask on line 17 */ |
| 4176 | #define EXTI_IMR_MR18 ((uint32_t)0x00040000) /*!< Interrupt Mask on line 18 */ |
| 4177 | #define EXTI_IMR_MR19 ((uint32_t)0x00080000) /*!< Interrupt Mask on line 19 */ |
| 4178 | |
| 4179 | /******************* Bit definition for EXTI_EMR register *******************/ |
| 4180 | #define EXTI_EMR_MR0 ((uint32_t)0x00000001) /*!< Event Mask on line 0 */ |
| 4181 | #define EXTI_EMR_MR1 ((uint32_t)0x00000002) /*!< Event Mask on line 1 */ |
| 4182 | #define EXTI_EMR_MR2 ((uint32_t)0x00000004) /*!< Event Mask on line 2 */ |
| 4183 | #define EXTI_EMR_MR3 ((uint32_t)0x00000008) /*!< Event Mask on line 3 */ |
| 4184 | #define EXTI_EMR_MR4 ((uint32_t)0x00000010) /*!< Event Mask on line 4 */ |
| 4185 | #define EXTI_EMR_MR5 ((uint32_t)0x00000020) /*!< Event Mask on line 5 */ |
| 4186 | #define EXTI_EMR_MR6 ((uint32_t)0x00000040) /*!< Event Mask on line 6 */ |
| 4187 | #define EXTI_EMR_MR7 ((uint32_t)0x00000080) /*!< Event Mask on line 7 */ |
| 4188 | #define EXTI_EMR_MR8 ((uint32_t)0x00000100) /*!< Event Mask on line 8 */ |
| 4189 | #define EXTI_EMR_MR9 ((uint32_t)0x00000200) /*!< Event Mask on line 9 */ |
| 4190 | #define EXTI_EMR_MR10 ((uint32_t)0x00000400) /*!< Event Mask on line 10 */ |
| 4191 | #define EXTI_EMR_MR11 ((uint32_t)0x00000800) /*!< Event Mask on line 11 */ |
| 4192 | #define EXTI_EMR_MR12 ((uint32_t)0x00001000) /*!< Event Mask on line 12 */ |
| 4193 | #define EXTI_EMR_MR13 ((uint32_t)0x00002000) /*!< Event Mask on line 13 */ |
| 4194 | #define EXTI_EMR_MR14 ((uint32_t)0x00004000) /*!< Event Mask on line 14 */ |
| 4195 | #define EXTI_EMR_MR15 ((uint32_t)0x00008000) /*!< Event Mask on line 15 */ |
| 4196 | #define EXTI_EMR_MR16 ((uint32_t)0x00010000) /*!< Event Mask on line 16 */ |
| 4197 | #define EXTI_EMR_MR17 ((uint32_t)0x00020000) /*!< Event Mask on line 17 */ |
| 4198 | #define EXTI_EMR_MR18 ((uint32_t)0x00040000) /*!< Event Mask on line 18 */ |
| 4199 | #define EXTI_EMR_MR19 ((uint32_t)0x00080000) /*!< Event Mask on line 19 */ |
| 4200 | |
| 4201 | /****************** Bit definition for EXTI_RTSR register *******************/ |
| 4202 | #define EXTI_RTSR_TR0 ((uint32_t)0x00000001) /*!< Rising trigger event configuration bit of line 0 */ |
| 4203 | #define EXTI_RTSR_TR1 ((uint32_t)0x00000002) /*!< Rising trigger event configuration bit of line 1 */ |
| 4204 | #define EXTI_RTSR_TR2 ((uint32_t)0x00000004) /*!< Rising trigger event configuration bit of line 2 */ |
| 4205 | #define EXTI_RTSR_TR3 ((uint32_t)0x00000008) /*!< Rising trigger event configuration bit of line 3 */ |
| 4206 | #define EXTI_RTSR_TR4 ((uint32_t)0x00000010) /*!< Rising trigger event configuration bit of line 4 */ |
| 4207 | #define EXTI_RTSR_TR5 ((uint32_t)0x00000020) /*!< Rising trigger event configuration bit of line 5 */ |
| 4208 | #define EXTI_RTSR_TR6 ((uint32_t)0x00000040) /*!< Rising trigger event configuration bit of line 6 */ |
| 4209 | #define EXTI_RTSR_TR7 ((uint32_t)0x00000080) /*!< Rising trigger event configuration bit of line 7 */ |
| 4210 | #define EXTI_RTSR_TR8 ((uint32_t)0x00000100) /*!< Rising trigger event configuration bit of line 8 */ |
| 4211 | #define EXTI_RTSR_TR9 ((uint32_t)0x00000200) /*!< Rising trigger event configuration bit of line 9 */ |
| 4212 | #define EXTI_RTSR_TR10 ((uint32_t)0x00000400) /*!< Rising trigger event configuration bit of line 10 */ |
| 4213 | #define EXTI_RTSR_TR11 ((uint32_t)0x00000800) /*!< Rising trigger event configuration bit of line 11 */ |
| 4214 | #define EXTI_RTSR_TR12 ((uint32_t)0x00001000) /*!< Rising trigger event configuration bit of line 12 */ |
| 4215 | #define EXTI_RTSR_TR13 ((uint32_t)0x00002000) /*!< Rising trigger event configuration bit of line 13 */ |
| 4216 | #define EXTI_RTSR_TR14 ((uint32_t)0x00004000) /*!< Rising trigger event configuration bit of line 14 */ |
| 4217 | #define EXTI_RTSR_TR15 ((uint32_t)0x00008000) /*!< Rising trigger event configuration bit of line 15 */ |
| 4218 | #define EXTI_RTSR_TR16 ((uint32_t)0x00010000) /*!< Rising trigger event configuration bit of line 16 */ |
| 4219 | #define EXTI_RTSR_TR17 ((uint32_t)0x00020000) /*!< Rising trigger event configuration bit of line 17 */ |
| 4220 | #define EXTI_RTSR_TR18 ((uint32_t)0x00040000) /*!< Rising trigger event configuration bit of line 18 */ |
| 4221 | #define EXTI_RTSR_TR19 ((uint32_t)0x00080000) /*!< Rising trigger event configuration bit of line 19 */ |
| 4222 | |
| 4223 | /****************** Bit definition for EXTI_FTSR register *******************/ |
| 4224 | #define EXTI_FTSR_TR0 ((uint32_t)0x00000001) /*!< Falling trigger event configuration bit of line 0 */ |
| 4225 | #define EXTI_FTSR_TR1 ((uint32_t)0x00000002) /*!< Falling trigger event configuration bit of line 1 */ |
| 4226 | #define EXTI_FTSR_TR2 ((uint32_t)0x00000004) /*!< Falling trigger event configuration bit of line 2 */ |
| 4227 | #define EXTI_FTSR_TR3 ((uint32_t)0x00000008) /*!< Falling trigger event configuration bit of line 3 */ |
| 4228 | #define EXTI_FTSR_TR4 ((uint32_t)0x00000010) /*!< Falling trigger event configuration bit of line 4 */ |
| 4229 | #define EXTI_FTSR_TR5 ((uint32_t)0x00000020) /*!< Falling trigger event configuration bit of line 5 */ |
| 4230 | #define EXTI_FTSR_TR6 ((uint32_t)0x00000040) /*!< Falling trigger event configuration bit of line 6 */ |
| 4231 | #define EXTI_FTSR_TR7 ((uint32_t)0x00000080) /*!< Falling trigger event configuration bit of line 7 */ |
| 4232 | #define EXTI_FTSR_TR8 ((uint32_t)0x00000100) /*!< Falling trigger event configuration bit of line 8 */ |
| 4233 | #define EXTI_FTSR_TR9 ((uint32_t)0x00000200) /*!< Falling trigger event configuration bit of line 9 */ |
| 4234 | #define EXTI_FTSR_TR10 ((uint32_t)0x00000400) /*!< Falling trigger event configuration bit of line 10 */ |
| 4235 | #define EXTI_FTSR_TR11 ((uint32_t)0x00000800) /*!< Falling trigger event configuration bit of line 11 */ |
| 4236 | #define EXTI_FTSR_TR12 ((uint32_t)0x00001000) /*!< Falling trigger event configuration bit of line 12 */ |
| 4237 | #define EXTI_FTSR_TR13 ((uint32_t)0x00002000) /*!< Falling trigger event configuration bit of line 13 */ |
| 4238 | #define EXTI_FTSR_TR14 ((uint32_t)0x00004000) /*!< Falling trigger event configuration bit of line 14 */ |
| 4239 | #define EXTI_FTSR_TR15 ((uint32_t)0x00008000) /*!< Falling trigger event configuration bit of line 15 */ |
| 4240 | #define EXTI_FTSR_TR16 ((uint32_t)0x00010000) /*!< Falling trigger event configuration bit of line 16 */ |
| 4241 | #define EXTI_FTSR_TR17 ((uint32_t)0x00020000) /*!< Falling trigger event configuration bit of line 17 */ |
| 4242 | #define EXTI_FTSR_TR18 ((uint32_t)0x00040000) /*!< Falling trigger event configuration bit of line 18 */ |
| 4243 | #define EXTI_FTSR_TR19 ((uint32_t)0x00080000) /*!< Falling trigger event configuration bit of line 19 */ |
| 4244 | |
| 4245 | /****************** Bit definition for EXTI_SWIER register ******************/ |
| 4246 | #define EXTI_SWIER_SWIER0 ((uint32_t)0x00000001) /*!< Software Interrupt on line 0 */ |
| 4247 | #define EXTI_SWIER_SWIER1 ((uint32_t)0x00000002) /*!< Software Interrupt on line 1 */ |
| 4248 | #define EXTI_SWIER_SWIER2 ((uint32_t)0x00000004) /*!< Software Interrupt on line 2 */ |
| 4249 | #define EXTI_SWIER_SWIER3 ((uint32_t)0x00000008) /*!< Software Interrupt on line 3 */ |
| 4250 | #define EXTI_SWIER_SWIER4 ((uint32_t)0x00000010) /*!< Software Interrupt on line 4 */ |
| 4251 | #define EXTI_SWIER_SWIER5 ((uint32_t)0x00000020) /*!< Software Interrupt on line 5 */ |
| 4252 | #define EXTI_SWIER_SWIER6 ((uint32_t)0x00000040) /*!< Software Interrupt on line 6 */ |
| 4253 | #define EXTI_SWIER_SWIER7 ((uint32_t)0x00000080) /*!< Software Interrupt on line 7 */ |
| 4254 | #define EXTI_SWIER_SWIER8 ((uint32_t)0x00000100) /*!< Software Interrupt on line 8 */ |
| 4255 | #define EXTI_SWIER_SWIER9 ((uint32_t)0x00000200) /*!< Software Interrupt on line 9 */ |
| 4256 | #define EXTI_SWIER_SWIER10 ((uint32_t)0x00000400) /*!< Software Interrupt on line 10 */ |
| 4257 | #define EXTI_SWIER_SWIER11 ((uint32_t)0x00000800) /*!< Software Interrupt on line 11 */ |
| 4258 | #define EXTI_SWIER_SWIER12 ((uint32_t)0x00001000) /*!< Software Interrupt on line 12 */ |
| 4259 | #define EXTI_SWIER_SWIER13 ((uint32_t)0x00002000) /*!< Software Interrupt on line 13 */ |
| 4260 | #define EXTI_SWIER_SWIER14 ((uint32_t)0x00004000) /*!< Software Interrupt on line 14 */ |
| 4261 | #define EXTI_SWIER_SWIER15 ((uint32_t)0x00008000) /*!< Software Interrupt on line 15 */ |
| 4262 | #define EXTI_SWIER_SWIER16 ((uint32_t)0x00010000) /*!< Software Interrupt on line 16 */ |
| 4263 | #define EXTI_SWIER_SWIER17 ((uint32_t)0x00020000) /*!< Software Interrupt on line 17 */ |
| 4264 | #define EXTI_SWIER_SWIER18 ((uint32_t)0x00040000) /*!< Software Interrupt on line 18 */ |
| 4265 | #define EXTI_SWIER_SWIER19 ((uint32_t)0x00080000) /*!< Software Interrupt on line 19 */ |
| 4266 | |
| 4267 | /******************* Bit definition for EXTI_PR register ********************/ |
| 4268 | #define EXTI_PR_PR0 ((uint32_t)0x00000001) /*!< Pending bit for line 0 */ |
| 4269 | #define EXTI_PR_PR1 ((uint32_t)0x00000002) /*!< Pending bit for line 1 */ |
| 4270 | #define EXTI_PR_PR2 ((uint32_t)0x00000004) /*!< Pending bit for line 2 */ |
| 4271 | #define EXTI_PR_PR3 ((uint32_t)0x00000008) /*!< Pending bit for line 3 */ |
| 4272 | #define EXTI_PR_PR4 ((uint32_t)0x00000010) /*!< Pending bit for line 4 */ |
| 4273 | #define EXTI_PR_PR5 ((uint32_t)0x00000020) /*!< Pending bit for line 5 */ |
| 4274 | #define EXTI_PR_PR6 ((uint32_t)0x00000040) /*!< Pending bit for line 6 */ |
| 4275 | #define EXTI_PR_PR7 ((uint32_t)0x00000080) /*!< Pending bit for line 7 */ |
| 4276 | #define EXTI_PR_PR8 ((uint32_t)0x00000100) /*!< Pending bit for line 8 */ |
| 4277 | #define EXTI_PR_PR9 ((uint32_t)0x00000200) /*!< Pending bit for line 9 */ |
| 4278 | #define EXTI_PR_PR10 ((uint32_t)0x00000400) /*!< Pending bit for line 10 */ |
| 4279 | #define EXTI_PR_PR11 ((uint32_t)0x00000800) /*!< Pending bit for line 11 */ |
| 4280 | #define EXTI_PR_PR12 ((uint32_t)0x00001000) /*!< Pending bit for line 12 */ |
| 4281 | #define EXTI_PR_PR13 ((uint32_t)0x00002000) /*!< Pending bit for line 13 */ |
| 4282 | #define EXTI_PR_PR14 ((uint32_t)0x00004000) /*!< Pending bit for line 14 */ |
| 4283 | #define EXTI_PR_PR15 ((uint32_t)0x00008000) /*!< Pending bit for line 15 */ |
| 4284 | #define EXTI_PR_PR16 ((uint32_t)0x00010000) /*!< Pending bit for line 16 */ |
| 4285 | #define EXTI_PR_PR17 ((uint32_t)0x00020000) /*!< Pending bit for line 17 */ |
| 4286 | #define EXTI_PR_PR18 ((uint32_t)0x00040000) /*!< Pending bit for line 18 */ |
| 4287 | #define EXTI_PR_PR19 ((uint32_t)0x00080000) /*!< Pending bit for line 19 */ |
| 4288 | |
| 4289 | /******************************************************************************/ |
| 4290 | /* */ |
| 4291 | /* FLASH */ |
| 4292 | /* */ |
| 4293 | /******************************************************************************/ |
| 4294 | /******************* Bits definition for FLASH_ACR register *****************/ |
| 4295 | #define FLASH_ACR_LATENCY ((uint32_t)0x0000000F) |
| 4296 | #define FLASH_ACR_LATENCY_0WS ((uint32_t)0x00000000) |
| 4297 | #define FLASH_ACR_LATENCY_1WS ((uint32_t)0x00000001) |
| 4298 | #define FLASH_ACR_LATENCY_2WS ((uint32_t)0x00000002) |
| 4299 | #define FLASH_ACR_LATENCY_3WS ((uint32_t)0x00000003) |
| 4300 | #define FLASH_ACR_LATENCY_4WS ((uint32_t)0x00000004) |
| 4301 | #define FLASH_ACR_LATENCY_5WS ((uint32_t)0x00000005) |
| 4302 | #define FLASH_ACR_LATENCY_6WS ((uint32_t)0x00000006) |
| 4303 | #define FLASH_ACR_LATENCY_7WS ((uint32_t)0x00000007) |
| 4304 | #define FLASH_ACR_LATENCY_8WS ((uint32_t)0x00000008) |
| 4305 | #define FLASH_ACR_LATENCY_9WS ((uint32_t)0x00000009) |
| 4306 | #define FLASH_ACR_LATENCY_10WS ((uint32_t)0x0000000A) |
| 4307 | #define FLASH_ACR_LATENCY_11WS ((uint32_t)0x0000000B) |
| 4308 | #define FLASH_ACR_LATENCY_12WS ((uint32_t)0x0000000C) |
| 4309 | #define FLASH_ACR_LATENCY_13WS ((uint32_t)0x0000000D) |
| 4310 | #define FLASH_ACR_LATENCY_14WS ((uint32_t)0x0000000E) |
| 4311 | #define FLASH_ACR_LATENCY_15WS ((uint32_t)0x0000000F) |
| 4312 | |
| 4313 | #define FLASH_ACR_PRFTEN ((uint32_t)0x00000100) |
| 4314 | #define FLASH_ACR_ICEN ((uint32_t)0x00000200) |
| 4315 | #define FLASH_ACR_DCEN ((uint32_t)0x00000400) |
| 4316 | #define FLASH_ACR_ICRST ((uint32_t)0x00000800) |
| 4317 | #define FLASH_ACR_DCRST ((uint32_t)0x00001000) |
| 4318 | #define FLASH_ACR_BYTE0_ADDRESS ((uint32_t)0x40023C00) |
| 4319 | #define FLASH_ACR_BYTE2_ADDRESS ((uint32_t)0x40023C03) |
| 4320 | |
| 4321 | /******************* Bits definition for FLASH_SR register ******************/ |
| 4322 | #define FLASH_SR_EOP ((uint32_t)0x00000001) |
| 4323 | #define FLASH_SR_SOP ((uint32_t)0x00000002) |
| 4324 | #define FLASH_SR_WRPERR ((uint32_t)0x00000010) |
| 4325 | #define FLASH_SR_PGAERR ((uint32_t)0x00000020) |
| 4326 | #define FLASH_SR_PGPERR ((uint32_t)0x00000040) |
| 4327 | #define FLASH_SR_PGSERR ((uint32_t)0x00000080) |
| 4328 | #define FLASH_SR_BSY ((uint32_t)0x00010000) |
| 4329 | |
| 4330 | /******************* Bits definition for FLASH_CR register ******************/ |
| 4331 | #define FLASH_CR_PG ((uint32_t)0x00000001) |
| 4332 | #define FLASH_CR_SER ((uint32_t)0x00000002) |
| 4333 | #define FLASH_CR_MER ((uint32_t)0x00000004) |
| 4334 | #define FLASH_CR_MER1 FLASH_CR_MER |
| 4335 | #define FLASH_CR_SNB ((uint32_t)0x000000F8) |
| 4336 | #define FLASH_CR_SNB_0 ((uint32_t)0x00000008) |
| 4337 | #define FLASH_CR_SNB_1 ((uint32_t)0x00000010) |
| 4338 | #define FLASH_CR_SNB_2 ((uint32_t)0x00000020) |
| 4339 | #define FLASH_CR_SNB_3 ((uint32_t)0x00000040) |
| 4340 | #define FLASH_CR_SNB_4 ((uint32_t)0x00000040) |
| 4341 | #define FLASH_CR_PSIZE ((uint32_t)0x00000300) |
| 4342 | #define FLASH_CR_PSIZE_0 ((uint32_t)0x00000100) |
| 4343 | #define FLASH_CR_PSIZE_1 ((uint32_t)0x00000200) |
| 4344 | #define FLASH_CR_MER2 ((uint32_t)0x00008000) |
| 4345 | #define FLASH_CR_STRT ((uint32_t)0x00010000) |
| 4346 | #define FLASH_CR_EOPIE ((uint32_t)0x01000000) |
| 4347 | #define FLASH_CR_LOCK ((uint32_t)0x80000000) |
| 4348 | |
| 4349 | /******************* Bits definition for FLASH_OPTCR register ***************/ |
| 4350 | #define FLASH_OPTCR_OPTLOCK ((uint32_t)0x00000001) |
| 4351 | #define FLASH_OPTCR_OPTSTRT ((uint32_t)0x00000002) |
| 4352 | #define FLASH_OPTCR_BOR_LEV_0 ((uint32_t)0x00000004) |
| 4353 | #define FLASH_OPTCR_BOR_LEV_1 ((uint32_t)0x00000008) |
| 4354 | #define FLASH_OPTCR_BOR_LEV ((uint32_t)0x0000000C) |
| 4355 | #define FLASH_OPTCR_BFB2 ((uint32_t)0x00000010) |
| 4356 | |
| 4357 | #define FLASH_OPTCR_WDG_SW ((uint32_t)0x00000020) |
| 4358 | #define FLASH_OPTCR_nRST_STOP ((uint32_t)0x00000040) |
| 4359 | #define FLASH_OPTCR_nRST_STDBY ((uint32_t)0x00000080) |
| 4360 | #define FLASH_OPTCR_RDP ((uint32_t)0x0000FF00) |
| 4361 | #define FLASH_OPTCR_RDP_0 ((uint32_t)0x00000100) |
| 4362 | #define FLASH_OPTCR_RDP_1 ((uint32_t)0x00000200) |
| 4363 | #define FLASH_OPTCR_RDP_2 ((uint32_t)0x00000400) |
| 4364 | #define FLASH_OPTCR_RDP_3 ((uint32_t)0x00000800) |
| 4365 | #define FLASH_OPTCR_RDP_4 ((uint32_t)0x00001000) |
| 4366 | #define FLASH_OPTCR_RDP_5 ((uint32_t)0x00002000) |
| 4367 | #define FLASH_OPTCR_RDP_6 ((uint32_t)0x00004000) |
| 4368 | #define FLASH_OPTCR_RDP_7 ((uint32_t)0x00008000) |
| 4369 | #define FLASH_OPTCR_nWRP ((uint32_t)0x0FFF0000) |
| 4370 | #define FLASH_OPTCR_nWRP_0 ((uint32_t)0x00010000) |
| 4371 | #define FLASH_OPTCR_nWRP_1 ((uint32_t)0x00020000) |
| 4372 | #define FLASH_OPTCR_nWRP_2 ((uint32_t)0x00040000) |
| 4373 | #define FLASH_OPTCR_nWRP_3 ((uint32_t)0x00080000) |
| 4374 | #define FLASH_OPTCR_nWRP_4 ((uint32_t)0x00100000) |
| 4375 | #define FLASH_OPTCR_nWRP_5 ((uint32_t)0x00200000) |
| 4376 | #define FLASH_OPTCR_nWRP_6 ((uint32_t)0x00400000) |
| 4377 | #define FLASH_OPTCR_nWRP_7 ((uint32_t)0x00800000) |
| 4378 | #define FLASH_OPTCR_nWRP_8 ((uint32_t)0x01000000) |
| 4379 | #define FLASH_OPTCR_nWRP_9 ((uint32_t)0x02000000) |
| 4380 | #define FLASH_OPTCR_nWRP_10 ((uint32_t)0x04000000) |
| 4381 | #define FLASH_OPTCR_nWRP_11 ((uint32_t)0x08000000) |
| 4382 | |
| 4383 | #define FLASH_OPTCR_DB1M ((uint32_t)0x40000000) |
| 4384 | #define FLASH_OPTCR_SPRMOD ((uint32_t)0x80000000) |
| 4385 | |
| 4386 | /****************** Bits definition for FLASH_OPTCR1 register ***************/ |
| 4387 | #define FLASH_OPTCR1_nWRP ((uint32_t)0x0FFF0000) |
| 4388 | #define FLASH_OPTCR1_nWRP_0 ((uint32_t)0x00010000) |
| 4389 | #define FLASH_OPTCR1_nWRP_1 ((uint32_t)0x00020000) |
| 4390 | #define FLASH_OPTCR1_nWRP_2 ((uint32_t)0x00040000) |
| 4391 | #define FLASH_OPTCR1_nWRP_3 ((uint32_t)0x00080000) |
| 4392 | #define FLASH_OPTCR1_nWRP_4 ((uint32_t)0x00100000) |
| 4393 | #define FLASH_OPTCR1_nWRP_5 ((uint32_t)0x00200000) |
| 4394 | #define FLASH_OPTCR1_nWRP_6 ((uint32_t)0x00400000) |
| 4395 | #define FLASH_OPTCR1_nWRP_7 ((uint32_t)0x00800000) |
| 4396 | #define FLASH_OPTCR1_nWRP_8 ((uint32_t)0x01000000) |
| 4397 | #define FLASH_OPTCR1_nWRP_9 ((uint32_t)0x02000000) |
| 4398 | #define FLASH_OPTCR1_nWRP_10 ((uint32_t)0x04000000) |
| 4399 | #define FLASH_OPTCR1_nWRP_11 ((uint32_t)0x08000000) |
| 4400 | |
| 4401 | #if defined(STM32F40_41xxx) |
| 4402 | /******************************************************************************/ |
| 4403 | /* */ |
| 4404 | /* Flexible Static Memory Controller */ |
| 4405 | /* */ |
| 4406 | /******************************************************************************/ |
| 4407 | /****************** Bit definition for FSMC_BCR1 register *******************/ |
| 4408 | #define FSMC_BCR1_MBKEN ((uint32_t)0x00000001) /*!<Memory bank enable bit */ |
| 4409 | #define FSMC_BCR1_MUXEN ((uint32_t)0x00000002) /*!<Address/data multiplexing enable bit */ |
| 4410 | |
| 4411 | #define FSMC_BCR1_MTYP ((uint32_t)0x0000000C) /*!<MTYP[1:0] bits (Memory type) */ |
| 4412 | #define FSMC_BCR1_MTYP_0 ((uint32_t)0x00000004) /*!<Bit 0 */ |
| 4413 | #define FSMC_BCR1_MTYP_1 ((uint32_t)0x00000008) /*!<Bit 1 */ |
| 4414 | |
| 4415 | #define FSMC_BCR1_MWID ((uint32_t)0x00000030) /*!<MWID[1:0] bits (Memory data bus width) */ |
| 4416 | #define FSMC_BCR1_MWID_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 4417 | #define FSMC_BCR1_MWID_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 4418 | |
| 4419 | #define FSMC_BCR1_FACCEN ((uint32_t)0x00000040) /*!<Flash access enable */ |
| 4420 | #define FSMC_BCR1_BURSTEN ((uint32_t)0x00000100) /*!<Burst enable bit */ |
| 4421 | #define FSMC_BCR1_WAITPOL ((uint32_t)0x00000200) /*!<Wait signal polarity bit */ |
| 4422 | #define FSMC_BCR1_WRAPMOD ((uint32_t)0x00000400) /*!<Wrapped burst mode support */ |
| 4423 | #define FSMC_BCR1_WAITCFG ((uint32_t)0x00000800) /*!<Wait timing configuration */ |
| 4424 | #define FSMC_BCR1_WREN ((uint32_t)0x00001000) /*!<Write enable bit */ |
| 4425 | #define FSMC_BCR1_WAITEN ((uint32_t)0x00002000) /*!<Wait enable bit */ |
| 4426 | #define FSMC_BCR1_EXTMOD ((uint32_t)0x00004000) /*!<Extended mode enable */ |
| 4427 | #define FSMC_BCR1_ASYNCWAIT ((uint32_t)0x00008000) /*!<Asynchronous wait */ |
| 4428 | #define FSMC_BCR1_CBURSTRW ((uint32_t)0x00080000) /*!<Write burst enable */ |
| 4429 | |
| 4430 | /****************** Bit definition for FSMC_BCR2 register *******************/ |
| 4431 | #define FSMC_BCR2_MBKEN ((uint32_t)0x00000001) /*!<Memory bank enable bit */ |
| 4432 | #define FSMC_BCR2_MUXEN ((uint32_t)0x00000002) /*!<Address/data multiplexing enable bit */ |
| 4433 | |
| 4434 | #define FSMC_BCR2_MTYP ((uint32_t)0x0000000C) /*!<MTYP[1:0] bits (Memory type) */ |
| 4435 | #define FSMC_BCR2_MTYP_0 ((uint32_t)0x00000004) /*!<Bit 0 */ |
| 4436 | #define FSMC_BCR2_MTYP_1 ((uint32_t)0x00000008) /*!<Bit 1 */ |
| 4437 | |
| 4438 | #define FSMC_BCR2_MWID ((uint32_t)0x00000030) /*!<MWID[1:0] bits (Memory data bus width) */ |
| 4439 | #define FSMC_BCR2_MWID_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 4440 | #define FSMC_BCR2_MWID_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 4441 | |
| 4442 | #define FSMC_BCR2_FACCEN ((uint32_t)0x00000040) /*!<Flash access enable */ |
| 4443 | #define FSMC_BCR2_BURSTEN ((uint32_t)0x00000100) /*!<Burst enable bit */ |
| 4444 | #define FSMC_BCR2_WAITPOL ((uint32_t)0x00000200) /*!<Wait signal polarity bit */ |
| 4445 | #define FSMC_BCR2_WRAPMOD ((uint32_t)0x00000400) /*!<Wrapped burst mode support */ |
| 4446 | #define FSMC_BCR2_WAITCFG ((uint32_t)0x00000800) /*!<Wait timing configuration */ |
| 4447 | #define FSMC_BCR2_WREN ((uint32_t)0x00001000) /*!<Write enable bit */ |
| 4448 | #define FSMC_BCR2_WAITEN ((uint32_t)0x00002000) /*!<Wait enable bit */ |
| 4449 | #define FSMC_BCR2_EXTMOD ((uint32_t)0x00004000) /*!<Extended mode enable */ |
| 4450 | #define FSMC_BCR2_ASYNCWAIT ((uint32_t)0x00008000) /*!<Asynchronous wait */ |
| 4451 | #define FSMC_BCR2_CBURSTRW ((uint32_t)0x00080000) /*!<Write burst enable */ |
| 4452 | |
| 4453 | /****************** Bit definition for FSMC_BCR3 register *******************/ |
| 4454 | #define FSMC_BCR3_MBKEN ((uint32_t)0x00000001) /*!<Memory bank enable bit */ |
| 4455 | #define FSMC_BCR3_MUXEN ((uint32_t)0x00000002) /*!<Address/data multiplexing enable bit */ |
| 4456 | |
| 4457 | #define FSMC_BCR3_MTYP ((uint32_t)0x0000000C) /*!<MTYP[1:0] bits (Memory type) */ |
| 4458 | #define FSMC_BCR3_MTYP_0 ((uint32_t)0x00000004) /*!<Bit 0 */ |
| 4459 | #define FSMC_BCR3_MTYP_1 ((uint32_t)0x00000008) /*!<Bit 1 */ |
| 4460 | |
| 4461 | #define FSMC_BCR3_MWID ((uint32_t)0x00000030) /*!<MWID[1:0] bits (Memory data bus width) */ |
| 4462 | #define FSMC_BCR3_MWID_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 4463 | #define FSMC_BCR3_MWID_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 4464 | |
| 4465 | #define FSMC_BCR3_FACCEN ((uint32_t)0x00000040) /*!<Flash access enable */ |
| 4466 | #define FSMC_BCR3_BURSTEN ((uint32_t)0x00000100) /*!<Burst enable bit */ |
| 4467 | #define FSMC_BCR3_WAITPOL ((uint32_t)0x00000200) /*!<Wait signal polarity bit */ |
| 4468 | #define FSMC_BCR3_WRAPMOD ((uint32_t)0x00000400) /*!<Wrapped burst mode support */ |
| 4469 | #define FSMC_BCR3_WAITCFG ((uint32_t)0x00000800) /*!<Wait timing configuration */ |
| 4470 | #define FSMC_BCR3_WREN ((uint32_t)0x00001000) /*!<Write enable bit */ |
| 4471 | #define FSMC_BCR3_WAITEN ((uint32_t)0x00002000) /*!<Wait enable bit */ |
| 4472 | #define FSMC_BCR3_EXTMOD ((uint32_t)0x00004000) /*!<Extended mode enable */ |
| 4473 | #define FSMC_BCR3_ASYNCWAIT ((uint32_t)0x00008000) /*!<Asynchronous wait */ |
| 4474 | #define FSMC_BCR3_CBURSTRW ((uint32_t)0x00080000) /*!<Write burst enable */ |
| 4475 | |
| 4476 | /****************** Bit definition for FSMC_BCR4 register *******************/ |
| 4477 | #define FSMC_BCR4_MBKEN ((uint32_t)0x00000001) /*!<Memory bank enable bit */ |
| 4478 | #define FSMC_BCR4_MUXEN ((uint32_t)0x00000002) /*!<Address/data multiplexing enable bit */ |
| 4479 | |
| 4480 | #define FSMC_BCR4_MTYP ((uint32_t)0x0000000C) /*!<MTYP[1:0] bits (Memory type) */ |
| 4481 | #define FSMC_BCR4_MTYP_0 ((uint32_t)0x00000004) /*!<Bit 0 */ |
| 4482 | #define FSMC_BCR4_MTYP_1 ((uint32_t)0x00000008) /*!<Bit 1 */ |
| 4483 | |
| 4484 | #define FSMC_BCR4_MWID ((uint32_t)0x00000030) /*!<MWID[1:0] bits (Memory data bus width) */ |
| 4485 | #define FSMC_BCR4_MWID_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 4486 | #define FSMC_BCR4_MWID_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 4487 | |
| 4488 | #define FSMC_BCR4_FACCEN ((uint32_t)0x00000040) /*!<Flash access enable */ |
| 4489 | #define FSMC_BCR4_BURSTEN ((uint32_t)0x00000100) /*!<Burst enable bit */ |
| 4490 | #define FSMC_BCR4_WAITPOL ((uint32_t)0x00000200) /*!<Wait signal polarity bit */ |
| 4491 | #define FSMC_BCR4_WRAPMOD ((uint32_t)0x00000400) /*!<Wrapped burst mode support */ |
| 4492 | #define FSMC_BCR4_WAITCFG ((uint32_t)0x00000800) /*!<Wait timing configuration */ |
| 4493 | #define FSMC_BCR4_WREN ((uint32_t)0x00001000) /*!<Write enable bit */ |
| 4494 | #define FSMC_BCR4_WAITEN ((uint32_t)0x00002000) /*!<Wait enable bit */ |
| 4495 | #define FSMC_BCR4_EXTMOD ((uint32_t)0x00004000) /*!<Extended mode enable */ |
| 4496 | #define FSMC_BCR4_ASYNCWAIT ((uint32_t)0x00008000) /*!<Asynchronous wait */ |
| 4497 | #define FSMC_BCR4_CBURSTRW ((uint32_t)0x00080000) /*!<Write burst enable */ |
| 4498 | |
| 4499 | /****************** Bit definition for FSMC_BTR1 register ******************/ |
| 4500 | #define FSMC_BTR1_ADDSET ((uint32_t)0x0000000F) /*!<ADDSET[3:0] bits (Address setup phase duration) */ |
| 4501 | #define FSMC_BTR1_ADDSET_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 4502 | #define FSMC_BTR1_ADDSET_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 4503 | #define FSMC_BTR1_ADDSET_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 4504 | #define FSMC_BTR1_ADDSET_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 4505 | |
| 4506 | #define FSMC_BTR1_ADDHLD ((uint32_t)0x000000F0) /*!<ADDHLD[3:0] bits (Address-hold phase duration) */ |
| 4507 | #define FSMC_BTR1_ADDHLD_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 4508 | #define FSMC_BTR1_ADDHLD_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 4509 | #define FSMC_BTR1_ADDHLD_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 4510 | #define FSMC_BTR1_ADDHLD_3 ((uint32_t)0x00000080) /*!<Bit 3 */ |
| 4511 | |
| 4512 | #define FSMC_BTR1_DATAST ((uint32_t)0x0000FF00) /*!<DATAST [3:0] bits (Data-phase duration) */ |
| 4513 | #define FSMC_BTR1_DATAST_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 4514 | #define FSMC_BTR1_DATAST_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 4515 | #define FSMC_BTR1_DATAST_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 4516 | #define FSMC_BTR1_DATAST_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 4517 | |
| 4518 | #define FSMC_BTR1_BUSTURN ((uint32_t)0x000F0000) /*!<BUSTURN[3:0] bits (Bus turnaround phase duration) */ |
| 4519 | #define FSMC_BTR1_BUSTURN_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 4520 | #define FSMC_BTR1_BUSTURN_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 4521 | #define FSMC_BTR1_BUSTURN_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 4522 | #define FSMC_BTR1_BUSTURN_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 4523 | |
| 4524 | #define FSMC_BTR1_CLKDIV ((uint32_t)0x00F00000) /*!<CLKDIV[3:0] bits (Clock divide ratio) */ |
| 4525 | #define FSMC_BTR1_CLKDIV_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 4526 | #define FSMC_BTR1_CLKDIV_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 4527 | #define FSMC_BTR1_CLKDIV_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 4528 | #define FSMC_BTR1_CLKDIV_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 4529 | |
| 4530 | #define FSMC_BTR1_DATLAT ((uint32_t)0x0F000000) /*!<DATLA[3:0] bits (Data latency) */ |
| 4531 | #define FSMC_BTR1_DATLAT_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 4532 | #define FSMC_BTR1_DATLAT_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 4533 | #define FSMC_BTR1_DATLAT_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 4534 | #define FSMC_BTR1_DATLAT_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 4535 | |
| 4536 | #define FSMC_BTR1_ACCMOD ((uint32_t)0x30000000) /*!<ACCMOD[1:0] bits (Access mode) */ |
| 4537 | #define FSMC_BTR1_ACCMOD_0 ((uint32_t)0x10000000) /*!<Bit 0 */ |
| 4538 | #define FSMC_BTR1_ACCMOD_1 ((uint32_t)0x20000000) /*!<Bit 1 */ |
| 4539 | |
| 4540 | /****************** Bit definition for FSMC_BTR2 register *******************/ |
| 4541 | #define FSMC_BTR2_ADDSET ((uint32_t)0x0000000F) /*!<ADDSET[3:0] bits (Address setup phase duration) */ |
| 4542 | #define FSMC_BTR2_ADDSET_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 4543 | #define FSMC_BTR2_ADDSET_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 4544 | #define FSMC_BTR2_ADDSET_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 4545 | #define FSMC_BTR2_ADDSET_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 4546 | |
| 4547 | #define FSMC_BTR2_ADDHLD ((uint32_t)0x000000F0) /*!<ADDHLD[3:0] bits (Address-hold phase duration) */ |
| 4548 | #define FSMC_BTR2_ADDHLD_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 4549 | #define FSMC_BTR2_ADDHLD_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 4550 | #define FSMC_BTR2_ADDHLD_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 4551 | #define FSMC_BTR2_ADDHLD_3 ((uint32_t)0x00000080) /*!<Bit 3 */ |
| 4552 | |
| 4553 | #define FSMC_BTR2_DATAST ((uint32_t)0x0000FF00) /*!<DATAST [3:0] bits (Data-phase duration) */ |
| 4554 | #define FSMC_BTR2_DATAST_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 4555 | #define FSMC_BTR2_DATAST_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 4556 | #define FSMC_BTR2_DATAST_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 4557 | #define FSMC_BTR2_DATAST_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 4558 | |
| 4559 | #define FSMC_BTR2_BUSTURN ((uint32_t)0x000F0000) /*!<BUSTURN[3:0] bits (Bus turnaround phase duration) */ |
| 4560 | #define FSMC_BTR2_BUSTURN_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 4561 | #define FSMC_BTR2_BUSTURN_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 4562 | #define FSMC_BTR2_BUSTURN_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 4563 | #define FSMC_BTR2_BUSTURN_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 4564 | |
| 4565 | #define FSMC_BTR2_CLKDIV ((uint32_t)0x00F00000) /*!<CLKDIV[3:0] bits (Clock divide ratio) */ |
| 4566 | #define FSMC_BTR2_CLKDIV_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 4567 | #define FSMC_BTR2_CLKDIV_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 4568 | #define FSMC_BTR2_CLKDIV_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 4569 | #define FSMC_BTR2_CLKDIV_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 4570 | |
| 4571 | #define FSMC_BTR2_DATLAT ((uint32_t)0x0F000000) /*!<DATLA[3:0] bits (Data latency) */ |
| 4572 | #define FSMC_BTR2_DATLAT_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 4573 | #define FSMC_BTR2_DATLAT_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 4574 | #define FSMC_BTR2_DATLAT_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 4575 | #define FSMC_BTR2_DATLAT_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 4576 | |
| 4577 | #define FSMC_BTR2_ACCMOD ((uint32_t)0x30000000) /*!<ACCMOD[1:0] bits (Access mode) */ |
| 4578 | #define FSMC_BTR2_ACCMOD_0 ((uint32_t)0x10000000) /*!<Bit 0 */ |
| 4579 | #define FSMC_BTR2_ACCMOD_1 ((uint32_t)0x20000000) /*!<Bit 1 */ |
| 4580 | |
| 4581 | /******************* Bit definition for FSMC_BTR3 register *******************/ |
| 4582 | #define FSMC_BTR3_ADDSET ((uint32_t)0x0000000F) /*!<ADDSET[3:0] bits (Address setup phase duration) */ |
| 4583 | #define FSMC_BTR3_ADDSET_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 4584 | #define FSMC_BTR3_ADDSET_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 4585 | #define FSMC_BTR3_ADDSET_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 4586 | #define FSMC_BTR3_ADDSET_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 4587 | |
| 4588 | #define FSMC_BTR3_ADDHLD ((uint32_t)0x000000F0) /*!<ADDHLD[3:0] bits (Address-hold phase duration) */ |
| 4589 | #define FSMC_BTR3_ADDHLD_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 4590 | #define FSMC_BTR3_ADDHLD_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 4591 | #define FSMC_BTR3_ADDHLD_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 4592 | #define FSMC_BTR3_ADDHLD_3 ((uint32_t)0x00000080) /*!<Bit 3 */ |
| 4593 | |
| 4594 | #define FSMC_BTR3_DATAST ((uint32_t)0x0000FF00) /*!<DATAST [3:0] bits (Data-phase duration) */ |
| 4595 | #define FSMC_BTR3_DATAST_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 4596 | #define FSMC_BTR3_DATAST_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 4597 | #define FSMC_BTR3_DATAST_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 4598 | #define FSMC_BTR3_DATAST_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 4599 | |
| 4600 | #define FSMC_BTR3_BUSTURN ((uint32_t)0x000F0000) /*!<BUSTURN[3:0] bits (Bus turnaround phase duration) */ |
| 4601 | #define FSMC_BTR3_BUSTURN_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 4602 | #define FSMC_BTR3_BUSTURN_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 4603 | #define FSMC_BTR3_BUSTURN_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 4604 | #define FSMC_BTR3_BUSTURN_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 4605 | |
| 4606 | #define FSMC_BTR3_CLKDIV ((uint32_t)0x00F00000) /*!<CLKDIV[3:0] bits (Clock divide ratio) */ |
| 4607 | #define FSMC_BTR3_CLKDIV_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 4608 | #define FSMC_BTR3_CLKDIV_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 4609 | #define FSMC_BTR3_CLKDIV_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 4610 | #define FSMC_BTR3_CLKDIV_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 4611 | |
| 4612 | #define FSMC_BTR3_DATLAT ((uint32_t)0x0F000000) /*!<DATLA[3:0] bits (Data latency) */ |
| 4613 | #define FSMC_BTR3_DATLAT_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 4614 | #define FSMC_BTR3_DATLAT_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 4615 | #define FSMC_BTR3_DATLAT_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 4616 | #define FSMC_BTR3_DATLAT_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 4617 | |
| 4618 | #define FSMC_BTR3_ACCMOD ((uint32_t)0x30000000) /*!<ACCMOD[1:0] bits (Access mode) */ |
| 4619 | #define FSMC_BTR3_ACCMOD_0 ((uint32_t)0x10000000) /*!<Bit 0 */ |
| 4620 | #define FSMC_BTR3_ACCMOD_1 ((uint32_t)0x20000000) /*!<Bit 1 */ |
| 4621 | |
| 4622 | /****************** Bit definition for FSMC_BTR4 register *******************/ |
| 4623 | #define FSMC_BTR4_ADDSET ((uint32_t)0x0000000F) /*!<ADDSET[3:0] bits (Address setup phase duration) */ |
| 4624 | #define FSMC_BTR4_ADDSET_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 4625 | #define FSMC_BTR4_ADDSET_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 4626 | #define FSMC_BTR4_ADDSET_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 4627 | #define FSMC_BTR4_ADDSET_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 4628 | |
| 4629 | #define FSMC_BTR4_ADDHLD ((uint32_t)0x000000F0) /*!<ADDHLD[3:0] bits (Address-hold phase duration) */ |
| 4630 | #define FSMC_BTR4_ADDHLD_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 4631 | #define FSMC_BTR4_ADDHLD_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 4632 | #define FSMC_BTR4_ADDHLD_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 4633 | #define FSMC_BTR4_ADDHLD_3 ((uint32_t)0x00000080) /*!<Bit 3 */ |
| 4634 | |
| 4635 | #define FSMC_BTR4_DATAST ((uint32_t)0x0000FF00) /*!<DATAST [3:0] bits (Data-phase duration) */ |
| 4636 | #define FSMC_BTR4_DATAST_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 4637 | #define FSMC_BTR4_DATAST_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 4638 | #define FSMC_BTR4_DATAST_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 4639 | #define FSMC_BTR4_DATAST_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 4640 | |
| 4641 | #define FSMC_BTR4_BUSTURN ((uint32_t)0x000F0000) /*!<BUSTURN[3:0] bits (Bus turnaround phase duration) */ |
| 4642 | #define FSMC_BTR4_BUSTURN_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 4643 | #define FSMC_BTR4_BUSTURN_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 4644 | #define FSMC_BTR4_BUSTURN_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 4645 | #define FSMC_BTR4_BUSTURN_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 4646 | |
| 4647 | #define FSMC_BTR4_CLKDIV ((uint32_t)0x00F00000) /*!<CLKDIV[3:0] bits (Clock divide ratio) */ |
| 4648 | #define FSMC_BTR4_CLKDIV_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 4649 | #define FSMC_BTR4_CLKDIV_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 4650 | #define FSMC_BTR4_CLKDIV_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 4651 | #define FSMC_BTR4_CLKDIV_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 4652 | |
| 4653 | #define FSMC_BTR4_DATLAT ((uint32_t)0x0F000000) /*!<DATLA[3:0] bits (Data latency) */ |
| 4654 | #define FSMC_BTR4_DATLAT_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 4655 | #define FSMC_BTR4_DATLAT_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 4656 | #define FSMC_BTR4_DATLAT_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 4657 | #define FSMC_BTR4_DATLAT_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 4658 | |
| 4659 | #define FSMC_BTR4_ACCMOD ((uint32_t)0x30000000) /*!<ACCMOD[1:0] bits (Access mode) */ |
| 4660 | #define FSMC_BTR4_ACCMOD_0 ((uint32_t)0x10000000) /*!<Bit 0 */ |
| 4661 | #define FSMC_BTR4_ACCMOD_1 ((uint32_t)0x20000000) /*!<Bit 1 */ |
| 4662 | |
| 4663 | /****************** Bit definition for FSMC_BWTR1 register ******************/ |
| 4664 | #define FSMC_BWTR1_ADDSET ((uint32_t)0x0000000F) /*!<ADDSET[3:0] bits (Address setup phase duration) */ |
| 4665 | #define FSMC_BWTR1_ADDSET_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 4666 | #define FSMC_BWTR1_ADDSET_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 4667 | #define FSMC_BWTR1_ADDSET_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 4668 | #define FSMC_BWTR1_ADDSET_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 4669 | |
| 4670 | #define FSMC_BWTR1_ADDHLD ((uint32_t)0x000000F0) /*!<ADDHLD[3:0] bits (Address-hold phase duration) */ |
| 4671 | #define FSMC_BWTR1_ADDHLD_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 4672 | #define FSMC_BWTR1_ADDHLD_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 4673 | #define FSMC_BWTR1_ADDHLD_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 4674 | #define FSMC_BWTR1_ADDHLD_3 ((uint32_t)0x00000080) /*!<Bit 3 */ |
| 4675 | |
| 4676 | #define FSMC_BWTR1_DATAST ((uint32_t)0x0000FF00) /*!<DATAST [3:0] bits (Data-phase duration) */ |
| 4677 | #define FSMC_BWTR1_DATAST_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 4678 | #define FSMC_BWTR1_DATAST_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 4679 | #define FSMC_BWTR1_DATAST_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 4680 | #define FSMC_BWTR1_DATAST_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 4681 | |
| 4682 | #define FSMC_BWTR1_BUSTURN ((uint32_t)0x000F0000) /*!<BUSTURN[3:0] bits (Bus turnaround duration) */ |
| 4683 | #define FSMC_BWTR1_BUSTURN_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 4684 | #define FSMC_BWTR1_BUSTURN_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 4685 | #define FSMC_BWTR1_BUSTURN_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 4686 | #define FSMC_BWTR1_BUSTURN_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 4687 | |
| 4688 | #define FSMC_BWTR1_CLKDIV ((uint32_t)0x00F00000) /*!<CLKDIV[3:0] bits (Clock divide ratio) */ |
| 4689 | #define FSMC_BWTR1_CLKDIV_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 4690 | #define FSMC_BWTR1_CLKDIV_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 4691 | #define FSMC_BWTR1_CLKDIV_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 4692 | #define FSMC_BWTR1_CLKDIV_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 4693 | |
| 4694 | #define FSMC_BWTR1_DATLAT ((uint32_t)0x0F000000) /*!<DATLA[3:0] bits (Data latency) */ |
| 4695 | #define FSMC_BWTR1_DATLAT_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 4696 | #define FSMC_BWTR1_DATLAT_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 4697 | #define FSMC_BWTR1_DATLAT_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 4698 | #define FSMC_BWTR1_DATLAT_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 4699 | |
| 4700 | #define FSMC_BWTR1_ACCMOD ((uint32_t)0x30000000) /*!<ACCMOD[1:0] bits (Access mode) */ |
| 4701 | #define FSMC_BWTR1_ACCMOD_0 ((uint32_t)0x10000000) /*!<Bit 0 */ |
| 4702 | #define FSMC_BWTR1_ACCMOD_1 ((uint32_t)0x20000000) /*!<Bit 1 */ |
| 4703 | |
| 4704 | /****************** Bit definition for FSMC_BWTR2 register ******************/ |
| 4705 | #define FSMC_BWTR2_ADDSET ((uint32_t)0x0000000F) /*!<ADDSET[3:0] bits (Address setup phase duration) */ |
| 4706 | #define FSMC_BWTR2_ADDSET_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 4707 | #define FSMC_BWTR2_ADDSET_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 4708 | #define FSMC_BWTR2_ADDSET_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 4709 | #define FSMC_BWTR2_ADDSET_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 4710 | |
| 4711 | #define FSMC_BWTR2_ADDHLD ((uint32_t)0x000000F0) /*!<ADDHLD[3:0] bits (Address-hold phase duration) */ |
| 4712 | #define FSMC_BWTR2_ADDHLD_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 4713 | #define FSMC_BWTR2_ADDHLD_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 4714 | #define FSMC_BWTR2_ADDHLD_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 4715 | #define FSMC_BWTR2_ADDHLD_3 ((uint32_t)0x00000080) /*!<Bit 3 */ |
| 4716 | |
| 4717 | #define FSMC_BWTR2_DATAST ((uint32_t)0x0000FF00) /*!<DATAST [3:0] bits (Data-phase duration) */ |
| 4718 | #define FSMC_BWTR2_DATAST_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 4719 | #define FSMC_BWTR2_DATAST_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 4720 | #define FSMC_BWTR2_DATAST_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 4721 | #define FSMC_BWTR2_DATAST_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 4722 | |
| 4723 | #define FSMC_BWTR2_BUSTURN ((uint32_t)0x000F0000) /*!<BUSTURN[3:0] bits (Bus turnaround duration) */ |
| 4724 | #define FSMC_BWTR2_BUSTURN_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 4725 | #define FSMC_BWTR2_BUSTURN_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 4726 | #define FSMC_BWTR2_BUSTURN_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 4727 | #define FSMC_BWTR2_BUSTURN_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 4728 | |
| 4729 | #define FSMC_BWTR2_CLKDIV ((uint32_t)0x00F00000) /*!<CLKDIV[3:0] bits (Clock divide ratio) */ |
| 4730 | #define FSMC_BWTR2_CLKDIV_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 4731 | #define FSMC_BWTR2_CLKDIV_1 ((uint32_t)0x00200000) /*!<Bit 1*/ |
| 4732 | #define FSMC_BWTR2_CLKDIV_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 4733 | #define FSMC_BWTR2_CLKDIV_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 4734 | |
| 4735 | #define FSMC_BWTR2_DATLAT ((uint32_t)0x0F000000) /*!<DATLA[3:0] bits (Data latency) */ |
| 4736 | #define FSMC_BWTR2_DATLAT_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 4737 | #define FSMC_BWTR2_DATLAT_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 4738 | #define FSMC_BWTR2_DATLAT_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 4739 | #define FSMC_BWTR2_DATLAT_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 4740 | |
| 4741 | #define FSMC_BWTR2_ACCMOD ((uint32_t)0x30000000) /*!<ACCMOD[1:0] bits (Access mode) */ |
| 4742 | #define FSMC_BWTR2_ACCMOD_0 ((uint32_t)0x10000000) /*!<Bit 0 */ |
| 4743 | #define FSMC_BWTR2_ACCMOD_1 ((uint32_t)0x20000000) /*!<Bit 1 */ |
| 4744 | |
| 4745 | /****************** Bit definition for FSMC_BWTR3 register ******************/ |
| 4746 | #define FSMC_BWTR3_ADDSET ((uint32_t)0x0000000F) /*!<ADDSET[3:0] bits (Address setup phase duration) */ |
| 4747 | #define FSMC_BWTR3_ADDSET_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 4748 | #define FSMC_BWTR3_ADDSET_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 4749 | #define FSMC_BWTR3_ADDSET_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 4750 | #define FSMC_BWTR3_ADDSET_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 4751 | |
| 4752 | #define FSMC_BWTR3_ADDHLD ((uint32_t)0x000000F0) /*!<ADDHLD[3:0] bits (Address-hold phase duration) */ |
| 4753 | #define FSMC_BWTR3_ADDHLD_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 4754 | #define FSMC_BWTR3_ADDHLD_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 4755 | #define FSMC_BWTR3_ADDHLD_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 4756 | #define FSMC_BWTR3_ADDHLD_3 ((uint32_t)0x00000080) /*!<Bit 3 */ |
| 4757 | |
| 4758 | #define FSMC_BWTR3_DATAST ((uint32_t)0x0000FF00) /*!<DATAST [3:0] bits (Data-phase duration) */ |
| 4759 | #define FSMC_BWTR3_DATAST_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 4760 | #define FSMC_BWTR3_DATAST_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 4761 | #define FSMC_BWTR3_DATAST_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 4762 | #define FSMC_BWTR3_DATAST_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 4763 | |
| 4764 | #define FSMC_BWTR3_BUSTURN ((uint32_t)0x000F0000) /*!<BUSTURN[3:0] bits (Bus turnaround duration) */ |
| 4765 | #define FSMC_BWTR3_BUSTURN_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 4766 | #define FSMC_BWTR3_BUSTURN_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 4767 | #define FSMC_BWTR3_BUSTURN_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 4768 | #define FSMC_BWTR3_BUSTURN_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 4769 | |
| 4770 | #define FSMC_BWTR3_CLKDIV ((uint32_t)0x00F00000) /*!<CLKDIV[3:0] bits (Clock divide ratio) */ |
| 4771 | #define FSMC_BWTR3_CLKDIV_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 4772 | #define FSMC_BWTR3_CLKDIV_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 4773 | #define FSMC_BWTR3_CLKDIV_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 4774 | #define FSMC_BWTR3_CLKDIV_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 4775 | |
| 4776 | #define FSMC_BWTR3_DATLAT ((uint32_t)0x0F000000) /*!<DATLA[3:0] bits (Data latency) */ |
| 4777 | #define FSMC_BWTR3_DATLAT_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 4778 | #define FSMC_BWTR3_DATLAT_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 4779 | #define FSMC_BWTR3_DATLAT_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 4780 | #define FSMC_BWTR3_DATLAT_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 4781 | |
| 4782 | #define FSMC_BWTR3_ACCMOD ((uint32_t)0x30000000) /*!<ACCMOD[1:0] bits (Access mode) */ |
| 4783 | #define FSMC_BWTR3_ACCMOD_0 ((uint32_t)0x10000000) /*!<Bit 0 */ |
| 4784 | #define FSMC_BWTR3_ACCMOD_1 ((uint32_t)0x20000000) /*!<Bit 1 */ |
| 4785 | |
| 4786 | /****************** Bit definition for FSMC_BWTR4 register ******************/ |
| 4787 | #define FSMC_BWTR4_ADDSET ((uint32_t)0x0000000F) /*!<ADDSET[3:0] bits (Address setup phase duration) */ |
| 4788 | #define FSMC_BWTR4_ADDSET_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 4789 | #define FSMC_BWTR4_ADDSET_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 4790 | #define FSMC_BWTR4_ADDSET_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 4791 | #define FSMC_BWTR4_ADDSET_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 4792 | |
| 4793 | #define FSMC_BWTR4_ADDHLD ((uint32_t)0x000000F0) /*!<ADDHLD[3:0] bits (Address-hold phase duration) */ |
| 4794 | #define FSMC_BWTR4_ADDHLD_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 4795 | #define FSMC_BWTR4_ADDHLD_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 4796 | #define FSMC_BWTR4_ADDHLD_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 4797 | #define FSMC_BWTR4_ADDHLD_3 ((uint32_t)0x00000080) /*!<Bit 3 */ |
| 4798 | |
| 4799 | #define FSMC_BWTR4_DATAST ((uint32_t)0x0000FF00) /*!<DATAST [3:0] bits (Data-phase duration) */ |
| 4800 | #define FSMC_BWTR4_DATAST_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 4801 | #define FSMC_BWTR4_DATAST_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 4802 | #define FSMC_BWTR4_DATAST_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 4803 | #define FSMC_BWTR4_DATAST_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 4804 | |
| 4805 | #define FSMC_BWTR4_BUSTURN ((uint32_t)0x000F0000) /*!<BUSTURN[3:0] bits (Bus turnaround duration) */ |
| 4806 | #define FSMC_BWTR4_BUSTURN_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 4807 | #define FSMC_BWTR4_BUSTURN_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 4808 | #define FSMC_BWTR4_BUSTURN_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 4809 | #define FSMC_BWTR4_BUSTURN_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 4810 | |
| 4811 | #define FSMC_BWTR4_CLKDIV ((uint32_t)0x00F00000) /*!<CLKDIV[3:0] bits (Clock divide ratio) */ |
| 4812 | #define FSMC_BWTR4_CLKDIV_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 4813 | #define FSMC_BWTR4_CLKDIV_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 4814 | #define FSMC_BWTR4_CLKDIV_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 4815 | #define FSMC_BWTR4_CLKDIV_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 4816 | |
| 4817 | #define FSMC_BWTR4_DATLAT ((uint32_t)0x0F000000) /*!<DATLA[3:0] bits (Data latency) */ |
| 4818 | #define FSMC_BWTR4_DATLAT_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 4819 | #define FSMC_BWTR4_DATLAT_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 4820 | #define FSMC_BWTR4_DATLAT_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 4821 | #define FSMC_BWTR4_DATLAT_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 4822 | |
| 4823 | #define FSMC_BWTR4_ACCMOD ((uint32_t)0x30000000) /*!<ACCMOD[1:0] bits (Access mode) */ |
| 4824 | #define FSMC_BWTR4_ACCMOD_0 ((uint32_t)0x10000000) /*!<Bit 0 */ |
| 4825 | #define FSMC_BWTR4_ACCMOD_1 ((uint32_t)0x20000000) /*!<Bit 1 */ |
| 4826 | |
| 4827 | /****************** Bit definition for FSMC_PCR2 register *******************/ |
| 4828 | #define FSMC_PCR2_PWAITEN ((uint32_t)0x00000002) /*!<Wait feature enable bit */ |
| 4829 | #define FSMC_PCR2_PBKEN ((uint32_t)0x00000004) /*!<PC Card/NAND Flash memory bank enable bit */ |
| 4830 | #define FSMC_PCR2_PTYP ((uint32_t)0x00000008) /*!<Memory type */ |
| 4831 | |
| 4832 | #define FSMC_PCR2_PWID ((uint32_t)0x00000030) /*!<PWID[1:0] bits (NAND Flash databus width) */ |
| 4833 | #define FSMC_PCR2_PWID_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 4834 | #define FSMC_PCR2_PWID_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 4835 | |
| 4836 | #define FSMC_PCR2_ECCEN ((uint32_t)0x00000040) /*!<ECC computation logic enable bit */ |
| 4837 | |
| 4838 | #define FSMC_PCR2_TCLR ((uint32_t)0x00001E00) /*!<TCLR[3:0] bits (CLE to RE delay) */ |
| 4839 | #define FSMC_PCR2_TCLR_0 ((uint32_t)0x00000200) /*!<Bit 0 */ |
| 4840 | #define FSMC_PCR2_TCLR_1 ((uint32_t)0x00000400) /*!<Bit 1 */ |
| 4841 | #define FSMC_PCR2_TCLR_2 ((uint32_t)0x00000800) /*!<Bit 2 */ |
| 4842 | #define FSMC_PCR2_TCLR_3 ((uint32_t)0x00001000) /*!<Bit 3 */ |
| 4843 | |
| 4844 | #define FSMC_PCR2_TAR ((uint32_t)0x0001E000) /*!<TAR[3:0] bits (ALE to RE delay) */ |
| 4845 | #define FSMC_PCR2_TAR_0 ((uint32_t)0x00002000) /*!<Bit 0 */ |
| 4846 | #define FSMC_PCR2_TAR_1 ((uint32_t)0x00004000) /*!<Bit 1 */ |
| 4847 | #define FSMC_PCR2_TAR_2 ((uint32_t)0x00008000) /*!<Bit 2 */ |
| 4848 | #define FSMC_PCR2_TAR_3 ((uint32_t)0x00010000) /*!<Bit 3 */ |
| 4849 | |
| 4850 | #define FSMC_PCR2_ECCPS ((uint32_t)0x000E0000) /*!<ECCPS[1:0] bits (ECC page size) */ |
| 4851 | #define FSMC_PCR2_ECCPS_0 ((uint32_t)0x00020000) /*!<Bit 0 */ |
| 4852 | #define FSMC_PCR2_ECCPS_1 ((uint32_t)0x00040000) /*!<Bit 1 */ |
| 4853 | #define FSMC_PCR2_ECCPS_2 ((uint32_t)0x00080000) /*!<Bit 2 */ |
| 4854 | |
| 4855 | /****************** Bit definition for FSMC_PCR3 register *******************/ |
| 4856 | #define FSMC_PCR3_PWAITEN ((uint32_t)0x00000002) /*!<Wait feature enable bit */ |
| 4857 | #define FSMC_PCR3_PBKEN ((uint32_t)0x00000004) /*!<PC Card/NAND Flash memory bank enable bit */ |
| 4858 | #define FSMC_PCR3_PTYP ((uint32_t)0x00000008) /*!<Memory type */ |
| 4859 | |
| 4860 | #define FSMC_PCR3_PWID ((uint32_t)0x00000030) /*!<PWID[1:0] bits (NAND Flash databus width) */ |
| 4861 | #define FSMC_PCR3_PWID_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 4862 | #define FSMC_PCR3_PWID_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 4863 | |
| 4864 | #define FSMC_PCR3_ECCEN ((uint32_t)0x00000040) /*!<ECC computation logic enable bit */ |
| 4865 | |
| 4866 | #define FSMC_PCR3_TCLR ((uint32_t)0x00001E00) /*!<TCLR[3:0] bits (CLE to RE delay) */ |
| 4867 | #define FSMC_PCR3_TCLR_0 ((uint32_t)0x00000200) /*!<Bit 0 */ |
| 4868 | #define FSMC_PCR3_TCLR_1 ((uint32_t)0x00000400) /*!<Bit 1 */ |
| 4869 | #define FSMC_PCR3_TCLR_2 ((uint32_t)0x00000800) /*!<Bit 2 */ |
| 4870 | #define FSMC_PCR3_TCLR_3 ((uint32_t)0x00001000) /*!<Bit 3 */ |
| 4871 | |
| 4872 | #define FSMC_PCR3_TAR ((uint32_t)0x0001E000) /*!<TAR[3:0] bits (ALE to RE delay) */ |
| 4873 | #define FSMC_PCR3_TAR_0 ((uint32_t)0x00002000) /*!<Bit 0 */ |
| 4874 | #define FSMC_PCR3_TAR_1 ((uint32_t)0x00004000) /*!<Bit 1 */ |
| 4875 | #define FSMC_PCR3_TAR_2 ((uint32_t)0x00008000) /*!<Bit 2 */ |
| 4876 | #define FSMC_PCR3_TAR_3 ((uint32_t)0x00010000) /*!<Bit 3 */ |
| 4877 | |
| 4878 | #define FSMC_PCR3_ECCPS ((uint32_t)0x000E0000) /*!<ECCPS[2:0] bits (ECC page size) */ |
| 4879 | #define FSMC_PCR3_ECCPS_0 ((uint32_t)0x00020000) /*!<Bit 0 */ |
| 4880 | #define FSMC_PCR3_ECCPS_1 ((uint32_t)0x00040000) /*!<Bit 1 */ |
| 4881 | #define FSMC_PCR3_ECCPS_2 ((uint32_t)0x00080000) /*!<Bit 2 */ |
| 4882 | |
| 4883 | /****************** Bit definition for FSMC_PCR4 register *******************/ |
| 4884 | #define FSMC_PCR4_PWAITEN ((uint32_t)0x00000002) /*!<Wait feature enable bit */ |
| 4885 | #define FSMC_PCR4_PBKEN ((uint32_t)0x00000004) /*!<PC Card/NAND Flash memory bank enable bit */ |
| 4886 | #define FSMC_PCR4_PTYP ((uint32_t)0x00000008) /*!<Memory type */ |
| 4887 | |
| 4888 | #define FSMC_PCR4_PWID ((uint32_t)0x00000030) /*!<PWID[1:0] bits (NAND Flash databus width) */ |
| 4889 | #define FSMC_PCR4_PWID_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 4890 | #define FSMC_PCR4_PWID_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 4891 | |
| 4892 | #define FSMC_PCR4_ECCEN ((uint32_t)0x00000040) /*!<ECC computation logic enable bit */ |
| 4893 | |
| 4894 | #define FSMC_PCR4_TCLR ((uint32_t)0x00001E00) /*!<TCLR[3:0] bits (CLE to RE delay) */ |
| 4895 | #define FSMC_PCR4_TCLR_0 ((uint32_t)0x00000200) /*!<Bit 0 */ |
| 4896 | #define FSMC_PCR4_TCLR_1 ((uint32_t)0x00000400) /*!<Bit 1 */ |
| 4897 | #define FSMC_PCR4_TCLR_2 ((uint32_t)0x00000800) /*!<Bit 2 */ |
| 4898 | #define FSMC_PCR4_TCLR_3 ((uint32_t)0x00001000) /*!<Bit 3 */ |
| 4899 | |
| 4900 | #define FSMC_PCR4_TAR ((uint32_t)0x0001E000) /*!<TAR[3:0] bits (ALE to RE delay) */ |
| 4901 | #define FSMC_PCR4_TAR_0 ((uint32_t)0x00002000) /*!<Bit 0 */ |
| 4902 | #define FSMC_PCR4_TAR_1 ((uint32_t)0x00004000) /*!<Bit 1 */ |
| 4903 | #define FSMC_PCR4_TAR_2 ((uint32_t)0x00008000) /*!<Bit 2 */ |
| 4904 | #define FSMC_PCR4_TAR_3 ((uint32_t)0x00010000) /*!<Bit 3 */ |
| 4905 | |
| 4906 | #define FSMC_PCR4_ECCPS ((uint32_t)0x000E0000) /*!<ECCPS[2:0] bits (ECC page size) */ |
| 4907 | #define FSMC_PCR4_ECCPS_0 ((uint32_t)0x00020000) /*!<Bit 0 */ |
| 4908 | #define FSMC_PCR4_ECCPS_1 ((uint32_t)0x00040000) /*!<Bit 1 */ |
| 4909 | #define FSMC_PCR4_ECCPS_2 ((uint32_t)0x00080000) /*!<Bit 2 */ |
| 4910 | |
| 4911 | /******************* Bit definition for FSMC_SR2 register *******************/ |
| 4912 | #define FSMC_SR2_IRS ((uint8_t)0x01) /*!<Interrupt Rising Edge status */ |
| 4913 | #define FSMC_SR2_ILS ((uint8_t)0x02) /*!<Interrupt Level status */ |
| 4914 | #define FSMC_SR2_IFS ((uint8_t)0x04) /*!<Interrupt Falling Edge status */ |
| 4915 | #define FSMC_SR2_IREN ((uint8_t)0x08) /*!<Interrupt Rising Edge detection Enable bit */ |
| 4916 | #define FSMC_SR2_ILEN ((uint8_t)0x10) /*!<Interrupt Level detection Enable bit */ |
| 4917 | #define FSMC_SR2_IFEN ((uint8_t)0x20) /*!<Interrupt Falling Edge detection Enable bit */ |
| 4918 | #define FSMC_SR2_FEMPT ((uint8_t)0x40) /*!<FIFO empty */ |
| 4919 | |
| 4920 | /******************* Bit definition for FSMC_SR3 register *******************/ |
| 4921 | #define FSMC_SR3_IRS ((uint8_t)0x01) /*!<Interrupt Rising Edge status */ |
| 4922 | #define FSMC_SR3_ILS ((uint8_t)0x02) /*!<Interrupt Level status */ |
| 4923 | #define FSMC_SR3_IFS ((uint8_t)0x04) /*!<Interrupt Falling Edge status */ |
| 4924 | #define FSMC_SR3_IREN ((uint8_t)0x08) /*!<Interrupt Rising Edge detection Enable bit */ |
| 4925 | #define FSMC_SR3_ILEN ((uint8_t)0x10) /*!<Interrupt Level detection Enable bit */ |
| 4926 | #define FSMC_SR3_IFEN ((uint8_t)0x20) /*!<Interrupt Falling Edge detection Enable bit */ |
| 4927 | #define FSMC_SR3_FEMPT ((uint8_t)0x40) /*!<FIFO empty */ |
| 4928 | |
| 4929 | /******************* Bit definition for FSMC_SR4 register *******************/ |
| 4930 | #define FSMC_SR4_IRS ((uint8_t)0x01) /*!<Interrupt Rising Edge status */ |
| 4931 | #define FSMC_SR4_ILS ((uint8_t)0x02) /*!<Interrupt Level status */ |
| 4932 | #define FSMC_SR4_IFS ((uint8_t)0x04) /*!<Interrupt Falling Edge status */ |
| 4933 | #define FSMC_SR4_IREN ((uint8_t)0x08) /*!<Interrupt Rising Edge detection Enable bit */ |
| 4934 | #define FSMC_SR4_ILEN ((uint8_t)0x10) /*!<Interrupt Level detection Enable bit */ |
| 4935 | #define FSMC_SR4_IFEN ((uint8_t)0x20) /*!<Interrupt Falling Edge detection Enable bit */ |
| 4936 | #define FSMC_SR4_FEMPT ((uint8_t)0x40) /*!<FIFO empty */ |
| 4937 | |
| 4938 | /****************** Bit definition for FSMC_PMEM2 register ******************/ |
| 4939 | #define FSMC_PMEM2_MEMSET2 ((uint32_t)0x000000FF) /*!<MEMSET2[7:0] bits (Common memory 2 setup time) */ |
| 4940 | #define FSMC_PMEM2_MEMSET2_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 4941 | #define FSMC_PMEM2_MEMSET2_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 4942 | #define FSMC_PMEM2_MEMSET2_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 4943 | #define FSMC_PMEM2_MEMSET2_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 4944 | #define FSMC_PMEM2_MEMSET2_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 4945 | #define FSMC_PMEM2_MEMSET2_5 ((uint32_t)0x00000020) /*!<Bit 5 */ |
| 4946 | #define FSMC_PMEM2_MEMSET2_6 ((uint32_t)0x00000040) /*!<Bit 6 */ |
| 4947 | #define FSMC_PMEM2_MEMSET2_7 ((uint32_t)0x00000080) /*!<Bit 7 */ |
| 4948 | |
| 4949 | #define FSMC_PMEM2_MEMWAIT2 ((uint32_t)0x0000FF00) /*!<MEMWAIT2[7:0] bits (Common memory 2 wait time) */ |
| 4950 | #define FSMC_PMEM2_MEMWAIT2_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 4951 | #define FSMC_PMEM2_MEMWAIT2_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 4952 | #define FSMC_PMEM2_MEMWAIT2_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 4953 | #define FSMC_PMEM2_MEMWAIT2_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 4954 | #define FSMC_PMEM2_MEMWAIT2_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 4955 | #define FSMC_PMEM2_MEMWAIT2_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 4956 | #define FSMC_PMEM2_MEMWAIT2_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 4957 | #define FSMC_PMEM2_MEMWAIT2_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 4958 | |
| 4959 | #define FSMC_PMEM2_MEMHOLD2 ((uint32_t)0x00FF0000) /*!<MEMHOLD2[7:0] bits (Common memory 2 hold time) */ |
| 4960 | #define FSMC_PMEM2_MEMHOLD2_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 4961 | #define FSMC_PMEM2_MEMHOLD2_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 4962 | #define FSMC_PMEM2_MEMHOLD2_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 4963 | #define FSMC_PMEM2_MEMHOLD2_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 4964 | #define FSMC_PMEM2_MEMHOLD2_4 ((uint32_t)0x00100000) /*!<Bit 4 */ |
| 4965 | #define FSMC_PMEM2_MEMHOLD2_5 ((uint32_t)0x00200000) /*!<Bit 5 */ |
| 4966 | #define FSMC_PMEM2_MEMHOLD2_6 ((uint32_t)0x00400000) /*!<Bit 6 */ |
| 4967 | #define FSMC_PMEM2_MEMHOLD2_7 ((uint32_t)0x00800000) /*!<Bit 7 */ |
| 4968 | |
| 4969 | #define FSMC_PMEM2_MEMHIZ2 ((uint32_t)0xFF000000) /*!<MEMHIZ2[7:0] bits (Common memory 2 databus HiZ time) */ |
| 4970 | #define FSMC_PMEM2_MEMHIZ2_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 4971 | #define FSMC_PMEM2_MEMHIZ2_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 4972 | #define FSMC_PMEM2_MEMHIZ2_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 4973 | #define FSMC_PMEM2_MEMHIZ2_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 4974 | #define FSMC_PMEM2_MEMHIZ2_4 ((uint32_t)0x10000000) /*!<Bit 4 */ |
| 4975 | #define FSMC_PMEM2_MEMHIZ2_5 ((uint32_t)0x20000000) /*!<Bit 5 */ |
| 4976 | #define FSMC_PMEM2_MEMHIZ2_6 ((uint32_t)0x40000000) /*!<Bit 6 */ |
| 4977 | #define FSMC_PMEM2_MEMHIZ2_7 ((uint32_t)0x80000000) /*!<Bit 7 */ |
| 4978 | |
| 4979 | /****************** Bit definition for FSMC_PMEM3 register ******************/ |
| 4980 | #define FSMC_PMEM3_MEMSET3 ((uint32_t)0x000000FF) /*!<MEMSET3[7:0] bits (Common memory 3 setup time) */ |
| 4981 | #define FSMC_PMEM3_MEMSET3_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 4982 | #define FSMC_PMEM3_MEMSET3_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 4983 | #define FSMC_PMEM3_MEMSET3_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 4984 | #define FSMC_PMEM3_MEMSET3_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 4985 | #define FSMC_PMEM3_MEMSET3_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 4986 | #define FSMC_PMEM3_MEMSET3_5 ((uint32_t)0x00000020) /*!<Bit 5 */ |
| 4987 | #define FSMC_PMEM3_MEMSET3_6 ((uint32_t)0x00000040) /*!<Bit 6 */ |
| 4988 | #define FSMC_PMEM3_MEMSET3_7 ((uint32_t)0x00000080) /*!<Bit 7 */ |
| 4989 | |
| 4990 | #define FSMC_PMEM3_MEMWAIT3 ((uint32_t)0x0000FF00) /*!<MEMWAIT3[7:0] bits (Common memory 3 wait time) */ |
| 4991 | #define FSMC_PMEM3_MEMWAIT3_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 4992 | #define FSMC_PMEM3_MEMWAIT3_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 4993 | #define FSMC_PMEM3_MEMWAIT3_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 4994 | #define FSMC_PMEM3_MEMWAIT3_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 4995 | #define FSMC_PMEM3_MEMWAIT3_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 4996 | #define FSMC_PMEM3_MEMWAIT3_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 4997 | #define FSMC_PMEM3_MEMWAIT3_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 4998 | #define FSMC_PMEM3_MEMWAIT3_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 4999 | |
| 5000 | #define FSMC_PMEM3_MEMHOLD3 ((uint32_t)0x00FF0000) /*!<MEMHOLD3[7:0] bits (Common memory 3 hold time) */ |
| 5001 | #define FSMC_PMEM3_MEMHOLD3_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 5002 | #define FSMC_PMEM3_MEMHOLD3_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 5003 | #define FSMC_PMEM3_MEMHOLD3_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 5004 | #define FSMC_PMEM3_MEMHOLD3_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 5005 | #define FSMC_PMEM3_MEMHOLD3_4 ((uint32_t)0x00100000) /*!<Bit 4 */ |
| 5006 | #define FSMC_PMEM3_MEMHOLD3_5 ((uint32_t)0x00200000) /*!<Bit 5 */ |
| 5007 | #define FSMC_PMEM3_MEMHOLD3_6 ((uint32_t)0x00400000) /*!<Bit 6 */ |
| 5008 | #define FSMC_PMEM3_MEMHOLD3_7 ((uint32_t)0x00800000) /*!<Bit 7 */ |
| 5009 | |
| 5010 | #define FSMC_PMEM3_MEMHIZ3 ((uint32_t)0xFF000000) /*!<MEMHIZ3[7:0] bits (Common memory 3 databus HiZ time) */ |
| 5011 | #define FSMC_PMEM3_MEMHIZ3_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5012 | #define FSMC_PMEM3_MEMHIZ3_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5013 | #define FSMC_PMEM3_MEMHIZ3_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5014 | #define FSMC_PMEM3_MEMHIZ3_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5015 | #define FSMC_PMEM3_MEMHIZ3_4 ((uint32_t)0x10000000) /*!<Bit 4 */ |
| 5016 | #define FSMC_PMEM3_MEMHIZ3_5 ((uint32_t)0x20000000) /*!<Bit 5 */ |
| 5017 | #define FSMC_PMEM3_MEMHIZ3_6 ((uint32_t)0x40000000) /*!<Bit 6 */ |
| 5018 | #define FSMC_PMEM3_MEMHIZ3_7 ((uint32_t)0x80000000) /*!<Bit 7 */ |
| 5019 | |
| 5020 | /****************** Bit definition for FSMC_PMEM4 register ******************/ |
| 5021 | #define FSMC_PMEM4_MEMSET4 ((uint32_t)0x000000FF) /*!<MEMSET4[7:0] bits (Common memory 4 setup time) */ |
| 5022 | #define FSMC_PMEM4_MEMSET4_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5023 | #define FSMC_PMEM4_MEMSET4_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5024 | #define FSMC_PMEM4_MEMSET4_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5025 | #define FSMC_PMEM4_MEMSET4_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5026 | #define FSMC_PMEM4_MEMSET4_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 5027 | #define FSMC_PMEM4_MEMSET4_5 ((uint32_t)0x00000020) /*!<Bit 5 */ |
| 5028 | #define FSMC_PMEM4_MEMSET4_6 ((uint32_t)0x00000040) /*!<Bit 6 */ |
| 5029 | #define FSMC_PMEM4_MEMSET4_7 ((uint32_t)0x00000080) /*!<Bit 7 */ |
| 5030 | |
| 5031 | #define FSMC_PMEM4_MEMWAIT4 ((uint32_t)0x0000FF00) /*!<MEMWAIT4[7:0] bits (Common memory 4 wait time) */ |
| 5032 | #define FSMC_PMEM4_MEMWAIT4_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5033 | #define FSMC_PMEM4_MEMWAIT4_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5034 | #define FSMC_PMEM4_MEMWAIT4_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5035 | #define FSMC_PMEM4_MEMWAIT4_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5036 | #define FSMC_PMEM4_MEMWAIT4_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 5037 | #define FSMC_PMEM4_MEMWAIT4_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 5038 | #define FSMC_PMEM4_MEMWAIT4_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 5039 | #define FSMC_PMEM4_MEMWAIT4_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 5040 | |
| 5041 | #define FSMC_PMEM4_MEMHOLD4 ((uint32_t)0x00FF0000) /*!<MEMHOLD4[7:0] bits (Common memory 4 hold time) */ |
| 5042 | #define FSMC_PMEM4_MEMHOLD4_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 5043 | #define FSMC_PMEM4_MEMHOLD4_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 5044 | #define FSMC_PMEM4_MEMHOLD4_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 5045 | #define FSMC_PMEM4_MEMHOLD4_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 5046 | #define FSMC_PMEM4_MEMHOLD4_4 ((uint32_t)0x00100000) /*!<Bit 4 */ |
| 5047 | #define FSMC_PMEM4_MEMHOLD4_5 ((uint32_t)0x00200000) /*!<Bit 5 */ |
| 5048 | #define FSMC_PMEM4_MEMHOLD4_6 ((uint32_t)0x00400000) /*!<Bit 6 */ |
| 5049 | #define FSMC_PMEM4_MEMHOLD4_7 ((uint32_t)0x00800000) /*!<Bit 7 */ |
| 5050 | |
| 5051 | #define FSMC_PMEM4_MEMHIZ4 ((uint32_t)0xFF000000) /*!<MEMHIZ4[7:0] bits (Common memory 4 databus HiZ time) */ |
| 5052 | #define FSMC_PMEM4_MEMHIZ4_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5053 | #define FSMC_PMEM4_MEMHIZ4_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5054 | #define FSMC_PMEM4_MEMHIZ4_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5055 | #define FSMC_PMEM4_MEMHIZ4_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5056 | #define FSMC_PMEM4_MEMHIZ4_4 ((uint32_t)0x10000000) /*!<Bit 4 */ |
| 5057 | #define FSMC_PMEM4_MEMHIZ4_5 ((uint32_t)0x20000000) /*!<Bit 5 */ |
| 5058 | #define FSMC_PMEM4_MEMHIZ4_6 ((uint32_t)0x40000000) /*!<Bit 6 */ |
| 5059 | #define FSMC_PMEM4_MEMHIZ4_7 ((uint32_t)0x80000000) /*!<Bit 7 */ |
| 5060 | |
| 5061 | /****************** Bit definition for FSMC_PATT2 register ******************/ |
| 5062 | #define FSMC_PATT2_ATTSET2 ((uint32_t)0x000000FF) /*!<ATTSET2[7:0] bits (Attribute memory 2 setup time) */ |
| 5063 | #define FSMC_PATT2_ATTSET2_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5064 | #define FSMC_PATT2_ATTSET2_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5065 | #define FSMC_PATT2_ATTSET2_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5066 | #define FSMC_PATT2_ATTSET2_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5067 | #define FSMC_PATT2_ATTSET2_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 5068 | #define FSMC_PATT2_ATTSET2_5 ((uint32_t)0x00000020) /*!<Bit 5 */ |
| 5069 | #define FSMC_PATT2_ATTSET2_6 ((uint32_t)0x00000040) /*!<Bit 6 */ |
| 5070 | #define FSMC_PATT2_ATTSET2_7 ((uint32_t)0x00000080) /*!<Bit 7 */ |
| 5071 | |
| 5072 | #define FSMC_PATT2_ATTWAIT2 ((uint32_t)0x0000FF00) /*!<ATTWAIT2[7:0] bits (Attribute memory 2 wait time) */ |
| 5073 | #define FSMC_PATT2_ATTWAIT2_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5074 | #define FSMC_PATT2_ATTWAIT2_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5075 | #define FSMC_PATT2_ATTWAIT2_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5076 | #define FSMC_PATT2_ATTWAIT2_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5077 | #define FSMC_PATT2_ATTWAIT2_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 5078 | #define FSMC_PATT2_ATTWAIT2_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 5079 | #define FSMC_PATT2_ATTWAIT2_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 5080 | #define FSMC_PATT2_ATTWAIT2_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 5081 | |
| 5082 | #define FSMC_PATT2_ATTHOLD2 ((uint32_t)0x00FF0000) /*!<ATTHOLD2[7:0] bits (Attribute memory 2 hold time) */ |
| 5083 | #define FSMC_PATT2_ATTHOLD2_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 5084 | #define FSMC_PATT2_ATTHOLD2_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 5085 | #define FSMC_PATT2_ATTHOLD2_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 5086 | #define FSMC_PATT2_ATTHOLD2_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 5087 | #define FSMC_PATT2_ATTHOLD2_4 ((uint32_t)0x00100000) /*!<Bit 4 */ |
| 5088 | #define FSMC_PATT2_ATTHOLD2_5 ((uint32_t)0x00200000) /*!<Bit 5 */ |
| 5089 | #define FSMC_PATT2_ATTHOLD2_6 ((uint32_t)0x00400000) /*!<Bit 6 */ |
| 5090 | #define FSMC_PATT2_ATTHOLD2_7 ((uint32_t)0x00800000) /*!<Bit 7 */ |
| 5091 | |
| 5092 | #define FSMC_PATT2_ATTHIZ2 ((uint32_t)0xFF000000) /*!<ATTHIZ2[7:0] bits (Attribute memory 2 databus HiZ time) */ |
| 5093 | #define FSMC_PATT2_ATTHIZ2_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5094 | #define FSMC_PATT2_ATTHIZ2_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5095 | #define FSMC_PATT2_ATTHIZ2_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5096 | #define FSMC_PATT2_ATTHIZ2_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5097 | #define FSMC_PATT2_ATTHIZ2_4 ((uint32_t)0x10000000) /*!<Bit 4 */ |
| 5098 | #define FSMC_PATT2_ATTHIZ2_5 ((uint32_t)0x20000000) /*!<Bit 5 */ |
| 5099 | #define FSMC_PATT2_ATTHIZ2_6 ((uint32_t)0x40000000) /*!<Bit 6 */ |
| 5100 | #define FSMC_PATT2_ATTHIZ2_7 ((uint32_t)0x80000000) /*!<Bit 7 */ |
| 5101 | |
| 5102 | /****************** Bit definition for FSMC_PATT3 register ******************/ |
| 5103 | #define FSMC_PATT3_ATTSET3 ((uint32_t)0x000000FF) /*!<ATTSET3[7:0] bits (Attribute memory 3 setup time) */ |
| 5104 | #define FSMC_PATT3_ATTSET3_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5105 | #define FSMC_PATT3_ATTSET3_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5106 | #define FSMC_PATT3_ATTSET3_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5107 | #define FSMC_PATT3_ATTSET3_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5108 | #define FSMC_PATT3_ATTSET3_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 5109 | #define FSMC_PATT3_ATTSET3_5 ((uint32_t)0x00000020) /*!<Bit 5 */ |
| 5110 | #define FSMC_PATT3_ATTSET3_6 ((uint32_t)0x00000040) /*!<Bit 6 */ |
| 5111 | #define FSMC_PATT3_ATTSET3_7 ((uint32_t)0x00000080) /*!<Bit 7 */ |
| 5112 | |
| 5113 | #define FSMC_PATT3_ATTWAIT3 ((uint32_t)0x0000FF00) /*!<ATTWAIT3[7:0] bits (Attribute memory 3 wait time) */ |
| 5114 | #define FSMC_PATT3_ATTWAIT3_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5115 | #define FSMC_PATT3_ATTWAIT3_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5116 | #define FSMC_PATT3_ATTWAIT3_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5117 | #define FSMC_PATT3_ATTWAIT3_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5118 | #define FSMC_PATT3_ATTWAIT3_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 5119 | #define FSMC_PATT3_ATTWAIT3_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 5120 | #define FSMC_PATT3_ATTWAIT3_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 5121 | #define FSMC_PATT3_ATTWAIT3_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 5122 | |
| 5123 | #define FSMC_PATT3_ATTHOLD3 ((uint32_t)0x00FF0000) /*!<ATTHOLD3[7:0] bits (Attribute memory 3 hold time) */ |
| 5124 | #define FSMC_PATT3_ATTHOLD3_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 5125 | #define FSMC_PATT3_ATTHOLD3_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 5126 | #define FSMC_PATT3_ATTHOLD3_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 5127 | #define FSMC_PATT3_ATTHOLD3_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 5128 | #define FSMC_PATT3_ATTHOLD3_4 ((uint32_t)0x00100000) /*!<Bit 4 */ |
| 5129 | #define FSMC_PATT3_ATTHOLD3_5 ((uint32_t)0x00200000) /*!<Bit 5 */ |
| 5130 | #define FSMC_PATT3_ATTHOLD3_6 ((uint32_t)0x00400000) /*!<Bit 6 */ |
| 5131 | #define FSMC_PATT3_ATTHOLD3_7 ((uint32_t)0x00800000) /*!<Bit 7 */ |
| 5132 | |
| 5133 | #define FSMC_PATT3_ATTHIZ3 ((uint32_t)0xFF000000) /*!<ATTHIZ3[7:0] bits (Attribute memory 3 databus HiZ time) */ |
| 5134 | #define FSMC_PATT3_ATTHIZ3_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5135 | #define FSMC_PATT3_ATTHIZ3_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5136 | #define FSMC_PATT3_ATTHIZ3_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5137 | #define FSMC_PATT3_ATTHIZ3_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5138 | #define FSMC_PATT3_ATTHIZ3_4 ((uint32_t)0x10000000) /*!<Bit 4 */ |
| 5139 | #define FSMC_PATT3_ATTHIZ3_5 ((uint32_t)0x20000000) /*!<Bit 5 */ |
| 5140 | #define FSMC_PATT3_ATTHIZ3_6 ((uint32_t)0x40000000) /*!<Bit 6 */ |
| 5141 | #define FSMC_PATT3_ATTHIZ3_7 ((uint32_t)0x80000000) /*!<Bit 7 */ |
| 5142 | |
| 5143 | /****************** Bit definition for FSMC_PATT4 register ******************/ |
| 5144 | #define FSMC_PATT4_ATTSET4 ((uint32_t)0x000000FF) /*!<ATTSET4[7:0] bits (Attribute memory 4 setup time) */ |
| 5145 | #define FSMC_PATT4_ATTSET4_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5146 | #define FSMC_PATT4_ATTSET4_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5147 | #define FSMC_PATT4_ATTSET4_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5148 | #define FSMC_PATT4_ATTSET4_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5149 | #define FSMC_PATT4_ATTSET4_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 5150 | #define FSMC_PATT4_ATTSET4_5 ((uint32_t)0x00000020) /*!<Bit 5 */ |
| 5151 | #define FSMC_PATT4_ATTSET4_6 ((uint32_t)0x00000040) /*!<Bit 6 */ |
| 5152 | #define FSMC_PATT4_ATTSET4_7 ((uint32_t)0x00000080) /*!<Bit 7 */ |
| 5153 | |
| 5154 | #define FSMC_PATT4_ATTWAIT4 ((uint32_t)0x0000FF00) /*!<ATTWAIT4[7:0] bits (Attribute memory 4 wait time) */ |
| 5155 | #define FSMC_PATT4_ATTWAIT4_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5156 | #define FSMC_PATT4_ATTWAIT4_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5157 | #define FSMC_PATT4_ATTWAIT4_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5158 | #define FSMC_PATT4_ATTWAIT4_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5159 | #define FSMC_PATT4_ATTWAIT4_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 5160 | #define FSMC_PATT4_ATTWAIT4_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 5161 | #define FSMC_PATT4_ATTWAIT4_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 5162 | #define FSMC_PATT4_ATTWAIT4_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 5163 | |
| 5164 | #define FSMC_PATT4_ATTHOLD4 ((uint32_t)0x00FF0000) /*!<ATTHOLD4[7:0] bits (Attribute memory 4 hold time) */ |
| 5165 | #define FSMC_PATT4_ATTHOLD4_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 5166 | #define FSMC_PATT4_ATTHOLD4_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 5167 | #define FSMC_PATT4_ATTHOLD4_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 5168 | #define FSMC_PATT4_ATTHOLD4_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 5169 | #define FSMC_PATT4_ATTHOLD4_4 ((uint32_t)0x00100000) /*!<Bit 4 */ |
| 5170 | #define FSMC_PATT4_ATTHOLD4_5 ((uint32_t)0x00200000) /*!<Bit 5 */ |
| 5171 | #define FSMC_PATT4_ATTHOLD4_6 ((uint32_t)0x00400000) /*!<Bit 6 */ |
| 5172 | #define FSMC_PATT4_ATTHOLD4_7 ((uint32_t)0x00800000) /*!<Bit 7 */ |
| 5173 | |
| 5174 | #define FSMC_PATT4_ATTHIZ4 ((uint32_t)0xFF000000) /*!<ATTHIZ4[7:0] bits (Attribute memory 4 databus HiZ time) */ |
| 5175 | #define FSMC_PATT4_ATTHIZ4_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5176 | #define FSMC_PATT4_ATTHIZ4_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5177 | #define FSMC_PATT4_ATTHIZ4_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5178 | #define FSMC_PATT4_ATTHIZ4_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5179 | #define FSMC_PATT4_ATTHIZ4_4 ((uint32_t)0x10000000) /*!<Bit 4 */ |
| 5180 | #define FSMC_PATT4_ATTHIZ4_5 ((uint32_t)0x20000000) /*!<Bit 5 */ |
| 5181 | #define FSMC_PATT4_ATTHIZ4_6 ((uint32_t)0x40000000) /*!<Bit 6 */ |
| 5182 | #define FSMC_PATT4_ATTHIZ4_7 ((uint32_t)0x80000000) /*!<Bit 7 */ |
| 5183 | |
| 5184 | /****************** Bit definition for FSMC_PIO4 register *******************/ |
| 5185 | #define FSMC_PIO4_IOSET4 ((uint32_t)0x000000FF) /*!<IOSET4[7:0] bits (I/O 4 setup time) */ |
| 5186 | #define FSMC_PIO4_IOSET4_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5187 | #define FSMC_PIO4_IOSET4_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5188 | #define FSMC_PIO4_IOSET4_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5189 | #define FSMC_PIO4_IOSET4_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5190 | #define FSMC_PIO4_IOSET4_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 5191 | #define FSMC_PIO4_IOSET4_5 ((uint32_t)0x00000020) /*!<Bit 5 */ |
| 5192 | #define FSMC_PIO4_IOSET4_6 ((uint32_t)0x00000040) /*!<Bit 6 */ |
| 5193 | #define FSMC_PIO4_IOSET4_7 ((uint32_t)0x00000080) /*!<Bit 7 */ |
| 5194 | |
| 5195 | #define FSMC_PIO4_IOWAIT4 ((uint32_t)0x0000FF00) /*!<IOWAIT4[7:0] bits (I/O 4 wait time) */ |
| 5196 | #define FSMC_PIO4_IOWAIT4_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5197 | #define FSMC_PIO4_IOWAIT4_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5198 | #define FSMC_PIO4_IOWAIT4_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5199 | #define FSMC_PIO4_IOWAIT4_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5200 | #define FSMC_PIO4_IOWAIT4_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 5201 | #define FSMC_PIO4_IOWAIT4_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 5202 | #define FSMC_PIO4_IOWAIT4_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 5203 | #define FSMC_PIO4_IOWAIT4_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 5204 | |
| 5205 | #define FSMC_PIO4_IOHOLD4 ((uint32_t)0x00FF0000) /*!<IOHOLD4[7:0] bits (I/O 4 hold time) */ |
| 5206 | #define FSMC_PIO4_IOHOLD4_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 5207 | #define FSMC_PIO4_IOHOLD4_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 5208 | #define FSMC_PIO4_IOHOLD4_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 5209 | #define FSMC_PIO4_IOHOLD4_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 5210 | #define FSMC_PIO4_IOHOLD4_4 ((uint32_t)0x00100000) /*!<Bit 4 */ |
| 5211 | #define FSMC_PIO4_IOHOLD4_5 ((uint32_t)0x00200000) /*!<Bit 5 */ |
| 5212 | #define FSMC_PIO4_IOHOLD4_6 ((uint32_t)0x00400000) /*!<Bit 6 */ |
| 5213 | #define FSMC_PIO4_IOHOLD4_7 ((uint32_t)0x00800000) /*!<Bit 7 */ |
| 5214 | |
| 5215 | #define FSMC_PIO4_IOHIZ4 ((uint32_t)0xFF000000) /*!<IOHIZ4[7:0] bits (I/O 4 databus HiZ time) */ |
| 5216 | #define FSMC_PIO4_IOHIZ4_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5217 | #define FSMC_PIO4_IOHIZ4_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5218 | #define FSMC_PIO4_IOHIZ4_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5219 | #define FSMC_PIO4_IOHIZ4_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5220 | #define FSMC_PIO4_IOHIZ4_4 ((uint32_t)0x10000000) /*!<Bit 4 */ |
| 5221 | #define FSMC_PIO4_IOHIZ4_5 ((uint32_t)0x20000000) /*!<Bit 5 */ |
| 5222 | #define FSMC_PIO4_IOHIZ4_6 ((uint32_t)0x40000000) /*!<Bit 6 */ |
| 5223 | #define FSMC_PIO4_IOHIZ4_7 ((uint32_t)0x80000000) /*!<Bit 7 */ |
| 5224 | |
| 5225 | /****************** Bit definition for FSMC_ECCR2 register ******************/ |
| 5226 | #define FSMC_ECCR2_ECC2 ((uint32_t)0xFFFFFFFF) /*!<ECC result */ |
| 5227 | |
| 5228 | /****************** Bit definition for FSMC_ECCR3 register ******************/ |
| 5229 | #define FSMC_ECCR3_ECC3 ((uint32_t)0xFFFFFFFF) /*!<ECC result */ |
| 5230 | #endif /* STM32F40_41xxx */ |
| 5231 | |
| 5232 | #if defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F446xx) |
| 5233 | /******************************************************************************/ |
| 5234 | /* */ |
| 5235 | /* Flexible Memory Controller */ |
| 5236 | /* */ |
| 5237 | /******************************************************************************/ |
| 5238 | /****************** Bit definition for FMC_BCR1 register *******************/ |
| 5239 | #define FMC_BCR1_MBKEN ((uint32_t)0x00000001) /*!<Memory bank enable bit */ |
| 5240 | #define FMC_BCR1_MUXEN ((uint32_t)0x00000002) /*!<Address/data multiplexing enable bit */ |
| 5241 | |
| 5242 | #define FMC_BCR1_MTYP ((uint32_t)0x0000000C) /*!<MTYP[1:0] bits (Memory type) */ |
| 5243 | #define FMC_BCR1_MTYP_0 ((uint32_t)0x00000004) /*!<Bit 0 */ |
| 5244 | #define FMC_BCR1_MTYP_1 ((uint32_t)0x00000008) /*!<Bit 1 */ |
| 5245 | |
| 5246 | #define FMC_BCR1_MWID ((uint32_t)0x00000030) /*!<MWID[1:0] bits (Memory data bus width) */ |
| 5247 | #define FMC_BCR1_MWID_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 5248 | #define FMC_BCR1_MWID_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 5249 | |
| 5250 | #define FMC_BCR1_FACCEN ((uint32_t)0x00000040) /*!<Flash access enable */ |
| 5251 | #define FMC_BCR1_BURSTEN ((uint32_t)0x00000100) /*!<Burst enable bit */ |
| 5252 | #define FMC_BCR1_WAITPOL ((uint32_t)0x00000200) /*!<Wait signal polarity bit */ |
| 5253 | #define FMC_BCR1_WRAPMOD ((uint32_t)0x00000400) /*!<Wrapped burst mode support */ |
| 5254 | #define FMC_BCR1_WAITCFG ((uint32_t)0x00000800) /*!<Wait timing configuration */ |
| 5255 | #define FMC_BCR1_WREN ((uint32_t)0x00001000) /*!<Write enable bit */ |
| 5256 | #define FMC_BCR1_WAITEN ((uint32_t)0x00002000) /*!<Wait enable bit */ |
| 5257 | #define FMC_BCR1_EXTMOD ((uint32_t)0x00004000) /*!<Extended mode enable */ |
| 5258 | #define FMC_BCR1_ASYNCWAIT ((uint32_t)0x00008000) /*!<Asynchronous wait */ |
| 5259 | #define FMC_BCR1_CBURSTRW ((uint32_t)0x00080000) /*!<Write burst enable */ |
| 5260 | #define FMC_BCR1_CCLKEN ((uint32_t)0x00100000) /*!<Continous clock enable */ |
| 5261 | |
| 5262 | /****************** Bit definition for FMC_BCR2 register *******************/ |
| 5263 | #define FMC_BCR2_MBKEN ((uint32_t)0x00000001) /*!<Memory bank enable bit */ |
| 5264 | #define FMC_BCR2_MUXEN ((uint32_t)0x00000002) /*!<Address/data multiplexing enable bit */ |
| 5265 | |
| 5266 | #define FMC_BCR2_MTYP ((uint32_t)0x0000000C) /*!<MTYP[1:0] bits (Memory type) */ |
| 5267 | #define FMC_BCR2_MTYP_0 ((uint32_t)0x00000004) /*!<Bit 0 */ |
| 5268 | #define FMC_BCR2_MTYP_1 ((uint32_t)0x00000008) /*!<Bit 1 */ |
| 5269 | |
| 5270 | #define FMC_BCR2_MWID ((uint32_t)0x00000030) /*!<MWID[1:0] bits (Memory data bus width) */ |
| 5271 | #define FMC_BCR2_MWID_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 5272 | #define FMC_BCR2_MWID_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 5273 | |
| 5274 | #define FMC_BCR2_FACCEN ((uint32_t)0x00000040) /*!<Flash access enable */ |
| 5275 | #define FMC_BCR2_BURSTEN ((uint32_t)0x00000100) /*!<Burst enable bit */ |
| 5276 | #define FMC_BCR2_WAITPOL ((uint32_t)0x00000200) /*!<Wait signal polarity bit */ |
| 5277 | #define FMC_BCR2_WRAPMOD ((uint32_t)0x00000400) /*!<Wrapped burst mode support */ |
| 5278 | #define FMC_BCR2_WAITCFG ((uint32_t)0x00000800) /*!<Wait timing configuration */ |
| 5279 | #define FMC_BCR2_WREN ((uint32_t)0x00001000) /*!<Write enable bit */ |
| 5280 | #define FMC_BCR2_WAITEN ((uint32_t)0x00002000) /*!<Wait enable bit */ |
| 5281 | #define FMC_BCR2_EXTMOD ((uint32_t)0x00004000) /*!<Extended mode enable */ |
| 5282 | #define FMC_BCR2_ASYNCWAIT ((uint32_t)0x00008000) /*!<Asynchronous wait */ |
| 5283 | #define FMC_BCR2_CBURSTRW ((uint32_t)0x00080000) /*!<Write burst enable */ |
| 5284 | |
| 5285 | /****************** Bit definition for FMC_BCR3 register *******************/ |
| 5286 | #define FMC_BCR3_MBKEN ((uint32_t)0x00000001) /*!<Memory bank enable bit */ |
| 5287 | #define FMC_BCR3_MUXEN ((uint32_t)0x00000002) /*!<Address/data multiplexing enable bit */ |
| 5288 | |
| 5289 | #define FMC_BCR3_MTYP ((uint32_t)0x0000000C) /*!<MTYP[1:0] bits (Memory type) */ |
| 5290 | #define FMC_BCR3_MTYP_0 ((uint32_t)0x00000004) /*!<Bit 0 */ |
| 5291 | #define FMC_BCR3_MTYP_1 ((uint32_t)0x00000008) /*!<Bit 1 */ |
| 5292 | |
| 5293 | #define FMC_BCR3_MWID ((uint32_t)0x00000030) /*!<MWID[1:0] bits (Memory data bus width) */ |
| 5294 | #define FMC_BCR3_MWID_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 5295 | #define FMC_BCR3_MWID_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 5296 | |
| 5297 | #define FMC_BCR3_FACCEN ((uint32_t)0x00000040) /*!<Flash access enable */ |
| 5298 | #define FMC_BCR3_BURSTEN ((uint32_t)0x00000100) /*!<Burst enable bit */ |
| 5299 | #define FMC_BCR3_WAITPOL ((uint32_t)0x00000200) /*!<Wait signal polarity bit */ |
| 5300 | #define FMC_BCR3_WRAPMOD ((uint32_t)0x00000400) /*!<Wrapped burst mode support */ |
| 5301 | #define FMC_BCR3_WAITCFG ((uint32_t)0x00000800) /*!<Wait timing configuration */ |
| 5302 | #define FMC_BCR3_WREN ((uint32_t)0x00001000) /*!<Write enable bit */ |
| 5303 | #define FMC_BCR3_WAITEN ((uint32_t)0x00002000) /*!<Wait enable bit */ |
| 5304 | #define FMC_BCR3_EXTMOD ((uint32_t)0x00004000) /*!<Extended mode enable */ |
| 5305 | #define FMC_BCR3_ASYNCWAIT ((uint32_t)0x00008000) /*!<Asynchronous wait */ |
| 5306 | #define FMC_BCR3_CBURSTRW ((uint32_t)0x00080000) /*!<Write burst enable */ |
| 5307 | |
| 5308 | /****************** Bit definition for FMC_BCR4 register *******************/ |
| 5309 | #define FMC_BCR4_MBKEN ((uint32_t)0x00000001) /*!<Memory bank enable bit */ |
| 5310 | #define FMC_BCR4_MUXEN ((uint32_t)0x00000002) /*!<Address/data multiplexing enable bit */ |
| 5311 | |
| 5312 | #define FMC_BCR4_MTYP ((uint32_t)0x0000000C) /*!<MTYP[1:0] bits (Memory type) */ |
| 5313 | #define FMC_BCR4_MTYP_0 ((uint32_t)0x00000004) /*!<Bit 0 */ |
| 5314 | #define FMC_BCR4_MTYP_1 ((uint32_t)0x00000008) /*!<Bit 1 */ |
| 5315 | |
| 5316 | #define FMC_BCR4_MWID ((uint32_t)0x00000030) /*!<MWID[1:0] bits (Memory data bus width) */ |
| 5317 | #define FMC_BCR4_MWID_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 5318 | #define FMC_BCR4_MWID_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 5319 | |
| 5320 | #define FMC_BCR4_FACCEN ((uint32_t)0x00000040) /*!<Flash access enable */ |
| 5321 | #define FMC_BCR4_BURSTEN ((uint32_t)0x00000100) /*!<Burst enable bit */ |
| 5322 | #define FMC_BCR4_WAITPOL ((uint32_t)0x00000200) /*!<Wait signal polarity bit */ |
| 5323 | #define FMC_BCR4_WRAPMOD ((uint32_t)0x00000400) /*!<Wrapped burst mode support */ |
| 5324 | #define FMC_BCR4_WAITCFG ((uint32_t)0x00000800) /*!<Wait timing configuration */ |
| 5325 | #define FMC_BCR4_WREN ((uint32_t)0x00001000) /*!<Write enable bit */ |
| 5326 | #define FMC_BCR4_WAITEN ((uint32_t)0x00002000) /*!<Wait enable bit */ |
| 5327 | #define FMC_BCR4_EXTMOD ((uint32_t)0x00004000) /*!<Extended mode enable */ |
| 5328 | #define FMC_BCR4_ASYNCWAIT ((uint32_t)0x00008000) /*!<Asynchronous wait */ |
| 5329 | #define FMC_BCR4_CBURSTRW ((uint32_t)0x00080000) /*!<Write burst enable */ |
| 5330 | |
| 5331 | /****************** Bit definition for FMC_BTR1 register ******************/ |
| 5332 | #define FMC_BTR1_ADDSET ((uint32_t)0x0000000F) /*!<ADDSET[3:0] bits (Address setup phase duration) */ |
| 5333 | #define FMC_BTR1_ADDSET_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5334 | #define FMC_BTR1_ADDSET_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5335 | #define FMC_BTR1_ADDSET_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5336 | #define FMC_BTR1_ADDSET_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5337 | |
| 5338 | #define FMC_BTR1_ADDHLD ((uint32_t)0x000000F0) /*!<ADDHLD[3:0] bits (Address-hold phase duration) */ |
| 5339 | #define FMC_BTR1_ADDHLD_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 5340 | #define FMC_BTR1_ADDHLD_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 5341 | #define FMC_BTR1_ADDHLD_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 5342 | #define FMC_BTR1_ADDHLD_3 ((uint32_t)0x00000080) /*!<Bit 3 */ |
| 5343 | |
| 5344 | #define FMC_BTR1_DATAST ((uint32_t)0x0000FF00) /*!<DATAST [3:0] bits (Data-phase duration) */ |
| 5345 | #define FMC_BTR1_DATAST_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5346 | #define FMC_BTR1_DATAST_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5347 | #define FMC_BTR1_DATAST_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5348 | #define FMC_BTR1_DATAST_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5349 | #define FMC_BTR1_DATAST_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 5350 | #define FMC_BTR1_DATAST_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 5351 | #define FMC_BTR1_DATAST_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 5352 | #define FMC_BTR1_DATAST_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 5353 | |
| 5354 | #define FMC_BTR1_BUSTURN ((uint32_t)0x000F0000) /*!<BUSTURN[3:0] bits (Bus turnaround phase duration) */ |
| 5355 | #define FMC_BTR1_BUSTURN_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 5356 | #define FMC_BTR1_BUSTURN_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 5357 | #define FMC_BTR1_BUSTURN_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 5358 | #define FMC_BTR1_BUSTURN_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 5359 | |
| 5360 | #define FMC_BTR1_CLKDIV ((uint32_t)0x00F00000) /*!<CLKDIV[3:0] bits (Clock divide ratio) */ |
| 5361 | #define FMC_BTR1_CLKDIV_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 5362 | #define FMC_BTR1_CLKDIV_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 5363 | #define FMC_BTR1_CLKDIV_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 5364 | #define FMC_BTR1_CLKDIV_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 5365 | |
| 5366 | #define FMC_BTR1_DATLAT ((uint32_t)0x0F000000) /*!<DATLA[3:0] bits (Data latency) */ |
| 5367 | #define FMC_BTR1_DATLAT_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5368 | #define FMC_BTR1_DATLAT_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5369 | #define FMC_BTR1_DATLAT_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5370 | #define FMC_BTR1_DATLAT_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5371 | |
| 5372 | #define FMC_BTR1_ACCMOD ((uint32_t)0x30000000) /*!<ACCMOD[1:0] bits (Access mode) */ |
| 5373 | #define FMC_BTR1_ACCMOD_0 ((uint32_t)0x10000000) /*!<Bit 0 */ |
| 5374 | #define FMC_BTR1_ACCMOD_1 ((uint32_t)0x20000000) /*!<Bit 1 */ |
| 5375 | |
| 5376 | /****************** Bit definition for FMC_BTR2 register *******************/ |
| 5377 | #define FMC_BTR2_ADDSET ((uint32_t)0x0000000F) /*!<ADDSET[3:0] bits (Address setup phase duration) */ |
| 5378 | #define FMC_BTR2_ADDSET_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5379 | #define FMC_BTR2_ADDSET_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5380 | #define FMC_BTR2_ADDSET_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5381 | #define FMC_BTR2_ADDSET_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5382 | |
| 5383 | #define FMC_BTR2_ADDHLD ((uint32_t)0x000000F0) /*!<ADDHLD[3:0] bits (Address-hold phase duration) */ |
| 5384 | #define FMC_BTR2_ADDHLD_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 5385 | #define FMC_BTR2_ADDHLD_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 5386 | #define FMC_BTR2_ADDHLD_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 5387 | #define FMC_BTR2_ADDHLD_3 ((uint32_t)0x00000080) /*!<Bit 3 */ |
| 5388 | |
| 5389 | #define FMC_BTR2_DATAST ((uint32_t)0x0000FF00) /*!<DATAST [3:0] bits (Data-phase duration) */ |
| 5390 | #define FMC_BTR2_DATAST_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5391 | #define FMC_BTR2_DATAST_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5392 | #define FMC_BTR2_DATAST_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5393 | #define FMC_BTR2_DATAST_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5394 | #define FMC_BTR2_DATAST_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 5395 | #define FMC_BTR2_DATAST_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 5396 | #define FMC_BTR2_DATAST_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 5397 | #define FMC_BTR2_DATAST_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 5398 | |
| 5399 | #define FMC_BTR2_BUSTURN ((uint32_t)0x000F0000) /*!<BUSTURN[3:0] bits (Bus turnaround phase duration) */ |
| 5400 | #define FMC_BTR2_BUSTURN_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 5401 | #define FMC_BTR2_BUSTURN_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 5402 | #define FMC_BTR2_BUSTURN_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 5403 | #define FMC_BTR2_BUSTURN_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 5404 | |
| 5405 | #define FMC_BTR2_CLKDIV ((uint32_t)0x00F00000) /*!<CLKDIV[3:0] bits (Clock divide ratio) */ |
| 5406 | #define FMC_BTR2_CLKDIV_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 5407 | #define FMC_BTR2_CLKDIV_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 5408 | #define FMC_BTR2_CLKDIV_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 5409 | #define FMC_BTR2_CLKDIV_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 5410 | |
| 5411 | #define FMC_BTR2_DATLAT ((uint32_t)0x0F000000) /*!<DATLA[3:0] bits (Data latency) */ |
| 5412 | #define FMC_BTR2_DATLAT_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5413 | #define FMC_BTR2_DATLAT_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5414 | #define FMC_BTR2_DATLAT_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5415 | #define FMC_BTR2_DATLAT_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5416 | |
| 5417 | #define FMC_BTR2_ACCMOD ((uint32_t)0x30000000) /*!<ACCMOD[1:0] bits (Access mode) */ |
| 5418 | #define FMC_BTR2_ACCMOD_0 ((uint32_t)0x10000000) /*!<Bit 0 */ |
| 5419 | #define FMC_BTR2_ACCMOD_1 ((uint32_t)0x20000000) /*!<Bit 1 */ |
| 5420 | |
| 5421 | /******************* Bit definition for FMC_BTR3 register *******************/ |
| 5422 | #define FMC_BTR3_ADDSET ((uint32_t)0x0000000F) /*!<ADDSET[3:0] bits (Address setup phase duration) */ |
| 5423 | #define FMC_BTR3_ADDSET_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5424 | #define FMC_BTR3_ADDSET_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5425 | #define FMC_BTR3_ADDSET_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5426 | #define FMC_BTR3_ADDSET_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5427 | |
| 5428 | #define FMC_BTR3_ADDHLD ((uint32_t)0x000000F0) /*!<ADDHLD[3:0] bits (Address-hold phase duration) */ |
| 5429 | #define FMC_BTR3_ADDHLD_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 5430 | #define FMC_BTR3_ADDHLD_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 5431 | #define FMC_BTR3_ADDHLD_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 5432 | #define FMC_BTR3_ADDHLD_3 ((uint32_t)0x00000080) /*!<Bit 3 */ |
| 5433 | |
| 5434 | #define FMC_BTR3_DATAST ((uint32_t)0x0000FF00) /*!<DATAST [3:0] bits (Data-phase duration) */ |
| 5435 | #define FMC_BTR3_DATAST_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5436 | #define FMC_BTR3_DATAST_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5437 | #define FMC_BTR3_DATAST_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5438 | #define FMC_BTR3_DATAST_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5439 | #define FMC_BTR3_DATAST_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 5440 | #define FMC_BTR3_DATAST_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 5441 | #define FMC_BTR3_DATAST_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 5442 | #define FMC_BTR3_DATAST_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 5443 | |
| 5444 | #define FMC_BTR3_BUSTURN ((uint32_t)0x000F0000) /*!<BUSTURN[3:0] bits (Bus turnaround phase duration) */ |
| 5445 | #define FMC_BTR3_BUSTURN_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 5446 | #define FMC_BTR3_BUSTURN_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 5447 | #define FMC_BTR3_BUSTURN_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 5448 | #define FMC_BTR3_BUSTURN_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 5449 | |
| 5450 | #define FMC_BTR3_CLKDIV ((uint32_t)0x00F00000) /*!<CLKDIV[3:0] bits (Clock divide ratio) */ |
| 5451 | #define FMC_BTR3_CLKDIV_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 5452 | #define FMC_BTR3_CLKDIV_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 5453 | #define FMC_BTR3_CLKDIV_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 5454 | #define FMC_BTR3_CLKDIV_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 5455 | |
| 5456 | #define FMC_BTR3_DATLAT ((uint32_t)0x0F000000) /*!<DATLA[3:0] bits (Data latency) */ |
| 5457 | #define FMC_BTR3_DATLAT_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5458 | #define FMC_BTR3_DATLAT_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5459 | #define FMC_BTR3_DATLAT_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5460 | #define FMC_BTR3_DATLAT_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5461 | |
| 5462 | #define FMC_BTR3_ACCMOD ((uint32_t)0x30000000) /*!<ACCMOD[1:0] bits (Access mode) */ |
| 5463 | #define FMC_BTR3_ACCMOD_0 ((uint32_t)0x10000000) /*!<Bit 0 */ |
| 5464 | #define FMC_BTR3_ACCMOD_1 ((uint32_t)0x20000000) /*!<Bit 1 */ |
| 5465 | |
| 5466 | /****************** Bit definition for FMC_BTR4 register *******************/ |
| 5467 | #define FMC_BTR4_ADDSET ((uint32_t)0x0000000F) /*!<ADDSET[3:0] bits (Address setup phase duration) */ |
| 5468 | #define FMC_BTR4_ADDSET_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5469 | #define FMC_BTR4_ADDSET_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5470 | #define FMC_BTR4_ADDSET_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5471 | #define FMC_BTR4_ADDSET_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5472 | |
| 5473 | #define FMC_BTR4_ADDHLD ((uint32_t)0x000000F0) /*!<ADDHLD[3:0] bits (Address-hold phase duration) */ |
| 5474 | #define FMC_BTR4_ADDHLD_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 5475 | #define FMC_BTR4_ADDHLD_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 5476 | #define FMC_BTR4_ADDHLD_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 5477 | #define FMC_BTR4_ADDHLD_3 ((uint32_t)0x00000080) /*!<Bit 3 */ |
| 5478 | |
| 5479 | #define FMC_BTR4_DATAST ((uint32_t)0x0000FF00) /*!<DATAST [3:0] bits (Data-phase duration) */ |
| 5480 | #define FMC_BTR4_DATAST_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5481 | #define FMC_BTR4_DATAST_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5482 | #define FMC_BTR4_DATAST_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5483 | #define FMC_BTR4_DATAST_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5484 | #define FMC_BTR4_DATAST_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 5485 | #define FMC_BTR4_DATAST_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 5486 | #define FMC_BTR4_DATAST_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 5487 | #define FMC_BTR4_DATAST_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 5488 | |
| 5489 | #define FMC_BTR4_BUSTURN ((uint32_t)0x000F0000) /*!<BUSTURN[3:0] bits (Bus turnaround phase duration) */ |
| 5490 | #define FMC_BTR4_BUSTURN_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 5491 | #define FMC_BTR4_BUSTURN_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 5492 | #define FMC_BTR4_BUSTURN_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 5493 | #define FMC_BTR4_BUSTURN_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 5494 | |
| 5495 | #define FMC_BTR4_CLKDIV ((uint32_t)0x00F00000) /*!<CLKDIV[3:0] bits (Clock divide ratio) */ |
| 5496 | #define FMC_BTR4_CLKDIV_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 5497 | #define FMC_BTR4_CLKDIV_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 5498 | #define FMC_BTR4_CLKDIV_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 5499 | #define FMC_BTR4_CLKDIV_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 5500 | |
| 5501 | #define FMC_BTR4_DATLAT ((uint32_t)0x0F000000) /*!<DATLA[3:0] bits (Data latency) */ |
| 5502 | #define FMC_BTR4_DATLAT_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5503 | #define FMC_BTR4_DATLAT_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5504 | #define FMC_BTR4_DATLAT_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5505 | #define FMC_BTR4_DATLAT_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5506 | |
| 5507 | #define FMC_BTR4_ACCMOD ((uint32_t)0x30000000) /*!<ACCMOD[1:0] bits (Access mode) */ |
| 5508 | #define FMC_BTR4_ACCMOD_0 ((uint32_t)0x10000000) /*!<Bit 0 */ |
| 5509 | #define FMC_BTR4_ACCMOD_1 ((uint32_t)0x20000000) /*!<Bit 1 */ |
| 5510 | |
| 5511 | /****************** Bit definition for FMC_BWTR1 register ******************/ |
| 5512 | #define FMC_BWTR1_ADDSET ((uint32_t)0x0000000F) /*!<ADDSET[3:0] bits (Address setup phase duration) */ |
| 5513 | #define FMC_BWTR1_ADDSET_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5514 | #define FMC_BWTR1_ADDSET_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5515 | #define FMC_BWTR1_ADDSET_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5516 | #define FMC_BWTR1_ADDSET_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5517 | |
| 5518 | #define FMC_BWTR1_ADDHLD ((uint32_t)0x000000F0) /*!<ADDHLD[3:0] bits (Address-hold phase duration) */ |
| 5519 | #define FMC_BWTR1_ADDHLD_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 5520 | #define FMC_BWTR1_ADDHLD_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 5521 | #define FMC_BWTR1_ADDHLD_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 5522 | #define FMC_BWTR1_ADDHLD_3 ((uint32_t)0x00000080) /*!<Bit 3 */ |
| 5523 | |
| 5524 | #define FMC_BWTR1_DATAST ((uint32_t)0x0000FF00) /*!<DATAST [3:0] bits (Data-phase duration) */ |
| 5525 | #define FMC_BWTR1_DATAST_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5526 | #define FMC_BWTR1_DATAST_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5527 | #define FMC_BWTR1_DATAST_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5528 | #define FMC_BWTR1_DATAST_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5529 | #define FMC_BWTR1_DATAST_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 5530 | #define FMC_BWTR1_DATAST_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 5531 | #define FMC_BWTR1_DATAST_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 5532 | #define FMC_BWTR1_DATAST_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 5533 | |
| 5534 | #define FMC_BWTR1_CLKDIV ((uint32_t)0x00F00000) /*!<CLKDIV[3:0] bits (Clock divide ratio) */ |
| 5535 | #define FMC_BWTR1_CLKDIV_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 5536 | #define FMC_BWTR1_CLKDIV_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 5537 | #define FMC_BWTR1_CLKDIV_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 5538 | #define FMC_BWTR1_CLKDIV_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 5539 | |
| 5540 | #define FMC_BWTR1_DATLAT ((uint32_t)0x0F000000) /*!<DATLA[3:0] bits (Data latency) */ |
| 5541 | #define FMC_BWTR1_DATLAT_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5542 | #define FMC_BWTR1_DATLAT_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5543 | #define FMC_BWTR1_DATLAT_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5544 | #define FMC_BWTR1_DATLAT_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5545 | |
| 5546 | #define FMC_BWTR1_ACCMOD ((uint32_t)0x30000000) /*!<ACCMOD[1:0] bits (Access mode) */ |
| 5547 | #define FMC_BWTR1_ACCMOD_0 ((uint32_t)0x10000000) /*!<Bit 0 */ |
| 5548 | #define FMC_BWTR1_ACCMOD_1 ((uint32_t)0x20000000) /*!<Bit 1 */ |
| 5549 | |
| 5550 | /****************** Bit definition for FMC_BWTR2 register ******************/ |
| 5551 | #define FMC_BWTR2_ADDSET ((uint32_t)0x0000000F) /*!<ADDSET[3:0] bits (Address setup phase duration) */ |
| 5552 | #define FMC_BWTR2_ADDSET_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5553 | #define FMC_BWTR2_ADDSET_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5554 | #define FMC_BWTR2_ADDSET_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5555 | #define FMC_BWTR2_ADDSET_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5556 | |
| 5557 | #define FMC_BWTR2_ADDHLD ((uint32_t)0x000000F0) /*!<ADDHLD[3:0] bits (Address-hold phase duration) */ |
| 5558 | #define FMC_BWTR2_ADDHLD_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 5559 | #define FMC_BWTR2_ADDHLD_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 5560 | #define FMC_BWTR2_ADDHLD_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 5561 | #define FMC_BWTR2_ADDHLD_3 ((uint32_t)0x00000080) /*!<Bit 3 */ |
| 5562 | |
| 5563 | #define FMC_BWTR2_DATAST ((uint32_t)0x0000FF00) /*!<DATAST [3:0] bits (Data-phase duration) */ |
| 5564 | #define FMC_BWTR2_DATAST_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5565 | #define FMC_BWTR2_DATAST_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5566 | #define FMC_BWTR2_DATAST_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5567 | #define FMC_BWTR2_DATAST_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5568 | #define FMC_BWTR2_DATAST_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 5569 | #define FMC_BWTR2_DATAST_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 5570 | #define FMC_BWTR2_DATAST_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 5571 | #define FMC_BWTR2_DATAST_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 5572 | |
| 5573 | #define FMC_BWTR2_CLKDIV ((uint32_t)0x00F00000) /*!<CLKDIV[3:0] bits (Clock divide ratio) */ |
| 5574 | #define FMC_BWTR2_CLKDIV_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 5575 | #define FMC_BWTR2_CLKDIV_1 ((uint32_t)0x00200000) /*!<Bit 1*/ |
| 5576 | #define FMC_BWTR2_CLKDIV_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 5577 | #define FMC_BWTR2_CLKDIV_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 5578 | |
| 5579 | #define FMC_BWTR2_DATLAT ((uint32_t)0x0F000000) /*!<DATLA[3:0] bits (Data latency) */ |
| 5580 | #define FMC_BWTR2_DATLAT_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5581 | #define FMC_BWTR2_DATLAT_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5582 | #define FMC_BWTR2_DATLAT_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5583 | #define FMC_BWTR2_DATLAT_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5584 | |
| 5585 | #define FMC_BWTR2_ACCMOD ((uint32_t)0x30000000) /*!<ACCMOD[1:0] bits (Access mode) */ |
| 5586 | #define FMC_BWTR2_ACCMOD_0 ((uint32_t)0x10000000) /*!<Bit 0 */ |
| 5587 | #define FMC_BWTR2_ACCMOD_1 ((uint32_t)0x20000000) /*!<Bit 1 */ |
| 5588 | |
| 5589 | /****************** Bit definition for FMC_BWTR3 register ******************/ |
| 5590 | #define FMC_BWTR3_ADDSET ((uint32_t)0x0000000F) /*!<ADDSET[3:0] bits (Address setup phase duration) */ |
| 5591 | #define FMC_BWTR3_ADDSET_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5592 | #define FMC_BWTR3_ADDSET_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5593 | #define FMC_BWTR3_ADDSET_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5594 | #define FMC_BWTR3_ADDSET_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5595 | |
| 5596 | #define FMC_BWTR3_ADDHLD ((uint32_t)0x000000F0) /*!<ADDHLD[3:0] bits (Address-hold phase duration) */ |
| 5597 | #define FMC_BWTR3_ADDHLD_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 5598 | #define FMC_BWTR3_ADDHLD_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 5599 | #define FMC_BWTR3_ADDHLD_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 5600 | #define FMC_BWTR3_ADDHLD_3 ((uint32_t)0x00000080) /*!<Bit 3 */ |
| 5601 | |
| 5602 | #define FMC_BWTR3_DATAST ((uint32_t)0x0000FF00) /*!<DATAST [3:0] bits (Data-phase duration) */ |
| 5603 | #define FMC_BWTR3_DATAST_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5604 | #define FMC_BWTR3_DATAST_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5605 | #define FMC_BWTR3_DATAST_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5606 | #define FMC_BWTR3_DATAST_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5607 | #define FMC_BWTR3_DATAST_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 5608 | #define FMC_BWTR3_DATAST_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 5609 | #define FMC_BWTR3_DATAST_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 5610 | #define FMC_BWTR3_DATAST_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 5611 | |
| 5612 | #define FMC_BWTR3_CLKDIV ((uint32_t)0x00F00000) /*!<CLKDIV[3:0] bits (Clock divide ratio) */ |
| 5613 | #define FMC_BWTR3_CLKDIV_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 5614 | #define FMC_BWTR3_CLKDIV_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 5615 | #define FMC_BWTR3_CLKDIV_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 5616 | #define FMC_BWTR3_CLKDIV_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 5617 | |
| 5618 | #define FMC_BWTR3_DATLAT ((uint32_t)0x0F000000) /*!<DATLA[3:0] bits (Data latency) */ |
| 5619 | #define FMC_BWTR3_DATLAT_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5620 | #define FMC_BWTR3_DATLAT_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5621 | #define FMC_BWTR3_DATLAT_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5622 | #define FMC_BWTR3_DATLAT_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5623 | |
| 5624 | #define FMC_BWTR3_ACCMOD ((uint32_t)0x30000000) /*!<ACCMOD[1:0] bits (Access mode) */ |
| 5625 | #define FMC_BWTR3_ACCMOD_0 ((uint32_t)0x10000000) /*!<Bit 0 */ |
| 5626 | #define FMC_BWTR3_ACCMOD_1 ((uint32_t)0x20000000) /*!<Bit 1 */ |
| 5627 | |
| 5628 | /****************** Bit definition for FMC_BWTR4 register ******************/ |
| 5629 | #define FMC_BWTR4_ADDSET ((uint32_t)0x0000000F) /*!<ADDSET[3:0] bits (Address setup phase duration) */ |
| 5630 | #define FMC_BWTR4_ADDSET_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5631 | #define FMC_BWTR4_ADDSET_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5632 | #define FMC_BWTR4_ADDSET_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5633 | #define FMC_BWTR4_ADDSET_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5634 | |
| 5635 | #define FMC_BWTR4_ADDHLD ((uint32_t)0x000000F0) /*!<ADDHLD[3:0] bits (Address-hold phase duration) */ |
| 5636 | #define FMC_BWTR4_ADDHLD_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 5637 | #define FMC_BWTR4_ADDHLD_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 5638 | #define FMC_BWTR4_ADDHLD_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 5639 | #define FMC_BWTR4_ADDHLD_3 ((uint32_t)0x00000080) /*!<Bit 3 */ |
| 5640 | |
| 5641 | #define FMC_BWTR4_DATAST ((uint32_t)0x0000FF00) /*!<DATAST [3:0] bits (Data-phase duration) */ |
| 5642 | #define FMC_BWTR4_DATAST_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5643 | #define FMC_BWTR4_DATAST_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5644 | #define FMC_BWTR4_DATAST_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5645 | #define FMC_BWTR4_DATAST_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5646 | #define FMC_BWTR4_DATAST_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 5647 | #define FMC_BWTR4_DATAST_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 5648 | #define FMC_BWTR4_DATAST_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 5649 | #define FMC_BWTR4_DATAST_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 5650 | |
| 5651 | #define FMC_BWTR4_CLKDIV ((uint32_t)0x00F00000) /*!<CLKDIV[3:0] bits (Clock divide ratio) */ |
| 5652 | #define FMC_BWTR4_CLKDIV_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 5653 | #define FMC_BWTR4_CLKDIV_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 5654 | #define FMC_BWTR4_CLKDIV_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 5655 | #define FMC_BWTR4_CLKDIV_3 ((uint32_t)0x00800000) /*!<Bit 3 */ |
| 5656 | |
| 5657 | #define FMC_BWTR4_DATLAT ((uint32_t)0x0F000000) /*!<DATLA[3:0] bits (Data latency) */ |
| 5658 | #define FMC_BWTR4_DATLAT_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5659 | #define FMC_BWTR4_DATLAT_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5660 | #define FMC_BWTR4_DATLAT_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5661 | #define FMC_BWTR4_DATLAT_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5662 | |
| 5663 | #define FMC_BWTR4_ACCMOD ((uint32_t)0x30000000) /*!<ACCMOD[1:0] bits (Access mode) */ |
| 5664 | #define FMC_BWTR4_ACCMOD_0 ((uint32_t)0x10000000) /*!<Bit 0 */ |
| 5665 | #define FMC_BWTR4_ACCMOD_1 ((uint32_t)0x20000000) /*!<Bit 1 */ |
| 5666 | |
| 5667 | /****************** Bit definition for FMC_PCR2 register *******************/ |
| 5668 | #define FMC_PCR2_PWAITEN ((uint32_t)0x00000002) /*!<Wait feature enable bit */ |
| 5669 | #define FMC_PCR2_PBKEN ((uint32_t)0x00000004) /*!<PC Card/NAND Flash memory bank enable bit */ |
| 5670 | #define FMC_PCR2_PTYP ((uint32_t)0x00000008) /*!<Memory type */ |
| 5671 | |
| 5672 | #define FMC_PCR2_PWID ((uint32_t)0x00000030) /*!<PWID[1:0] bits (NAND Flash databus width) */ |
| 5673 | #define FMC_PCR2_PWID_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 5674 | #define FMC_PCR2_PWID_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 5675 | |
| 5676 | #define FMC_PCR2_ECCEN ((uint32_t)0x00000040) /*!<ECC computation logic enable bit */ |
| 5677 | |
| 5678 | #define FMC_PCR2_TCLR ((uint32_t)0x00001E00) /*!<TCLR[3:0] bits (CLE to RE delay) */ |
| 5679 | #define FMC_PCR2_TCLR_0 ((uint32_t)0x00000200) /*!<Bit 0 */ |
| 5680 | #define FMC_PCR2_TCLR_1 ((uint32_t)0x00000400) /*!<Bit 1 */ |
| 5681 | #define FMC_PCR2_TCLR_2 ((uint32_t)0x00000800) /*!<Bit 2 */ |
| 5682 | #define FMC_PCR2_TCLR_3 ((uint32_t)0x00001000) /*!<Bit 3 */ |
| 5683 | |
| 5684 | #define FMC_PCR2_TAR ((uint32_t)0x0001E000) /*!<TAR[3:0] bits (ALE to RE delay) */ |
| 5685 | #define FMC_PCR2_TAR_0 ((uint32_t)0x00002000) /*!<Bit 0 */ |
| 5686 | #define FMC_PCR2_TAR_1 ((uint32_t)0x00004000) /*!<Bit 1 */ |
| 5687 | #define FMC_PCR2_TAR_2 ((uint32_t)0x00008000) /*!<Bit 2 */ |
| 5688 | #define FMC_PCR2_TAR_3 ((uint32_t)0x00010000) /*!<Bit 3 */ |
| 5689 | |
| 5690 | #define FMC_PCR2_ECCPS ((uint32_t)0x000E0000) /*!<ECCPS[1:0] bits (ECC page size) */ |
| 5691 | #define FMC_PCR2_ECCPS_0 ((uint32_t)0x00020000) /*!<Bit 0 */ |
| 5692 | #define FMC_PCR2_ECCPS_1 ((uint32_t)0x00040000) /*!<Bit 1 */ |
| 5693 | #define FMC_PCR2_ECCPS_2 ((uint32_t)0x00080000) /*!<Bit 2 */ |
| 5694 | |
| 5695 | /****************** Bit definition for FMC_PCR3 register *******************/ |
| 5696 | #define FMC_PCR3_PWAITEN ((uint32_t)0x00000002) /*!<Wait feature enable bit */ |
| 5697 | #define FMC_PCR3_PBKEN ((uint32_t)0x00000004) /*!<PC Card/NAND Flash memory bank enable bit */ |
| 5698 | #define FMC_PCR3_PTYP ((uint32_t)0x00000008) /*!<Memory type */ |
| 5699 | |
| 5700 | #define FMC_PCR3_PWID ((uint32_t)0x00000030) /*!<PWID[1:0] bits (NAND Flash databus width) */ |
| 5701 | #define FMC_PCR3_PWID_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 5702 | #define FMC_PCR3_PWID_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 5703 | |
| 5704 | #define FMC_PCR3_ECCEN ((uint32_t)0x00000040) /*!<ECC computation logic enable bit */ |
| 5705 | |
| 5706 | #define FMC_PCR3_TCLR ((uint32_t)0x00001E00) /*!<TCLR[3:0] bits (CLE to RE delay) */ |
| 5707 | #define FMC_PCR3_TCLR_0 ((uint32_t)0x00000200) /*!<Bit 0 */ |
| 5708 | #define FMC_PCR3_TCLR_1 ((uint32_t)0x00000400) /*!<Bit 1 */ |
| 5709 | #define FMC_PCR3_TCLR_2 ((uint32_t)0x00000800) /*!<Bit 2 */ |
| 5710 | #define FMC_PCR3_TCLR_3 ((uint32_t)0x00001000) /*!<Bit 3 */ |
| 5711 | |
| 5712 | #define FMC_PCR3_TAR ((uint32_t)0x0001E000) /*!<TAR[3:0] bits (ALE to RE delay) */ |
| 5713 | #define FMC_PCR3_TAR_0 ((uint32_t)0x00002000) /*!<Bit 0 */ |
| 5714 | #define FMC_PCR3_TAR_1 ((uint32_t)0x00004000) /*!<Bit 1 */ |
| 5715 | #define FMC_PCR3_TAR_2 ((uint32_t)0x00008000) /*!<Bit 2 */ |
| 5716 | #define FMC_PCR3_TAR_3 ((uint32_t)0x00010000) /*!<Bit 3 */ |
| 5717 | |
| 5718 | #define FMC_PCR3_ECCPS ((uint32_t)0x000E0000) /*!<ECCPS[2:0] bits (ECC page size) */ |
| 5719 | #define FMC_PCR3_ECCPS_0 ((uint32_t)0x00020000) /*!<Bit 0 */ |
| 5720 | #define FMC_PCR3_ECCPS_1 ((uint32_t)0x00040000) /*!<Bit 1 */ |
| 5721 | #define FMC_PCR3_ECCPS_2 ((uint32_t)0x00080000) /*!<Bit 2 */ |
| 5722 | |
| 5723 | /****************** Bit definition for FMC_PCR4 register *******************/ |
| 5724 | #define FMC_PCR4_PWAITEN ((uint32_t)0x00000002) /*!<Wait feature enable bit */ |
| 5725 | #define FMC_PCR4_PBKEN ((uint32_t)0x00000004) /*!<PC Card/NAND Flash memory bank enable bit */ |
| 5726 | #define FMC_PCR4_PTYP ((uint32_t)0x00000008) /*!<Memory type */ |
| 5727 | |
| 5728 | #define FMC_PCR4_PWID ((uint32_t)0x00000030) /*!<PWID[1:0] bits (NAND Flash databus width) */ |
| 5729 | #define FMC_PCR4_PWID_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 5730 | #define FMC_PCR4_PWID_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 5731 | |
| 5732 | #define FMC_PCR4_ECCEN ((uint32_t)0x00000040) /*!<ECC computation logic enable bit */ |
| 5733 | |
| 5734 | #define FMC_PCR4_TCLR ((uint32_t)0x00001E00) /*!<TCLR[3:0] bits (CLE to RE delay) */ |
| 5735 | #define FMC_PCR4_TCLR_0 ((uint32_t)0x00000200) /*!<Bit 0 */ |
| 5736 | #define FMC_PCR4_TCLR_1 ((uint32_t)0x00000400) /*!<Bit 1 */ |
| 5737 | #define FMC_PCR4_TCLR_2 ((uint32_t)0x00000800) /*!<Bit 2 */ |
| 5738 | #define FMC_PCR4_TCLR_3 ((uint32_t)0x00001000) /*!<Bit 3 */ |
| 5739 | |
| 5740 | #define FMC_PCR4_TAR ((uint32_t)0x0001E000) /*!<TAR[3:0] bits (ALE to RE delay) */ |
| 5741 | #define FMC_PCR4_TAR_0 ((uint32_t)0x00002000) /*!<Bit 0 */ |
| 5742 | #define FMC_PCR4_TAR_1 ((uint32_t)0x00004000) /*!<Bit 1 */ |
| 5743 | #define FMC_PCR4_TAR_2 ((uint32_t)0x00008000) /*!<Bit 2 */ |
| 5744 | #define FMC_PCR4_TAR_3 ((uint32_t)0x00010000) /*!<Bit 3 */ |
| 5745 | |
| 5746 | #define FMC_PCR4_ECCPS ((uint32_t)0x000E0000) /*!<ECCPS[2:0] bits (ECC page size) */ |
| 5747 | #define FMC_PCR4_ECCPS_0 ((uint32_t)0x00020000) /*!<Bit 0 */ |
| 5748 | #define FMC_PCR4_ECCPS_1 ((uint32_t)0x00040000) /*!<Bit 1 */ |
| 5749 | #define FMC_PCR4_ECCPS_2 ((uint32_t)0x00080000) /*!<Bit 2 */ |
| 5750 | |
| 5751 | /******************* Bit definition for FMC_SR2 register *******************/ |
| 5752 | #define FMC_SR2_IRS ((uint8_t)0x01) /*!<Interrupt Rising Edge status */ |
| 5753 | #define FMC_SR2_ILS ((uint8_t)0x02) /*!<Interrupt Level status */ |
| 5754 | #define FMC_SR2_IFS ((uint8_t)0x04) /*!<Interrupt Falling Edge status */ |
| 5755 | #define FMC_SR2_IREN ((uint8_t)0x08) /*!<Interrupt Rising Edge detection Enable bit */ |
| 5756 | #define FMC_SR2_ILEN ((uint8_t)0x10) /*!<Interrupt Level detection Enable bit */ |
| 5757 | #define FMC_SR2_IFEN ((uint8_t)0x20) /*!<Interrupt Falling Edge detection Enable bit */ |
| 5758 | #define FMC_SR2_FEMPT ((uint8_t)0x40) /*!<FIFO empty */ |
| 5759 | |
| 5760 | /******************* Bit definition for FMC_SR3 register *******************/ |
| 5761 | #define FMC_SR3_IRS ((uint8_t)0x01) /*!<Interrupt Rising Edge status */ |
| 5762 | #define FMC_SR3_ILS ((uint8_t)0x02) /*!<Interrupt Level status */ |
| 5763 | #define FMC_SR3_IFS ((uint8_t)0x04) /*!<Interrupt Falling Edge status */ |
| 5764 | #define FMC_SR3_IREN ((uint8_t)0x08) /*!<Interrupt Rising Edge detection Enable bit */ |
| 5765 | #define FMC_SR3_ILEN ((uint8_t)0x10) /*!<Interrupt Level detection Enable bit */ |
| 5766 | #define FMC_SR3_IFEN ((uint8_t)0x20) /*!<Interrupt Falling Edge detection Enable bit */ |
| 5767 | #define FMC_SR3_FEMPT ((uint8_t)0x40) /*!<FIFO empty */ |
| 5768 | |
| 5769 | /******************* Bit definition for FMC_SR4 register *******************/ |
| 5770 | #define FMC_SR4_IRS ((uint8_t)0x01) /*!<Interrupt Rising Edge status */ |
| 5771 | #define FMC_SR4_ILS ((uint8_t)0x02) /*!<Interrupt Level status */ |
| 5772 | #define FMC_SR4_IFS ((uint8_t)0x04) /*!<Interrupt Falling Edge status */ |
| 5773 | #define FMC_SR4_IREN ((uint8_t)0x08) /*!<Interrupt Rising Edge detection Enable bit */ |
| 5774 | #define FMC_SR4_ILEN ((uint8_t)0x10) /*!<Interrupt Level detection Enable bit */ |
| 5775 | #define FMC_SR4_IFEN ((uint8_t)0x20) /*!<Interrupt Falling Edge detection Enable bit */ |
| 5776 | #define FMC_SR4_FEMPT ((uint8_t)0x40) /*!<FIFO empty */ |
| 5777 | |
| 5778 | /****************** Bit definition for FMC_PMEM2 register ******************/ |
| 5779 | #define FMC_PMEM2_MEMSET2 ((uint32_t)0x000000FF) /*!<MEMSET2[7:0] bits (Common memory 2 setup time) */ |
| 5780 | #define FMC_PMEM2_MEMSET2_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5781 | #define FMC_PMEM2_MEMSET2_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5782 | #define FMC_PMEM2_MEMSET2_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5783 | #define FMC_PMEM2_MEMSET2_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5784 | #define FMC_PMEM2_MEMSET2_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 5785 | #define FMC_PMEM2_MEMSET2_5 ((uint32_t)0x00000020) /*!<Bit 5 */ |
| 5786 | #define FMC_PMEM2_MEMSET2_6 ((uint32_t)0x00000040) /*!<Bit 6 */ |
| 5787 | #define FMC_PMEM2_MEMSET2_7 ((uint32_t)0x00000080) /*!<Bit 7 */ |
| 5788 | |
| 5789 | #define FMC_PMEM2_MEMWAIT2 ((uint32_t)0x0000FF00) /*!<MEMWAIT2[7:0] bits (Common memory 2 wait time) */ |
| 5790 | #define FMC_PMEM2_MEMWAIT2_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5791 | #define FMC_PMEM2_MEMWAIT2_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5792 | #define FMC_PMEM2_MEMWAIT2_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5793 | #define FMC_PMEM2_MEMWAIT2_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5794 | #define FMC_PMEM2_MEMWAIT2_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 5795 | #define FMC_PMEM2_MEMWAIT2_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 5796 | #define FMC_PMEM2_MEMWAIT2_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 5797 | #define FMC_PMEM2_MEMWAIT2_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 5798 | |
| 5799 | #define FMC_PMEM2_MEMHOLD2 ((uint32_t)0x00FF0000) /*!<MEMHOLD2[7:0] bits (Common memory 2 hold time) */ |
| 5800 | #define FMC_PMEM2_MEMHOLD2_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 5801 | #define FMC_PMEM2_MEMHOLD2_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 5802 | #define FMC_PMEM2_MEMHOLD2_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 5803 | #define FMC_PMEM2_MEMHOLD2_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 5804 | #define FMC_PMEM2_MEMHOLD2_4 ((uint32_t)0x00100000) /*!<Bit 4 */ |
| 5805 | #define FMC_PMEM2_MEMHOLD2_5 ((uint32_t)0x00200000) /*!<Bit 5 */ |
| 5806 | #define FMC_PMEM2_MEMHOLD2_6 ((uint32_t)0x00400000) /*!<Bit 6 */ |
| 5807 | #define FMC_PMEM2_MEMHOLD2_7 ((uint32_t)0x00800000) /*!<Bit 7 */ |
| 5808 | |
| 5809 | #define FMC_PMEM2_MEMHIZ2 ((uint32_t)0xFF000000) /*!<MEMHIZ2[7:0] bits (Common memory 2 databus HiZ time) */ |
| 5810 | #define FMC_PMEM2_MEMHIZ2_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5811 | #define FMC_PMEM2_MEMHIZ2_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5812 | #define FMC_PMEM2_MEMHIZ2_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5813 | #define FMC_PMEM2_MEMHIZ2_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5814 | #define FMC_PMEM2_MEMHIZ2_4 ((uint32_t)0x10000000) /*!<Bit 4 */ |
| 5815 | #define FMC_PMEM2_MEMHIZ2_5 ((uint32_t)0x20000000) /*!<Bit 5 */ |
| 5816 | #define FMC_PMEM2_MEMHIZ2_6 ((uint32_t)0x40000000) /*!<Bit 6 */ |
| 5817 | #define FMC_PMEM2_MEMHIZ2_7 ((uint32_t)0x80000000) /*!<Bit 7 */ |
| 5818 | |
| 5819 | /****************** Bit definition for FMC_PMEM3 register ******************/ |
| 5820 | #define FMC_PMEM3_MEMSET3 ((uint32_t)0x000000FF) /*!<MEMSET3[7:0] bits (Common memory 3 setup time) */ |
| 5821 | #define FMC_PMEM3_MEMSET3_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5822 | #define FMC_PMEM3_MEMSET3_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5823 | #define FMC_PMEM3_MEMSET3_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5824 | #define FMC_PMEM3_MEMSET3_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5825 | #define FMC_PMEM3_MEMSET3_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 5826 | #define FMC_PMEM3_MEMSET3_5 ((uint32_t)0x00000020) /*!<Bit 5 */ |
| 5827 | #define FMC_PMEM3_MEMSET3_6 ((uint32_t)0x00000040) /*!<Bit 6 */ |
| 5828 | #define FMC_PMEM3_MEMSET3_7 ((uint32_t)0x00000080) /*!<Bit 7 */ |
| 5829 | |
| 5830 | #define FMC_PMEM3_MEMWAIT3 ((uint32_t)0x0000FF00) /*!<MEMWAIT3[7:0] bits (Common memory 3 wait time) */ |
| 5831 | #define FMC_PMEM3_MEMWAIT3_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5832 | #define FMC_PMEM3_MEMWAIT3_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5833 | #define FMC_PMEM3_MEMWAIT3_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5834 | #define FMC_PMEM3_MEMWAIT3_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5835 | #define FMC_PMEM3_MEMWAIT3_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 5836 | #define FMC_PMEM3_MEMWAIT3_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 5837 | #define FMC_PMEM3_MEMWAIT3_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 5838 | #define FMC_PMEM3_MEMWAIT3_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 5839 | |
| 5840 | #define FMC_PMEM3_MEMHOLD3 ((uint32_t)0x00FF0000) /*!<MEMHOLD3[7:0] bits (Common memory 3 hold time) */ |
| 5841 | #define FMC_PMEM3_MEMHOLD3_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 5842 | #define FMC_PMEM3_MEMHOLD3_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 5843 | #define FMC_PMEM3_MEMHOLD3_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 5844 | #define FMC_PMEM3_MEMHOLD3_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 5845 | #define FMC_PMEM3_MEMHOLD3_4 ((uint32_t)0x00100000) /*!<Bit 4 */ |
| 5846 | #define FMC_PMEM3_MEMHOLD3_5 ((uint32_t)0x00200000) /*!<Bit 5 */ |
| 5847 | #define FMC_PMEM3_MEMHOLD3_6 ((uint32_t)0x00400000) /*!<Bit 6 */ |
| 5848 | #define FMC_PMEM3_MEMHOLD3_7 ((uint32_t)0x00800000) /*!<Bit 7 */ |
| 5849 | |
| 5850 | #define FMC_PMEM3_MEMHIZ3 ((uint32_t)0xFF000000) /*!<MEMHIZ3[7:0] bits (Common memory 3 databus HiZ time) */ |
| 5851 | #define FMC_PMEM3_MEMHIZ3_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5852 | #define FMC_PMEM3_MEMHIZ3_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5853 | #define FMC_PMEM3_MEMHIZ3_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5854 | #define FMC_PMEM3_MEMHIZ3_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5855 | #define FMC_PMEM3_MEMHIZ3_4 ((uint32_t)0x10000000) /*!<Bit 4 */ |
| 5856 | #define FMC_PMEM3_MEMHIZ3_5 ((uint32_t)0x20000000) /*!<Bit 5 */ |
| 5857 | #define FMC_PMEM3_MEMHIZ3_6 ((uint32_t)0x40000000) /*!<Bit 6 */ |
| 5858 | #define FMC_PMEM3_MEMHIZ3_7 ((uint32_t)0x80000000) /*!<Bit 7 */ |
| 5859 | |
| 5860 | /****************** Bit definition for FMC_PMEM4 register ******************/ |
| 5861 | #define FMC_PMEM4_MEMSET4 ((uint32_t)0x000000FF) /*!<MEMSET4[7:0] bits (Common memory 4 setup time) */ |
| 5862 | #define FMC_PMEM4_MEMSET4_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5863 | #define FMC_PMEM4_MEMSET4_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5864 | #define FMC_PMEM4_MEMSET4_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5865 | #define FMC_PMEM4_MEMSET4_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5866 | #define FMC_PMEM4_MEMSET4_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 5867 | #define FMC_PMEM4_MEMSET4_5 ((uint32_t)0x00000020) /*!<Bit 5 */ |
| 5868 | #define FMC_PMEM4_MEMSET4_6 ((uint32_t)0x00000040) /*!<Bit 6 */ |
| 5869 | #define FMC_PMEM4_MEMSET4_7 ((uint32_t)0x00000080) /*!<Bit 7 */ |
| 5870 | |
| 5871 | #define FMC_PMEM4_MEMWAIT4 ((uint32_t)0x0000FF00) /*!<MEMWAIT4[7:0] bits (Common memory 4 wait time) */ |
| 5872 | #define FMC_PMEM4_MEMWAIT4_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5873 | #define FMC_PMEM4_MEMWAIT4_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5874 | #define FMC_PMEM4_MEMWAIT4_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5875 | #define FMC_PMEM4_MEMWAIT4_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5876 | #define FMC_PMEM4_MEMWAIT4_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 5877 | #define FMC_PMEM4_MEMWAIT4_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 5878 | #define FMC_PMEM4_MEMWAIT4_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 5879 | #define FMC_PMEM4_MEMWAIT4_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 5880 | |
| 5881 | #define FMC_PMEM4_MEMHOLD4 ((uint32_t)0x00FF0000) /*!<MEMHOLD4[7:0] bits (Common memory 4 hold time) */ |
| 5882 | #define FMC_PMEM4_MEMHOLD4_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 5883 | #define FMC_PMEM4_MEMHOLD4_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 5884 | #define FMC_PMEM4_MEMHOLD4_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 5885 | #define FMC_PMEM4_MEMHOLD4_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 5886 | #define FMC_PMEM4_MEMHOLD4_4 ((uint32_t)0x00100000) /*!<Bit 4 */ |
| 5887 | #define FMC_PMEM4_MEMHOLD4_5 ((uint32_t)0x00200000) /*!<Bit 5 */ |
| 5888 | #define FMC_PMEM4_MEMHOLD4_6 ((uint32_t)0x00400000) /*!<Bit 6 */ |
| 5889 | #define FMC_PMEM4_MEMHOLD4_7 ((uint32_t)0x00800000) /*!<Bit 7 */ |
| 5890 | |
| 5891 | #define FMC_PMEM4_MEMHIZ4 ((uint32_t)0xFF000000) /*!<MEMHIZ4[7:0] bits (Common memory 4 databus HiZ time) */ |
| 5892 | #define FMC_PMEM4_MEMHIZ4_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5893 | #define FMC_PMEM4_MEMHIZ4_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5894 | #define FMC_PMEM4_MEMHIZ4_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5895 | #define FMC_PMEM4_MEMHIZ4_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5896 | #define FMC_PMEM4_MEMHIZ4_4 ((uint32_t)0x10000000) /*!<Bit 4 */ |
| 5897 | #define FMC_PMEM4_MEMHIZ4_5 ((uint32_t)0x20000000) /*!<Bit 5 */ |
| 5898 | #define FMC_PMEM4_MEMHIZ4_6 ((uint32_t)0x40000000) /*!<Bit 6 */ |
| 5899 | #define FMC_PMEM4_MEMHIZ4_7 ((uint32_t)0x80000000) /*!<Bit 7 */ |
| 5900 | |
| 5901 | /****************** Bit definition for FMC_PATT2 register ******************/ |
| 5902 | #define FMC_PATT2_ATTSET2 ((uint32_t)0x000000FF) /*!<ATTSET2[7:0] bits (Attribute memory 2 setup time) */ |
| 5903 | #define FMC_PATT2_ATTSET2_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5904 | #define FMC_PATT2_ATTSET2_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5905 | #define FMC_PATT2_ATTSET2_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5906 | #define FMC_PATT2_ATTSET2_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5907 | #define FMC_PATT2_ATTSET2_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 5908 | #define FMC_PATT2_ATTSET2_5 ((uint32_t)0x00000020) /*!<Bit 5 */ |
| 5909 | #define FMC_PATT2_ATTSET2_6 ((uint32_t)0x00000040) /*!<Bit 6 */ |
| 5910 | #define FMC_PATT2_ATTSET2_7 ((uint32_t)0x00000080) /*!<Bit 7 */ |
| 5911 | |
| 5912 | #define FMC_PATT2_ATTWAIT2 ((uint32_t)0x0000FF00) /*!<ATTWAIT2[7:0] bits (Attribute memory 2 wait time) */ |
| 5913 | #define FMC_PATT2_ATTWAIT2_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5914 | #define FMC_PATT2_ATTWAIT2_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5915 | #define FMC_PATT2_ATTWAIT2_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5916 | #define FMC_PATT2_ATTWAIT2_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5917 | #define FMC_PATT2_ATTWAIT2_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 5918 | #define FMC_PATT2_ATTWAIT2_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 5919 | #define FMC_PATT2_ATTWAIT2_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 5920 | #define FMC_PATT2_ATTWAIT2_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 5921 | |
| 5922 | #define FMC_PATT2_ATTHOLD2 ((uint32_t)0x00FF0000) /*!<ATTHOLD2[7:0] bits (Attribute memory 2 hold time) */ |
| 5923 | #define FMC_PATT2_ATTHOLD2_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 5924 | #define FMC_PATT2_ATTHOLD2_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 5925 | #define FMC_PATT2_ATTHOLD2_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 5926 | #define FMC_PATT2_ATTHOLD2_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 5927 | #define FMC_PATT2_ATTHOLD2_4 ((uint32_t)0x00100000) /*!<Bit 4 */ |
| 5928 | #define FMC_PATT2_ATTHOLD2_5 ((uint32_t)0x00200000) /*!<Bit 5 */ |
| 5929 | #define FMC_PATT2_ATTHOLD2_6 ((uint32_t)0x00400000) /*!<Bit 6 */ |
| 5930 | #define FMC_PATT2_ATTHOLD2_7 ((uint32_t)0x00800000) /*!<Bit 7 */ |
| 5931 | |
| 5932 | #define FMC_PATT2_ATTHIZ2 ((uint32_t)0xFF000000) /*!<ATTHIZ2[7:0] bits (Attribute memory 2 databus HiZ time) */ |
| 5933 | #define FMC_PATT2_ATTHIZ2_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5934 | #define FMC_PATT2_ATTHIZ2_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5935 | #define FMC_PATT2_ATTHIZ2_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5936 | #define FMC_PATT2_ATTHIZ2_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5937 | #define FMC_PATT2_ATTHIZ2_4 ((uint32_t)0x10000000) /*!<Bit 4 */ |
| 5938 | #define FMC_PATT2_ATTHIZ2_5 ((uint32_t)0x20000000) /*!<Bit 5 */ |
| 5939 | #define FMC_PATT2_ATTHIZ2_6 ((uint32_t)0x40000000) /*!<Bit 6 */ |
| 5940 | #define FMC_PATT2_ATTHIZ2_7 ((uint32_t)0x80000000) /*!<Bit 7 */ |
| 5941 | |
| 5942 | /****************** Bit definition for FMC_PATT3 register ******************/ |
| 5943 | #define FMC_PATT3_ATTSET3 ((uint32_t)0x000000FF) /*!<ATTSET3[7:0] bits (Attribute memory 3 setup time) */ |
| 5944 | #define FMC_PATT3_ATTSET3_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5945 | #define FMC_PATT3_ATTSET3_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5946 | #define FMC_PATT3_ATTSET3_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5947 | #define FMC_PATT3_ATTSET3_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5948 | #define FMC_PATT3_ATTSET3_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 5949 | #define FMC_PATT3_ATTSET3_5 ((uint32_t)0x00000020) /*!<Bit 5 */ |
| 5950 | #define FMC_PATT3_ATTSET3_6 ((uint32_t)0x00000040) /*!<Bit 6 */ |
| 5951 | #define FMC_PATT3_ATTSET3_7 ((uint32_t)0x00000080) /*!<Bit 7 */ |
| 5952 | |
| 5953 | #define FMC_PATT3_ATTWAIT3 ((uint32_t)0x0000FF00) /*!<ATTWAIT3[7:0] bits (Attribute memory 3 wait time) */ |
| 5954 | #define FMC_PATT3_ATTWAIT3_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5955 | #define FMC_PATT3_ATTWAIT3_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5956 | #define FMC_PATT3_ATTWAIT3_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5957 | #define FMC_PATT3_ATTWAIT3_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5958 | #define FMC_PATT3_ATTWAIT3_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 5959 | #define FMC_PATT3_ATTWAIT3_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 5960 | #define FMC_PATT3_ATTWAIT3_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 5961 | #define FMC_PATT3_ATTWAIT3_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 5962 | |
| 5963 | #define FMC_PATT3_ATTHOLD3 ((uint32_t)0x00FF0000) /*!<ATTHOLD3[7:0] bits (Attribute memory 3 hold time) */ |
| 5964 | #define FMC_PATT3_ATTHOLD3_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 5965 | #define FMC_PATT3_ATTHOLD3_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 5966 | #define FMC_PATT3_ATTHOLD3_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 5967 | #define FMC_PATT3_ATTHOLD3_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 5968 | #define FMC_PATT3_ATTHOLD3_4 ((uint32_t)0x00100000) /*!<Bit 4 */ |
| 5969 | #define FMC_PATT3_ATTHOLD3_5 ((uint32_t)0x00200000) /*!<Bit 5 */ |
| 5970 | #define FMC_PATT3_ATTHOLD3_6 ((uint32_t)0x00400000) /*!<Bit 6 */ |
| 5971 | #define FMC_PATT3_ATTHOLD3_7 ((uint32_t)0x00800000) /*!<Bit 7 */ |
| 5972 | |
| 5973 | #define FMC_PATT3_ATTHIZ3 ((uint32_t)0xFF000000) /*!<ATTHIZ3[7:0] bits (Attribute memory 3 databus HiZ time) */ |
| 5974 | #define FMC_PATT3_ATTHIZ3_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 5975 | #define FMC_PATT3_ATTHIZ3_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 5976 | #define FMC_PATT3_ATTHIZ3_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 5977 | #define FMC_PATT3_ATTHIZ3_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 5978 | #define FMC_PATT3_ATTHIZ3_4 ((uint32_t)0x10000000) /*!<Bit 4 */ |
| 5979 | #define FMC_PATT3_ATTHIZ3_5 ((uint32_t)0x20000000) /*!<Bit 5 */ |
| 5980 | #define FMC_PATT3_ATTHIZ3_6 ((uint32_t)0x40000000) /*!<Bit 6 */ |
| 5981 | #define FMC_PATT3_ATTHIZ3_7 ((uint32_t)0x80000000) /*!<Bit 7 */ |
| 5982 | |
| 5983 | /****************** Bit definition for FMC_PATT4 register ******************/ |
| 5984 | #define FMC_PATT4_ATTSET4 ((uint32_t)0x000000FF) /*!<ATTSET4[7:0] bits (Attribute memory 4 setup time) */ |
| 5985 | #define FMC_PATT4_ATTSET4_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 5986 | #define FMC_PATT4_ATTSET4_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 5987 | #define FMC_PATT4_ATTSET4_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 5988 | #define FMC_PATT4_ATTSET4_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 5989 | #define FMC_PATT4_ATTSET4_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 5990 | #define FMC_PATT4_ATTSET4_5 ((uint32_t)0x00000020) /*!<Bit 5 */ |
| 5991 | #define FMC_PATT4_ATTSET4_6 ((uint32_t)0x00000040) /*!<Bit 6 */ |
| 5992 | #define FMC_PATT4_ATTSET4_7 ((uint32_t)0x00000080) /*!<Bit 7 */ |
| 5993 | |
| 5994 | #define FMC_PATT4_ATTWAIT4 ((uint32_t)0x0000FF00) /*!<ATTWAIT4[7:0] bits (Attribute memory 4 wait time) */ |
| 5995 | #define FMC_PATT4_ATTWAIT4_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 5996 | #define FMC_PATT4_ATTWAIT4_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 5997 | #define FMC_PATT4_ATTWAIT4_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 5998 | #define FMC_PATT4_ATTWAIT4_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 5999 | #define FMC_PATT4_ATTWAIT4_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 6000 | #define FMC_PATT4_ATTWAIT4_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 6001 | #define FMC_PATT4_ATTWAIT4_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 6002 | #define FMC_PATT4_ATTWAIT4_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 6003 | |
| 6004 | #define FMC_PATT4_ATTHOLD4 ((uint32_t)0x00FF0000) /*!<ATTHOLD4[7:0] bits (Attribute memory 4 hold time) */ |
| 6005 | #define FMC_PATT4_ATTHOLD4_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 6006 | #define FMC_PATT4_ATTHOLD4_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 6007 | #define FMC_PATT4_ATTHOLD4_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 6008 | #define FMC_PATT4_ATTHOLD4_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 6009 | #define FMC_PATT4_ATTHOLD4_4 ((uint32_t)0x00100000) /*!<Bit 4 */ |
| 6010 | #define FMC_PATT4_ATTHOLD4_5 ((uint32_t)0x00200000) /*!<Bit 5 */ |
| 6011 | #define FMC_PATT4_ATTHOLD4_6 ((uint32_t)0x00400000) /*!<Bit 6 */ |
| 6012 | #define FMC_PATT4_ATTHOLD4_7 ((uint32_t)0x00800000) /*!<Bit 7 */ |
| 6013 | |
| 6014 | #define FMC_PATT4_ATTHIZ4 ((uint32_t)0xFF000000) /*!<ATTHIZ4[7:0] bits (Attribute memory 4 databus HiZ time) */ |
| 6015 | #define FMC_PATT4_ATTHIZ4_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 6016 | #define FMC_PATT4_ATTHIZ4_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 6017 | #define FMC_PATT4_ATTHIZ4_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 6018 | #define FMC_PATT4_ATTHIZ4_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 6019 | #define FMC_PATT4_ATTHIZ4_4 ((uint32_t)0x10000000) /*!<Bit 4 */ |
| 6020 | #define FMC_PATT4_ATTHIZ4_5 ((uint32_t)0x20000000) /*!<Bit 5 */ |
| 6021 | #define FMC_PATT4_ATTHIZ4_6 ((uint32_t)0x40000000) /*!<Bit 6 */ |
| 6022 | #define FMC_PATT4_ATTHIZ4_7 ((uint32_t)0x80000000) /*!<Bit 7 */ |
| 6023 | |
| 6024 | /****************** Bit definition for FMC_PIO4 register *******************/ |
| 6025 | #define FMC_PIO4_IOSET4 ((uint32_t)0x000000FF) /*!<IOSET4[7:0] bits (I/O 4 setup time) */ |
| 6026 | #define FMC_PIO4_IOSET4_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 6027 | #define FMC_PIO4_IOSET4_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 6028 | #define FMC_PIO4_IOSET4_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 6029 | #define FMC_PIO4_IOSET4_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 6030 | #define FMC_PIO4_IOSET4_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 6031 | #define FMC_PIO4_IOSET4_5 ((uint32_t)0x00000020) /*!<Bit 5 */ |
| 6032 | #define FMC_PIO4_IOSET4_6 ((uint32_t)0x00000040) /*!<Bit 6 */ |
| 6033 | #define FMC_PIO4_IOSET4_7 ((uint32_t)0x00000080) /*!<Bit 7 */ |
| 6034 | |
| 6035 | #define FMC_PIO4_IOWAIT4 ((uint32_t)0x0000FF00) /*!<IOWAIT4[7:0] bits (I/O 4 wait time) */ |
| 6036 | #define FMC_PIO4_IOWAIT4_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 6037 | #define FMC_PIO4_IOWAIT4_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 6038 | #define FMC_PIO4_IOWAIT4_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 6039 | #define FMC_PIO4_IOWAIT4_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 6040 | #define FMC_PIO4_IOWAIT4_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 6041 | #define FMC_PIO4_IOWAIT4_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 6042 | #define FMC_PIO4_IOWAIT4_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 6043 | #define FMC_PIO4_IOWAIT4_7 ((uint32_t)0x00008000) /*!<Bit 7 */ |
| 6044 | |
| 6045 | #define FMC_PIO4_IOHOLD4 ((uint32_t)0x00FF0000) /*!<IOHOLD4[7:0] bits (I/O 4 hold time) */ |
| 6046 | #define FMC_PIO4_IOHOLD4_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 6047 | #define FMC_PIO4_IOHOLD4_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 6048 | #define FMC_PIO4_IOHOLD4_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 6049 | #define FMC_PIO4_IOHOLD4_3 ((uint32_t)0x00080000) /*!<Bit 3 */ |
| 6050 | #define FMC_PIO4_IOHOLD4_4 ((uint32_t)0x00100000) /*!<Bit 4 */ |
| 6051 | #define FMC_PIO4_IOHOLD4_5 ((uint32_t)0x00200000) /*!<Bit 5 */ |
| 6052 | #define FMC_PIO4_IOHOLD4_6 ((uint32_t)0x00400000) /*!<Bit 6 */ |
| 6053 | #define FMC_PIO4_IOHOLD4_7 ((uint32_t)0x00800000) /*!<Bit 7 */ |
| 6054 | |
| 6055 | #define FMC_PIO4_IOHIZ4 ((uint32_t)0xFF000000) /*!<IOHIZ4[7:0] bits (I/O 4 databus HiZ time) */ |
| 6056 | #define FMC_PIO4_IOHIZ4_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 6057 | #define FMC_PIO4_IOHIZ4_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 6058 | #define FMC_PIO4_IOHIZ4_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 6059 | #define FMC_PIO4_IOHIZ4_3 ((uint32_t)0x08000000) /*!<Bit 3 */ |
| 6060 | #define FMC_PIO4_IOHIZ4_4 ((uint32_t)0x10000000) /*!<Bit 4 */ |
| 6061 | #define FMC_PIO4_IOHIZ4_5 ((uint32_t)0x20000000) /*!<Bit 5 */ |
| 6062 | #define FMC_PIO4_IOHIZ4_6 ((uint32_t)0x40000000) /*!<Bit 6 */ |
| 6063 | #define FMC_PIO4_IOHIZ4_7 ((uint32_t)0x80000000) /*!<Bit 7 */ |
| 6064 | |
| 6065 | /****************** Bit definition for FMC_ECCR2 register ******************/ |
| 6066 | #define FMC_ECCR2_ECC2 ((uint32_t)0xFFFFFFFF) /*!<ECC result */ |
| 6067 | |
| 6068 | /****************** Bit definition for FMC_ECCR3 register ******************/ |
| 6069 | #define FMC_ECCR3_ECC3 ((uint32_t)0xFFFFFFFF) /*!<ECC result */ |
| 6070 | |
| 6071 | /****************** Bit definition for FMC_SDCR1 register ******************/ |
| 6072 | #define FMC_SDCR1_NC ((uint32_t)0x00000003) /*!<NC[1:0] bits (Number of column bits) */ |
| 6073 | #define FMC_SDCR1_NC_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 6074 | #define FMC_SDCR1_NC_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 6075 | |
| 6076 | #define FMC_SDCR1_NR ((uint32_t)0x0000000C) /*!<NR[1:0] bits (Number of row bits) */ |
| 6077 | #define FMC_SDCR1_NR_0 ((uint32_t)0x00000004) /*!<Bit 0 */ |
| 6078 | #define FMC_SDCR1_NR_1 ((uint32_t)0x00000008) /*!<Bit 1 */ |
| 6079 | |
| 6080 | #define FMC_SDCR1_MWID ((uint32_t)0x00000030) /*!<NR[1:0] bits (Number of row bits) */ |
| 6081 | #define FMC_SDCR1_MWID_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 6082 | #define FMC_SDCR1_MWID_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 6083 | |
| 6084 | #define FMC_SDCR1_NB ((uint32_t)0x00000040) /*!<Number of internal bank */ |
| 6085 | |
| 6086 | #define FMC_SDCR1_CAS ((uint32_t)0x00000180) /*!<CAS[1:0] bits (CAS latency) */ |
| 6087 | #define FMC_SDCR1_CAS_0 ((uint32_t)0x00000080) /*!<Bit 0 */ |
| 6088 | #define FMC_SDCR1_CAS_1 ((uint32_t)0x00000100) /*!<Bit 1 */ |
| 6089 | |
| 6090 | #define FMC_SDCR1_WP ((uint32_t)0x00000200) /*!<Write protection */ |
| 6091 | |
| 6092 | #define FMC_SDCR1_SDCLK ((uint32_t)0x00000C00) /*!<SDRAM clock configuration */ |
| 6093 | #define FMC_SDCR1_SDCLK_0 ((uint32_t)0x00000400) /*!<Bit 0 */ |
| 6094 | #define FMC_SDCR1_SDCLK_1 ((uint32_t)0x00000800) /*!<Bit 1 */ |
| 6095 | |
| 6096 | #define FMC_SDCR1_RBURST ((uint32_t)0x00001000) /*!<Read burst */ |
| 6097 | |
| 6098 | #define FMC_SDCR1_RPIPE ((uint32_t)0x00006000) /*!<Write protection */ |
| 6099 | #define FMC_SDCR1_RPIPE_0 ((uint32_t)0x00002000) /*!<Bit 0 */ |
| 6100 | #define FMC_SDCR1_RPIPE_1 ((uint32_t)0x00004000) /*!<Bit 1 */ |
| 6101 | |
| 6102 | /****************** Bit definition for FMC_SDCR2 register ******************/ |
| 6103 | #define FMC_SDCR2_NC ((uint32_t)0x00000003) /*!<NC[1:0] bits (Number of column bits) */ |
| 6104 | #define FMC_SDCR2_NC_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 6105 | #define FMC_SDCR2_NC_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 6106 | |
| 6107 | #define FMC_SDCR2_NR ((uint32_t)0x0000000C) /*!<NR[1:0] bits (Number of row bits) */ |
| 6108 | #define FMC_SDCR2_NR_0 ((uint32_t)0x00000004) /*!<Bit 0 */ |
| 6109 | #define FMC_SDCR2_NR_1 ((uint32_t)0x00000008) /*!<Bit 1 */ |
| 6110 | |
| 6111 | #define FMC_SDCR2_MWID ((uint32_t)0x00000030) /*!<NR[1:0] bits (Number of row bits) */ |
| 6112 | #define FMC_SDCR2_MWID_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 6113 | #define FMC_SDCR2_MWID_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 6114 | |
| 6115 | #define FMC_SDCR2_NB ((uint32_t)0x00000040) /*!<Number of internal bank */ |
| 6116 | |
| 6117 | #define FMC_SDCR2_CAS ((uint32_t)0x00000180) /*!<CAS[1:0] bits (CAS latency) */ |
| 6118 | #define FMC_SDCR2_CAS_0 ((uint32_t)0x00000080) /*!<Bit 0 */ |
| 6119 | #define FMC_SDCR2_CAS_1 ((uint32_t)0x00000100) /*!<Bit 1 */ |
| 6120 | |
| 6121 | #define FMC_SDCR2_WP ((uint32_t)0x00000200) /*!<Write protection */ |
| 6122 | |
| 6123 | #define FMC_SDCR2_SDCLK ((uint32_t)0x00000C00) /*!<SDCLK[1:0] (SDRAM clock configuration) */ |
| 6124 | #define FMC_SDCR2_SDCLK_0 ((uint32_t)0x00000400) /*!<Bit 0 */ |
| 6125 | #define FMC_SDCR2_SDCLK_1 ((uint32_t)0x00000800) /*!<Bit 1 */ |
| 6126 | |
| 6127 | #define FMC_SDCR2_RBURST ((uint32_t)0x00001000) /*!<Read burst */ |
| 6128 | |
| 6129 | #define FMC_SDCR2_RPIPE ((uint32_t)0x00006000) /*!<RPIPE[1:0](Read pipe) */ |
| 6130 | #define FMC_SDCR2_RPIPE_0 ((uint32_t)0x00002000) /*!<Bit 0 */ |
| 6131 | #define FMC_SDCR2_RPIPE_1 ((uint32_t)0x00004000) /*!<Bit 1 */ |
| 6132 | |
| 6133 | /****************** Bit definition for FMC_SDTR1 register ******************/ |
| 6134 | #define FMC_SDTR1_TMRD ((uint32_t)0x0000000F) /*!<TMRD[3:0] bits (Load mode register to active) */ |
| 6135 | #define FMC_SDTR1_TMRD_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 6136 | #define FMC_SDTR1_TMRD_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 6137 | #define FMC_SDTR1_TMRD_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 6138 | #define FMC_SDTR1_TMRD_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 6139 | |
| 6140 | #define FMC_SDTR1_TXSR ((uint32_t)0x000000F0) /*!<TXSR[3:0] bits (Exit self refresh) */ |
| 6141 | #define FMC_SDTR1_TXSR_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 6142 | #define FMC_SDTR1_TXSR_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 6143 | #define FMC_SDTR1_TXSR_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 6144 | #define FMC_SDTR1_TXSR_3 ((uint32_t)0x00000080) /*!<Bit 3 */ |
| 6145 | |
| 6146 | #define FMC_SDTR1_TRAS ((uint32_t)0x00000F00) /*!<TRAS[3:0] bits (Self refresh time) */ |
| 6147 | #define FMC_SDTR1_TRAS_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 6148 | #define FMC_SDTR1_TRAS_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 6149 | #define FMC_SDTR1_TRAS_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 6150 | #define FMC_SDTR1_TRAS_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 6151 | |
| 6152 | #define FMC_SDTR1_TRC ((uint32_t)0x0000F000) /*!<TRC[2:0] bits (Row cycle delay) */ |
| 6153 | #define FMC_SDTR1_TRC_0 ((uint32_t)0x00001000) /*!<Bit 0 */ |
| 6154 | #define FMC_SDTR1_TRC_1 ((uint32_t)0x00002000) /*!<Bit 1 */ |
| 6155 | #define FMC_SDTR1_TRC_2 ((uint32_t)0x00004000) /*!<Bit 2 */ |
| 6156 | |
| 6157 | #define FMC_SDTR1_TWR ((uint32_t)0x000F0000) /*!<TRC[2:0] bits (Write recovery delay) */ |
| 6158 | #define FMC_SDTR1_TWR_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 6159 | #define FMC_SDTR1_TWR_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 6160 | #define FMC_SDTR1_TWR_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 6161 | |
| 6162 | #define FMC_SDTR1_TRP ((uint32_t)0x00F00000) /*!<TRP[2:0] bits (Row precharge delay) */ |
| 6163 | #define FMC_SDTR1_TRP_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 6164 | #define FMC_SDTR1_TRP_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 6165 | #define FMC_SDTR1_TRP_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 6166 | |
| 6167 | #define FMC_SDTR1_TRCD ((uint32_t)0x0F000000) /*!<TRP[2:0] bits (Row to column delay) */ |
| 6168 | #define FMC_SDTR1_TRCD_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 6169 | #define FMC_SDTR1_TRCD_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 6170 | #define FMC_SDTR1_TRCD_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 6171 | |
| 6172 | /****************** Bit definition for FMC_SDTR2 register ******************/ |
| 6173 | #define FMC_SDTR2_TMRD ((uint32_t)0x0000000F) /*!<TMRD[3:0] bits (Load mode register to active) */ |
| 6174 | #define FMC_SDTR2_TMRD_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 6175 | #define FMC_SDTR2_TMRD_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 6176 | #define FMC_SDTR2_TMRD_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 6177 | #define FMC_SDTR2_TMRD_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 6178 | |
| 6179 | #define FMC_SDTR2_TXSR ((uint32_t)0x000000F0) /*!<TXSR[3:0] bits (Exit self refresh) */ |
| 6180 | #define FMC_SDTR2_TXSR_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 6181 | #define FMC_SDTR2_TXSR_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 6182 | #define FMC_SDTR2_TXSR_2 ((uint32_t)0x00000040) /*!<Bit 2 */ |
| 6183 | #define FMC_SDTR2_TXSR_3 ((uint32_t)0x00000080) /*!<Bit 3 */ |
| 6184 | |
| 6185 | #define FMC_SDTR2_TRAS ((uint32_t)0x00000F00) /*!<TRAS[3:0] bits (Self refresh time) */ |
| 6186 | #define FMC_SDTR2_TRAS_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 6187 | #define FMC_SDTR2_TRAS_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 6188 | #define FMC_SDTR2_TRAS_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 6189 | #define FMC_SDTR2_TRAS_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 6190 | |
| 6191 | #define FMC_SDTR2_TRC ((uint32_t)0x0000F000) /*!<TRC[2:0] bits (Row cycle delay) */ |
| 6192 | #define FMC_SDTR2_TRC_0 ((uint32_t)0x00001000) /*!<Bit 0 */ |
| 6193 | #define FMC_SDTR2_TRC_1 ((uint32_t)0x00002000) /*!<Bit 1 */ |
| 6194 | #define FMC_SDTR2_TRC_2 ((uint32_t)0x00004000) /*!<Bit 2 */ |
| 6195 | |
| 6196 | #define FMC_SDTR2_TWR ((uint32_t)0x000F0000) /*!<TRC[2:0] bits (Write recovery delay) */ |
| 6197 | #define FMC_SDTR2_TWR_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 6198 | #define FMC_SDTR2_TWR_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 6199 | #define FMC_SDTR2_TWR_2 ((uint32_t)0x00040000) /*!<Bit 2 */ |
| 6200 | |
| 6201 | #define FMC_SDTR2_TRP ((uint32_t)0x00F00000) /*!<TRP[2:0] bits (Row precharge delay) */ |
| 6202 | #define FMC_SDTR2_TRP_0 ((uint32_t)0x00100000) /*!<Bit 0 */ |
| 6203 | #define FMC_SDTR2_TRP_1 ((uint32_t)0x00200000) /*!<Bit 1 */ |
| 6204 | #define FMC_SDTR2_TRP_2 ((uint32_t)0x00400000) /*!<Bit 2 */ |
| 6205 | |
| 6206 | #define FMC_SDTR2_TRCD ((uint32_t)0x0F000000) /*!<TRP[2:0] bits (Row to column delay) */ |
| 6207 | #define FMC_SDTR2_TRCD_0 ((uint32_t)0x01000000) /*!<Bit 0 */ |
| 6208 | #define FMC_SDTR2_TRCD_1 ((uint32_t)0x02000000) /*!<Bit 1 */ |
| 6209 | #define FMC_SDTR2_TRCD_2 ((uint32_t)0x04000000) /*!<Bit 2 */ |
| 6210 | |
| 6211 | /****************** Bit definition for FMC_SDCMR register ******************/ |
| 6212 | #define FMC_SDCMR_MODE ((uint32_t)0x00000007) /*!<MODE[2:0] bits (Command mode) */ |
| 6213 | #define FMC_SDCMR_MODE_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 6214 | #define FMC_SDCMR_MODE_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 6215 | #define FMC_SDCMR_MODE_2 ((uint32_t)0x00000003) /*!<Bit 2 */ |
| 6216 | |
| 6217 | #define FMC_SDCMR_CTB2 ((uint32_t)0x00000008) /*!<Command target 2 */ |
| 6218 | |
| 6219 | #define FMC_SDCMR_CTB1 ((uint32_t)0x00000010) /*!<Command target 1 */ |
| 6220 | |
| 6221 | #define FMC_SDCMR_NRFS ((uint32_t)0x000001E0) /*!<NRFS[3:0] bits (Number of auto-refresh) */ |
| 6222 | #define FMC_SDCMR_NRFS_0 ((uint32_t)0x00000020) /*!<Bit 0 */ |
| 6223 | #define FMC_SDCMR_NRFS_1 ((uint32_t)0x00000040) /*!<Bit 1 */ |
| 6224 | #define FMC_SDCMR_NRFS_2 ((uint32_t)0x00000080) /*!<Bit 2 */ |
| 6225 | #define FMC_SDCMR_NRFS_3 ((uint32_t)0x00000100) /*!<Bit 3 */ |
| 6226 | |
| 6227 | #define FMC_SDCMR_MRD ((uint32_t)0x003FFE00) /*!<MRD[12:0] bits (Mode register definition) */ |
| 6228 | |
| 6229 | /****************** Bit definition for FMC_SDRTR register ******************/ |
| 6230 | #define FMC_SDRTR_CRE ((uint32_t)0x00000001) /*!<Clear refresh error flag */ |
| 6231 | |
| 6232 | #define FMC_SDRTR_COUNT ((uint32_t)0x00003FFE) /*!<COUNT[12:0] bits (Refresh timer count) */ |
| 6233 | |
| 6234 | #define FMC_SDRTR_REIE ((uint32_t)0x00004000) /*!<RES interupt enable */ |
| 6235 | |
| 6236 | /****************** Bit definition for FMC_SDSR register ******************/ |
| 6237 | #define FMC_SDSR_RE ((uint32_t)0x00000001) /*!<Refresh error flag */ |
| 6238 | |
| 6239 | #define FMC_SDSR_MODES1 ((uint32_t)0x00000006) /*!<MODES1[1:0]bits (Status mode for bank 1) */ |
| 6240 | #define FMC_SDSR_MODES1_0 ((uint32_t)0x00000002) /*!<Bit 0 */ |
| 6241 | #define FMC_SDSR_MODES1_1 ((uint32_t)0x00000004) /*!<Bit 1 */ |
| 6242 | |
| 6243 | #define FMC_SDSR_MODES2 ((uint32_t)0x00000018) /*!<MODES2[1:0]bits (Status mode for bank 2) */ |
| 6244 | #define FMC_SDSR_MODES2_0 ((uint32_t)0x00000008) /*!<Bit 0 */ |
| 6245 | #define FMC_SDSR_MODES2_1 ((uint32_t)0x00000010) /*!<Bit 1 */ |
| 6246 | |
| 6247 | #define FMC_SDSR_BUSY ((uint32_t)0x00000020) /*!<Busy status */ |
| 6248 | |
| 6249 | #endif /* STM32F427_437xx || STM32F429_439xx || STM32F446xx */ |
| 6250 | |
| 6251 | /******************************************************************************/ |
| 6252 | /* */ |
| 6253 | /* General Purpose I/O */ |
| 6254 | /* */ |
| 6255 | /******************************************************************************/ |
| 6256 | /****************** Bits definition for GPIO_MODER register *****************/ |
| 6257 | #define GPIO_MODER_MODER0 ((uint32_t)0x00000003) |
| 6258 | #define GPIO_MODER_MODER0_0 ((uint32_t)0x00000001) |
| 6259 | #define GPIO_MODER_MODER0_1 ((uint32_t)0x00000002) |
| 6260 | |
| 6261 | #define GPIO_MODER_MODER1 ((uint32_t)0x0000000C) |
| 6262 | #define GPIO_MODER_MODER1_0 ((uint32_t)0x00000004) |
| 6263 | #define GPIO_MODER_MODER1_1 ((uint32_t)0x00000008) |
| 6264 | |
| 6265 | #define GPIO_MODER_MODER2 ((uint32_t)0x00000030) |
| 6266 | #define GPIO_MODER_MODER2_0 ((uint32_t)0x00000010) |
| 6267 | #define GPIO_MODER_MODER2_1 ((uint32_t)0x00000020) |
| 6268 | |
| 6269 | #define GPIO_MODER_MODER3 ((uint32_t)0x000000C0) |
| 6270 | #define GPIO_MODER_MODER3_0 ((uint32_t)0x00000040) |
| 6271 | #define GPIO_MODER_MODER3_1 ((uint32_t)0x00000080) |
| 6272 | |
| 6273 | #define GPIO_MODER_MODER4 ((uint32_t)0x00000300) |
| 6274 | #define GPIO_MODER_MODER4_0 ((uint32_t)0x00000100) |
| 6275 | #define GPIO_MODER_MODER4_1 ((uint32_t)0x00000200) |
| 6276 | |
| 6277 | #define GPIO_MODER_MODER5 ((uint32_t)0x00000C00) |
| 6278 | #define GPIO_MODER_MODER5_0 ((uint32_t)0x00000400) |
| 6279 | #define GPIO_MODER_MODER5_1 ((uint32_t)0x00000800) |
| 6280 | |
| 6281 | #define GPIO_MODER_MODER6 ((uint32_t)0x00003000) |
| 6282 | #define GPIO_MODER_MODER6_0 ((uint32_t)0x00001000) |
| 6283 | #define GPIO_MODER_MODER6_1 ((uint32_t)0x00002000) |
| 6284 | |
| 6285 | #define GPIO_MODER_MODER7 ((uint32_t)0x0000C000) |
| 6286 | #define GPIO_MODER_MODER7_0 ((uint32_t)0x00004000) |
| 6287 | #define GPIO_MODER_MODER7_1 ((uint32_t)0x00008000) |
| 6288 | |
| 6289 | #define GPIO_MODER_MODER8 ((uint32_t)0x00030000) |
| 6290 | #define GPIO_MODER_MODER8_0 ((uint32_t)0x00010000) |
| 6291 | #define GPIO_MODER_MODER8_1 ((uint32_t)0x00020000) |
| 6292 | |
| 6293 | #define GPIO_MODER_MODER9 ((uint32_t)0x000C0000) |
| 6294 | #define GPIO_MODER_MODER9_0 ((uint32_t)0x00040000) |
| 6295 | #define GPIO_MODER_MODER9_1 ((uint32_t)0x00080000) |
| 6296 | |
| 6297 | #define GPIO_MODER_MODER10 ((uint32_t)0x00300000) |
| 6298 | #define GPIO_MODER_MODER10_0 ((uint32_t)0x00100000) |
| 6299 | #define GPIO_MODER_MODER10_1 ((uint32_t)0x00200000) |
| 6300 | |
| 6301 | #define GPIO_MODER_MODER11 ((uint32_t)0x00C00000) |
| 6302 | #define GPIO_MODER_MODER11_0 ((uint32_t)0x00400000) |
| 6303 | #define GPIO_MODER_MODER11_1 ((uint32_t)0x00800000) |
| 6304 | |
| 6305 | #define GPIO_MODER_MODER12 ((uint32_t)0x03000000) |
| 6306 | #define GPIO_MODER_MODER12_0 ((uint32_t)0x01000000) |
| 6307 | #define GPIO_MODER_MODER12_1 ((uint32_t)0x02000000) |
| 6308 | |
| 6309 | #define GPIO_MODER_MODER13 ((uint32_t)0x0C000000) |
| 6310 | #define GPIO_MODER_MODER13_0 ((uint32_t)0x04000000) |
| 6311 | #define GPIO_MODER_MODER13_1 ((uint32_t)0x08000000) |
| 6312 | |
| 6313 | #define GPIO_MODER_MODER14 ((uint32_t)0x30000000) |
| 6314 | #define GPIO_MODER_MODER14_0 ((uint32_t)0x10000000) |
| 6315 | #define GPIO_MODER_MODER14_1 ((uint32_t)0x20000000) |
| 6316 | |
| 6317 | #define GPIO_MODER_MODER15 ((uint32_t)0xC0000000) |
| 6318 | #define GPIO_MODER_MODER15_0 ((uint32_t)0x40000000) |
| 6319 | #define GPIO_MODER_MODER15_1 ((uint32_t)0x80000000) |
| 6320 | |
| 6321 | /****************** Bits definition for GPIO_OTYPER register ****************/ |
| 6322 | #define GPIO_OTYPER_OT_0 ((uint32_t)0x00000001) |
| 6323 | #define GPIO_OTYPER_OT_1 ((uint32_t)0x00000002) |
| 6324 | #define GPIO_OTYPER_OT_2 ((uint32_t)0x00000004) |
| 6325 | #define GPIO_OTYPER_OT_3 ((uint32_t)0x00000008) |
| 6326 | #define GPIO_OTYPER_OT_4 ((uint32_t)0x00000010) |
| 6327 | #define GPIO_OTYPER_OT_5 ((uint32_t)0x00000020) |
| 6328 | #define GPIO_OTYPER_OT_6 ((uint32_t)0x00000040) |
| 6329 | #define GPIO_OTYPER_OT_7 ((uint32_t)0x00000080) |
| 6330 | #define GPIO_OTYPER_OT_8 ((uint32_t)0x00000100) |
| 6331 | #define GPIO_OTYPER_OT_9 ((uint32_t)0x00000200) |
| 6332 | #define GPIO_OTYPER_OT_10 ((uint32_t)0x00000400) |
| 6333 | #define GPIO_OTYPER_OT_11 ((uint32_t)0x00000800) |
| 6334 | #define GPIO_OTYPER_OT_12 ((uint32_t)0x00001000) |
| 6335 | #define GPIO_OTYPER_OT_13 ((uint32_t)0x00002000) |
| 6336 | #define GPIO_OTYPER_OT_14 ((uint32_t)0x00004000) |
| 6337 | #define GPIO_OTYPER_OT_15 ((uint32_t)0x00008000) |
| 6338 | |
| 6339 | /****************** Bits definition for GPIO_OSPEEDR register ***************/ |
| 6340 | #define GPIO_OSPEEDER_OSPEEDR0 ((uint32_t)0x00000003) |
| 6341 | #define GPIO_OSPEEDER_OSPEEDR0_0 ((uint32_t)0x00000001) |
| 6342 | #define GPIO_OSPEEDER_OSPEEDR0_1 ((uint32_t)0x00000002) |
| 6343 | |
| 6344 | #define GPIO_OSPEEDER_OSPEEDR1 ((uint32_t)0x0000000C) |
| 6345 | #define GPIO_OSPEEDER_OSPEEDR1_0 ((uint32_t)0x00000004) |
| 6346 | #define GPIO_OSPEEDER_OSPEEDR1_1 ((uint32_t)0x00000008) |
| 6347 | |
| 6348 | #define GPIO_OSPEEDER_OSPEEDR2 ((uint32_t)0x00000030) |
| 6349 | #define GPIO_OSPEEDER_OSPEEDR2_0 ((uint32_t)0x00000010) |
| 6350 | #define GPIO_OSPEEDER_OSPEEDR2_1 ((uint32_t)0x00000020) |
| 6351 | |
| 6352 | #define GPIO_OSPEEDER_OSPEEDR3 ((uint32_t)0x000000C0) |
| 6353 | #define GPIO_OSPEEDER_OSPEEDR3_0 ((uint32_t)0x00000040) |
| 6354 | #define GPIO_OSPEEDER_OSPEEDR3_1 ((uint32_t)0x00000080) |
| 6355 | |
| 6356 | #define GPIO_OSPEEDER_OSPEEDR4 ((uint32_t)0x00000300) |
| 6357 | #define GPIO_OSPEEDER_OSPEEDR4_0 ((uint32_t)0x00000100) |
| 6358 | #define GPIO_OSPEEDER_OSPEEDR4_1 ((uint32_t)0x00000200) |
| 6359 | |
| 6360 | #define GPIO_OSPEEDER_OSPEEDR5 ((uint32_t)0x00000C00) |
| 6361 | #define GPIO_OSPEEDER_OSPEEDR5_0 ((uint32_t)0x00000400) |
| 6362 | #define GPIO_OSPEEDER_OSPEEDR5_1 ((uint32_t)0x00000800) |
| 6363 | |
| 6364 | #define GPIO_OSPEEDER_OSPEEDR6 ((uint32_t)0x00003000) |
| 6365 | #define GPIO_OSPEEDER_OSPEEDR6_0 ((uint32_t)0x00001000) |
| 6366 | #define GPIO_OSPEEDER_OSPEEDR6_1 ((uint32_t)0x00002000) |
| 6367 | |
| 6368 | #define GPIO_OSPEEDER_OSPEEDR7 ((uint32_t)0x0000C000) |
| 6369 | #define GPIO_OSPEEDER_OSPEEDR7_0 ((uint32_t)0x00004000) |
| 6370 | #define GPIO_OSPEEDER_OSPEEDR7_1 ((uint32_t)0x00008000) |
| 6371 | |
| 6372 | #define GPIO_OSPEEDER_OSPEEDR8 ((uint32_t)0x00030000) |
| 6373 | #define GPIO_OSPEEDER_OSPEEDR8_0 ((uint32_t)0x00010000) |
| 6374 | #define GPIO_OSPEEDER_OSPEEDR8_1 ((uint32_t)0x00020000) |
| 6375 | |
| 6376 | #define GPIO_OSPEEDER_OSPEEDR9 ((uint32_t)0x000C0000) |
| 6377 | #define GPIO_OSPEEDER_OSPEEDR9_0 ((uint32_t)0x00040000) |
| 6378 | #define GPIO_OSPEEDER_OSPEEDR9_1 ((uint32_t)0x00080000) |
| 6379 | |
| 6380 | #define GPIO_OSPEEDER_OSPEEDR10 ((uint32_t)0x00300000) |
| 6381 | #define GPIO_OSPEEDER_OSPEEDR10_0 ((uint32_t)0x00100000) |
| 6382 | #define GPIO_OSPEEDER_OSPEEDR10_1 ((uint32_t)0x00200000) |
| 6383 | |
| 6384 | #define GPIO_OSPEEDER_OSPEEDR11 ((uint32_t)0x00C00000) |
| 6385 | #define GPIO_OSPEEDER_OSPEEDR11_0 ((uint32_t)0x00400000) |
| 6386 | #define GPIO_OSPEEDER_OSPEEDR11_1 ((uint32_t)0x00800000) |
| 6387 | |
| 6388 | #define GPIO_OSPEEDER_OSPEEDR12 ((uint32_t)0x03000000) |
| 6389 | #define GPIO_OSPEEDER_OSPEEDR12_0 ((uint32_t)0x01000000) |
| 6390 | #define GPIO_OSPEEDER_OSPEEDR12_1 ((uint32_t)0x02000000) |
| 6391 | |
| 6392 | #define GPIO_OSPEEDER_OSPEEDR13 ((uint32_t)0x0C000000) |
| 6393 | #define GPIO_OSPEEDER_OSPEEDR13_0 ((uint32_t)0x04000000) |
| 6394 | #define GPIO_OSPEEDER_OSPEEDR13_1 ((uint32_t)0x08000000) |
| 6395 | |
| 6396 | #define GPIO_OSPEEDER_OSPEEDR14 ((uint32_t)0x30000000) |
| 6397 | #define GPIO_OSPEEDER_OSPEEDR14_0 ((uint32_t)0x10000000) |
| 6398 | #define GPIO_OSPEEDER_OSPEEDR14_1 ((uint32_t)0x20000000) |
| 6399 | |
| 6400 | #define GPIO_OSPEEDER_OSPEEDR15 ((uint32_t)0xC0000000) |
| 6401 | #define GPIO_OSPEEDER_OSPEEDR15_0 ((uint32_t)0x40000000) |
| 6402 | #define GPIO_OSPEEDER_OSPEEDR15_1 ((uint32_t)0x80000000) |
| 6403 | |
| 6404 | /****************** Bits definition for GPIO_PUPDR register *****************/ |
| 6405 | #define GPIO_PUPDR_PUPDR0 ((uint32_t)0x00000003) |
| 6406 | #define GPIO_PUPDR_PUPDR0_0 ((uint32_t)0x00000001) |
| 6407 | #define GPIO_PUPDR_PUPDR0_1 ((uint32_t)0x00000002) |
| 6408 | |
| 6409 | #define GPIO_PUPDR_PUPDR1 ((uint32_t)0x0000000C) |
| 6410 | #define GPIO_PUPDR_PUPDR1_0 ((uint32_t)0x00000004) |
| 6411 | #define GPIO_PUPDR_PUPDR1_1 ((uint32_t)0x00000008) |
| 6412 | |
| 6413 | #define GPIO_PUPDR_PUPDR2 ((uint32_t)0x00000030) |
| 6414 | #define GPIO_PUPDR_PUPDR2_0 ((uint32_t)0x00000010) |
| 6415 | #define GPIO_PUPDR_PUPDR2_1 ((uint32_t)0x00000020) |
| 6416 | |
| 6417 | #define GPIO_PUPDR_PUPDR3 ((uint32_t)0x000000C0) |
| 6418 | #define GPIO_PUPDR_PUPDR3_0 ((uint32_t)0x00000040) |
| 6419 | #define GPIO_PUPDR_PUPDR3_1 ((uint32_t)0x00000080) |
| 6420 | |
| 6421 | #define GPIO_PUPDR_PUPDR4 ((uint32_t)0x00000300) |
| 6422 | #define GPIO_PUPDR_PUPDR4_0 ((uint32_t)0x00000100) |
| 6423 | #define GPIO_PUPDR_PUPDR4_1 ((uint32_t)0x00000200) |
| 6424 | |
| 6425 | #define GPIO_PUPDR_PUPDR5 ((uint32_t)0x00000C00) |
| 6426 | #define GPIO_PUPDR_PUPDR5_0 ((uint32_t)0x00000400) |
| 6427 | #define GPIO_PUPDR_PUPDR5_1 ((uint32_t)0x00000800) |
| 6428 | |
| 6429 | #define GPIO_PUPDR_PUPDR6 ((uint32_t)0x00003000) |
| 6430 | #define GPIO_PUPDR_PUPDR6_0 ((uint32_t)0x00001000) |
| 6431 | #define GPIO_PUPDR_PUPDR6_1 ((uint32_t)0x00002000) |
| 6432 | |
| 6433 | #define GPIO_PUPDR_PUPDR7 ((uint32_t)0x0000C000) |
| 6434 | #define GPIO_PUPDR_PUPDR7_0 ((uint32_t)0x00004000) |
| 6435 | #define GPIO_PUPDR_PUPDR7_1 ((uint32_t)0x00008000) |
| 6436 | |
| 6437 | #define GPIO_PUPDR_PUPDR8 ((uint32_t)0x00030000) |
| 6438 | #define GPIO_PUPDR_PUPDR8_0 ((uint32_t)0x00010000) |
| 6439 | #define GPIO_PUPDR_PUPDR8_1 ((uint32_t)0x00020000) |
| 6440 | |
| 6441 | #define GPIO_PUPDR_PUPDR9 ((uint32_t)0x000C0000) |
| 6442 | #define GPIO_PUPDR_PUPDR9_0 ((uint32_t)0x00040000) |
| 6443 | #define GPIO_PUPDR_PUPDR9_1 ((uint32_t)0x00080000) |
| 6444 | |
| 6445 | #define GPIO_PUPDR_PUPDR10 ((uint32_t)0x00300000) |
| 6446 | #define GPIO_PUPDR_PUPDR10_0 ((uint32_t)0x00100000) |
| 6447 | #define GPIO_PUPDR_PUPDR10_1 ((uint32_t)0x00200000) |
| 6448 | |
| 6449 | #define GPIO_PUPDR_PUPDR11 ((uint32_t)0x00C00000) |
| 6450 | #define GPIO_PUPDR_PUPDR11_0 ((uint32_t)0x00400000) |
| 6451 | #define GPIO_PUPDR_PUPDR11_1 ((uint32_t)0x00800000) |
| 6452 | |
| 6453 | #define GPIO_PUPDR_PUPDR12 ((uint32_t)0x03000000) |
| 6454 | #define GPIO_PUPDR_PUPDR12_0 ((uint32_t)0x01000000) |
| 6455 | #define GPIO_PUPDR_PUPDR12_1 ((uint32_t)0x02000000) |
| 6456 | |
| 6457 | #define GPIO_PUPDR_PUPDR13 ((uint32_t)0x0C000000) |
| 6458 | #define GPIO_PUPDR_PUPDR13_0 ((uint32_t)0x04000000) |
| 6459 | #define GPIO_PUPDR_PUPDR13_1 ((uint32_t)0x08000000) |
| 6460 | |
| 6461 | #define GPIO_PUPDR_PUPDR14 ((uint32_t)0x30000000) |
| 6462 | #define GPIO_PUPDR_PUPDR14_0 ((uint32_t)0x10000000) |
| 6463 | #define GPIO_PUPDR_PUPDR14_1 ((uint32_t)0x20000000) |
| 6464 | |
| 6465 | #define GPIO_PUPDR_PUPDR15 ((uint32_t)0xC0000000) |
| 6466 | #define GPIO_PUPDR_PUPDR15_0 ((uint32_t)0x40000000) |
| 6467 | #define GPIO_PUPDR_PUPDR15_1 ((uint32_t)0x80000000) |
| 6468 | |
| 6469 | /****************** Bits definition for GPIO_IDR register *******************/ |
| 6470 | #define GPIO_IDR_IDR_0 ((uint32_t)0x00000001) |
| 6471 | #define GPIO_IDR_IDR_1 ((uint32_t)0x00000002) |
| 6472 | #define GPIO_IDR_IDR_2 ((uint32_t)0x00000004) |
| 6473 | #define GPIO_IDR_IDR_3 ((uint32_t)0x00000008) |
| 6474 | #define GPIO_IDR_IDR_4 ((uint32_t)0x00000010) |
| 6475 | #define GPIO_IDR_IDR_5 ((uint32_t)0x00000020) |
| 6476 | #define GPIO_IDR_IDR_6 ((uint32_t)0x00000040) |
| 6477 | #define GPIO_IDR_IDR_7 ((uint32_t)0x00000080) |
| 6478 | #define GPIO_IDR_IDR_8 ((uint32_t)0x00000100) |
| 6479 | #define GPIO_IDR_IDR_9 ((uint32_t)0x00000200) |
| 6480 | #define GPIO_IDR_IDR_10 ((uint32_t)0x00000400) |
| 6481 | #define GPIO_IDR_IDR_11 ((uint32_t)0x00000800) |
| 6482 | #define GPIO_IDR_IDR_12 ((uint32_t)0x00001000) |
| 6483 | #define GPIO_IDR_IDR_13 ((uint32_t)0x00002000) |
| 6484 | #define GPIO_IDR_IDR_14 ((uint32_t)0x00004000) |
| 6485 | #define GPIO_IDR_IDR_15 ((uint32_t)0x00008000) |
| 6486 | /* Old GPIO_IDR register bits definition, maintained for legacy purpose */ |
| 6487 | #define GPIO_OTYPER_IDR_0 GPIO_IDR_IDR_0 |
| 6488 | #define GPIO_OTYPER_IDR_1 GPIO_IDR_IDR_1 |
| 6489 | #define GPIO_OTYPER_IDR_2 GPIO_IDR_IDR_2 |
| 6490 | #define GPIO_OTYPER_IDR_3 GPIO_IDR_IDR_3 |
| 6491 | #define GPIO_OTYPER_IDR_4 GPIO_IDR_IDR_4 |
| 6492 | #define GPIO_OTYPER_IDR_5 GPIO_IDR_IDR_5 |
| 6493 | #define GPIO_OTYPER_IDR_6 GPIO_IDR_IDR_6 |
| 6494 | #define GPIO_OTYPER_IDR_7 GPIO_IDR_IDR_7 |
| 6495 | #define GPIO_OTYPER_IDR_8 GPIO_IDR_IDR_8 |
| 6496 | #define GPIO_OTYPER_IDR_9 GPIO_IDR_IDR_9 |
| 6497 | #define GPIO_OTYPER_IDR_10 GPIO_IDR_IDR_10 |
| 6498 | #define GPIO_OTYPER_IDR_11 GPIO_IDR_IDR_11 |
| 6499 | #define GPIO_OTYPER_IDR_12 GPIO_IDR_IDR_12 |
| 6500 | #define GPIO_OTYPER_IDR_13 GPIO_IDR_IDR_13 |
| 6501 | #define GPIO_OTYPER_IDR_14 GPIO_IDR_IDR_14 |
| 6502 | #define GPIO_OTYPER_IDR_15 GPIO_IDR_IDR_15 |
| 6503 | |
| 6504 | /****************** Bits definition for GPIO_ODR register *******************/ |
| 6505 | #define GPIO_ODR_ODR_0 ((uint32_t)0x00000001) |
| 6506 | #define GPIO_ODR_ODR_1 ((uint32_t)0x00000002) |
| 6507 | #define GPIO_ODR_ODR_2 ((uint32_t)0x00000004) |
| 6508 | #define GPIO_ODR_ODR_3 ((uint32_t)0x00000008) |
| 6509 | #define GPIO_ODR_ODR_4 ((uint32_t)0x00000010) |
| 6510 | #define GPIO_ODR_ODR_5 ((uint32_t)0x00000020) |
| 6511 | #define GPIO_ODR_ODR_6 ((uint32_t)0x00000040) |
| 6512 | #define GPIO_ODR_ODR_7 ((uint32_t)0x00000080) |
| 6513 | #define GPIO_ODR_ODR_8 ((uint32_t)0x00000100) |
| 6514 | #define GPIO_ODR_ODR_9 ((uint32_t)0x00000200) |
| 6515 | #define GPIO_ODR_ODR_10 ((uint32_t)0x00000400) |
| 6516 | #define GPIO_ODR_ODR_11 ((uint32_t)0x00000800) |
| 6517 | #define GPIO_ODR_ODR_12 ((uint32_t)0x00001000) |
| 6518 | #define GPIO_ODR_ODR_13 ((uint32_t)0x00002000) |
| 6519 | #define GPIO_ODR_ODR_14 ((uint32_t)0x00004000) |
| 6520 | #define GPIO_ODR_ODR_15 ((uint32_t)0x00008000) |
| 6521 | /* Old GPIO_ODR register bits definition, maintained for legacy purpose */ |
| 6522 | #define GPIO_OTYPER_ODR_0 GPIO_ODR_ODR_0 |
| 6523 | #define GPIO_OTYPER_ODR_1 GPIO_ODR_ODR_1 |
| 6524 | #define GPIO_OTYPER_ODR_2 GPIO_ODR_ODR_2 |
| 6525 | #define GPIO_OTYPER_ODR_3 GPIO_ODR_ODR_3 |
| 6526 | #define GPIO_OTYPER_ODR_4 GPIO_ODR_ODR_4 |
| 6527 | #define GPIO_OTYPER_ODR_5 GPIO_ODR_ODR_5 |
| 6528 | #define GPIO_OTYPER_ODR_6 GPIO_ODR_ODR_6 |
| 6529 | #define GPIO_OTYPER_ODR_7 GPIO_ODR_ODR_7 |
| 6530 | #define GPIO_OTYPER_ODR_8 GPIO_ODR_ODR_8 |
| 6531 | #define GPIO_OTYPER_ODR_9 GPIO_ODR_ODR_9 |
| 6532 | #define GPIO_OTYPER_ODR_10 GPIO_ODR_ODR_10 |
| 6533 | #define GPIO_OTYPER_ODR_11 GPIO_ODR_ODR_11 |
| 6534 | #define GPIO_OTYPER_ODR_12 GPIO_ODR_ODR_12 |
| 6535 | #define GPIO_OTYPER_ODR_13 GPIO_ODR_ODR_13 |
| 6536 | #define GPIO_OTYPER_ODR_14 GPIO_ODR_ODR_14 |
| 6537 | #define GPIO_OTYPER_ODR_15 GPIO_ODR_ODR_15 |
| 6538 | |
| 6539 | /****************** Bits definition for GPIO_BSRR register ******************/ |
| 6540 | #define GPIO_BSRR_BS_0 ((uint32_t)0x00000001) |
| 6541 | #define GPIO_BSRR_BS_1 ((uint32_t)0x00000002) |
| 6542 | #define GPIO_BSRR_BS_2 ((uint32_t)0x00000004) |
| 6543 | #define GPIO_BSRR_BS_3 ((uint32_t)0x00000008) |
| 6544 | #define GPIO_BSRR_BS_4 ((uint32_t)0x00000010) |
| 6545 | #define GPIO_BSRR_BS_5 ((uint32_t)0x00000020) |
| 6546 | #define GPIO_BSRR_BS_6 ((uint32_t)0x00000040) |
| 6547 | #define GPIO_BSRR_BS_7 ((uint32_t)0x00000080) |
| 6548 | #define GPIO_BSRR_BS_8 ((uint32_t)0x00000100) |
| 6549 | #define GPIO_BSRR_BS_9 ((uint32_t)0x00000200) |
| 6550 | #define GPIO_BSRR_BS_10 ((uint32_t)0x00000400) |
| 6551 | #define GPIO_BSRR_BS_11 ((uint32_t)0x00000800) |
| 6552 | #define GPIO_BSRR_BS_12 ((uint32_t)0x00001000) |
| 6553 | #define GPIO_BSRR_BS_13 ((uint32_t)0x00002000) |
| 6554 | #define GPIO_BSRR_BS_14 ((uint32_t)0x00004000) |
| 6555 | #define GPIO_BSRR_BS_15 ((uint32_t)0x00008000) |
| 6556 | #define GPIO_BSRR_BR_0 ((uint32_t)0x00010000) |
| 6557 | #define GPIO_BSRR_BR_1 ((uint32_t)0x00020000) |
| 6558 | #define GPIO_BSRR_BR_2 ((uint32_t)0x00040000) |
| 6559 | #define GPIO_BSRR_BR_3 ((uint32_t)0x00080000) |
| 6560 | #define GPIO_BSRR_BR_4 ((uint32_t)0x00100000) |
| 6561 | #define GPIO_BSRR_BR_5 ((uint32_t)0x00200000) |
| 6562 | #define GPIO_BSRR_BR_6 ((uint32_t)0x00400000) |
| 6563 | #define GPIO_BSRR_BR_7 ((uint32_t)0x00800000) |
| 6564 | #define GPIO_BSRR_BR_8 ((uint32_t)0x01000000) |
| 6565 | #define GPIO_BSRR_BR_9 ((uint32_t)0x02000000) |
| 6566 | #define GPIO_BSRR_BR_10 ((uint32_t)0x04000000) |
| 6567 | #define GPIO_BSRR_BR_11 ((uint32_t)0x08000000) |
| 6568 | #define GPIO_BSRR_BR_12 ((uint32_t)0x10000000) |
| 6569 | #define GPIO_BSRR_BR_13 ((uint32_t)0x20000000) |
| 6570 | #define GPIO_BSRR_BR_14 ((uint32_t)0x40000000) |
| 6571 | #define GPIO_BSRR_BR_15 ((uint32_t)0x80000000) |
| 6572 | |
| 6573 | /******************************************************************************/ |
| 6574 | /* */ |
| 6575 | /* HASH */ |
| 6576 | /* */ |
| 6577 | /******************************************************************************/ |
| 6578 | /****************** Bits definition for HASH_CR register ********************/ |
| 6579 | #define HASH_CR_INIT ((uint32_t)0x00000004) |
| 6580 | #define HASH_CR_DMAE ((uint32_t)0x00000008) |
| 6581 | #define HASH_CR_DATATYPE ((uint32_t)0x00000030) |
| 6582 | #define HASH_CR_DATATYPE_0 ((uint32_t)0x00000010) |
| 6583 | #define HASH_CR_DATATYPE_1 ((uint32_t)0x00000020) |
| 6584 | #define HASH_CR_MODE ((uint32_t)0x00000040) |
| 6585 | #define HASH_CR_ALGO ((uint32_t)0x00040080) |
| 6586 | #define HASH_CR_ALGO_0 ((uint32_t)0x00000080) |
| 6587 | #define HASH_CR_ALGO_1 ((uint32_t)0x00040000) |
| 6588 | #define HASH_CR_NBW ((uint32_t)0x00000F00) |
| 6589 | #define HASH_CR_NBW_0 ((uint32_t)0x00000100) |
| 6590 | #define HASH_CR_NBW_1 ((uint32_t)0x00000200) |
| 6591 | #define HASH_CR_NBW_2 ((uint32_t)0x00000400) |
| 6592 | #define HASH_CR_NBW_3 ((uint32_t)0x00000800) |
| 6593 | #define HASH_CR_DINNE ((uint32_t)0x00001000) |
| 6594 | #define HASH_CR_MDMAT ((uint32_t)0x00002000) |
| 6595 | #define HASH_CR_LKEY ((uint32_t)0x00010000) |
| 6596 | |
| 6597 | /****************** Bits definition for HASH_STR register *******************/ |
| 6598 | #define HASH_STR_NBW ((uint32_t)0x0000001F) |
| 6599 | #define HASH_STR_NBW_0 ((uint32_t)0x00000001) |
| 6600 | #define HASH_STR_NBW_1 ((uint32_t)0x00000002) |
| 6601 | #define HASH_STR_NBW_2 ((uint32_t)0x00000004) |
| 6602 | #define HASH_STR_NBW_3 ((uint32_t)0x00000008) |
| 6603 | #define HASH_STR_NBW_4 ((uint32_t)0x00000010) |
| 6604 | #define HASH_STR_DCAL ((uint32_t)0x00000100) |
| 6605 | |
| 6606 | /****************** Bits definition for HASH_IMR register *******************/ |
| 6607 | #define HASH_IMR_DINIM ((uint32_t)0x00000001) |
| 6608 | #define HASH_IMR_DCIM ((uint32_t)0x00000002) |
| 6609 | |
| 6610 | /****************** Bits definition for HASH_SR register ********************/ |
| 6611 | #define HASH_SR_DINIS ((uint32_t)0x00000001) |
| 6612 | #define HASH_SR_DCIS ((uint32_t)0x00000002) |
| 6613 | #define HASH_SR_DMAS ((uint32_t)0x00000004) |
| 6614 | #define HASH_SR_BUSY ((uint32_t)0x00000008) |
| 6615 | |
| 6616 | /******************************************************************************/ |
| 6617 | /* */ |
| 6618 | /* Inter-integrated Circuit Interface */ |
| 6619 | /* */ |
| 6620 | /******************************************************************************/ |
| 6621 | /******************* Bit definition for I2C_CR1 register ********************/ |
| 6622 | #define I2C_CR1_PE ((uint16_t)0x0001) /*!<Peripheral Enable */ |
| 6623 | #define I2C_CR1_SMBUS ((uint16_t)0x0002) /*!<SMBus Mode */ |
| 6624 | #define I2C_CR1_SMBTYPE ((uint16_t)0x0008) /*!<SMBus Type */ |
| 6625 | #define I2C_CR1_ENARP ((uint16_t)0x0010) /*!<ARP Enable */ |
| 6626 | #define I2C_CR1_ENPEC ((uint16_t)0x0020) /*!<PEC Enable */ |
| 6627 | #define I2C_CR1_ENGC ((uint16_t)0x0040) /*!<General Call Enable */ |
| 6628 | #define I2C_CR1_NOSTRETCH ((uint16_t)0x0080) /*!<Clock Stretching Disable (Slave mode) */ |
| 6629 | #define I2C_CR1_START ((uint16_t)0x0100) /*!<Start Generation */ |
| 6630 | #define I2C_CR1_STOP ((uint16_t)0x0200) /*!<Stop Generation */ |
| 6631 | #define I2C_CR1_ACK ((uint16_t)0x0400) /*!<Acknowledge Enable */ |
| 6632 | #define I2C_CR1_POS ((uint16_t)0x0800) /*!<Acknowledge/PEC Position (for data reception) */ |
| 6633 | #define I2C_CR1_PEC ((uint16_t)0x1000) /*!<Packet Error Checking */ |
| 6634 | #define I2C_CR1_ALERT ((uint16_t)0x2000) /*!<SMBus Alert */ |
| 6635 | #define I2C_CR1_SWRST ((uint16_t)0x8000) /*!<Software Reset */ |
| 6636 | |
| 6637 | /******************* Bit definition for I2C_CR2 register ********************/ |
| 6638 | #define I2C_CR2_FREQ ((uint16_t)0x003F) /*!<FREQ[5:0] bits (Peripheral Clock Frequency) */ |
| 6639 | #define I2C_CR2_FREQ_0 ((uint16_t)0x0001) /*!<Bit 0 */ |
| 6640 | #define I2C_CR2_FREQ_1 ((uint16_t)0x0002) /*!<Bit 1 */ |
| 6641 | #define I2C_CR2_FREQ_2 ((uint16_t)0x0004) /*!<Bit 2 */ |
| 6642 | #define I2C_CR2_FREQ_3 ((uint16_t)0x0008) /*!<Bit 3 */ |
| 6643 | #define I2C_CR2_FREQ_4 ((uint16_t)0x0010) /*!<Bit 4 */ |
| 6644 | #define I2C_CR2_FREQ_5 ((uint16_t)0x0020) /*!<Bit 5 */ |
| 6645 | |
| 6646 | #define I2C_CR2_ITERREN ((uint16_t)0x0100) /*!<Error Interrupt Enable */ |
| 6647 | #define I2C_CR2_ITEVTEN ((uint16_t)0x0200) /*!<Event Interrupt Enable */ |
| 6648 | #define I2C_CR2_ITBUFEN ((uint16_t)0x0400) /*!<Buffer Interrupt Enable */ |
| 6649 | #define I2C_CR2_DMAEN ((uint16_t)0x0800) /*!<DMA Requests Enable */ |
| 6650 | #define I2C_CR2_LAST ((uint16_t)0x1000) /*!<DMA Last Transfer */ |
| 6651 | |
| 6652 | /******************* Bit definition for I2C_OAR1 register *******************/ |
| 6653 | #define I2C_OAR1_ADD1_7 ((uint16_t)0x00FE) /*!<Interface Address */ |
| 6654 | #define I2C_OAR1_ADD8_9 ((uint16_t)0x0300) /*!<Interface Address */ |
| 6655 | |
| 6656 | #define I2C_OAR1_ADD0 ((uint16_t)0x0001) /*!<Bit 0 */ |
| 6657 | #define I2C_OAR1_ADD1 ((uint16_t)0x0002) /*!<Bit 1 */ |
| 6658 | #define I2C_OAR1_ADD2 ((uint16_t)0x0004) /*!<Bit 2 */ |
| 6659 | #define I2C_OAR1_ADD3 ((uint16_t)0x0008) /*!<Bit 3 */ |
| 6660 | #define I2C_OAR1_ADD4 ((uint16_t)0x0010) /*!<Bit 4 */ |
| 6661 | #define I2C_OAR1_ADD5 ((uint16_t)0x0020) /*!<Bit 5 */ |
| 6662 | #define I2C_OAR1_ADD6 ((uint16_t)0x0040) /*!<Bit 6 */ |
| 6663 | #define I2C_OAR1_ADD7 ((uint16_t)0x0080) /*!<Bit 7 */ |
| 6664 | #define I2C_OAR1_ADD8 ((uint16_t)0x0100) /*!<Bit 8 */ |
| 6665 | #define I2C_OAR1_ADD9 ((uint16_t)0x0200) /*!<Bit 9 */ |
| 6666 | |
| 6667 | #define I2C_OAR1_ADDMODE ((uint16_t)0x8000) /*!<Addressing Mode (Slave mode) */ |
| 6668 | |
| 6669 | /******************* Bit definition for I2C_OAR2 register *******************/ |
| 6670 | #define I2C_OAR2_ENDUAL ((uint8_t)0x01) /*!<Dual addressing mode enable */ |
| 6671 | #define I2C_OAR2_ADD2 ((uint8_t)0xFE) /*!<Interface address */ |
| 6672 | |
| 6673 | /******************** Bit definition for I2C_DR register ********************/ |
| 6674 | #define I2C_DR_DR ((uint8_t)0xFF) /*!<8-bit Data Register */ |
| 6675 | |
| 6676 | /******************* Bit definition for I2C_SR1 register ********************/ |
| 6677 | #define I2C_SR1_SB ((uint16_t)0x0001) /*!<Start Bit (Master mode) */ |
| 6678 | #define I2C_SR1_ADDR ((uint16_t)0x0002) /*!<Address sent (master mode)/matched (slave mode) */ |
| 6679 | #define I2C_SR1_BTF ((uint16_t)0x0004) /*!<Byte Transfer Finished */ |
| 6680 | #define I2C_SR1_ADD10 ((uint16_t)0x0008) /*!<10-bit header sent (Master mode) */ |
| 6681 | #define I2C_SR1_STOPF ((uint16_t)0x0010) /*!<Stop detection (Slave mode) */ |
| 6682 | #define I2C_SR1_RXNE ((uint16_t)0x0040) /*!<Data Register not Empty (receivers) */ |
| 6683 | #define I2C_SR1_TXE ((uint16_t)0x0080) /*!<Data Register Empty (transmitters) */ |
| 6684 | #define I2C_SR1_BERR ((uint16_t)0x0100) /*!<Bus Error */ |
| 6685 | #define I2C_SR1_ARLO ((uint16_t)0x0200) /*!<Arbitration Lost (master mode) */ |
| 6686 | #define I2C_SR1_AF ((uint16_t)0x0400) /*!<Acknowledge Failure */ |
| 6687 | #define I2C_SR1_OVR ((uint16_t)0x0800) /*!<Overrun/Underrun */ |
| 6688 | #define I2C_SR1_PECERR ((uint16_t)0x1000) /*!<PEC Error in reception */ |
| 6689 | #define I2C_SR1_TIMEOUT ((uint16_t)0x4000) /*!<Timeout or Tlow Error */ |
| 6690 | #define I2C_SR1_SMBALERT ((uint16_t)0x8000) /*!<SMBus Alert */ |
| 6691 | |
| 6692 | /******************* Bit definition for I2C_SR2 register ********************/ |
| 6693 | #define I2C_SR2_MSL ((uint16_t)0x0001) /*!<Master/Slave */ |
| 6694 | #define I2C_SR2_BUSY ((uint16_t)0x0002) /*!<Bus Busy */ |
| 6695 | #define I2C_SR2_TRA ((uint16_t)0x0004) /*!<Transmitter/Receiver */ |
| 6696 | #define I2C_SR2_GENCALL ((uint16_t)0x0010) /*!<General Call Address (Slave mode) */ |
| 6697 | #define I2C_SR2_SMBDEFAULT ((uint16_t)0x0020) /*!<SMBus Device Default Address (Slave mode) */ |
| 6698 | #define I2C_SR2_SMBHOST ((uint16_t)0x0040) /*!<SMBus Host Header (Slave mode) */ |
| 6699 | #define I2C_SR2_DUALF ((uint16_t)0x0080) /*!<Dual Flag (Slave mode) */ |
| 6700 | #define I2C_SR2_PEC ((uint16_t)0xFF00) /*!<Packet Error Checking Register */ |
| 6701 | |
| 6702 | /******************* Bit definition for I2C_CCR register ********************/ |
| 6703 | #define I2C_CCR_CCR ((uint16_t)0x0FFF) /*!<Clock Control Register in Fast/Standard mode (Master mode) */ |
| 6704 | #define I2C_CCR_DUTY ((uint16_t)0x4000) /*!<Fast Mode Duty Cycle */ |
| 6705 | #define I2C_CCR_FS ((uint16_t)0x8000) /*!<I2C Master Mode Selection */ |
| 6706 | |
| 6707 | /****************** Bit definition for I2C_TRISE register *******************/ |
| 6708 | #define I2C_TRISE_TRISE ((uint8_t)0x3F) /*!<Maximum Rise Time in Fast/Standard mode (Master mode) */ |
| 6709 | |
| 6710 | /****************** Bit definition for I2C_FLTR register *******************/ |
| 6711 | #define I2C_FLTR_DNF ((uint8_t)0x0F) /*!<Digital Noise Filter */ |
| 6712 | #define I2C_FLTR_ANOFF ((uint8_t)0x10) /*!<Analog Noise Filter OFF */ |
| 6713 | |
| 6714 | /******************************************************************************/ |
| 6715 | /* */ |
| 6716 | /* Fast-mode Plus Inter-integrated circuit (FMPI2C) */ |
| 6717 | /* */ |
| 6718 | /******************************************************************************/ |
| 6719 | /******************* Bit definition for I2C_CR1 register *******************/ |
| 6720 | #define FMPI2C_CR1_PE ((uint32_t)0x00000001) /*!< Peripheral enable */ |
| 6721 | #define FMPI2C_CR1_TXIE ((uint32_t)0x00000002) /*!< TX interrupt enable */ |
| 6722 | #define FMPI2C_CR1_RXIE ((uint32_t)0x00000004) /*!< RX interrupt enable */ |
| 6723 | #define FMPI2C_CR1_ADDRIE ((uint32_t)0x00000008) /*!< Address match interrupt enable */ |
| 6724 | #define FMPI2C_CR1_NACKIE ((uint32_t)0x00000010) /*!< NACK received interrupt enable */ |
| 6725 | #define FMPI2C_CR1_STOPIE ((uint32_t)0x00000020) /*!< STOP detection interrupt enable */ |
| 6726 | #define FMPI2C_CR1_TCIE ((uint32_t)0x00000040) /*!< Transfer complete interrupt enable */ |
| 6727 | #define FMPI2C_CR1_ERRIE ((uint32_t)0x00000080) /*!< Errors interrupt enable */ |
| 6728 | #define FMPI2C_CR1_DFN ((uint32_t)0x00000F00) /*!< Digital noise filter */ |
| 6729 | #define FMPI2C_CR1_ANFOFF ((uint32_t)0x00001000) /*!< Analog noise filter OFF */ |
| 6730 | #define FMPI2C_CR1_SWRST ((uint32_t)0x00002000) /*!< Software reset */ |
| 6731 | #define FMPI2C_CR1_TXDMAEN ((uint32_t)0x00004000) /*!< DMA transmission requests enable */ |
| 6732 | #define FMPI2C_CR1_RXDMAEN ((uint32_t)0x00008000) /*!< DMA reception requests enable */ |
| 6733 | #define FMPI2C_CR1_SBC ((uint32_t)0x00010000) /*!< Slave byte control */ |
| 6734 | #define FMPI2C_CR1_NOSTRETCH ((uint32_t)0x00020000) /*!< Clock stretching disable */ |
| 6735 | #define FMPI2C_CR1_WUPEN ((uint32_t)0x00040000) /*!< Wakeup from STOP enable */ |
| 6736 | #define FMPI2C_CR1_GCEN ((uint32_t)0x00080000) /*!< General call enable */ |
| 6737 | #define FMPI2C_CR1_SMBHEN ((uint32_t)0x00100000) /*!< SMBus host address enable */ |
| 6738 | #define FMPI2C_CR1_SMBDEN ((uint32_t)0x00200000) /*!< SMBus device default address enable */ |
| 6739 | #define FMPI2C_CR1_ALERTEN ((uint32_t)0x00400000) /*!< SMBus alert enable */ |
| 6740 | #define FMPI2C_CR1_PECEN ((uint32_t)0x00800000) /*!< PEC enable */ |
| 6741 | |
| 6742 | /****************** Bit definition for I2C_CR2 register ********************/ |
| 6743 | #define FMPI2C_CR2_SADD ((uint32_t)0x000003FF) /*!< Slave address (master mode) */ |
| 6744 | #define FMPI2C_CR2_RD_WRN ((uint32_t)0x00000400) /*!< Transfer direction (master mode) */ |
| 6745 | #define FMPI2C_CR2_ADD10 ((uint32_t)0x00000800) /*!< 10-bit addressing mode (master mode) */ |
| 6746 | #define FMPI2C_CR2_HEAD10R ((uint32_t)0x00001000) /*!< 10-bit address header only read direction (master mode) */ |
| 6747 | #define FMPI2C_CR2_START ((uint32_t)0x00002000) /*!< START generation */ |
| 6748 | #define FMPI2C_CR2_STOP ((uint32_t)0x00004000) /*!< STOP generation (master mode) */ |
| 6749 | #define FMPI2C_CR2_NACK ((uint32_t)0x00008000) /*!< NACK generation (slave mode) */ |
| 6750 | #define FMPI2C_CR2_NBYTES ((uint32_t)0x00FF0000) /*!< Number of bytes */ |
| 6751 | #define FMPI2C_CR2_RELOAD ((uint32_t)0x01000000) /*!< NBYTES reload mode */ |
| 6752 | #define FMPI2C_CR2_AUTOEND ((uint32_t)0x02000000) /*!< Automatic end mode (master mode) */ |
| 6753 | #define FMPI2C_CR2_PECBYTE ((uint32_t)0x04000000) /*!< Packet error checking byte */ |
| 6754 | |
| 6755 | /******************* Bit definition for I2C_OAR1 register ******************/ |
| 6756 | #define FMPI2C_OAR1_OA1 ((uint32_t)0x000003FF) /*!< Interface own address 1 */ |
| 6757 | #define FMPI2C_OAR1_OA1MODE ((uint32_t)0x00000400) /*!< Own address 1 10-bit mode */ |
| 6758 | #define FMPI2C_OAR1_OA1EN ((uint32_t)0x00008000) /*!< Own address 1 enable */ |
| 6759 | |
| 6760 | /******************* Bit definition for I2C_OAR2 register *******************/ |
| 6761 | #define FMPI2C_OAR2_OA2 ((uint32_t)0x000000FE) /*!< Interface own address 2 */ |
| 6762 | #define FMPI2C_OAR2_OA2MSK ((uint32_t)0x00000700) /*!< Own address 2 masks */ |
| 6763 | #define FMPI2C_OAR2_OA2EN ((uint32_t)0x00008000) /*!< Own address 2 enable */ |
| 6764 | |
| 6765 | /******************* Bit definition for I2C_TIMINGR register *****************/ |
| 6766 | #define FMPI2C_TIMINGR_SCLL ((uint32_t)0x000000FF) /*!< SCL low period (master mode) */ |
| 6767 | #define FMPI2C_TIMINGR_SCLH ((uint32_t)0x0000FF00) /*!< SCL high period (master mode) */ |
| 6768 | #define FMPI2C_TIMINGR_SDADEL ((uint32_t)0x000F0000) /*!< Data hold time */ |
| 6769 | #define FMPI2C_TIMINGR_SCLDEL ((uint32_t)0x00F00000) /*!< Data setup time */ |
| 6770 | #define FMPI2C_TIMINGR_PRESC ((uint32_t)0xF0000000) /*!< Timings prescaler */ |
| 6771 | |
| 6772 | /******************* Bit definition for I2C_TIMEOUTR register *****************/ |
| 6773 | #define FMPI2C_TIMEOUTR_TIMEOUTA ((uint32_t)0x00000FFF) /*!< Bus timeout A */ |
| 6774 | #define FMPI2C_TIMEOUTR_TIDLE ((uint32_t)0x00001000) /*!< Idle clock timeout detection */ |
| 6775 | #define FMPI2C_TIMEOUTR_TIMOUTEN ((uint32_t)0x00008000) /*!< Clock timeout enable */ |
| 6776 | #define FMPI2C_TIMEOUTR_TIMEOUTB ((uint32_t)0x0FFF0000) /*!< Bus timeout B */ |
| 6777 | #define FMPI2C_TIMEOUTR_TEXTEN ((uint32_t)0x80000000) /*!< Extended clock timeout enable */ |
| 6778 | |
| 6779 | /****************** Bit definition for I2C_ISR register *********************/ |
| 6780 | #define FMPI2C_ISR_TXE ((uint32_t)0x00000001) /*!< Transmit data register empty */ |
| 6781 | #define FMPI2C_ISR_TXIS ((uint32_t)0x00000002) /*!< Transmit interrupt status */ |
| 6782 | #define FMPI2C_ISR_RXNE ((uint32_t)0x00000004) /*!< Receive data register not empty */ |
| 6783 | #define FMPI2C_ISR_ADDR ((uint32_t)0x00000008) /*!< Address matched (slave mode) */ |
| 6784 | #define FMPI2C_ISR_NACKF ((uint32_t)0x00000010) /*!< NACK received flag */ |
| 6785 | #define FMPI2C_ISR_STOPF ((uint32_t)0x00000020) /*!< STOP detection flag */ |
| 6786 | #define FMPI2C_ISR_TC ((uint32_t)0x00000040) /*!< Transfer complete (master mode) */ |
| 6787 | #define FMPI2C_ISR_TCR ((uint32_t)0x00000080) /*!< Transfer complete reload */ |
| 6788 | #define FMPI2C_ISR_BERR ((uint32_t)0x00000100) /*!< Bus error */ |
| 6789 | #define FMPI2C_ISR_ARLO ((uint32_t)0x00000200) /*!< Arbitration lost */ |
| 6790 | #define FMPI2C_ISR_OVR ((uint32_t)0x00000400) /*!< Overrun/Underrun */ |
| 6791 | #define FMPI2C_ISR_PECERR ((uint32_t)0x00000800) /*!< PEC error in reception */ |
| 6792 | #define FMPI2C_ISR_TIMEOUT ((uint32_t)0x00001000) /*!< Timeout or Tlow detection flag */ |
| 6793 | #define FMPI2C_ISR_ALERT ((uint32_t)0x00002000) /*!< SMBus alert */ |
| 6794 | #define FMPI2C_ISR_BUSY ((uint32_t)0x00008000) /*!< Bus busy */ |
| 6795 | #define FMPI2C_ISR_DIR ((uint32_t)0x00010000) /*!< Transfer direction (slave mode) */ |
| 6796 | #define FMPI2C_ISR_ADDCODE ((uint32_t)0x00FE0000) /*!< Address match code (slave mode) */ |
| 6797 | |
| 6798 | /****************** Bit definition for I2C_ICR register *********************/ |
| 6799 | #define FMPI2C_ICR_ADDRCF ((uint32_t)0x00000008) /*!< Address matched clear flag */ |
| 6800 | #define FMPI2C_ICR_NACKCF ((uint32_t)0x00000010) /*!< NACK clear flag */ |
| 6801 | #define FMPI2C_ICR_STOPCF ((uint32_t)0x00000020) /*!< STOP detection clear flag */ |
| 6802 | #define FMPI2C_ICR_BERRCF ((uint32_t)0x00000100) /*!< Bus error clear flag */ |
| 6803 | #define FMPI2C_ICR_ARLOCF ((uint32_t)0x00000200) /*!< Arbitration lost clear flag */ |
| 6804 | #define FMPI2C_ICR_OVRCF ((uint32_t)0x00000400) /*!< Overrun/Underrun clear flag */ |
| 6805 | #define FMPI2C_ICR_PECCF ((uint32_t)0x00000800) /*!< PAC error clear flag */ |
| 6806 | #define FMPI2C_ICR_TIMOUTCF ((uint32_t)0x00001000) /*!< Timeout clear flag */ |
| 6807 | #define FMPI2C_ICR_ALERTCF ((uint32_t)0x00002000) /*!< Alert clear flag */ |
| 6808 | |
| 6809 | /****************** Bit definition for I2C_PECR register ********************/ |
| 6810 | #define FMPI2C_PECR_PEC ((uint32_t)0x000000FF) /*!< PEC register */ |
| 6811 | |
| 6812 | /****************** Bit definition for I2C_RXDR register *********************/ |
| 6813 | #define FMPI2C_RXDR_RXDATA ((uint32_t)0x000000FF) /*!< 8-bit receive data */ |
| 6814 | |
| 6815 | /****************** Bit definition for I2C_TXDR register *********************/ |
| 6816 | #define FMPI2C_TXDR_TXDATA ((uint32_t)0x000000FF) /*!< 8-bit transmit data */ |
| 6817 | |
| 6818 | /******************************************************************************/ |
| 6819 | /* */ |
| 6820 | /* Independent WATCHDOG */ |
| 6821 | /* */ |
| 6822 | /******************************************************************************/ |
| 6823 | /******************* Bit definition for IWDG_KR register ********************/ |
| 6824 | #define IWDG_KR_KEY ((uint16_t)0xFFFF) /*!<Key value (write only, read 0000h) */ |
| 6825 | |
| 6826 | /******************* Bit definition for IWDG_PR register ********************/ |
| 6827 | #define IWDG_PR_PR ((uint8_t)0x07) /*!<PR[2:0] (Prescaler divider) */ |
| 6828 | #define IWDG_PR_PR_0 ((uint8_t)0x01) /*!<Bit 0 */ |
| 6829 | #define IWDG_PR_PR_1 ((uint8_t)0x02) /*!<Bit 1 */ |
| 6830 | #define IWDG_PR_PR_2 ((uint8_t)0x04) /*!<Bit 2 */ |
| 6831 | |
| 6832 | /******************* Bit definition for IWDG_RLR register *******************/ |
| 6833 | #define IWDG_RLR_RL ((uint16_t)0x0FFF) /*!<Watchdog counter reload value */ |
| 6834 | |
| 6835 | /******************* Bit definition for IWDG_SR register ********************/ |
| 6836 | #define IWDG_SR_PVU ((uint8_t)0x01) /*!<Watchdog prescaler value update */ |
| 6837 | #define IWDG_SR_RVU ((uint8_t)0x02) /*!<Watchdog counter reload value update */ |
| 6838 | |
| 6839 | /******************************************************************************/ |
| 6840 | /* */ |
| 6841 | /* LCD-TFT Display Controller (LTDC) */ |
| 6842 | /* */ |
| 6843 | /******************************************************************************/ |
| 6844 | |
| 6845 | /******************** Bit definition for LTDC_SSCR register *****************/ |
| 6846 | |
| 6847 | #define LTDC_SSCR_VSH ((uint32_t)0x000007FF) /*!< Vertical Synchronization Height */ |
| 6848 | #define LTDC_SSCR_HSW ((uint32_t)0x0FFF0000) /*!< Horizontal Synchronization Width */ |
| 6849 | |
| 6850 | /******************** Bit definition for LTDC_BPCR register *****************/ |
| 6851 | |
| 6852 | #define LTDC_BPCR_AVBP ((uint32_t)0x000007FF) /*!< Accumulated Vertical Back Porch */ |
| 6853 | #define LTDC_BPCR_AHBP ((uint32_t)0x0FFF0000) /*!< Accumulated Horizontal Back Porch */ |
| 6854 | |
| 6855 | /******************** Bit definition for LTDC_AWCR register *****************/ |
| 6856 | |
| 6857 | #define LTDC_AWCR_AAH ((uint32_t)0x000007FF) /*!< Accumulated Active heigh */ |
| 6858 | #define LTDC_AWCR_AAW ((uint32_t)0x0FFF0000) /*!< Accumulated Active Width */ |
| 6859 | |
| 6860 | /******************** Bit definition for LTDC_TWCR register *****************/ |
| 6861 | |
| 6862 | #define LTDC_TWCR_TOTALH ((uint32_t)0x000007FF) /*!< Total Heigh */ |
| 6863 | #define LTDC_TWCR_TOTALW ((uint32_t)0x0FFF0000) /*!< Total Width */ |
| 6864 | |
| 6865 | /******************** Bit definition for LTDC_GCR register ******************/ |
| 6866 | |
| 6867 | #define LTDC_GCR_LTDCEN ((uint32_t)0x00000001) /*!< LCD-TFT controller enable bit */ |
| 6868 | #define LTDC_GCR_DBW ((uint32_t)0x00000070) /*!< Dither Blue Width */ |
| 6869 | #define LTDC_GCR_DGW ((uint32_t)0x00000700) /*!< Dither Green Width */ |
| 6870 | #define LTDC_GCR_DRW ((uint32_t)0x00007000) /*!< Dither Red Width */ |
| 6871 | #define LTDC_GCR_DTEN ((uint32_t)0x00010000) /*!< Dither Enable */ |
| 6872 | #define LTDC_GCR_PCPOL ((uint32_t)0x10000000) /*!< Pixel Clock Polarity */ |
| 6873 | #define LTDC_GCR_DEPOL ((uint32_t)0x20000000) /*!< Data Enable Polarity */ |
| 6874 | #define LTDC_GCR_VSPOL ((uint32_t)0x40000000) /*!< Vertical Synchronization Polarity */ |
| 6875 | #define LTDC_GCR_HSPOL ((uint32_t)0x80000000) /*!< Horizontal Synchronization Polarity */ |
| 6876 | |
| 6877 | /******************** Bit definition for LTDC_SRCR register *****************/ |
| 6878 | |
| 6879 | #define LTDC_SRCR_IMR ((uint32_t)0x00000001) /*!< Immediate Reload */ |
| 6880 | #define LTDC_SRCR_VBR ((uint32_t)0x00000002) /*!< Vertical Blanking Reload */ |
| 6881 | |
| 6882 | /******************** Bit definition for LTDC_BCCR register *****************/ |
| 6883 | |
| 6884 | #define LTDC_BCCR_BCBLUE ((uint32_t)0x000000FF) /*!< Background Blue value */ |
| 6885 | #define LTDC_BCCR_BCGREEN ((uint32_t)0x0000FF00) /*!< Background Green value */ |
| 6886 | #define LTDC_BCCR_BCRED ((uint32_t)0x00FF0000) /*!< Background Red value */ |
| 6887 | |
| 6888 | /******************** Bit definition for LTDC_IER register ******************/ |
| 6889 | |
| 6890 | #define LTDC_IER_LIE ((uint32_t)0x00000001) /*!< Line Interrupt Enable */ |
| 6891 | #define LTDC_IER_FUIE ((uint32_t)0x00000002) /*!< FIFO Underrun Interrupt Enable */ |
| 6892 | #define LTDC_IER_TERRIE ((uint32_t)0x00000004) /*!< Transfer Error Interrupt Enable */ |
| 6893 | #define LTDC_IER_RRIE ((uint32_t)0x00000008) /*!< Register Reload interrupt enable */ |
| 6894 | |
| 6895 | /******************** Bit definition for LTDC_ISR register ******************/ |
| 6896 | |
| 6897 | #define LTDC_ISR_LIF ((uint32_t)0x00000001) /*!< Line Interrupt Flag */ |
| 6898 | #define LTDC_ISR_FUIF ((uint32_t)0x00000002) /*!< FIFO Underrun Interrupt Flag */ |
| 6899 | #define LTDC_ISR_TERRIF ((uint32_t)0x00000004) /*!< Transfer Error Interrupt Flag */ |
| 6900 | #define LTDC_ISR_RRIF ((uint32_t)0x00000008) /*!< Register Reload interrupt Flag */ |
| 6901 | |
| 6902 | /******************** Bit definition for LTDC_ICR register ******************/ |
| 6903 | |
| 6904 | #define LTDC_ICR_CLIF ((uint32_t)0x00000001) /*!< Clears the Line Interrupt Flag */ |
| 6905 | #define LTDC_ICR_CFUIF ((uint32_t)0x00000002) /*!< Clears the FIFO Underrun Interrupt Flag */ |
| 6906 | #define LTDC_ICR_CTERRIF ((uint32_t)0x00000004) /*!< Clears the Transfer Error Interrupt Flag */ |
| 6907 | #define LTDC_ICR_CRRIF ((uint32_t)0x00000008) /*!< Clears Register Reload interrupt Flag */ |
| 6908 | |
| 6909 | /******************** Bit definition for LTDC_LIPCR register ****************/ |
| 6910 | |
| 6911 | #define LTDC_LIPCR_LIPOS ((uint32_t)0x000007FF) /*!< Line Interrupt Position */ |
| 6912 | |
| 6913 | /******************** Bit definition for LTDC_CPSR register *****************/ |
| 6914 | |
| 6915 | #define LTDC_CPSR_CYPOS ((uint32_t)0x0000FFFF) /*!< Current Y Position */ |
| 6916 | #define LTDC_CPSR_CXPOS ((uint32_t)0xFFFF0000) /*!< Current X Position */ |
| 6917 | |
| 6918 | /******************** Bit definition for LTDC_CDSR register *****************/ |
| 6919 | |
| 6920 | #define LTDC_CDSR_VDES ((uint32_t)0x00000001) /*!< Vertical Data Enable Status */ |
| 6921 | #define LTDC_CDSR_HDES ((uint32_t)0x00000002) /*!< Horizontal Data Enable Status */ |
| 6922 | #define LTDC_CDSR_VSYNCS ((uint32_t)0x00000004) /*!< Vertical Synchronization Status */ |
| 6923 | #define LTDC_CDSR_HSYNCS ((uint32_t)0x00000008) /*!< Horizontal Synchronization Status */ |
| 6924 | |
| 6925 | /******************** Bit definition for LTDC_LxCR register *****************/ |
| 6926 | |
| 6927 | #define LTDC_LxCR_LEN ((uint32_t)0x00000001) /*!< Layer Enable */ |
| 6928 | #define LTDC_LxCR_COLKEN ((uint32_t)0x00000002) /*!< Color Keying Enable */ |
| 6929 | #define LTDC_LxCR_CLUTEN ((uint32_t)0x00000010) /*!< Color Lockup Table Enable */ |
| 6930 | |
| 6931 | /******************** Bit definition for LTDC_LxWHPCR register **************/ |
| 6932 | |
| 6933 | #define LTDC_LxWHPCR_WHSTPOS ((uint32_t)0x00000FFF) /*!< Window Horizontal Start Position */ |
| 6934 | #define LTDC_LxWHPCR_WHSPPOS ((uint32_t)0xFFFF0000) /*!< Window Horizontal Stop Position */ |
| 6935 | |
| 6936 | /******************** Bit definition for LTDC_LxWVPCR register **************/ |
| 6937 | |
| 6938 | #define LTDC_LxWVPCR_WVSTPOS ((uint32_t)0x00000FFF) /*!< Window Vertical Start Position */ |
| 6939 | #define LTDC_LxWVPCR_WVSPPOS ((uint32_t)0xFFFF0000) /*!< Window Vertical Stop Position */ |
| 6940 | |
| 6941 | /******************** Bit definition for LTDC_LxCKCR register ***************/ |
| 6942 | |
| 6943 | #define LTDC_LxCKCR_CKBLUE ((uint32_t)0x000000FF) /*!< Color Key Blue value */ |
| 6944 | #define LTDC_LxCKCR_CKGREEN ((uint32_t)0x0000FF00) /*!< Color Key Green value */ |
| 6945 | #define LTDC_LxCKCR_CKRED ((uint32_t)0x00FF0000) /*!< Color Key Red value */ |
| 6946 | |
| 6947 | /******************** Bit definition for LTDC_LxPFCR register ***************/ |
| 6948 | |
| 6949 | #define LTDC_LxPFCR_PF ((uint32_t)0x00000007) /*!< Pixel Format */ |
| 6950 | |
| 6951 | /******************** Bit definition for LTDC_LxCACR register ***************/ |
| 6952 | |
| 6953 | #define LTDC_LxCACR_CONSTA ((uint32_t)0x000000FF) /*!< Constant Alpha */ |
| 6954 | |
| 6955 | /******************** Bit definition for LTDC_LxDCCR register ***************/ |
| 6956 | |
| 6957 | #define LTDC_LxDCCR_DCBLUE ((uint32_t)0x000000FF) /*!< Default Color Blue */ |
| 6958 | #define LTDC_LxDCCR_DCGREEN ((uint32_t)0x0000FF00) /*!< Default Color Green */ |
| 6959 | #define LTDC_LxDCCR_DCRED ((uint32_t)0x00FF0000) /*!< Default Color Red */ |
| 6960 | #define LTDC_LxDCCR_DCALPHA ((uint32_t)0xFF000000) /*!< Default Color Alpha */ |
| 6961 | |
| 6962 | /******************** Bit definition for LTDC_LxBFCR register ***************/ |
| 6963 | |
| 6964 | #define LTDC_LxBFCR_BF2 ((uint32_t)0x00000007) /*!< Blending Factor 2 */ |
| 6965 | #define LTDC_LxBFCR_BF1 ((uint32_t)0x00000700) /*!< Blending Factor 1 */ |
| 6966 | |
| 6967 | /******************** Bit definition for LTDC_LxCFBAR register **************/ |
| 6968 | |
| 6969 | #define LTDC_LxCFBAR_CFBADD ((uint32_t)0xFFFFFFFF) /*!< Color Frame Buffer Start Address */ |
| 6970 | |
| 6971 | /******************** Bit definition for LTDC_LxCFBLR register **************/ |
| 6972 | |
| 6973 | #define LTDC_LxCFBLR_CFBLL ((uint32_t)0x00001FFF) /*!< Color Frame Buffer Line Length */ |
| 6974 | #define LTDC_LxCFBLR_CFBP ((uint32_t)0x1FFF0000) /*!< Color Frame Buffer Pitch in bytes */ |
| 6975 | |
| 6976 | /******************** Bit definition for LTDC_LxCFBLNR register *************/ |
| 6977 | |
| 6978 | #define LTDC_LxCFBLNR_CFBLNBR ((uint32_t)0x000007FF) /*!< Frame Buffer Line Number */ |
| 6979 | |
| 6980 | /******************** Bit definition for LTDC_LxCLUTWR register *************/ |
| 6981 | |
| 6982 | #define LTDC_LxCLUTWR_BLUE ((uint32_t)0x000000FF) /*!< Blue value */ |
| 6983 | #define LTDC_LxCLUTWR_GREEN ((uint32_t)0x0000FF00) /*!< Green value */ |
| 6984 | #define LTDC_LxCLUTWR_RED ((uint32_t)0x00FF0000) /*!< Red value */ |
| 6985 | #define LTDC_LxCLUTWR_CLUTADD ((uint32_t)0xFF000000) /*!< CLUT address */ |
| 6986 | |
| 6987 | /******************************************************************************/ |
| 6988 | /* */ |
| 6989 | /* Power Control */ |
| 6990 | /* */ |
| 6991 | /******************************************************************************/ |
| 6992 | /******************** Bit definition for PWR_CR register ********************/ |
| 6993 | #define PWR_CR_LPDS ((uint32_t)0x00000001) /*!< Low-Power Deepsleep */ |
| 6994 | #define PWR_CR_PDDS ((uint32_t)0x00000002) /*!< Power Down Deepsleep */ |
| 6995 | #define PWR_CR_CWUF ((uint32_t)0x00000004) /*!< Clear Wakeup Flag */ |
| 6996 | #define PWR_CR_CSBF ((uint32_t)0x00000008) /*!< Clear Standby Flag */ |
| 6997 | #define PWR_CR_PVDE ((uint32_t)0x00000010) /*!< Power Voltage Detector Enable */ |
| 6998 | |
| 6999 | #define PWR_CR_PLS ((uint32_t)0x000000E0) /*!< PLS[2:0] bits (PVD Level Selection) */ |
| 7000 | #define PWR_CR_PLS_0 ((uint32_t)0x00000020) /*!< Bit 0 */ |
| 7001 | #define PWR_CR_PLS_1 ((uint32_t)0x00000040) /*!< Bit 1 */ |
| 7002 | #define PWR_CR_PLS_2 ((uint32_t)0x00000080) /*!< Bit 2 */ |
| 7003 | |
| 7004 | /*!< PVD level configuration */ |
| 7005 | #define PWR_CR_PLS_LEV0 ((uint32_t)0x00000000) /*!< PVD level 0 */ |
| 7006 | #define PWR_CR_PLS_LEV1 ((uint32_t)0x00000020) /*!< PVD level 1 */ |
| 7007 | #define PWR_CR_PLS_LEV2 ((uint32_t)0x00000040) /*!< PVD level 2 */ |
| 7008 | #define PWR_CR_PLS_LEV3 ((uint32_t)0x00000060) /*!< PVD level 3 */ |
| 7009 | #define PWR_CR_PLS_LEV4 ((uint32_t)0x00000080) /*!< PVD level 4 */ |
| 7010 | #define PWR_CR_PLS_LEV5 ((uint32_t)0x000000A0) /*!< PVD level 5 */ |
| 7011 | #define PWR_CR_PLS_LEV6 ((uint32_t)0x000000C0) /*!< PVD level 6 */ |
| 7012 | #define PWR_CR_PLS_LEV7 ((uint32_t)0x000000E0) /*!< PVD level 7 */ |
| 7013 | |
| 7014 | #define PWR_CR_DBP ((uint32_t)0x00000100) /*!< Disable Backup Domain write protection */ |
| 7015 | #define PWR_CR_FPDS ((uint32_t)0x00000200) /*!< Flash power down in Stop mode */ |
| 7016 | #define PWR_CR_LPUDS ((uint32_t)0x00000400) /*!< Low-Power Regulator in Stop under-drive mode */ |
| 7017 | #define PWR_CR_MRUDS ((uint32_t)0x00000800) /*!< Main regulator in Stop under-drive mode */ |
| 7018 | |
| 7019 | #define PWR_CR_LPLVDS ((uint32_t)0x00000400) /*!< Low-power regulator Low Voltage in Deep Sleep mode */ |
| 7020 | #define PWR_CR_MRLVDS ((uint32_t)0x00000800) /*!< Main regulator Low Voltage in Deep Sleep mode */ |
| 7021 | |
| 7022 | #define PWR_CR_ADCDC1 ((uint32_t)0x00002000) /*!< Refer to AN4073 on how to use this bit */ |
| 7023 | |
| 7024 | #define PWR_CR_VOS ((uint32_t)0x0000C000) /*!< VOS[1:0] bits (Regulator voltage scaling output selection) */ |
| 7025 | #define PWR_CR_VOS_0 ((uint32_t)0x00004000) /*!< Bit 0 */ |
| 7026 | #define PWR_CR_VOS_1 ((uint32_t)0x00008000) /*!< Bit 1 */ |
| 7027 | |
| 7028 | #define PWR_CR_ODEN ((uint32_t)0x00010000) /*!< Over Drive enable */ |
| 7029 | #define PWR_CR_ODSWEN ((uint32_t)0x00020000) /*!< Over Drive switch enabled */ |
| 7030 | #define PWR_CR_UDEN ((uint32_t)0x000C0000) /*!< Under Drive enable in stop mode */ |
| 7031 | #define PWR_CR_UDEN_0 ((uint32_t)0x00040000) /*!< Bit 0 */ |
| 7032 | #define PWR_CR_UDEN_1 ((uint32_t)0x00080000) /*!< Bit 1 */ |
| 7033 | |
| 7034 | #define PWR_CR_FMSSR ((uint32_t)0x00100000) /*!< Flash Memory Sleep System Run */ |
| 7035 | #define PWR_CR_FISSR ((uint32_t)0x00200000) /*!< Flash Interface Stop while System Run */ |
| 7036 | |
| 7037 | /* Legacy define */ |
| 7038 | #define PWR_CR_PMODE PWR_CR_VOS |
| 7039 | |
| 7040 | /******************* Bit definition for PWR_CSR register ********************/ |
| 7041 | #define PWR_CSR_WUF ((uint32_t)0x00000001) /*!< Wakeup Flag */ |
| 7042 | #define PWR_CSR_SBF ((uint32_t)0x00000002) /*!< Standby Flag */ |
| 7043 | #define PWR_CSR_PVDO ((uint32_t)0x00000004) /*!< PVD Output */ |
| 7044 | #define PWR_CSR_BRR ((uint32_t)0x00000008) /*!< Backup regulator ready */ |
| 7045 | #define PWR_CSR_WUPP ((uint32_t)0x00000080) /*!< WKUP pin Polarity */ |
| 7046 | #define PWR_CSR_EWUP ((uint32_t)0x00000100) /*!< Enable WKUP pin */ |
| 7047 | #define PWR_CSR_BRE ((uint32_t)0x00000200) /*!< Backup regulator enable */ |
| 7048 | #define PWR_CSR_VOSRDY ((uint32_t)0x00004000) /*!< Regulator voltage scaling output selection ready */ |
| 7049 | #define PWR_CSR_ODRDY ((uint32_t)0x00010000) /*!< Over Drive generator ready */ |
| 7050 | #define PWR_CSR_ODSWRDY ((uint32_t)0x00020000) /*!< Over Drive Switch ready */ |
| 7051 | #define PWR_CSR_UDSWRDY ((uint32_t)0x000C0000) /*!< Under Drive ready */ |
| 7052 | |
| 7053 | /* Legacy define */ |
| 7054 | #define PWR_CSR_REGRDY PWR_CSR_VOSRDY |
| 7055 | |
| 7056 | #if defined(STM32F446xx) |
| 7057 | /******************************************************************************/ |
| 7058 | /* */ |
| 7059 | /* QUADSPI */ |
| 7060 | /* */ |
| 7061 | /******************************************************************************/ |
| 7062 | /***************** Bit definition for QUADSPI_CR register *******************/ |
| 7063 | #define QUADSPI_CR_EN ((uint32_t)0x00000001) /*!< Enable */ |
| 7064 | #define QUADSPI_CR_ABORT ((uint32_t)0x00000002) /*!< Abort request */ |
| 7065 | #define QUADSPI_CR_DMAEN ((uint32_t)0x00000004) /*!< DMA Enable */ |
| 7066 | #define QUADSPI_CR_TCEN ((uint32_t)0x00000008) /*!< Timeout Counter Enable */ |
| 7067 | #define QUADSPI_CR_SSHIFT ((uint32_t)0x00000030) /*!< SSHIFT[1:0] Sample Shift */ |
| 7068 | #define QUADSPI_CR_SSHIFT_0 ((uint32_t)0x00000010) /*!< Bit 0 */ |
| 7069 | #define QUADSPI_CR_SSHIFT_1 ((uint32_t)0x00000020) /*!< Bit 1 */ |
| 7070 | #define QUADSPI_CR_DFM ((uint32_t)0x00000040) /*!< Dual Flash Mode */ |
| 7071 | #define QUADSPI_CR_FSEL ((uint32_t)0x00000080) /*!< Flash Select */ |
| 7072 | #define QUADSPI_CR_FTHRES ((uint32_t)0x00000F00) /*!< FTHRES[3:0] FIFO Level */ |
| 7073 | #define QUADSPI_CR_FTHRES_0 ((uint32_t)0x00000100) /*!< Bit 0 */ |
| 7074 | #define QUADSPI_CR_FTHRES_1 ((uint32_t)0x00000200) /*!< Bit 1 */ |
| 7075 | #define QUADSPI_CR_FTHRES_2 ((uint32_t)0x00000400) /*!< Bit 2 */ |
| 7076 | #define QUADSPI_CR_FTHRES_3 ((uint32_t)0x00000800) /*!< Bit 3 */ |
| 7077 | #define QUADSPI_CR_TEIE ((uint32_t)0x00010000) /*!< Transfer Error Interrupt Enable */ |
| 7078 | #define QUADSPI_CR_TCIE ((uint32_t)0x00020000) /*!< Transfer Complete Interrupt Enable */ |
| 7079 | #define QUADSPI_CR_FTIE ((uint32_t)0x00040000) /*!< FIFO Threshold Interrupt Enable */ |
| 7080 | #define QUADSPI_CR_SMIE ((uint32_t)0x00080000) /*!< Status Match Interrupt Enable */ |
| 7081 | #define QUADSPI_CR_TOIE ((uint32_t)0x00100000) /*!< TimeOut Interrupt Enable */ |
| 7082 | #define QUADSPI_CR_APMS ((uint32_t)0x00400000) /*!< Bit 1 */ |
| 7083 | #define QUADSPI_CR_PMM ((uint32_t)0x00800000) /*!< Polling Match Mode */ |
| 7084 | #define QUADSPI_CR_PRESCALER ((uint32_t)0xFF000000) /*!< PRESCALER[7:0] Clock prescaler */ |
| 7085 | #define QUADSPI_CR_PRESCALER_0 ((uint32_t)0x01000000) /*!< Bit 0 */ |
| 7086 | #define QUADSPI_CR_PRESCALER_1 ((uint32_t)0x02000000) /*!< Bit 1 */ |
| 7087 | #define QUADSPI_CR_PRESCALER_2 ((uint32_t)0x04000000) /*!< Bit 2 */ |
| 7088 | #define QUADSPI_CR_PRESCALER_3 ((uint32_t)0x08000000) /*!< Bit 3 */ |
| 7089 | #define QUADSPI_CR_PRESCALER_4 ((uint32_t)0x10000000) /*!< Bit 4 */ |
| 7090 | #define QUADSPI_CR_PRESCALER_5 ((uint32_t)0x20000000) /*!< Bit 5 */ |
| 7091 | #define QUADSPI_CR_PRESCALER_6 ((uint32_t)0x40000000) /*!< Bit 6 */ |
| 7092 | #define QUADSPI_CR_PRESCALER_7 ((uint32_t)0x80000000) /*!< Bit 7 */ |
| 7093 | |
| 7094 | /***************** Bit definition for QUADSPI_DCR register ******************/ |
| 7095 | #define QUADSPI_DCR_CKMODE ((uint32_t)0x00000001) /*!< Mode 0 / Mode 3 */ |
| 7096 | #define QUADSPI_DCR_CSHT ((uint32_t)0x00000700) /*!< CSHT[2:0]: ChipSelect High Time */ |
| 7097 | #define QUADSPI_DCR_CSHT_0 ((uint32_t)0x00000100) /*!< Bit 0 */ |
| 7098 | #define QUADSPI_DCR_CSHT_1 ((uint32_t)0x00000200) /*!< Bit 1 */ |
| 7099 | #define QUADSPI_DCR_CSHT_2 ((uint32_t)0x00000400) /*!< Bit 2 */ |
| 7100 | #define QUADSPI_DCR_FSIZE ((uint32_t)0x001F0000) /*!< FSIZE[4:0]: Flash Size */ |
| 7101 | #define QUADSPI_DCR_FSIZE_0 ((uint32_t)0x00010000) /*!< Bit 0 */ |
| 7102 | #define QUADSPI_DCR_FSIZE_1 ((uint32_t)0x00020000) /*!< Bit 1 */ |
| 7103 | #define QUADSPI_DCR_FSIZE_2 ((uint32_t)0x00040000) /*!< Bit 2 */ |
| 7104 | #define QUADSPI_DCR_FSIZE_3 ((uint32_t)0x00080000) /*!< Bit 3 */ |
| 7105 | #define QUADSPI_DCR_FSIZE_4 ((uint32_t)0x00100000) /*!< Bit 4 */ |
| 7106 | |
| 7107 | /****************** Bit definition for QUADSPI_SR register *******************/ |
| 7108 | #define QUADSPI_SR_TEF ((uint32_t)0x00000001) /*!< Transfer Error Flag */ |
| 7109 | #define QUADSPI_SR_TCF ((uint32_t)0x00000002) /*!< Transfer Complete Flag */ |
| 7110 | #define QUADSPI_SR_FTF ((uint32_t)0x00000004) /*!< FIFO Threshlod Flag */ |
| 7111 | #define QUADSPI_SR_SMF ((uint32_t)0x00000008) /*!< Status Match Flag */ |
| 7112 | #define QUADSPI_SR_TOF ((uint32_t)0x00000010) /*!< Timeout Flag */ |
| 7113 | #define QUADSPI_SR_BUSY ((uint32_t)0x00000020) /*!< Busy */ |
| 7114 | #define QUADSPI_SR_FLEVEL ((uint32_t)0x00003F00) /*!< FIFO Level */ |
| 7115 | #define QUADSPI_SR_FLEVEL_0 ((uint32_t)0x00000100) /*!< Bit 0 */ |
| 7116 | #define QUADSPI_SR_FLEVEL_1 ((uint32_t)0x00000200) /*!< Bit 1 */ |
| 7117 | #define QUADSPI_SR_FLEVEL_2 ((uint32_t)0x00000400) /*!< Bit 2 */ |
| 7118 | #define QUADSPI_SR_FLEVEL_3 ((uint32_t)0x00000800) /*!< Bit 3 */ |
| 7119 | #define QUADSPI_SR_FLEVEL_4 ((uint32_t)0x00001000) /*!< Bit 4 */ |
| 7120 | #define QUADSPI_SR_FLEVEL_5 ((uint32_t)0x00002000) /*!< Bit 5 */ |
| 7121 | |
| 7122 | /****************** Bit definition for QUADSPI_FCR register ******************/ |
| 7123 | #define QUADSPI_FCR_CTEF ((uint32_t)0x00000001) /*!< Clear Transfer Error Flag */ |
| 7124 | #define QUADSPI_FCR_CTCF ((uint32_t)0x00000002) /*!< Clear Transfer Complete Flag */ |
| 7125 | #define QUADSPI_FCR_CSMF ((uint32_t)0x00000008) /*!< Clear Status Match Flag */ |
| 7126 | #define QUADSPI_FCR_CTOF ((uint32_t)0x00000010) /*!< Clear Timeout Flag */ |
| 7127 | |
| 7128 | /****************** Bit definition for QUADSPI_DLR register ******************/ |
| 7129 | #define QUADSPI_DLR_DL ((uint32_t)0xFFFFFFFF) /*!< DL[31:0]: Data Length */ |
| 7130 | |
| 7131 | /****************** Bit definition for QUADSPI_CCR register ******************/ |
| 7132 | #define QUADSPI_CCR_INSTRUCTION ((uint32_t)0x000000FF) /*!< INSTRUCTION[7:0]: Instruction */ |
| 7133 | #define QUADSPI_CCR_INSTRUCTION_0 ((uint32_t)0x00000001) /*!< Bit 0 */ |
| 7134 | #define QUADSPI_CCR_INSTRUCTION_1 ((uint32_t)0x00000002) /*!< Bit 1 */ |
| 7135 | #define QUADSPI_CCR_INSTRUCTION_2 ((uint32_t)0x00000004) /*!< Bit 2 */ |
| 7136 | #define QUADSPI_CCR_INSTRUCTION_3 ((uint32_t)0x00000008) /*!< Bit 3 */ |
| 7137 | #define QUADSPI_CCR_INSTRUCTION_4 ((uint32_t)0x00000010) /*!< Bit 4 */ |
| 7138 | #define QUADSPI_CCR_INSTRUCTION_5 ((uint32_t)0x00000020) /*!< Bit 5 */ |
| 7139 | #define QUADSPI_CCR_INSTRUCTION_6 ((uint32_t)0x00000040) /*!< Bit 6 */ |
| 7140 | #define QUADSPI_CCR_INSTRUCTION_7 ((uint32_t)0x00000080) /*!< Bit 7 */ |
| 7141 | #define QUADSPI_CCR_IMODE ((uint32_t)0x00000300) /*!< IMODE[1:0]: Instruction Mode */ |
| 7142 | #define QUADSPI_CCR_IMODE_0 ((uint32_t)0x00000100) /*!< Bit 0 */ |
| 7143 | #define QUADSPI_CCR_IMODE_1 ((uint32_t)0x00000200) /*!< Bit 1 */ |
| 7144 | #define QUADSPI_CCR_ADMODE ((uint32_t)0x00000C00) /*!< ADMODE[1:0]: Address Mode */ |
| 7145 | #define QUADSPI_CCR_ADMODE_0 ((uint32_t)0x00000400) /*!< Bit 0 */ |
| 7146 | #define QUADSPI_CCR_ADMODE_1 ((uint32_t)0x00000800) /*!< Bit 1 */ |
| 7147 | #define QUADSPI_CCR_ADSIZE ((uint32_t)0x00003000) /*!< ADSIZE[1:0]: Address Size */ |
| 7148 | #define QUADSPI_CCR_ADSIZE_0 ((uint32_t)0x00001000) /*!< Bit 0 */ |
| 7149 | #define QUADSPI_CCR_ADSIZE_1 ((uint32_t)0x00002000) /*!< Bit 1 */ |
| 7150 | #define QUADSPI_CCR_ABMODE ((uint32_t)0x0000C000) /*!< ABMODE[1:0]: Alternate Bytes Mode */ |
| 7151 | #define QUADSPI_CCR_ABMODE_0 ((uint32_t)0x00004000) /*!< Bit 0 */ |
| 7152 | #define QUADSPI_CCR_ABMODE_1 ((uint32_t)0x00008000) /*!< Bit 1 */ |
| 7153 | #define QUADSPI_CCR_ABSIZE ((uint32_t)0x00030000) /*!< ABSIZE[1:0]: Instruction Mode */ |
| 7154 | #define QUADSPI_CCR_ABSIZE_0 ((uint32_t)0x00010000) /*!< Bit 0 */ |
| 7155 | #define QUADSPI_CCR_ABSIZE_1 ((uint32_t)0x00020000) /*!< Bit 1 */ |
| 7156 | #define QUADSPI_CCR_DCYC ((uint32_t)0x007C0000) /*!< DCYC[4:0]: Dummy Cycles */ |
| 7157 | #define QUADSPI_CCR_DCYC_0 ((uint32_t)0x00040000) /*!< Bit 0 */ |
| 7158 | #define QUADSPI_CCR_DCYC_1 ((uint32_t)0x00080000) /*!< Bit 1 */ |
| 7159 | #define QUADSPI_CCR_DCYC_2 ((uint32_t)0x00100000) /*!< Bit 2 */ |
| 7160 | #define QUADSPI_CCR_DCYC_3 ((uint32_t)0x00200000) /*!< Bit 3 */ |
| 7161 | #define QUADSPI_CCR_DCYC_4 ((uint32_t)0x00400000) /*!< Bit 4 */ |
| 7162 | #define QUADSPI_CCR_DMODE ((uint32_t)0x03000000) /*!< DMODE[1:0]: Data Mode */ |
| 7163 | #define QUADSPI_CCR_DMODE_0 ((uint32_t)0x01000000) /*!< Bit 0 */ |
| 7164 | #define QUADSPI_CCR_DMODE_1 ((uint32_t)0x02000000) /*!< Bit 1 */ |
| 7165 | #define QUADSPI_CCR_FMODE ((uint32_t)0x0C000000) /*!< FMODE[1:0]: Functional Mode */ |
| 7166 | #define QUADSPI_CCR_FMODE_0 ((uint32_t)0x04000000) /*!< Bit 0 */ |
| 7167 | #define QUADSPI_CCR_FMODE_1 ((uint32_t)0x08000000) /*!< Bit 1 */ |
| 7168 | #define QUADSPI_CCR_SIOO ((uint32_t)0x10000000) /*!< SIOO: Send Instruction Only Once Mode */ |
| 7169 | #define QUADSPI_CCR_DHHC ((uint32_t)0x40000000) /*!< DHHC: Delay Half Hclk Cycle */ |
| 7170 | #define QUADSPI_CCR_DDRM ((uint32_t)0x80000000) /*!< DDRM: Double Data Rate Mode */ |
| 7171 | /****************** Bit definition for QUADSPI_AR register *******************/ |
| 7172 | #define QUADSPI_AR_ADDRESS ((uint32_t)0xFFFFFFFF) /*!< ADDRESS[31:0]: Address */ |
| 7173 | |
| 7174 | /****************** Bit definition for QUADSPI_ABR register ******************/ |
| 7175 | #define QUADSPI_ABR_ALTERNATE ((uint32_t)0xFFFFFFFF) /*!< ALTERNATE[31:0]: Alternate Bytes */ |
| 7176 | |
| 7177 | /****************** Bit definition for QUADSPI_DR register *******************/ |
| 7178 | #define QUADSPI_DR_DATA ((uint32_t)0xFFFFFFFF) /*!< DATA[31:0]: Data */ |
| 7179 | |
| 7180 | /****************** Bit definition for QUADSPI_PSMKR register ****************/ |
| 7181 | #define QUADSPI_PSMKR_MASK ((uint32_t)0xFFFFFFFF) /*!< MASK[31:0]: Status Mask */ |
| 7182 | |
| 7183 | /****************** Bit definition for QUADSPI_PSMAR register ****************/ |
| 7184 | #define QUADSPI_PSMAR_MATCH ((uint32_t)0xFFFFFFFF) /*!< MATCH[31:0]: Status Match */ |
| 7185 | |
| 7186 | /****************** Bit definition for QUADSPI_PIR register *****************/ |
| 7187 | #define QUADSPI_PIR_INTERVAL ((uint32_t)0x0000FFFF) /*!< INTERVAL[15:0]: Polling Interval */ |
| 7188 | |
| 7189 | /****************** Bit definition for QUADSPI_LPTR register *****************/ |
| 7190 | #define QUADSPI_LPTR_TIMEOUT ((uint32_t)0x0000FFFF) /*!< TIMEOUT[15:0]: Timeout period */ |
| 7191 | #endif /* STM32F446xx */ |
| 7192 | |
| 7193 | /******************************************************************************/ |
| 7194 | /* */ |
| 7195 | /* Reset and Clock Control */ |
| 7196 | /* */ |
| 7197 | /******************************************************************************/ |
| 7198 | /******************** Bit definition for RCC_CR register ********************/ |
| 7199 | #define RCC_CR_HSION ((uint32_t)0x00000001) |
| 7200 | #define RCC_CR_HSIRDY ((uint32_t)0x00000002) |
| 7201 | |
| 7202 | #define RCC_CR_HSITRIM ((uint32_t)0x000000F8) |
| 7203 | #define RCC_CR_HSITRIM_0 ((uint32_t)0x00000008)/*!<Bit 0 */ |
| 7204 | #define RCC_CR_HSITRIM_1 ((uint32_t)0x00000010)/*!<Bit 1 */ |
| 7205 | #define RCC_CR_HSITRIM_2 ((uint32_t)0x00000020)/*!<Bit 2 */ |
| 7206 | #define RCC_CR_HSITRIM_3 ((uint32_t)0x00000040)/*!<Bit 3 */ |
| 7207 | #define RCC_CR_HSITRIM_4 ((uint32_t)0x00000080)/*!<Bit 4 */ |
| 7208 | |
| 7209 | #define RCC_CR_HSICAL ((uint32_t)0x0000FF00) |
| 7210 | #define RCC_CR_HSICAL_0 ((uint32_t)0x00000100)/*!<Bit 0 */ |
| 7211 | #define RCC_CR_HSICAL_1 ((uint32_t)0x00000200)/*!<Bit 1 */ |
| 7212 | #define RCC_CR_HSICAL_2 ((uint32_t)0x00000400)/*!<Bit 2 */ |
| 7213 | #define RCC_CR_HSICAL_3 ((uint32_t)0x00000800)/*!<Bit 3 */ |
| 7214 | #define RCC_CR_HSICAL_4 ((uint32_t)0x00001000)/*!<Bit 4 */ |
| 7215 | #define RCC_CR_HSICAL_5 ((uint32_t)0x00002000)/*!<Bit 5 */ |
| 7216 | #define RCC_CR_HSICAL_6 ((uint32_t)0x00004000)/*!<Bit 6 */ |
| 7217 | #define RCC_CR_HSICAL_7 ((uint32_t)0x00008000)/*!<Bit 7 */ |
| 7218 | |
| 7219 | #define RCC_CR_HSEON ((uint32_t)0x00010000) |
| 7220 | #define RCC_CR_HSERDY ((uint32_t)0x00020000) |
| 7221 | #define RCC_CR_HSEBYP ((uint32_t)0x00040000) |
| 7222 | #define RCC_CR_CSSON ((uint32_t)0x00080000) |
| 7223 | #define RCC_CR_PLLON ((uint32_t)0x01000000) |
| 7224 | #define RCC_CR_PLLRDY ((uint32_t)0x02000000) |
| 7225 | #define RCC_CR_PLLI2SON ((uint32_t)0x04000000) |
| 7226 | #define RCC_CR_PLLI2SRDY ((uint32_t)0x08000000) |
| 7227 | #define RCC_CR_PLLSAION ((uint32_t)0x10000000) |
| 7228 | #define RCC_CR_PLLSAIRDY ((uint32_t)0x20000000) |
| 7229 | |
| 7230 | /******************** Bit definition for RCC_PLLCFGR register ***************/ |
| 7231 | #define RCC_PLLCFGR_PLLM ((uint32_t)0x0000003F) |
| 7232 | #define RCC_PLLCFGR_PLLM_0 ((uint32_t)0x00000001) |
| 7233 | #define RCC_PLLCFGR_PLLM_1 ((uint32_t)0x00000002) |
| 7234 | #define RCC_PLLCFGR_PLLM_2 ((uint32_t)0x00000004) |
| 7235 | #define RCC_PLLCFGR_PLLM_3 ((uint32_t)0x00000008) |
| 7236 | #define RCC_PLLCFGR_PLLM_4 ((uint32_t)0x00000010) |
| 7237 | #define RCC_PLLCFGR_PLLM_5 ((uint32_t)0x00000020) |
| 7238 | |
| 7239 | #define RCC_PLLCFGR_PLLN ((uint32_t)0x00007FC0) |
| 7240 | #define RCC_PLLCFGR_PLLN_0 ((uint32_t)0x00000040) |
| 7241 | #define RCC_PLLCFGR_PLLN_1 ((uint32_t)0x00000080) |
| 7242 | #define RCC_PLLCFGR_PLLN_2 ((uint32_t)0x00000100) |
| 7243 | #define RCC_PLLCFGR_PLLN_3 ((uint32_t)0x00000200) |
| 7244 | #define RCC_PLLCFGR_PLLN_4 ((uint32_t)0x00000400) |
| 7245 | #define RCC_PLLCFGR_PLLN_5 ((uint32_t)0x00000800) |
| 7246 | #define RCC_PLLCFGR_PLLN_6 ((uint32_t)0x00001000) |
| 7247 | #define RCC_PLLCFGR_PLLN_7 ((uint32_t)0x00002000) |
| 7248 | #define RCC_PLLCFGR_PLLN_8 ((uint32_t)0x00004000) |
| 7249 | |
| 7250 | #define RCC_PLLCFGR_PLLP ((uint32_t)0x00030000) |
| 7251 | #define RCC_PLLCFGR_PLLP_0 ((uint32_t)0x00010000) |
| 7252 | #define RCC_PLLCFGR_PLLP_1 ((uint32_t)0x00020000) |
| 7253 | |
| 7254 | #define RCC_PLLCFGR_PLLSRC ((uint32_t)0x00400000) |
| 7255 | #define RCC_PLLCFGR_PLLSRC_HSE ((uint32_t)0x00400000) |
| 7256 | #define RCC_PLLCFGR_PLLSRC_HSI ((uint32_t)0x00000000) |
| 7257 | |
| 7258 | #define RCC_PLLCFGR_PLLQ ((uint32_t)0x0F000000) |
| 7259 | #define RCC_PLLCFGR_PLLQ_0 ((uint32_t)0x01000000) |
| 7260 | #define RCC_PLLCFGR_PLLQ_1 ((uint32_t)0x02000000) |
| 7261 | #define RCC_PLLCFGR_PLLQ_2 ((uint32_t)0x04000000) |
| 7262 | #define RCC_PLLCFGR_PLLQ_3 ((uint32_t)0x08000000) |
| 7263 | |
| 7264 | #if defined(STM32F446xx) |
| 7265 | #define RCC_PLLCFGR_PLLR ((uint32_t)0x70000000) |
| 7266 | #define RCC_PLLCFGR_PLLR_0 ((uint32_t)0x10000000) |
| 7267 | #define RCC_PLLCFGR_PLLR_1 ((uint32_t)0x20000000) |
| 7268 | #define RCC_PLLCFGR_PLLR_2 ((uint32_t)0x40000000) |
| 7269 | #endif /* STM32F446xx */ |
| 7270 | |
| 7271 | /******************** Bit definition for RCC_CFGR register ******************/ |
| 7272 | /*!< SW configuration */ |
| 7273 | #define RCC_CFGR_SW ((uint32_t)0x00000003) /*!< SW[1:0] bits (System clock Switch) */ |
| 7274 | #define RCC_CFGR_SW_0 ((uint32_t)0x00000001) /*!< Bit 0 */ |
| 7275 | #define RCC_CFGR_SW_1 ((uint32_t)0x00000002) /*!< Bit 1 */ |
| 7276 | |
| 7277 | #define RCC_CFGR_SW_HSI ((uint32_t)0x00000000) /*!< HSI selected as system clock */ |
| 7278 | #define RCC_CFGR_SW_HSE ((uint32_t)0x00000001) /*!< HSE selected as system clock */ |
| 7279 | #define RCC_CFGR_SW_PLL ((uint32_t)0x00000002) /*!< PLL/PLLP selected as system clock */ |
| 7280 | #if defined(STM32F446xx) |
| 7281 | #define RCC_CFGR_SW_PLLR ((uint32_t)0x00000003) /*!< PLL/PLLR selected as system clock */ |
| 7282 | #endif /* STM32F446xx */ |
| 7283 | |
| 7284 | /*!< SWS configuration */ |
| 7285 | #define RCC_CFGR_SWS ((uint32_t)0x0000000C) /*!< SWS[1:0] bits (System Clock Switch Status) */ |
| 7286 | #define RCC_CFGR_SWS_0 ((uint32_t)0x00000004) /*!< Bit 0 */ |
| 7287 | #define RCC_CFGR_SWS_1 ((uint32_t)0x00000008) /*!< Bit 1 */ |
| 7288 | |
| 7289 | #define RCC_CFGR_SWS_HSI ((uint32_t)0x00000000) /*!< HSI oscillator used as system clock */ |
| 7290 | #define RCC_CFGR_SWS_HSE ((uint32_t)0x00000004) /*!< HSE oscillator used as system clock */ |
| 7291 | #define RCC_CFGR_SWS_PLL ((uint32_t)0x00000008) /*!< PLL/PLLP used as system clock */ |
| 7292 | #if defined(STM32F446xx) |
| 7293 | #define RCC_CFGR_SWS_PLLR ((uint32_t)0x0000000C) /*!< PLL/PLLR used as system clock */ |
| 7294 | #endif /* STM32F446xx */ |
| 7295 | |
| 7296 | /*!< HPRE configuration */ |
| 7297 | #define RCC_CFGR_HPRE ((uint32_t)0x000000F0) /*!< HPRE[3:0] bits (AHB prescaler) */ |
| 7298 | #define RCC_CFGR_HPRE_0 ((uint32_t)0x00000010) /*!< Bit 0 */ |
| 7299 | #define RCC_CFGR_HPRE_1 ((uint32_t)0x00000020) /*!< Bit 1 */ |
| 7300 | #define RCC_CFGR_HPRE_2 ((uint32_t)0x00000040) /*!< Bit 2 */ |
| 7301 | #define RCC_CFGR_HPRE_3 ((uint32_t)0x00000080) /*!< Bit 3 */ |
| 7302 | |
| 7303 | #define RCC_CFGR_HPRE_DIV1 ((uint32_t)0x00000000) /*!< SYSCLK not divided */ |
| 7304 | #define RCC_CFGR_HPRE_DIV2 ((uint32_t)0x00000080) /*!< SYSCLK divided by 2 */ |
| 7305 | #define RCC_CFGR_HPRE_DIV4 ((uint32_t)0x00000090) /*!< SYSCLK divided by 4 */ |
| 7306 | #define RCC_CFGR_HPRE_DIV8 ((uint32_t)0x000000A0) /*!< SYSCLK divided by 8 */ |
| 7307 | #define RCC_CFGR_HPRE_DIV16 ((uint32_t)0x000000B0) /*!< SYSCLK divided by 16 */ |
| 7308 | #define RCC_CFGR_HPRE_DIV64 ((uint32_t)0x000000C0) /*!< SYSCLK divided by 64 */ |
| 7309 | #define RCC_CFGR_HPRE_DIV128 ((uint32_t)0x000000D0) /*!< SYSCLK divided by 128 */ |
| 7310 | #define RCC_CFGR_HPRE_DIV256 ((uint32_t)0x000000E0) /*!< SYSCLK divided by 256 */ |
| 7311 | #define RCC_CFGR_HPRE_DIV512 ((uint32_t)0x000000F0) /*!< SYSCLK divided by 512 */ |
| 7312 | |
| 7313 | /*!< PPRE1 configuration */ |
| 7314 | #define RCC_CFGR_PPRE1 ((uint32_t)0x00001C00) /*!< PRE1[2:0] bits (APB1 prescaler) */ |
| 7315 | #define RCC_CFGR_PPRE1_0 ((uint32_t)0x00000400) /*!< Bit 0 */ |
| 7316 | #define RCC_CFGR_PPRE1_1 ((uint32_t)0x00000800) /*!< Bit 1 */ |
| 7317 | #define RCC_CFGR_PPRE1_2 ((uint32_t)0x00001000) /*!< Bit 2 */ |
| 7318 | |
| 7319 | #define RCC_CFGR_PPRE1_DIV1 ((uint32_t)0x00000000) /*!< HCLK not divided */ |
| 7320 | #define RCC_CFGR_PPRE1_DIV2 ((uint32_t)0x00001000) /*!< HCLK divided by 2 */ |
| 7321 | #define RCC_CFGR_PPRE1_DIV4 ((uint32_t)0x00001400) /*!< HCLK divided by 4 */ |
| 7322 | #define RCC_CFGR_PPRE1_DIV8 ((uint32_t)0x00001800) /*!< HCLK divided by 8 */ |
| 7323 | #define RCC_CFGR_PPRE1_DIV16 ((uint32_t)0x00001C00) /*!< HCLK divided by 16 */ |
| 7324 | |
| 7325 | /*!< PPRE2 configuration */ |
| 7326 | #define RCC_CFGR_PPRE2 ((uint32_t)0x0000E000) /*!< PRE2[2:0] bits (APB2 prescaler) */ |
| 7327 | #define RCC_CFGR_PPRE2_0 ((uint32_t)0x00002000) /*!< Bit 0 */ |
| 7328 | #define RCC_CFGR_PPRE2_1 ((uint32_t)0x00004000) /*!< Bit 1 */ |
| 7329 | #define RCC_CFGR_PPRE2_2 ((uint32_t)0x00008000) /*!< Bit 2 */ |
| 7330 | |
| 7331 | #define RCC_CFGR_PPRE2_DIV1 ((uint32_t)0x00000000) /*!< HCLK not divided */ |
| 7332 | #define RCC_CFGR_PPRE2_DIV2 ((uint32_t)0x00008000) /*!< HCLK divided by 2 */ |
| 7333 | #define RCC_CFGR_PPRE2_DIV4 ((uint32_t)0x0000A000) /*!< HCLK divided by 4 */ |
| 7334 | #define RCC_CFGR_PPRE2_DIV8 ((uint32_t)0x0000C000) /*!< HCLK divided by 8 */ |
| 7335 | #define RCC_CFGR_PPRE2_DIV16 ((uint32_t)0x0000E000) /*!< HCLK divided by 16 */ |
| 7336 | |
| 7337 | /*!< RTCPRE configuration */ |
| 7338 | #define RCC_CFGR_RTCPRE ((uint32_t)0x001F0000) |
| 7339 | #define RCC_CFGR_RTCPRE_0 ((uint32_t)0x00010000) |
| 7340 | #define RCC_CFGR_RTCPRE_1 ((uint32_t)0x00020000) |
| 7341 | #define RCC_CFGR_RTCPRE_2 ((uint32_t)0x00040000) |
| 7342 | #define RCC_CFGR_RTCPRE_3 ((uint32_t)0x00080000) |
| 7343 | #define RCC_CFGR_RTCPRE_4 ((uint32_t)0x00100000) |
| 7344 | |
| 7345 | /*!< MCO1 configuration */ |
| 7346 | #define RCC_CFGR_MCO1 ((uint32_t)0x00600000) |
| 7347 | #define RCC_CFGR_MCO1_0 ((uint32_t)0x00200000) |
| 7348 | #define RCC_CFGR_MCO1_1 ((uint32_t)0x00400000) |
| 7349 | |
| 7350 | #define RCC_CFGR_I2SSRC ((uint32_t)0x00800000) |
| 7351 | |
| 7352 | #define RCC_CFGR_MCO1PRE ((uint32_t)0x07000000) |
| 7353 | #define RCC_CFGR_MCO1PRE_0 ((uint32_t)0x01000000) |
| 7354 | #define RCC_CFGR_MCO1PRE_1 ((uint32_t)0x02000000) |
| 7355 | #define RCC_CFGR_MCO1PRE_2 ((uint32_t)0x04000000) |
| 7356 | |
| 7357 | #define RCC_CFGR_MCO2PRE ((uint32_t)0x38000000) |
| 7358 | #define RCC_CFGR_MCO2PRE_0 ((uint32_t)0x08000000) |
| 7359 | #define RCC_CFGR_MCO2PRE_1 ((uint32_t)0x10000000) |
| 7360 | #define RCC_CFGR_MCO2PRE_2 ((uint32_t)0x20000000) |
| 7361 | |
| 7362 | #define RCC_CFGR_MCO2 ((uint32_t)0xC0000000) |
| 7363 | #define RCC_CFGR_MCO2_0 ((uint32_t)0x40000000) |
| 7364 | #define RCC_CFGR_MCO2_1 ((uint32_t)0x80000000) |
| 7365 | |
| 7366 | /******************** Bit definition for RCC_CIR register *******************/ |
| 7367 | #define RCC_CIR_LSIRDYF ((uint32_t)0x00000001) |
| 7368 | #define RCC_CIR_LSERDYF ((uint32_t)0x00000002) |
| 7369 | #define RCC_CIR_HSIRDYF ((uint32_t)0x00000004) |
| 7370 | #define RCC_CIR_HSERDYF ((uint32_t)0x00000008) |
| 7371 | #define RCC_CIR_PLLRDYF ((uint32_t)0x00000010) |
| 7372 | #define RCC_CIR_PLLI2SRDYF ((uint32_t)0x00000020) |
| 7373 | #define RCC_CIR_PLLSAIRDYF ((uint32_t)0x00000040) |
| 7374 | #define RCC_CIR_CSSF ((uint32_t)0x00000080) |
| 7375 | #define RCC_CIR_LSIRDYIE ((uint32_t)0x00000100) |
| 7376 | #define RCC_CIR_LSERDYIE ((uint32_t)0x00000200) |
| 7377 | #define RCC_CIR_HSIRDYIE ((uint32_t)0x00000400) |
| 7378 | #define RCC_CIR_HSERDYIE ((uint32_t)0x00000800) |
| 7379 | #define RCC_CIR_PLLRDYIE ((uint32_t)0x00001000) |
| 7380 | #define RCC_CIR_PLLI2SRDYIE ((uint32_t)0x00002000) |
| 7381 | #define RCC_CIR_PLLSAIRDYIE ((uint32_t)0x00004000) |
| 7382 | #define RCC_CIR_LSIRDYC ((uint32_t)0x00010000) |
| 7383 | #define RCC_CIR_LSERDYC ((uint32_t)0x00020000) |
| 7384 | #define RCC_CIR_HSIRDYC ((uint32_t)0x00040000) |
| 7385 | #define RCC_CIR_HSERDYC ((uint32_t)0x00080000) |
| 7386 | #define RCC_CIR_PLLRDYC ((uint32_t)0x00100000) |
| 7387 | #define RCC_CIR_PLLI2SRDYC ((uint32_t)0x00200000) |
| 7388 | #define RCC_CIR_PLLSAIRDYC ((uint32_t)0x00400000) |
| 7389 | #define RCC_CIR_CSSC ((uint32_t)0x00800000) |
| 7390 | |
| 7391 | /******************** Bit definition for RCC_AHB1RSTR register **************/ |
| 7392 | #define RCC_AHB1RSTR_GPIOARST ((uint32_t)0x00000001) |
| 7393 | #define RCC_AHB1RSTR_GPIOBRST ((uint32_t)0x00000002) |
| 7394 | #define RCC_AHB1RSTR_GPIOCRST ((uint32_t)0x00000004) |
| 7395 | #define RCC_AHB1RSTR_GPIODRST ((uint32_t)0x00000008) |
| 7396 | #define RCC_AHB1RSTR_GPIOERST ((uint32_t)0x00000010) |
| 7397 | #define RCC_AHB1RSTR_GPIOFRST ((uint32_t)0x00000020) |
| 7398 | #define RCC_AHB1RSTR_GPIOGRST ((uint32_t)0x00000040) |
| 7399 | #define RCC_AHB1RSTR_GPIOHRST ((uint32_t)0x00000080) |
| 7400 | #define RCC_AHB1RSTR_GPIOIRST ((uint32_t)0x00000100) |
| 7401 | #define RCC_AHB1RSTR_GPIOJRST ((uint32_t)0x00000200) |
| 7402 | #define RCC_AHB1RSTR_GPIOKRST ((uint32_t)0x00000400) |
| 7403 | #define RCC_AHB1RSTR_CRCRST ((uint32_t)0x00001000) |
| 7404 | #define RCC_AHB1RSTR_DMA1RST ((uint32_t)0x00200000) |
| 7405 | #define RCC_AHB1RSTR_DMA2RST ((uint32_t)0x00400000) |
| 7406 | #define RCC_AHB1RSTR_DMA2DRST ((uint32_t)0x00800000) |
| 7407 | #define RCC_AHB1RSTR_ETHMACRST ((uint32_t)0x02000000) |
| 7408 | #define RCC_AHB1RSTR_OTGHRST ((uint32_t)0x10000000) |
| 7409 | |
| 7410 | /******************** Bit definition for RCC_AHB2RSTR register **************/ |
| 7411 | #define RCC_AHB2RSTR_DCMIRST ((uint32_t)0x00000001) |
| 7412 | #define RCC_AHB2RSTR_CRYPRST ((uint32_t)0x00000010) |
| 7413 | #define RCC_AHB2RSTR_HASHRST ((uint32_t)0x00000020) |
| 7414 | /* maintained for legacy purpose */ |
| 7415 | #define RCC_AHB2RSTR_HSAHRST RCC_AHB2RSTR_HASHRST |
| 7416 | #define RCC_AHB2RSTR_RNGRST ((uint32_t)0x00000040) |
| 7417 | #define RCC_AHB2RSTR_OTGFSRST ((uint32_t)0x00000080) |
| 7418 | |
| 7419 | /******************** Bit definition for RCC_AHB3RSTR register **************/ |
| 7420 | #if defined(STM32F40_41xxx) |
| 7421 | #define RCC_AHB3RSTR_FSMCRST ((uint32_t)0x00000001) |
| 7422 | #endif /* STM32F40_41xxx */ |
| 7423 | |
| 7424 | #if defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F446xx) |
| 7425 | #define RCC_AHB3RSTR_FMCRST ((uint32_t)0x00000001) |
| 7426 | #endif /* STM32F427_437xx || STM32F429_439xx || STM32F446xx */ |
| 7427 | #if defined(STM32F446xx) |
| 7428 | #define RCC_AHB3RSTR_QSPIRST ((uint32_t)0x00000002) |
| 7429 | #endif /* STM32F446xx */ |
| 7430 | |
| 7431 | /******************** Bit definition for RCC_APB1RSTR register **************/ |
| 7432 | #define RCC_APB1RSTR_TIM2RST ((uint32_t)0x00000001) |
| 7433 | #define RCC_APB1RSTR_TIM3RST ((uint32_t)0x00000002) |
| 7434 | #define RCC_APB1RSTR_TIM4RST ((uint32_t)0x00000004) |
| 7435 | #define RCC_APB1RSTR_TIM5RST ((uint32_t)0x00000008) |
| 7436 | #define RCC_APB1RSTR_TIM6RST ((uint32_t)0x00000010) |
| 7437 | #define RCC_APB1RSTR_TIM7RST ((uint32_t)0x00000020) |
| 7438 | #define RCC_APB1RSTR_TIM12RST ((uint32_t)0x00000040) |
| 7439 | #define RCC_APB1RSTR_TIM13RST ((uint32_t)0x00000080) |
| 7440 | #define RCC_APB1RSTR_TIM14RST ((uint32_t)0x00000100) |
| 7441 | #define RCC_APB1RSTR_WWDGRST ((uint32_t)0x00000800) |
| 7442 | #define RCC_APB1RSTR_SPI2RST ((uint32_t)0x00004000) |
| 7443 | #define RCC_APB1RSTR_SPI3RST ((uint32_t)0x00008000) |
| 7444 | #if defined(STM32F446xx) |
| 7445 | #define RCC_APB1RSTR_SPDIFRXRST ((uint32_t)0x00010000) |
| 7446 | #endif /* STM32F446xx */ |
| 7447 | #define RCC_APB1RSTR_USART2RST ((uint32_t)0x00020000) |
| 7448 | #define RCC_APB1RSTR_USART3RST ((uint32_t)0x00040000) |
| 7449 | #define RCC_APB1RSTR_UART4RST ((uint32_t)0x00080000) |
| 7450 | #define RCC_APB1RSTR_UART5RST ((uint32_t)0x00100000) |
| 7451 | #define RCC_APB1RSTR_I2C1RST ((uint32_t)0x00200000) |
| 7452 | #define RCC_APB1RSTR_I2C2RST ((uint32_t)0x00400000) |
| 7453 | #define RCC_APB1RSTR_I2C3RST ((uint32_t)0x00800000) |
| 7454 | #if defined(STM32F446xx) |
| 7455 | #define RCC_APB1RSTR_FMPI2C1RST ((uint32_t)0x01000000) |
| 7456 | #endif /* STM32F446xx */ |
| 7457 | #define RCC_APB1RSTR_CAN1RST ((uint32_t)0x02000000) |
| 7458 | #define RCC_APB1RSTR_CAN2RST ((uint32_t)0x04000000) |
| 7459 | #if defined(STM32F446xx) |
| 7460 | #define RCC_APB1RSTR_CECRST ((uint32_t)0x08000000) |
| 7461 | #endif /* STM32F446xx */ |
| 7462 | #define RCC_APB1RSTR_PWRRST ((uint32_t)0x10000000) |
| 7463 | #define RCC_APB1RSTR_DACRST ((uint32_t)0x20000000) |
| 7464 | #define RCC_APB1RSTR_UART7RST ((uint32_t)0x40000000) |
| 7465 | #define RCC_APB1RSTR_UART8RST ((uint32_t)0x80000000) |
| 7466 | |
| 7467 | /******************** Bit definition for RCC_APB2RSTR register **************/ |
| 7468 | #define RCC_APB2RSTR_TIM1RST ((uint32_t)0x00000001) |
| 7469 | #define RCC_APB2RSTR_TIM8RST ((uint32_t)0x00000002) |
| 7470 | #define RCC_APB2RSTR_USART1RST ((uint32_t)0x00000010) |
| 7471 | #define RCC_APB2RSTR_USART6RST ((uint32_t)0x00000020) |
| 7472 | #define RCC_APB2RSTR_ADCRST ((uint32_t)0x00000100) |
| 7473 | #define RCC_APB2RSTR_SDIORST ((uint32_t)0x00000800) |
| 7474 | #define RCC_APB2RSTR_SPI1RST ((uint32_t)0x00001000) |
| 7475 | #define RCC_APB2RSTR_SPI4RST ((uint32_t)0x00002000) |
| 7476 | #define RCC_APB2RSTR_SYSCFGRST ((uint32_t)0x00004000) |
| 7477 | #define RCC_APB2RSTR_TIM9RST ((uint32_t)0x00010000) |
| 7478 | #define RCC_APB2RSTR_TIM10RST ((uint32_t)0x00020000) |
| 7479 | #define RCC_APB2RSTR_TIM11RST ((uint32_t)0x00040000) |
| 7480 | #define RCC_APB2RSTR_SPI5RST ((uint32_t)0x00100000) |
| 7481 | #define RCC_APB2RSTR_SPI6RST ((uint32_t)0x00200000) |
| 7482 | #define RCC_APB2RSTR_SAI1RST ((uint32_t)0x00400000) |
| 7483 | #if defined(STM32F446xx) |
| 7484 | #define RCC_APB2RSTR_SAI2RST ((uint32_t)0x00800000) |
| 7485 | #endif /* STM32F446xx */ |
| 7486 | #define RCC_APB2RSTR_LTDCRST ((uint32_t)0x04000000) |
| 7487 | |
| 7488 | /* Old SPI1RST bit definition, maintained for legacy purpose */ |
| 7489 | #define RCC_APB2RSTR_SPI1 RCC_APB2RSTR_SPI1RST |
| 7490 | |
| 7491 | /******************** Bit definition for RCC_AHB1ENR register ***************/ |
| 7492 | #define RCC_AHB1ENR_GPIOAEN ((uint32_t)0x00000001) |
| 7493 | #define RCC_AHB1ENR_GPIOBEN ((uint32_t)0x00000002) |
| 7494 | #define RCC_AHB1ENR_GPIOCEN ((uint32_t)0x00000004) |
| 7495 | #define RCC_AHB1ENR_GPIODEN ((uint32_t)0x00000008) |
| 7496 | #define RCC_AHB1ENR_GPIOEEN ((uint32_t)0x00000010) |
| 7497 | #define RCC_AHB1ENR_GPIOFEN ((uint32_t)0x00000020) |
| 7498 | #define RCC_AHB1ENR_GPIOGEN ((uint32_t)0x00000040) |
| 7499 | #define RCC_AHB1ENR_GPIOHEN ((uint32_t)0x00000080) |
| 7500 | #define RCC_AHB1ENR_GPIOIEN ((uint32_t)0x00000100) |
| 7501 | #define RCC_AHB1ENR_GPIOJEN ((uint32_t)0x00000200) |
| 7502 | #define RCC_AHB1ENR_GPIOKEN ((uint32_t)0x00000400) |
| 7503 | #define RCC_AHB1ENR_CRCEN ((uint32_t)0x00001000) |
| 7504 | #define RCC_AHB1ENR_BKPSRAMEN ((uint32_t)0x00040000) |
| 7505 | #define RCC_AHB1ENR_CCMDATARAMEN ((uint32_t)0x00100000) |
| 7506 | #define RCC_AHB1ENR_DMA1EN ((uint32_t)0x00200000) |
| 7507 | #define RCC_AHB1ENR_DMA2EN ((uint32_t)0x00400000) |
| 7508 | #define RCC_AHB1ENR_DMA2DEN ((uint32_t)0x00800000) |
| 7509 | #define RCC_AHB1ENR_ETHMACEN ((uint32_t)0x02000000) |
| 7510 | #define RCC_AHB1ENR_ETHMACTXEN ((uint32_t)0x04000000) |
| 7511 | #define RCC_AHB1ENR_ETHMACRXEN ((uint32_t)0x08000000) |
| 7512 | #define RCC_AHB1ENR_ETHMACPTPEN ((uint32_t)0x10000000) |
| 7513 | #define RCC_AHB1ENR_OTGHSEN ((uint32_t)0x20000000) |
| 7514 | #define RCC_AHB1ENR_OTGHSULPIEN ((uint32_t)0x40000000) |
| 7515 | |
| 7516 | /******************** Bit definition for RCC_AHB2ENR register ***************/ |
| 7517 | #define RCC_AHB2ENR_DCMIEN ((uint32_t)0x00000001) |
| 7518 | #define RCC_AHB2ENR_CRYPEN ((uint32_t)0x00000010) |
| 7519 | #define RCC_AHB2ENR_HASHEN ((uint32_t)0x00000020) |
| 7520 | #define RCC_AHB2ENR_RNGEN ((uint32_t)0x00000040) |
| 7521 | #define RCC_AHB2ENR_OTGFSEN ((uint32_t)0x00000080) |
| 7522 | |
| 7523 | /******************** Bit definition for RCC_AHB3ENR register ***************/ |
| 7524 | |
| 7525 | #if defined(STM32F40_41xxx) |
| 7526 | #define RCC_AHB3ENR_FSMCEN ((uint32_t)0x00000001) |
| 7527 | #endif /* STM32F40_41xxx */ |
| 7528 | |
| 7529 | #if defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F446xx) |
| 7530 | #define RCC_AHB3ENR_FMCEN ((uint32_t)0x00000001) |
| 7531 | #endif /* STM32F427_437xx || STM32F429_439xx || STM32F446xx */ |
| 7532 | |
| 7533 | #if defined(STM32F446xx) |
| 7534 | #define RCC_AHB3ENR_QSPIEN ((uint32_t)0x00000002) |
| 7535 | #endif /* STM32F446xx */ |
| 7536 | |
| 7537 | /******************** Bit definition for RCC_APB1ENR register ***************/ |
| 7538 | #define RCC_APB1ENR_TIM2EN ((uint32_t)0x00000001) |
| 7539 | #define RCC_APB1ENR_TIM3EN ((uint32_t)0x00000002) |
| 7540 | #define RCC_APB1ENR_TIM4EN ((uint32_t)0x00000004) |
| 7541 | #define RCC_APB1ENR_TIM5EN ((uint32_t)0x00000008) |
| 7542 | #define RCC_APB1ENR_TIM6EN ((uint32_t)0x00000010) |
| 7543 | #define RCC_APB1ENR_TIM7EN ((uint32_t)0x00000020) |
| 7544 | #define RCC_APB1ENR_TIM12EN ((uint32_t)0x00000040) |
| 7545 | #define RCC_APB1ENR_TIM13EN ((uint32_t)0x00000080) |
| 7546 | #define RCC_APB1ENR_TIM14EN ((uint32_t)0x00000100) |
| 7547 | #define RCC_APB1ENR_WWDGEN ((uint32_t)0x00000800) |
| 7548 | #define RCC_APB1ENR_SPI2EN ((uint32_t)0x00004000) |
| 7549 | #define RCC_APB1ENR_SPI3EN ((uint32_t)0x00008000) |
| 7550 | #if defined(STM32F446xx) |
| 7551 | #define RCC_APB1ENR_SPDIFRXEN ((uint32_t)0x00010000) |
| 7552 | #endif /* STM32F446xx */ |
| 7553 | #define RCC_APB1ENR_USART2EN ((uint32_t)0x00020000) |
| 7554 | #define RCC_APB1ENR_USART3EN ((uint32_t)0x00040000) |
| 7555 | #define RCC_APB1ENR_UART4EN ((uint32_t)0x00080000) |
| 7556 | #define RCC_APB1ENR_UART5EN ((uint32_t)0x00100000) |
| 7557 | #define RCC_APB1ENR_I2C1EN ((uint32_t)0x00200000) |
| 7558 | #define RCC_APB1ENR_I2C2EN ((uint32_t)0x00400000) |
| 7559 | #define RCC_APB1ENR_I2C3EN ((uint32_t)0x00800000) |
| 7560 | #if defined(STM32F446xx) |
| 7561 | #define RCC_APB1ENR_FMPI2C1EN ((uint32_t)0x01000000) |
| 7562 | #endif /* STM32F446xx */ |
| 7563 | #define RCC_APB1ENR_CAN1EN ((uint32_t)0x02000000) |
| 7564 | #define RCC_APB1ENR_CAN2EN ((uint32_t)0x04000000) |
| 7565 | #if defined(STM32F446xx) |
| 7566 | #define RCC_APB1ENR_CECEN ((uint32_t)0x08000000) |
| 7567 | #endif /* STM32F446xx */ |
| 7568 | #define RCC_APB1ENR_PWREN ((uint32_t)0x10000000) |
| 7569 | #define RCC_APB1ENR_DACEN ((uint32_t)0x20000000) |
| 7570 | #define RCC_APB1ENR_UART7EN ((uint32_t)0x40000000) |
| 7571 | #define RCC_APB1ENR_UART8EN ((uint32_t)0x80000000) |
| 7572 | |
| 7573 | /******************** Bit definition for RCC_APB2ENR register ***************/ |
| 7574 | #define RCC_APB2ENR_TIM1EN ((uint32_t)0x00000001) |
| 7575 | #define RCC_APB2ENR_TIM8EN ((uint32_t)0x00000002) |
| 7576 | #define RCC_APB2ENR_USART1EN ((uint32_t)0x00000010) |
| 7577 | #define RCC_APB2ENR_USART6EN ((uint32_t)0x00000020) |
| 7578 | #define RCC_APB2ENR_ADC1EN ((uint32_t)0x00000100) |
| 7579 | #define RCC_APB2ENR_ADC2EN ((uint32_t)0x00000200) |
| 7580 | #define RCC_APB2ENR_ADC3EN ((uint32_t)0x00000400) |
| 7581 | #define RCC_APB2ENR_SDIOEN ((uint32_t)0x00000800) |
| 7582 | #define RCC_APB2ENR_SPI1EN ((uint32_t)0x00001000) |
| 7583 | #define RCC_APB2ENR_SPI4EN ((uint32_t)0x00002000) |
| 7584 | #define RCC_APB2ENR_SYSCFGEN ((uint32_t)0x00004000) |
| 7585 | #define RCC_APB2ENR_TIM9EN ((uint32_t)0x00010000) |
| 7586 | #define RCC_APB2ENR_TIM10EN ((uint32_t)0x00020000) |
| 7587 | #define RCC_APB2ENR_TIM11EN ((uint32_t)0x00040000) |
| 7588 | #define RCC_APB2ENR_SPI5EN ((uint32_t)0x00100000) |
| 7589 | #define RCC_APB2ENR_SPI6EN ((uint32_t)0x00200000) |
| 7590 | #define RCC_APB2ENR_SAI1EN ((uint32_t)0x00400000) |
| 7591 | #if defined(STM32F446xx) |
| 7592 | #define RCC_APB2ENR_SAI2EN ((uint32_t)0x00800000) |
| 7593 | #endif /* STM32F446xx */ |
| 7594 | #define RCC_APB2ENR_LTDCEN ((uint32_t)0x04000000) |
| 7595 | |
| 7596 | /******************** Bit definition for RCC_AHB1LPENR register *************/ |
| 7597 | #define RCC_AHB1LPENR_GPIOALPEN ((uint32_t)0x00000001) |
| 7598 | #define RCC_AHB1LPENR_GPIOBLPEN ((uint32_t)0x00000002) |
| 7599 | #define RCC_AHB1LPENR_GPIOCLPEN ((uint32_t)0x00000004) |
| 7600 | #define RCC_AHB1LPENR_GPIODLPEN ((uint32_t)0x00000008) |
| 7601 | #define RCC_AHB1LPENR_GPIOELPEN ((uint32_t)0x00000010) |
| 7602 | #define RCC_AHB1LPENR_GPIOFLPEN ((uint32_t)0x00000020) |
| 7603 | #define RCC_AHB1LPENR_GPIOGLPEN ((uint32_t)0x00000040) |
| 7604 | #define RCC_AHB1LPENR_GPIOHLPEN ((uint32_t)0x00000080) |
| 7605 | #define RCC_AHB1LPENR_GPIOILPEN ((uint32_t)0x00000100) |
| 7606 | #define RCC_AHB1LPENR_GPIOJLPEN ((uint32_t)0x00000200) |
| 7607 | #define RCC_AHB1LPENR_GPIOKLPEN ((uint32_t)0x00000400) |
| 7608 | #define RCC_AHB1LPENR_CRCLPEN ((uint32_t)0x00001000) |
| 7609 | #define RCC_AHB1LPENR_FLITFLPEN ((uint32_t)0x00008000) |
| 7610 | #define RCC_AHB1LPENR_SRAM1LPEN ((uint32_t)0x00010000) |
| 7611 | #define RCC_AHB1LPENR_SRAM2LPEN ((uint32_t)0x00020000) |
| 7612 | #define RCC_AHB1LPENR_BKPSRAMLPEN ((uint32_t)0x00040000) |
| 7613 | #define RCC_AHB1LPENR_SRAM3LPEN ((uint32_t)0x00080000) |
| 7614 | #define RCC_AHB1LPENR_DMA1LPEN ((uint32_t)0x00200000) |
| 7615 | #define RCC_AHB1LPENR_DMA2LPEN ((uint32_t)0x00400000) |
| 7616 | #define RCC_AHB1LPENR_DMA2DLPEN ((uint32_t)0x00800000) |
| 7617 | #define RCC_AHB1LPENR_ETHMACLPEN ((uint32_t)0x02000000) |
| 7618 | #define RCC_AHB1LPENR_ETHMACTXLPEN ((uint32_t)0x04000000) |
| 7619 | #define RCC_AHB1LPENR_ETHMACRXLPEN ((uint32_t)0x08000000) |
| 7620 | #define RCC_AHB1LPENR_ETHMACPTPLPEN ((uint32_t)0x10000000) |
| 7621 | #define RCC_AHB1LPENR_OTGHSLPEN ((uint32_t)0x20000000) |
| 7622 | #define RCC_AHB1LPENR_OTGHSULPILPEN ((uint32_t)0x40000000) |
| 7623 | |
| 7624 | /******************** Bit definition for RCC_AHB2LPENR register *************/ |
| 7625 | #define RCC_AHB2LPENR_DCMILPEN ((uint32_t)0x00000001) |
| 7626 | #define RCC_AHB2LPENR_CRYPLPEN ((uint32_t)0x00000010) |
| 7627 | #define RCC_AHB2LPENR_HASHLPEN ((uint32_t)0x00000020) |
| 7628 | #define RCC_AHB2LPENR_RNGLPEN ((uint32_t)0x00000040) |
| 7629 | #define RCC_AHB2LPENR_OTGFSLPEN ((uint32_t)0x00000080) |
| 7630 | |
| 7631 | /******************** Bit definition for RCC_AHB3LPENR register *************/ |
| 7632 | #if defined(STM32F40_41xxx) |
| 7633 | #define RCC_AHB3LPENR_FSMCLPEN ((uint32_t)0x00000001) |
| 7634 | #endif /* STM32F40_41xxx */ |
| 7635 | |
| 7636 | #if defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F446xx) |
| 7637 | #define RCC_AHB3LPENR_FMCLPEN ((uint32_t)0x00000001) |
| 7638 | #endif /* STM32F427_437xx || STM32F429_439xx || STM32F446xx */ |
| 7639 | #if defined(STM32F446xx) |
| 7640 | #define RCC_AHB3LPENR_QSPILPEN ((uint32_t)0x00000002) |
| 7641 | #endif /* STM32F446xx */ |
| 7642 | |
| 7643 | /******************** Bit definition for RCC_APB1LPENR register *************/ |
| 7644 | #define RCC_APB1LPENR_TIM2LPEN ((uint32_t)0x00000001) |
| 7645 | #define RCC_APB1LPENR_TIM3LPEN ((uint32_t)0x00000002) |
| 7646 | #define RCC_APB1LPENR_TIM4LPEN ((uint32_t)0x00000004) |
| 7647 | #define RCC_APB1LPENR_TIM5LPEN ((uint32_t)0x00000008) |
| 7648 | #define RCC_APB1LPENR_TIM6LPEN ((uint32_t)0x00000010) |
| 7649 | #define RCC_APB1LPENR_TIM7LPEN ((uint32_t)0x00000020) |
| 7650 | #define RCC_APB1LPENR_TIM12LPEN ((uint32_t)0x00000040) |
| 7651 | #define RCC_APB1LPENR_TIM13LPEN ((uint32_t)0x00000080) |
| 7652 | #define RCC_APB1LPENR_TIM14LPEN ((uint32_t)0x00000100) |
| 7653 | #define RCC_APB1LPENR_WWDGLPEN ((uint32_t)0x00000800) |
| 7654 | #define RCC_APB1LPENR_SPI2LPEN ((uint32_t)0x00004000) |
| 7655 | #define RCC_APB1LPENR_SPI3LPEN ((uint32_t)0x00008000) |
| 7656 | #if defined(STM32F446xx) |
| 7657 | #define RCC_APB1LPENR_SPDIFRXLPEN ((uint32_t)0x00010000) |
| 7658 | #endif /* STM32F446xx */ |
| 7659 | #define RCC_APB1LPENR_USART2LPEN ((uint32_t)0x00020000) |
| 7660 | #define RCC_APB1LPENR_USART3LPEN ((uint32_t)0x00040000) |
| 7661 | #define RCC_APB1LPENR_UART4LPEN ((uint32_t)0x00080000) |
| 7662 | #define RCC_APB1LPENR_UART5LPEN ((uint32_t)0x00100000) |
| 7663 | #define RCC_APB1LPENR_I2C1LPEN ((uint32_t)0x00200000) |
| 7664 | #define RCC_APB1LPENR_I2C2LPEN ((uint32_t)0x00400000) |
| 7665 | #define RCC_APB1LPENR_I2C3LPEN ((uint32_t)0x00800000) |
| 7666 | #if defined(STM32F446xx) |
| 7667 | #define RCC_APB1LPENR_FMPI2C1LPEN ((uint32_t)0x01000000) |
| 7668 | #endif /* STM32F446xx */ |
| 7669 | #define RCC_APB1LPENR_CAN1LPEN ((uint32_t)0x02000000) |
| 7670 | #define RCC_APB1LPENR_CAN2LPEN ((uint32_t)0x04000000) |
| 7671 | #if defined(STM32F446xx) |
| 7672 | #define RCC_APB1LPENR_CECLPEN ((uint32_t)0x08000000) |
| 7673 | #endif /* STM32F446xx */ |
| 7674 | #define RCC_APB1LPENR_PWRLPEN ((uint32_t)0x10000000) |
| 7675 | #define RCC_APB1LPENR_DACLPEN ((uint32_t)0x20000000) |
| 7676 | #define RCC_APB1LPENR_UART7LPEN ((uint32_t)0x40000000) |
| 7677 | #define RCC_APB1LPENR_UART8LPEN ((uint32_t)0x80000000) |
| 7678 | |
| 7679 | /******************** Bit definition for RCC_APB2LPENR register *************/ |
| 7680 | #define RCC_APB2LPENR_TIM1LPEN ((uint32_t)0x00000001) |
| 7681 | #define RCC_APB2LPENR_TIM8LPEN ((uint32_t)0x00000002) |
| 7682 | #define RCC_APB2LPENR_USART1LPEN ((uint32_t)0x00000010) |
| 7683 | #define RCC_APB2LPENR_USART6LPEN ((uint32_t)0x00000020) |
| 7684 | #define RCC_APB2LPENR_ADC1LPEN ((uint32_t)0x00000100) |
| 7685 | #define RCC_APB2LPENR_ADC2PEN ((uint32_t)0x00000200) |
| 7686 | #define RCC_APB2LPENR_ADC3LPEN ((uint32_t)0x00000400) |
| 7687 | #define RCC_APB2LPENR_SDIOLPEN ((uint32_t)0x00000800) |
| 7688 | #define RCC_APB2LPENR_SPI1LPEN ((uint32_t)0x00001000) |
| 7689 | #define RCC_APB2LPENR_SPI4LPEN ((uint32_t)0x00002000) |
| 7690 | #define RCC_APB2LPENR_SYSCFGLPEN ((uint32_t)0x00004000) |
| 7691 | #define RCC_APB2LPENR_TIM9LPEN ((uint32_t)0x00010000) |
| 7692 | #define RCC_APB2LPENR_TIM10LPEN ((uint32_t)0x00020000) |
| 7693 | #define RCC_APB2LPENR_TIM11LPEN ((uint32_t)0x00040000) |
| 7694 | #define RCC_APB2LPENR_SPI5LPEN ((uint32_t)0x00100000) |
| 7695 | #define RCC_APB2LPENR_SPI6LPEN ((uint32_t)0x00200000) |
| 7696 | #define RCC_APB2LPENR_SAI1LPEN ((uint32_t)0x00400000) |
| 7697 | #if defined(STM32F446xx) |
| 7698 | #define RCC_APB2LPENR_SAI2LPEN ((uint32_t)0x00800000) |
| 7699 | #endif /* STM32F446xx */ |
| 7700 | #define RCC_APB2LPENR_LTDCLPEN ((uint32_t)0x04000000) |
| 7701 | |
| 7702 | /******************** Bit definition for RCC_BDCR register ******************/ |
| 7703 | #define RCC_BDCR_LSEON ((uint32_t)0x00000001) |
| 7704 | #define RCC_BDCR_LSERDY ((uint32_t)0x00000002) |
| 7705 | #define RCC_BDCR_LSEBYP ((uint32_t)0x00000004) |
| 7706 | #define RCC_BDCR_LSEMOD ((uint32_t)0x00000008) |
| 7707 | |
| 7708 | #define RCC_BDCR_RTCSEL ((uint32_t)0x00000300) |
| 7709 | #define RCC_BDCR_RTCSEL_0 ((uint32_t)0x00000100) |
| 7710 | #define RCC_BDCR_RTCSEL_1 ((uint32_t)0x00000200) |
| 7711 | |
| 7712 | #define RCC_BDCR_RTCEN ((uint32_t)0x00008000) |
| 7713 | #define RCC_BDCR_BDRST ((uint32_t)0x00010000) |
| 7714 | |
| 7715 | /******************** Bit definition for RCC_CSR register *******************/ |
| 7716 | #define RCC_CSR_LSION ((uint32_t)0x00000001) |
| 7717 | #define RCC_CSR_LSIRDY ((uint32_t)0x00000002) |
| 7718 | #define RCC_CSR_RMVF ((uint32_t)0x01000000) |
| 7719 | #define RCC_CSR_BORRSTF ((uint32_t)0x02000000) |
| 7720 | #define RCC_CSR_PADRSTF ((uint32_t)0x04000000) |
| 7721 | #define RCC_CSR_PORRSTF ((uint32_t)0x08000000) |
| 7722 | #define RCC_CSR_SFTRSTF ((uint32_t)0x10000000) |
| 7723 | #define RCC_CSR_WDGRSTF ((uint32_t)0x20000000) |
| 7724 | #define RCC_CSR_WWDGRSTF ((uint32_t)0x40000000) |
| 7725 | #define RCC_CSR_LPWRRSTF ((uint32_t)0x80000000) |
| 7726 | |
| 7727 | /******************** Bit definition for RCC_SSCGR register *****************/ |
| 7728 | #define RCC_SSCGR_MODPER ((uint32_t)0x00001FFF) |
| 7729 | #define RCC_SSCGR_INCSTEP ((uint32_t)0x0FFFE000) |
| 7730 | #define RCC_SSCGR_SPREADSEL ((uint32_t)0x40000000) |
| 7731 | #define RCC_SSCGR_SSCGEN ((uint32_t)0x80000000) |
| 7732 | |
| 7733 | /******************** Bit definition for RCC_PLLI2SCFGR register ************/ |
| 7734 | #define RCC_PLLI2SCFGR_PLLI2SM ((uint32_t)0x0000003F) |
| 7735 | #define RCC_PLLI2SCFGR_PLLI2SM_0 ((uint32_t)0x00000001) |
| 7736 | #define RCC_PLLI2SCFGR_PLLI2SM_1 ((uint32_t)0x00000002) |
| 7737 | #define RCC_PLLI2SCFGR_PLLI2SM_2 ((uint32_t)0x00000004) |
| 7738 | #define RCC_PLLI2SCFGR_PLLI2SM_3 ((uint32_t)0x00000008) |
| 7739 | #define RCC_PLLI2SCFGR_PLLI2SM_4 ((uint32_t)0x00000010) |
| 7740 | #define RCC_PLLI2SCFGR_PLLI2SM_5 ((uint32_t)0x00000020) |
| 7741 | |
| 7742 | #define RCC_PLLI2SCFGR_PLLI2SN ((uint32_t)0x00007FC0) |
| 7743 | #define RCC_PLLI2SCFGR_PLLI2SN_0 ((uint32_t)0x00000040) |
| 7744 | #define RCC_PLLI2SCFGR_PLLI2SN_1 ((uint32_t)0x00000080) |
| 7745 | #define RCC_PLLI2SCFGR_PLLI2SN_2 ((uint32_t)0x00000100) |
| 7746 | #define RCC_PLLI2SCFGR_PLLI2SN_3 ((uint32_t)0x00000200) |
| 7747 | #define RCC_PLLI2SCFGR_PLLI2SN_4 ((uint32_t)0x00000400) |
| 7748 | #define RCC_PLLI2SCFGR_PLLI2SN_5 ((uint32_t)0x00000800) |
| 7749 | #define RCC_PLLI2SCFGR_PLLI2SN_6 ((uint32_t)0x00001000) |
| 7750 | #define RCC_PLLI2SCFGR_PLLI2SN_7 ((uint32_t)0x00002000) |
| 7751 | #define RCC_PLLI2SCFGR_PLLI2SN_8 ((uint32_t)0x00004000) |
| 7752 | |
| 7753 | #if defined(STM32F446xx) |
| 7754 | #define RCC_PLLI2SCFGR_PLLI2SP ((uint32_t)0x00030000) |
| 7755 | #define RCC_PLLI2SCFGR_PLLI2SP_0 ((uint32_t)0x00010000) |
| 7756 | #define RCC_PLLI2SCFGR_PLLI2SP_1 ((uint32_t)0x00020000) |
| 7757 | #endif /* STM32F446xx */ |
| 7758 | |
| 7759 | #define RCC_PLLI2SCFGR_PLLI2SQ ((uint32_t)0x0F000000) |
| 7760 | #define RCC_PLLI2SCFGR_PLLI2SQ_0 ((uint32_t)0x01000000) |
| 7761 | #define RCC_PLLI2SCFGR_PLLI2SQ_1 ((uint32_t)0x02000000) |
| 7762 | #define RCC_PLLI2SCFGR_PLLI2SQ_2 ((uint32_t)0x04000000) |
| 7763 | #define RCC_PLLI2SCFGR_PLLI2SQ_3 ((uint32_t)0x08000000) |
| 7764 | |
| 7765 | #define RCC_PLLI2SCFGR_PLLI2SR ((uint32_t)0x70000000) |
| 7766 | #define RCC_PLLI2SCFGR_PLLI2SR_0 ((uint32_t)0x10000000) |
| 7767 | #define RCC_PLLI2SCFGR_PLLI2SR_1 ((uint32_t)0x20000000) |
| 7768 | #define RCC_PLLI2SCFGR_PLLI2SR_2 ((uint32_t)0x40000000) |
| 7769 | |
| 7770 | /******************** Bit definition for RCC_PLLSAICFGR register ************/ |
| 7771 | #if defined(STM32F446xx) |
| 7772 | #define RCC_PLLSAICFGR_PLLSAIM ((uint32_t)0x0000003F) |
| 7773 | #define RCC_PLLSAICFGR_PLLSAIM_0 ((uint32_t)0x00000001) |
| 7774 | #define RCC_PLLSAICFGR_PLLSAIM_1 ((uint32_t)0x00000002) |
| 7775 | #define RCC_PLLSAICFGR_PLLSAIM_2 ((uint32_t)0x00000004) |
| 7776 | #define RCC_PLLSAICFGR_PLLSAIM_3 ((uint32_t)0x00000008) |
| 7777 | #define RCC_PLLSAICFGR_PLLSAIM_4 ((uint32_t)0x00000010) |
| 7778 | #define RCC_PLLSAICFGR_PLLSAIM_5 ((uint32_t)0x00000020) |
| 7779 | #endif /* STM32F446xx */ |
| 7780 | |
| 7781 | #define RCC_PLLSAICFGR_PLLSAIN ((uint32_t)0x00007FC0) |
| 7782 | #define RCC_PLLSAICFGR_PLLSAIN_0 ((uint32_t)0x00000040) |
| 7783 | #define RCC_PLLSAICFGR_PLLSAIN_1 ((uint32_t)0x00000080) |
| 7784 | #define RCC_PLLSAICFGR_PLLSAIN_2 ((uint32_t)0x00000100) |
| 7785 | #define RCC_PLLSAICFGR_PLLSAIN_3 ((uint32_t)0x00000200) |
| 7786 | #define RCC_PLLSAICFGR_PLLSAIN_4 ((uint32_t)0x00000400) |
| 7787 | #define RCC_PLLSAICFGR_PLLSAIN_5 ((uint32_t)0x00000800) |
| 7788 | #define RCC_PLLSAICFGR_PLLSAIN_6 ((uint32_t)0x00001000) |
| 7789 | #define RCC_PLLSAICFGR_PLLSAIN_7 ((uint32_t)0x00002000) |
| 7790 | #define RCC_PLLSAICFGR_PLLSAIN_8 ((uint32_t)0x00004000) |
| 7791 | |
| 7792 | #if defined(STM32F446xx) |
| 7793 | #define RCC_PLLSAICFGR_PLLSAIP ((uint32_t)0x00030000) |
| 7794 | #define RCC_PLLSAICFGR_PLLSAIP_0 ((uint32_t)0x00010000) |
| 7795 | #define RCC_PLLSAICFGR_PLLSAIP_1 ((uint32_t)0x00020000) |
| 7796 | #endif /* STM32F446xx */ |
| 7797 | |
| 7798 | #define RCC_PLLSAICFGR_PLLSAIQ ((uint32_t)0x0F000000) |
| 7799 | #define RCC_PLLSAICFGR_PLLSAIQ_0 ((uint32_t)0x01000000) |
| 7800 | #define RCC_PLLSAICFGR_PLLSAIQ_1 ((uint32_t)0x02000000) |
| 7801 | #define RCC_PLLSAICFGR_PLLSAIQ_2 ((uint32_t)0x04000000) |
| 7802 | #define RCC_PLLSAICFGR_PLLSAIQ_3 ((uint32_t)0x08000000) |
| 7803 | |
| 7804 | #define RCC_PLLSAICFGR_PLLSAIR ((uint32_t)0x70000000) |
| 7805 | #define RCC_PLLSAICFGR_PLLSAIR_0 ((uint32_t)0x10000000) |
| 7806 | #define RCC_PLLSAICFGR_PLLSAIR_1 ((uint32_t)0x20000000) |
| 7807 | #define RCC_PLLSAICFGR_PLLSAIR_2 ((uint32_t)0x40000000) |
| 7808 | |
| 7809 | /******************** Bit definition for RCC_DCKCFGR register ***************/ |
| 7810 | #define RCC_DCKCFGR_PLLI2SDIVQ ((uint32_t)0x0000001F) |
| 7811 | #define RCC_DCKCFGR_PLLSAIDIVQ ((uint32_t)0x00001F00) |
| 7812 | #define RCC_DCKCFGR_PLLSAIDIVR ((uint32_t)0x00030000) |
| 7813 | |
| 7814 | #define RCC_DCKCFGR_SAI1ASRC ((uint32_t)0x00300000) |
| 7815 | #define RCC_DCKCFGR_SAI1ASRC_0 ((uint32_t)0x00100000) |
| 7816 | #define RCC_DCKCFGR_SAI1ASRC_1 ((uint32_t)0x00200000) |
| 7817 | #if defined(STM32F446xx) |
| 7818 | #define RCC_DCKCFGR_SAI1SRC ((uint32_t)0x00300000) |
| 7819 | #define RCC_DCKCFGR_SAI1SRC_0 ((uint32_t)0x00100000) |
| 7820 | #define RCC_DCKCFGR_SAI1SRC_1 ((uint32_t)0x00200000) |
| 7821 | #endif /* STM32F446xx */ |
| 7822 | |
| 7823 | #define RCC_DCKCFGR_SAI1BSRC ((uint32_t)0x00C00000) |
| 7824 | #define RCC_DCKCFGR_SAI1BSRC_0 ((uint32_t)0x00400000) |
| 7825 | #define RCC_DCKCFGR_SAI1BSRC_1 ((uint32_t)0x00800000) |
| 7826 | #if defined(STM32F446xx) |
| 7827 | #define RCC_DCKCFGR_SAI2SRC ((uint32_t)0x00C00000) |
| 7828 | #define RCC_DCKCFGR_SAI2SRC_0 ((uint32_t)0x00400000) |
| 7829 | #define RCC_DCKCFGR_SAI2SRC_1 ((uint32_t)0x00800000) |
| 7830 | #endif /* STM32F446xx */ |
| 7831 | |
| 7832 | #define RCC_DCKCFGR_TIMPRE ((uint32_t)0x01000000) |
| 7833 | #define RCC_DCKCFGR_CK48MSEL ((uint32_t)0x08000000) |
| 7834 | |
| 7835 | #if defined(STM32F446xx) |
| 7836 | #define RCC_DCKCFGR_I2S1SRC ((uint32_t)0x06000000) |
| 7837 | #define RCC_DCKCFGR_I2S1SRC_0 ((uint32_t)0x02000000) |
| 7838 | #define RCC_DCKCFGR_I2S1SRC_1 ((uint32_t)0x04000000) |
| 7839 | #define RCC_DCKCFGR_I2S2SRC ((uint32_t)0x18000000) |
| 7840 | #define RCC_DCKCFGR_I2S2SRC_0 ((uint32_t)0x08000000) |
| 7841 | #define RCC_DCKCFGR_I2S2SRC_1 ((uint32_t)0x10000000) |
| 7842 | |
| 7843 | /******************** Bit definition for RCC_CKGATENR register ***************/ |
| 7844 | #define RCC_CKGATENR_AHB2APB1_CKEN ((uint32_t)0x00000001) |
| 7845 | #define RCC_CKGATENR_AHB2APB2_CKEN ((uint32_t)0x00000002) |
| 7846 | #define RCC_CKGATENR_CM4DBG_CKEN ((uint32_t)0x00000004) |
| 7847 | #define RCC_CKGATENR_SPARE_CKEN ((uint32_t)0x00000008) |
| 7848 | #define RCC_CKGATENR_SRAM_CKEN ((uint32_t)0x00000010) |
| 7849 | #define RCC_CKGATENR_FLITF_CKEN ((uint32_t)0x00000020) |
| 7850 | #define RCC_CKGATENR_RCC_CKEN ((uint32_t)0x00000040) |
| 7851 | |
| 7852 | /******************** Bit definition for RCC_DCKCFGR2 register ***************/ |
| 7853 | #define RCC_DCKCFGR2_FMPI2C1SEL ((uint32_t)0x00C00000) |
| 7854 | #define RCC_DCKCFGR2_FMPI2C1SEL_0 ((uint32_t)0x00400000) |
| 7855 | #define RCC_DCKCFGR2_FMPI2C1SEL_1 ((uint32_t)0x00800000) |
| 7856 | #define RCC_DCKCFGR2_CECSEL ((uint32_t)0x04000000) |
| 7857 | #define RCC_DCKCFGR2_CK48MSEL ((uint32_t)0x08000000) |
| 7858 | #define RCC_DCKCFGR2_SDIOSEL ((uint32_t)0x10000000) |
| 7859 | #define RCC_DCKCFGR2_SPDIFRXSEL ((uint32_t)0x20000000) |
| 7860 | #endif /* STM32F446xx */ |
| 7861 | |
| 7862 | /******************************************************************************/ |
| 7863 | /* */ |
| 7864 | /* RNG */ |
| 7865 | /* */ |
| 7866 | /******************************************************************************/ |
| 7867 | /******************** Bits definition for RNG_CR register *******************/ |
| 7868 | #define RNG_CR_RNGEN ((uint32_t)0x00000004) |
| 7869 | #define RNG_CR_IE ((uint32_t)0x00000008) |
| 7870 | |
| 7871 | /******************** Bits definition for RNG_SR register *******************/ |
| 7872 | #define RNG_SR_DRDY ((uint32_t)0x00000001) |
| 7873 | #define RNG_SR_CECS ((uint32_t)0x00000002) |
| 7874 | #define RNG_SR_SECS ((uint32_t)0x00000004) |
| 7875 | #define RNG_SR_CEIS ((uint32_t)0x00000020) |
| 7876 | #define RNG_SR_SEIS ((uint32_t)0x00000040) |
| 7877 | |
| 7878 | /******************************************************************************/ |
| 7879 | /* */ |
| 7880 | /* Real-Time Clock (RTC) */ |
| 7881 | /* */ |
| 7882 | /******************************************************************************/ |
| 7883 | /******************** Bits definition for RTC_TR register *******************/ |
| 7884 | #define RTC_TR_PM ((uint32_t)0x00400000) |
| 7885 | #define RTC_TR_HT ((uint32_t)0x00300000) |
| 7886 | #define RTC_TR_HT_0 ((uint32_t)0x00100000) |
| 7887 | #define RTC_TR_HT_1 ((uint32_t)0x00200000) |
| 7888 | #define RTC_TR_HU ((uint32_t)0x000F0000) |
| 7889 | #define RTC_TR_HU_0 ((uint32_t)0x00010000) |
| 7890 | #define RTC_TR_HU_1 ((uint32_t)0x00020000) |
| 7891 | #define RTC_TR_HU_2 ((uint32_t)0x00040000) |
| 7892 | #define RTC_TR_HU_3 ((uint32_t)0x00080000) |
| 7893 | #define RTC_TR_MNT ((uint32_t)0x00007000) |
| 7894 | #define RTC_TR_MNT_0 ((uint32_t)0x00001000) |
| 7895 | #define RTC_TR_MNT_1 ((uint32_t)0x00002000) |
| 7896 | #define RTC_TR_MNT_2 ((uint32_t)0x00004000) |
| 7897 | #define RTC_TR_MNU ((uint32_t)0x00000F00) |
| 7898 | #define RTC_TR_MNU_0 ((uint32_t)0x00000100) |
| 7899 | #define RTC_TR_MNU_1 ((uint32_t)0x00000200) |
| 7900 | #define RTC_TR_MNU_2 ((uint32_t)0x00000400) |
| 7901 | #define RTC_TR_MNU_3 ((uint32_t)0x00000800) |
| 7902 | #define RTC_TR_ST ((uint32_t)0x00000070) |
| 7903 | #define RTC_TR_ST_0 ((uint32_t)0x00000010) |
| 7904 | #define RTC_TR_ST_1 ((uint32_t)0x00000020) |
| 7905 | #define RTC_TR_ST_2 ((uint32_t)0x00000040) |
| 7906 | #define RTC_TR_SU ((uint32_t)0x0000000F) |
| 7907 | #define RTC_TR_SU_0 ((uint32_t)0x00000001) |
| 7908 | #define RTC_TR_SU_1 ((uint32_t)0x00000002) |
| 7909 | #define RTC_TR_SU_2 ((uint32_t)0x00000004) |
| 7910 | #define RTC_TR_SU_3 ((uint32_t)0x00000008) |
| 7911 | |
| 7912 | /******************** Bits definition for RTC_DR register *******************/ |
| 7913 | #define RTC_DR_YT ((uint32_t)0x00F00000) |
| 7914 | #define RTC_DR_YT_0 ((uint32_t)0x00100000) |
| 7915 | #define RTC_DR_YT_1 ((uint32_t)0x00200000) |
| 7916 | #define RTC_DR_YT_2 ((uint32_t)0x00400000) |
| 7917 | #define RTC_DR_YT_3 ((uint32_t)0x00800000) |
| 7918 | #define RTC_DR_YU ((uint32_t)0x000F0000) |
| 7919 | #define RTC_DR_YU_0 ((uint32_t)0x00010000) |
| 7920 | #define RTC_DR_YU_1 ((uint32_t)0x00020000) |
| 7921 | #define RTC_DR_YU_2 ((uint32_t)0x00040000) |
| 7922 | #define RTC_DR_YU_3 ((uint32_t)0x00080000) |
| 7923 | #define RTC_DR_WDU ((uint32_t)0x0000E000) |
| 7924 | #define RTC_DR_WDU_0 ((uint32_t)0x00002000) |
| 7925 | #define RTC_DR_WDU_1 ((uint32_t)0x00004000) |
| 7926 | #define RTC_DR_WDU_2 ((uint32_t)0x00008000) |
| 7927 | #define RTC_DR_MT ((uint32_t)0x00001000) |
| 7928 | #define RTC_DR_MU ((uint32_t)0x00000F00) |
| 7929 | #define RTC_DR_MU_0 ((uint32_t)0x00000100) |
| 7930 | #define RTC_DR_MU_1 ((uint32_t)0x00000200) |
| 7931 | #define RTC_DR_MU_2 ((uint32_t)0x00000400) |
| 7932 | #define RTC_DR_MU_3 ((uint32_t)0x00000800) |
| 7933 | #define RTC_DR_DT ((uint32_t)0x00000030) |
| 7934 | #define RTC_DR_DT_0 ((uint32_t)0x00000010) |
| 7935 | #define RTC_DR_DT_1 ((uint32_t)0x00000020) |
| 7936 | #define RTC_DR_DU ((uint32_t)0x0000000F) |
| 7937 | #define RTC_DR_DU_0 ((uint32_t)0x00000001) |
| 7938 | #define RTC_DR_DU_1 ((uint32_t)0x00000002) |
| 7939 | #define RTC_DR_DU_2 ((uint32_t)0x00000004) |
| 7940 | #define RTC_DR_DU_3 ((uint32_t)0x00000008) |
| 7941 | |
| 7942 | /******************** Bits definition for RTC_CR register *******************/ |
| 7943 | #define RTC_CR_COE ((uint32_t)0x00800000) |
| 7944 | #define RTC_CR_OSEL ((uint32_t)0x00600000) |
| 7945 | #define RTC_CR_OSEL_0 ((uint32_t)0x00200000) |
| 7946 | #define RTC_CR_OSEL_1 ((uint32_t)0x00400000) |
| 7947 | #define RTC_CR_POL ((uint32_t)0x00100000) |
| 7948 | #define RTC_CR_COSEL ((uint32_t)0x00080000) |
| 7949 | #define RTC_CR_BCK ((uint32_t)0x00040000) |
| 7950 | #define RTC_CR_SUB1H ((uint32_t)0x00020000) |
| 7951 | #define RTC_CR_ADD1H ((uint32_t)0x00010000) |
| 7952 | #define RTC_CR_TSIE ((uint32_t)0x00008000) |
| 7953 | #define RTC_CR_WUTIE ((uint32_t)0x00004000) |
| 7954 | #define RTC_CR_ALRBIE ((uint32_t)0x00002000) |
| 7955 | #define RTC_CR_ALRAIE ((uint32_t)0x00001000) |
| 7956 | #define RTC_CR_TSE ((uint32_t)0x00000800) |
| 7957 | #define RTC_CR_WUTE ((uint32_t)0x00000400) |
| 7958 | #define RTC_CR_ALRBE ((uint32_t)0x00000200) |
| 7959 | #define RTC_CR_ALRAE ((uint32_t)0x00000100) |
| 7960 | #define RTC_CR_DCE ((uint32_t)0x00000080) |
| 7961 | #define RTC_CR_FMT ((uint32_t)0x00000040) |
| 7962 | #define RTC_CR_BYPSHAD ((uint32_t)0x00000020) |
| 7963 | #define RTC_CR_REFCKON ((uint32_t)0x00000010) |
| 7964 | #define RTC_CR_TSEDGE ((uint32_t)0x00000008) |
| 7965 | #define RTC_CR_WUCKSEL ((uint32_t)0x00000007) |
| 7966 | #define RTC_CR_WUCKSEL_0 ((uint32_t)0x00000001) |
| 7967 | #define RTC_CR_WUCKSEL_1 ((uint32_t)0x00000002) |
| 7968 | #define RTC_CR_WUCKSEL_2 ((uint32_t)0x00000004) |
| 7969 | |
| 7970 | /******************** Bits definition for RTC_ISR register ******************/ |
| 7971 | #define RTC_ISR_RECALPF ((uint32_t)0x00010000) |
| 7972 | #define RTC_ISR_TAMP1F ((uint32_t)0x00002000) |
| 7973 | #define RTC_ISR_TSOVF ((uint32_t)0x00001000) |
| 7974 | #define RTC_ISR_TSF ((uint32_t)0x00000800) |
| 7975 | #define RTC_ISR_WUTF ((uint32_t)0x00000400) |
| 7976 | #define RTC_ISR_ALRBF ((uint32_t)0x00000200) |
| 7977 | #define RTC_ISR_ALRAF ((uint32_t)0x00000100) |
| 7978 | #define RTC_ISR_INIT ((uint32_t)0x00000080) |
| 7979 | #define RTC_ISR_INITF ((uint32_t)0x00000040) |
| 7980 | #define RTC_ISR_RSF ((uint32_t)0x00000020) |
| 7981 | #define RTC_ISR_INITS ((uint32_t)0x00000010) |
| 7982 | #define RTC_ISR_SHPF ((uint32_t)0x00000008) |
| 7983 | #define RTC_ISR_WUTWF ((uint32_t)0x00000004) |
| 7984 | #define RTC_ISR_ALRBWF ((uint32_t)0x00000002) |
| 7985 | #define RTC_ISR_ALRAWF ((uint32_t)0x00000001) |
| 7986 | |
| 7987 | /******************** Bits definition for RTC_PRER register *****************/ |
| 7988 | #define RTC_PRER_PREDIV_A ((uint32_t)0x007F0000) |
| 7989 | #define RTC_PRER_PREDIV_S ((uint32_t)0x00001FFF) |
| 7990 | |
| 7991 | /******************** Bits definition for RTC_WUTR register *****************/ |
| 7992 | #define RTC_WUTR_WUT ((uint32_t)0x0000FFFF) |
| 7993 | |
| 7994 | /******************** Bits definition for RTC_CALIBR register ***************/ |
| 7995 | #define RTC_CALIBR_DCS ((uint32_t)0x00000080) |
| 7996 | #define RTC_CALIBR_DC ((uint32_t)0x0000001F) |
| 7997 | |
| 7998 | /******************** Bits definition for RTC_ALRMAR register ***************/ |
| 7999 | #define RTC_ALRMAR_MSK4 ((uint32_t)0x80000000) |
| 8000 | #define RTC_ALRMAR_WDSEL ((uint32_t)0x40000000) |
| 8001 | #define RTC_ALRMAR_DT ((uint32_t)0x30000000) |
| 8002 | #define RTC_ALRMAR_DT_0 ((uint32_t)0x10000000) |
| 8003 | #define RTC_ALRMAR_DT_1 ((uint32_t)0x20000000) |
| 8004 | #define RTC_ALRMAR_DU ((uint32_t)0x0F000000) |
| 8005 | #define RTC_ALRMAR_DU_0 ((uint32_t)0x01000000) |
| 8006 | #define RTC_ALRMAR_DU_1 ((uint32_t)0x02000000) |
| 8007 | #define RTC_ALRMAR_DU_2 ((uint32_t)0x04000000) |
| 8008 | #define RTC_ALRMAR_DU_3 ((uint32_t)0x08000000) |
| 8009 | #define RTC_ALRMAR_MSK3 ((uint32_t)0x00800000) |
| 8010 | #define RTC_ALRMAR_PM ((uint32_t)0x00400000) |
| 8011 | #define RTC_ALRMAR_HT ((uint32_t)0x00300000) |
| 8012 | #define RTC_ALRMAR_HT_0 ((uint32_t)0x00100000) |
| 8013 | #define RTC_ALRMAR_HT_1 ((uint32_t)0x00200000) |
| 8014 | #define RTC_ALRMAR_HU ((uint32_t)0x000F0000) |
| 8015 | #define RTC_ALRMAR_HU_0 ((uint32_t)0x00010000) |
| 8016 | #define RTC_ALRMAR_HU_1 ((uint32_t)0x00020000) |
| 8017 | #define RTC_ALRMAR_HU_2 ((uint32_t)0x00040000) |
| 8018 | #define RTC_ALRMAR_HU_3 ((uint32_t)0x00080000) |
| 8019 | #define RTC_ALRMAR_MSK2 ((uint32_t)0x00008000) |
| 8020 | #define RTC_ALRMAR_MNT ((uint32_t)0x00007000) |
| 8021 | #define RTC_ALRMAR_MNT_0 ((uint32_t)0x00001000) |
| 8022 | #define RTC_ALRMAR_MNT_1 ((uint32_t)0x00002000) |
| 8023 | #define RTC_ALRMAR_MNT_2 ((uint32_t)0x00004000) |
| 8024 | #define RTC_ALRMAR_MNU ((uint32_t)0x00000F00) |
| 8025 | #define RTC_ALRMAR_MNU_0 ((uint32_t)0x00000100) |
| 8026 | #define RTC_ALRMAR_MNU_1 ((uint32_t)0x00000200) |
| 8027 | #define RTC_ALRMAR_MNU_2 ((uint32_t)0x00000400) |
| 8028 | #define RTC_ALRMAR_MNU_3 ((uint32_t)0x00000800) |
| 8029 | #define RTC_ALRMAR_MSK1 ((uint32_t)0x00000080) |
| 8030 | #define RTC_ALRMAR_ST ((uint32_t)0x00000070) |
| 8031 | #define RTC_ALRMAR_ST_0 ((uint32_t)0x00000010) |
| 8032 | #define RTC_ALRMAR_ST_1 ((uint32_t)0x00000020) |
| 8033 | #define RTC_ALRMAR_ST_2 ((uint32_t)0x00000040) |
| 8034 | #define RTC_ALRMAR_SU ((uint32_t)0x0000000F) |
| 8035 | #define RTC_ALRMAR_SU_0 ((uint32_t)0x00000001) |
| 8036 | #define RTC_ALRMAR_SU_1 ((uint32_t)0x00000002) |
| 8037 | #define RTC_ALRMAR_SU_2 ((uint32_t)0x00000004) |
| 8038 | #define RTC_ALRMAR_SU_3 ((uint32_t)0x00000008) |
| 8039 | |
| 8040 | /******************** Bits definition for RTC_ALRMBR register ***************/ |
| 8041 | #define RTC_ALRMBR_MSK4 ((uint32_t)0x80000000) |
| 8042 | #define RTC_ALRMBR_WDSEL ((uint32_t)0x40000000) |
| 8043 | #define RTC_ALRMBR_DT ((uint32_t)0x30000000) |
| 8044 | #define RTC_ALRMBR_DT_0 ((uint32_t)0x10000000) |
| 8045 | #define RTC_ALRMBR_DT_1 ((uint32_t)0x20000000) |
| 8046 | #define RTC_ALRMBR_DU ((uint32_t)0x0F000000) |
| 8047 | #define RTC_ALRMBR_DU_0 ((uint32_t)0x01000000) |
| 8048 | #define RTC_ALRMBR_DU_1 ((uint32_t)0x02000000) |
| 8049 | #define RTC_ALRMBR_DU_2 ((uint32_t)0x04000000) |
| 8050 | #define RTC_ALRMBR_DU_3 ((uint32_t)0x08000000) |
| 8051 | #define RTC_ALRMBR_MSK3 ((uint32_t)0x00800000) |
| 8052 | #define RTC_ALRMBR_PM ((uint32_t)0x00400000) |
| 8053 | #define RTC_ALRMBR_HT ((uint32_t)0x00300000) |
| 8054 | #define RTC_ALRMBR_HT_0 ((uint32_t)0x00100000) |
| 8055 | #define RTC_ALRMBR_HT_1 ((uint32_t)0x00200000) |
| 8056 | #define RTC_ALRMBR_HU ((uint32_t)0x000F0000) |
| 8057 | #define RTC_ALRMBR_HU_0 ((uint32_t)0x00010000) |
| 8058 | #define RTC_ALRMBR_HU_1 ((uint32_t)0x00020000) |
| 8059 | #define RTC_ALRMBR_HU_2 ((uint32_t)0x00040000) |
| 8060 | #define RTC_ALRMBR_HU_3 ((uint32_t)0x00080000) |
| 8061 | #define RTC_ALRMBR_MSK2 ((uint32_t)0x00008000) |
| 8062 | #define RTC_ALRMBR_MNT ((uint32_t)0x00007000) |
| 8063 | #define RTC_ALRMBR_MNT_0 ((uint32_t)0x00001000) |
| 8064 | #define RTC_ALRMBR_MNT_1 ((uint32_t)0x00002000) |
| 8065 | #define RTC_ALRMBR_MNT_2 ((uint32_t)0x00004000) |
| 8066 | #define RTC_ALRMBR_MNU ((uint32_t)0x00000F00) |
| 8067 | #define RTC_ALRMBR_MNU_0 ((uint32_t)0x00000100) |
| 8068 | #define RTC_ALRMBR_MNU_1 ((uint32_t)0x00000200) |
| 8069 | #define RTC_ALRMBR_MNU_2 ((uint32_t)0x00000400) |
| 8070 | #define RTC_ALRMBR_MNU_3 ((uint32_t)0x00000800) |
| 8071 | #define RTC_ALRMBR_MSK1 ((uint32_t)0x00000080) |
| 8072 | #define RTC_ALRMBR_ST ((uint32_t)0x00000070) |
| 8073 | #define RTC_ALRMBR_ST_0 ((uint32_t)0x00000010) |
| 8074 | #define RTC_ALRMBR_ST_1 ((uint32_t)0x00000020) |
| 8075 | #define RTC_ALRMBR_ST_2 ((uint32_t)0x00000040) |
| 8076 | #define RTC_ALRMBR_SU ((uint32_t)0x0000000F) |
| 8077 | #define RTC_ALRMBR_SU_0 ((uint32_t)0x00000001) |
| 8078 | #define RTC_ALRMBR_SU_1 ((uint32_t)0x00000002) |
| 8079 | #define RTC_ALRMBR_SU_2 ((uint32_t)0x00000004) |
| 8080 | #define RTC_ALRMBR_SU_3 ((uint32_t)0x00000008) |
| 8081 | |
| 8082 | /******************** Bits definition for RTC_WPR register ******************/ |
| 8083 | #define RTC_WPR_KEY ((uint32_t)0x000000FF) |
| 8084 | |
| 8085 | /******************** Bits definition for RTC_SSR register ******************/ |
| 8086 | #define RTC_SSR_SS ((uint32_t)0x0000FFFF) |
| 8087 | |
| 8088 | /******************** Bits definition for RTC_SHIFTR register ***************/ |
| 8089 | #define RTC_SHIFTR_SUBFS ((uint32_t)0x00007FFF) |
| 8090 | #define RTC_SHIFTR_ADD1S ((uint32_t)0x80000000) |
| 8091 | |
| 8092 | /******************** Bits definition for RTC_TSTR register *****************/ |
| 8093 | #define RTC_TSTR_PM ((uint32_t)0x00400000) |
| 8094 | #define RTC_TSTR_HT ((uint32_t)0x00300000) |
| 8095 | #define RTC_TSTR_HT_0 ((uint32_t)0x00100000) |
| 8096 | #define RTC_TSTR_HT_1 ((uint32_t)0x00200000) |
| 8097 | #define RTC_TSTR_HU ((uint32_t)0x000F0000) |
| 8098 | #define RTC_TSTR_HU_0 ((uint32_t)0x00010000) |
| 8099 | #define RTC_TSTR_HU_1 ((uint32_t)0x00020000) |
| 8100 | #define RTC_TSTR_HU_2 ((uint32_t)0x00040000) |
| 8101 | #define RTC_TSTR_HU_3 ((uint32_t)0x00080000) |
| 8102 | #define RTC_TSTR_MNT ((uint32_t)0x00007000) |
| 8103 | #define RTC_TSTR_MNT_0 ((uint32_t)0x00001000) |
| 8104 | #define RTC_TSTR_MNT_1 ((uint32_t)0x00002000) |
| 8105 | #define RTC_TSTR_MNT_2 ((uint32_t)0x00004000) |
| 8106 | #define RTC_TSTR_MNU ((uint32_t)0x00000F00) |
| 8107 | #define RTC_TSTR_MNU_0 ((uint32_t)0x00000100) |
| 8108 | #define RTC_TSTR_MNU_1 ((uint32_t)0x00000200) |
| 8109 | #define RTC_TSTR_MNU_2 ((uint32_t)0x00000400) |
| 8110 | #define RTC_TSTR_MNU_3 ((uint32_t)0x00000800) |
| 8111 | #define RTC_TSTR_ST ((uint32_t)0x00000070) |
| 8112 | #define RTC_TSTR_ST_0 ((uint32_t)0x00000010) |
| 8113 | #define RTC_TSTR_ST_1 ((uint32_t)0x00000020) |
| 8114 | #define RTC_TSTR_ST_2 ((uint32_t)0x00000040) |
| 8115 | #define RTC_TSTR_SU ((uint32_t)0x0000000F) |
| 8116 | #define RTC_TSTR_SU_0 ((uint32_t)0x00000001) |
| 8117 | #define RTC_TSTR_SU_1 ((uint32_t)0x00000002) |
| 8118 | #define RTC_TSTR_SU_2 ((uint32_t)0x00000004) |
| 8119 | #define RTC_TSTR_SU_3 ((uint32_t)0x00000008) |
| 8120 | |
| 8121 | /******************** Bits definition for RTC_TSDR register *****************/ |
| 8122 | #define RTC_TSDR_WDU ((uint32_t)0x0000E000) |
| 8123 | #define RTC_TSDR_WDU_0 ((uint32_t)0x00002000) |
| 8124 | #define RTC_TSDR_WDU_1 ((uint32_t)0x00004000) |
| 8125 | #define RTC_TSDR_WDU_2 ((uint32_t)0x00008000) |
| 8126 | #define RTC_TSDR_MT ((uint32_t)0x00001000) |
| 8127 | #define RTC_TSDR_MU ((uint32_t)0x00000F00) |
| 8128 | #define RTC_TSDR_MU_0 ((uint32_t)0x00000100) |
| 8129 | #define RTC_TSDR_MU_1 ((uint32_t)0x00000200) |
| 8130 | #define RTC_TSDR_MU_2 ((uint32_t)0x00000400) |
| 8131 | #define RTC_TSDR_MU_3 ((uint32_t)0x00000800) |
| 8132 | #define RTC_TSDR_DT ((uint32_t)0x00000030) |
| 8133 | #define RTC_TSDR_DT_0 ((uint32_t)0x00000010) |
| 8134 | #define RTC_TSDR_DT_1 ((uint32_t)0x00000020) |
| 8135 | #define RTC_TSDR_DU ((uint32_t)0x0000000F) |
| 8136 | #define RTC_TSDR_DU_0 ((uint32_t)0x00000001) |
| 8137 | #define RTC_TSDR_DU_1 ((uint32_t)0x00000002) |
| 8138 | #define RTC_TSDR_DU_2 ((uint32_t)0x00000004) |
| 8139 | #define RTC_TSDR_DU_3 ((uint32_t)0x00000008) |
| 8140 | |
| 8141 | /******************** Bits definition for RTC_TSSSR register ****************/ |
| 8142 | #define RTC_TSSSR_SS ((uint32_t)0x0000FFFF) |
| 8143 | |
| 8144 | /******************** Bits definition for RTC_CAL register *****************/ |
| 8145 | #define RTC_CALR_CALP ((uint32_t)0x00008000) |
| 8146 | #define RTC_CALR_CALW8 ((uint32_t)0x00004000) |
| 8147 | #define RTC_CALR_CALW16 ((uint32_t)0x00002000) |
| 8148 | #define RTC_CALR_CALM ((uint32_t)0x000001FF) |
| 8149 | #define RTC_CALR_CALM_0 ((uint32_t)0x00000001) |
| 8150 | #define RTC_CALR_CALM_1 ((uint32_t)0x00000002) |
| 8151 | #define RTC_CALR_CALM_2 ((uint32_t)0x00000004) |
| 8152 | #define RTC_CALR_CALM_3 ((uint32_t)0x00000008) |
| 8153 | #define RTC_CALR_CALM_4 ((uint32_t)0x00000010) |
| 8154 | #define RTC_CALR_CALM_5 ((uint32_t)0x00000020) |
| 8155 | #define RTC_CALR_CALM_6 ((uint32_t)0x00000040) |
| 8156 | #define RTC_CALR_CALM_7 ((uint32_t)0x00000080) |
| 8157 | #define RTC_CALR_CALM_8 ((uint32_t)0x00000100) |
| 8158 | |
| 8159 | /******************** Bits definition for RTC_TAFCR register ****************/ |
| 8160 | #define RTC_TAFCR_ALARMOUTTYPE ((uint32_t)0x00040000) |
| 8161 | #define RTC_TAFCR_TSINSEL ((uint32_t)0x00020000) |
| 8162 | #define RTC_TAFCR_TAMPINSEL ((uint32_t)0x00010000) |
| 8163 | #define RTC_TAFCR_TAMPPUDIS ((uint32_t)0x00008000) |
| 8164 | #define RTC_TAFCR_TAMPPRCH ((uint32_t)0x00006000) |
| 8165 | #define RTC_TAFCR_TAMPPRCH_0 ((uint32_t)0x00002000) |
| 8166 | #define RTC_TAFCR_TAMPPRCH_1 ((uint32_t)0x00004000) |
| 8167 | #define RTC_TAFCR_TAMPFLT ((uint32_t)0x00001800) |
| 8168 | #define RTC_TAFCR_TAMPFLT_0 ((uint32_t)0x00000800) |
| 8169 | #define RTC_TAFCR_TAMPFLT_1 ((uint32_t)0x00001000) |
| 8170 | #define RTC_TAFCR_TAMPFREQ ((uint32_t)0x00000700) |
| 8171 | #define RTC_TAFCR_TAMPFREQ_0 ((uint32_t)0x00000100) |
| 8172 | #define RTC_TAFCR_TAMPFREQ_1 ((uint32_t)0x00000200) |
| 8173 | #define RTC_TAFCR_TAMPFREQ_2 ((uint32_t)0x00000400) |
| 8174 | #define RTC_TAFCR_TAMPTS ((uint32_t)0x00000080) |
| 8175 | #define RTC_TAFCR_TAMPIE ((uint32_t)0x00000004) |
| 8176 | #define RTC_TAFCR_TAMP1TRG ((uint32_t)0x00000002) |
| 8177 | #define RTC_TAFCR_TAMP1E ((uint32_t)0x00000001) |
| 8178 | |
| 8179 | /******************** Bits definition for RTC_ALRMASSR register *************/ |
| 8180 | #define RTC_ALRMASSR_MASKSS ((uint32_t)0x0F000000) |
| 8181 | #define RTC_ALRMASSR_MASKSS_0 ((uint32_t)0x01000000) |
| 8182 | #define RTC_ALRMASSR_MASKSS_1 ((uint32_t)0x02000000) |
| 8183 | #define RTC_ALRMASSR_MASKSS_2 ((uint32_t)0x04000000) |
| 8184 | #define RTC_ALRMASSR_MASKSS_3 ((uint32_t)0x08000000) |
| 8185 | #define RTC_ALRMASSR_SS ((uint32_t)0x00007FFF) |
| 8186 | |
| 8187 | /******************** Bits definition for RTC_ALRMBSSR register *************/ |
| 8188 | #define RTC_ALRMBSSR_MASKSS ((uint32_t)0x0F000000) |
| 8189 | #define RTC_ALRMBSSR_MASKSS_0 ((uint32_t)0x01000000) |
| 8190 | #define RTC_ALRMBSSR_MASKSS_1 ((uint32_t)0x02000000) |
| 8191 | #define RTC_ALRMBSSR_MASKSS_2 ((uint32_t)0x04000000) |
| 8192 | #define RTC_ALRMBSSR_MASKSS_3 ((uint32_t)0x08000000) |
| 8193 | #define RTC_ALRMBSSR_SS ((uint32_t)0x00007FFF) |
| 8194 | |
| 8195 | /******************** Bits definition for RTC_BKP0R register ****************/ |
| 8196 | #define RTC_BKP0R ((uint32_t)0xFFFFFFFF) |
| 8197 | |
| 8198 | /******************** Bits definition for RTC_BKP1R register ****************/ |
| 8199 | #define RTC_BKP1R ((uint32_t)0xFFFFFFFF) |
| 8200 | |
| 8201 | /******************** Bits definition for RTC_BKP2R register ****************/ |
| 8202 | #define RTC_BKP2R ((uint32_t)0xFFFFFFFF) |
| 8203 | |
| 8204 | /******************** Bits definition for RTC_BKP3R register ****************/ |
| 8205 | #define RTC_BKP3R ((uint32_t)0xFFFFFFFF) |
| 8206 | |
| 8207 | /******************** Bits definition for RTC_BKP4R register ****************/ |
| 8208 | #define RTC_BKP4R ((uint32_t)0xFFFFFFFF) |
| 8209 | |
| 8210 | /******************** Bits definition for RTC_BKP5R register ****************/ |
| 8211 | #define RTC_BKP5R ((uint32_t)0xFFFFFFFF) |
| 8212 | |
| 8213 | /******************** Bits definition for RTC_BKP6R register ****************/ |
| 8214 | #define RTC_BKP6R ((uint32_t)0xFFFFFFFF) |
| 8215 | |
| 8216 | /******************** Bits definition for RTC_BKP7R register ****************/ |
| 8217 | #define RTC_BKP7R ((uint32_t)0xFFFFFFFF) |
| 8218 | |
| 8219 | /******************** Bits definition for RTC_BKP8R register ****************/ |
| 8220 | #define RTC_BKP8R ((uint32_t)0xFFFFFFFF) |
| 8221 | |
| 8222 | /******************** Bits definition for RTC_BKP9R register ****************/ |
| 8223 | #define RTC_BKP9R ((uint32_t)0xFFFFFFFF) |
| 8224 | |
| 8225 | /******************** Bits definition for RTC_BKP10R register ***************/ |
| 8226 | #define RTC_BKP10R ((uint32_t)0xFFFFFFFF) |
| 8227 | |
| 8228 | /******************** Bits definition for RTC_BKP11R register ***************/ |
| 8229 | #define RTC_BKP11R ((uint32_t)0xFFFFFFFF) |
| 8230 | |
| 8231 | /******************** Bits definition for RTC_BKP12R register ***************/ |
| 8232 | #define RTC_BKP12R ((uint32_t)0xFFFFFFFF) |
| 8233 | |
| 8234 | /******************** Bits definition for RTC_BKP13R register ***************/ |
| 8235 | #define RTC_BKP13R ((uint32_t)0xFFFFFFFF) |
| 8236 | |
| 8237 | /******************** Bits definition for RTC_BKP14R register ***************/ |
| 8238 | #define RTC_BKP14R ((uint32_t)0xFFFFFFFF) |
| 8239 | |
| 8240 | /******************** Bits definition for RTC_BKP15R register ***************/ |
| 8241 | #define RTC_BKP15R ((uint32_t)0xFFFFFFFF) |
| 8242 | |
| 8243 | /******************** Bits definition for RTC_BKP16R register ***************/ |
| 8244 | #define RTC_BKP16R ((uint32_t)0xFFFFFFFF) |
| 8245 | |
| 8246 | /******************** Bits definition for RTC_BKP17R register ***************/ |
| 8247 | #define RTC_BKP17R ((uint32_t)0xFFFFFFFF) |
| 8248 | |
| 8249 | /******************** Bits definition for RTC_BKP18R register ***************/ |
| 8250 | #define RTC_BKP18R ((uint32_t)0xFFFFFFFF) |
| 8251 | |
| 8252 | /******************** Bits definition for RTC_BKP19R register ***************/ |
| 8253 | #define RTC_BKP19R ((uint32_t)0xFFFFFFFF) |
| 8254 | |
| 8255 | /******************************************************************************/ |
| 8256 | /* */ |
| 8257 | /* Serial Audio Interface */ |
| 8258 | /* */ |
| 8259 | /******************************************************************************/ |
| 8260 | /******************** Bit definition for SAI_GCR register *******************/ |
| 8261 | #define SAI_GCR_SYNCIN ((uint32_t)0x00000003) /*!<SYNCIN[1:0] bits (Synchronization Inputs) */ |
| 8262 | #define SAI_GCR_SYNCIN_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 8263 | #define SAI_GCR_SYNCIN_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 8264 | |
| 8265 | #define SAI_GCR_SYNCOUT ((uint32_t)0x00000030) /*!<SYNCOUT[1:0] bits (Synchronization Outputs) */ |
| 8266 | #define SAI_GCR_SYNCOUT_0 ((uint32_t)0x00000010) /*!<Bit 0 */ |
| 8267 | #define SAI_GCR_SYNCOUT_1 ((uint32_t)0x00000020) /*!<Bit 1 */ |
| 8268 | |
| 8269 | /******************* Bit definition for SAI_xCR1 register *******************/ |
| 8270 | #define SAI_xCR1_MODE ((uint32_t)0x00000003) /*!<MODE[1:0] bits (Audio Block Mode) */ |
| 8271 | #define SAI_xCR1_MODE_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 8272 | #define SAI_xCR1_MODE_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 8273 | |
| 8274 | #define SAI_xCR1_PRTCFG ((uint32_t)0x0000000C) /*!<PRTCFG[1:0] bits (Protocol Configuration) */ |
| 8275 | #define SAI_xCR1_PRTCFG_0 ((uint32_t)0x00000004) /*!<Bit 0 */ |
| 8276 | #define SAI_xCR1_PRTCFG_1 ((uint32_t)0x00000008) /*!<Bit 1 */ |
| 8277 | |
| 8278 | #define SAI_xCR1_DS ((uint32_t)0x000000E0) /*!<DS[1:0] bits (Data Size) */ |
| 8279 | #define SAI_xCR1_DS_0 ((uint32_t)0x00000020) /*!<Bit 0 */ |
| 8280 | #define SAI_xCR1_DS_1 ((uint32_t)0x00000040) /*!<Bit 1 */ |
| 8281 | #define SAI_xCR1_DS_2 ((uint32_t)0x00000080) /*!<Bit 2 */ |
| 8282 | |
| 8283 | #define SAI_xCR1_LSBFIRST ((uint32_t)0x00000100) /*!<LSB First Configuration */ |
| 8284 | #define SAI_xCR1_CKSTR ((uint32_t)0x00000200) /*!<ClocK STRobing edge */ |
| 8285 | |
| 8286 | #define SAI_xCR1_SYNCEN ((uint32_t)0x00000C00) /*!<SYNCEN[1:0](SYNChronization ENable) */ |
| 8287 | #define SAI_xCR1_SYNCEN_0 ((uint32_t)0x00000400) /*!<Bit 0 */ |
| 8288 | #define SAI_xCR1_SYNCEN_1 ((uint32_t)0x00000800) /*!<Bit 1 */ |
| 8289 | |
| 8290 | #define SAI_xCR1_MONO ((uint32_t)0x00001000) /*!<Mono mode */ |
| 8291 | #define SAI_xCR1_OUTDRIV ((uint32_t)0x00002000) /*!<Output Drive */ |
| 8292 | #define SAI_xCR1_SAIEN ((uint32_t)0x00010000) /*!<Audio Block enable */ |
| 8293 | #define SAI_xCR1_DMAEN ((uint32_t)0x00020000) /*!<DMA enable */ |
| 8294 | #define SAI_xCR1_NODIV ((uint32_t)0x00080000) /*!<No Divider Configuration */ |
| 8295 | |
| 8296 | #define SAI_xCR1_MCKDIV ((uint32_t)0x00780000) /*!<MCKDIV[3:0] (Master ClocK Divider) */ |
| 8297 | #define SAI_xCR1_MCKDIV_0 ((uint32_t)0x00080000) /*!<Bit 0 */ |
| 8298 | #define SAI_xCR1_MCKDIV_1 ((uint32_t)0x00100000) /*!<Bit 1 */ |
| 8299 | #define SAI_xCR1_MCKDIV_2 ((uint32_t)0x00200000) /*!<Bit 2 */ |
| 8300 | #define SAI_xCR1_MCKDIV_3 ((uint32_t)0x00400000) /*!<Bit 3 */ |
| 8301 | |
| 8302 | /******************* Bit definition for SAI_xCR2 register *******************/ |
| 8303 | #define SAI_xCR2_FTH ((uint32_t)0x00000003) /*!<FTH[1:0](Fifo THreshold) */ |
| 8304 | #define SAI_xCR2_FTH_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 8305 | #define SAI_xCR2_FTH_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 8306 | |
| 8307 | #define SAI_xCR2_FFLUSH ((uint32_t)0x00000008) /*!<Fifo FLUSH */ |
| 8308 | #define SAI_xCR2_TRIS ((uint32_t)0x00000010) /*!<TRIState Management on data line */ |
| 8309 | #define SAI_xCR2_MUTE ((uint32_t)0x00000020) /*!<Mute mode */ |
| 8310 | #define SAI_xCR2_MUTEVAL ((uint32_t)0x00000040) /*!<Muate value */ |
| 8311 | |
| 8312 | #define SAI_xCR2_MUTECNT ((uint32_t)0x00001F80) /*!<MUTECNT[5:0] (MUTE counter) */ |
| 8313 | #define SAI_xCR2_MUTECNT_0 ((uint32_t)0x00000080) /*!<Bit 0 */ |
| 8314 | #define SAI_xCR2_MUTECNT_1 ((uint32_t)0x00000100) /*!<Bit 1 */ |
| 8315 | #define SAI_xCR2_MUTECNT_2 ((uint32_t)0x00000200) /*!<Bit 2 */ |
| 8316 | #define SAI_xCR2_MUTECNT_3 ((uint32_t)0x00000400) /*!<Bit 3 */ |
| 8317 | #define SAI_xCR2_MUTECNT_4 ((uint32_t)0x00000800) /*!<Bit 4 */ |
| 8318 | #define SAI_xCR2_MUTECNT_5 ((uint32_t)0x00001000) /*!<Bit 5 */ |
| 8319 | |
| 8320 | #define SAI_xCR2_CPL ((uint32_t)0x00080000) /*!< Complement Bit */ |
| 8321 | |
| 8322 | #define SAI_xCR2_COMP ((uint32_t)0x0000C000) /*!<COMP[1:0] (Companding mode) */ |
| 8323 | #define SAI_xCR2_COMP_0 ((uint32_t)0x00004000) /*!<Bit 0 */ |
| 8324 | #define SAI_xCR2_COMP_1 ((uint32_t)0x00008000) /*!<Bit 1 */ |
| 8325 | |
| 8326 | /****************** Bit definition for SAI_xFRCR register *******************/ |
| 8327 | #define SAI_xFRCR_FRL ((uint32_t)0x000000FF) /*!<FRL[1:0](Frame length) */ |
| 8328 | #define SAI_xFRCR_FRL_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 8329 | #define SAI_xFRCR_FRL_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 8330 | #define SAI_xFRCR_FRL_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 8331 | #define SAI_xFRCR_FRL_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 8332 | #define SAI_xFRCR_FRL_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 8333 | #define SAI_xFRCR_FRL_5 ((uint32_t)0x00000020) /*!<Bit 5 */ |
| 8334 | #define SAI_xFRCR_FRL_6 ((uint32_t)0x00000040) /*!<Bit 6 */ |
| 8335 | #define SAI_xFRCR_FRL_7 ((uint32_t)0x00000080) /*!<Bit 7 */ |
| 8336 | |
| 8337 | #define SAI_xFRCR_FSALL ((uint32_t)0x00007F00) /*!<FRL[1:0] (Frame synchronization active level length) */ |
| 8338 | #define SAI_xFRCR_FSALL_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 8339 | #define SAI_xFRCR_FSALL_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 8340 | #define SAI_xFRCR_FSALL_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 8341 | #define SAI_xFRCR_FSALL_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 8342 | #define SAI_xFRCR_FSALL_4 ((uint32_t)0x00001000) /*!<Bit 4 */ |
| 8343 | #define SAI_xFRCR_FSALL_5 ((uint32_t)0x00002000) /*!<Bit 5 */ |
| 8344 | #define SAI_xFRCR_FSALL_6 ((uint32_t)0x00004000) /*!<Bit 6 */ |
| 8345 | |
| 8346 | #define SAI_xFRCR_FSDEF ((uint32_t)0x00010000) /*!< Frame Synchronization Definition */ |
| 8347 | #define SAI_xFRCR_FSPO ((uint32_t)0x00020000) /*!<Frame Synchronization POLarity */ |
| 8348 | #define SAI_xFRCR_FSOFF ((uint32_t)0x00040000) /*!<Frame Synchronization OFFset */ |
| 8349 | |
| 8350 | /****************** Bit definition for SAI_xSLOTR register *******************/ |
| 8351 | #define SAI_xSLOTR_FBOFF ((uint32_t)0x0000001F) /*!<FRL[4:0](First Bit Offset) */ |
| 8352 | #define SAI_xSLOTR_FBOFF_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 8353 | #define SAI_xSLOTR_FBOFF_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 8354 | #define SAI_xSLOTR_FBOFF_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 8355 | #define SAI_xSLOTR_FBOFF_3 ((uint32_t)0x00000008) /*!<Bit 3 */ |
| 8356 | #define SAI_xSLOTR_FBOFF_4 ((uint32_t)0x00000010) /*!<Bit 4 */ |
| 8357 | |
| 8358 | #define SAI_xSLOTR_SLOTSZ ((uint32_t)0x000000C0) /*!<SLOTSZ[1:0] (Slot size) */ |
| 8359 | #define SAI_xSLOTR_SLOTSZ_0 ((uint32_t)0x00000040) /*!<Bit 0 */ |
| 8360 | #define SAI_xSLOTR_SLOTSZ_1 ((uint32_t)0x00000080) /*!<Bit 1 */ |
| 8361 | |
| 8362 | #define SAI_xSLOTR_NBSLOT ((uint32_t)0x00000F00) /*!<NBSLOT[3:0] (Number of Slot in audio Frame) */ |
| 8363 | #define SAI_xSLOTR_NBSLOT_0 ((uint32_t)0x00000100) /*!<Bit 0 */ |
| 8364 | #define SAI_xSLOTR_NBSLOT_1 ((uint32_t)0x00000200) /*!<Bit 1 */ |
| 8365 | #define SAI_xSLOTR_NBSLOT_2 ((uint32_t)0x00000400) /*!<Bit 2 */ |
| 8366 | #define SAI_xSLOTR_NBSLOT_3 ((uint32_t)0x00000800) /*!<Bit 3 */ |
| 8367 | |
| 8368 | #define SAI_xSLOTR_SLOTEN ((uint32_t)0xFFFF0000) /*!<SLOTEN[15:0] (Slot Enable) */ |
| 8369 | |
| 8370 | /******************* Bit definition for SAI_xIMR register *******************/ |
| 8371 | #define SAI_xIMR_OVRUDRIE ((uint32_t)0x00000001) /*!<Overrun underrun interrupt enable */ |
| 8372 | #define SAI_xIMR_MUTEDETIE ((uint32_t)0x00000002) /*!<Mute detection interrupt enable */ |
| 8373 | #define SAI_xIMR_WCKCFGIE ((uint32_t)0x00000004) /*!<Wrong Clock Configuration interrupt enable */ |
| 8374 | #define SAI_xIMR_FREQIE ((uint32_t)0x00000008) /*!<FIFO request interrupt enable */ |
| 8375 | #define SAI_xIMR_CNRDYIE ((uint32_t)0x00000010) /*!<Codec not ready interrupt enable */ |
| 8376 | #define SAI_xIMR_AFSDETIE ((uint32_t)0x00000020) /*!<Anticipated frame synchronization detection interrupt enable */ |
| 8377 | #define SAI_xIMR_LFSDETIE ((uint32_t)0x00000040) /*!<Late frame synchronization detection interrupt enable */ |
| 8378 | |
| 8379 | /******************** Bit definition for SAI_xSR register *******************/ |
| 8380 | #define SAI_xSR_OVRUDR ((uint32_t)0x00000001) /*!<Overrun underrun */ |
| 8381 | #define SAI_xSR_MUTEDET ((uint32_t)0x00000002) /*!<Mute detection */ |
| 8382 | #define SAI_xSR_WCKCFG ((uint32_t)0x00000004) /*!<Wrong Clock Configuration */ |
| 8383 | #define SAI_xSR_FREQ ((uint32_t)0x00000008) /*!<FIFO request */ |
| 8384 | #define SAI_xSR_CNRDY ((uint32_t)0x00000010) /*!<Codec not ready */ |
| 8385 | #define SAI_xSR_AFSDET ((uint32_t)0x00000020) /*!<Anticipated frame synchronization detection */ |
| 8386 | #define SAI_xSR_LFSDET ((uint32_t)0x00000040) /*!<Late frame synchronization detection */ |
| 8387 | |
| 8388 | #define SAI_xSR_FLVL ((uint32_t)0x00070000) /*!<FLVL[2:0] (FIFO Level Threshold) */ |
| 8389 | #define SAI_xSR_FLVL_0 ((uint32_t)0x00010000) /*!<Bit 0 */ |
| 8390 | #define SAI_xSR_FLVL_1 ((uint32_t)0x00020000) /*!<Bit 1 */ |
| 8391 | #define SAI_xSR_FLVL_2 ((uint32_t)0x00030000) /*!<Bit 2 */ |
| 8392 | |
| 8393 | /****************** Bit definition for SAI_xCLRFR register ******************/ |
| 8394 | #define SAI_xCLRFR_COVRUDR ((uint32_t)0x00000001) /*!<Clear Overrun underrun */ |
| 8395 | #define SAI_xCLRFR_CMUTEDET ((uint32_t)0x00000002) /*!<Clear Mute detection */ |
| 8396 | #define SAI_xCLRFR_CWCKCFG ((uint32_t)0x00000004) /*!<Clear Wrong Clock Configuration */ |
| 8397 | #define SAI_xCLRFR_CFREQ ((uint32_t)0x00000008) /*!<Clear FIFO request */ |
| 8398 | #define SAI_xCLRFR_CCNRDY ((uint32_t)0x00000010) /*!<Clear Codec not ready */ |
| 8399 | #define SAI_xCLRFR_CAFSDET ((uint32_t)0x00000020) /*!<Clear Anticipated frame synchronization detection */ |
| 8400 | #define SAI_xCLRFR_CLFSDET ((uint32_t)0x00000040) /*!<Clear Late frame synchronization detection */ |
| 8401 | |
| 8402 | /****************** Bit definition for SAI_xDR register ******************/ |
| 8403 | #define SAI_xDR_DATA ((uint32_t)0xFFFFFFFF) |
| 8404 | |
| 8405 | #if defined(STM32F446xx) |
| 8406 | /******************************************************************************/ |
| 8407 | /* */ |
| 8408 | /* SPDIF-RX Interface */ |
| 8409 | /* */ |
| 8410 | /******************************************************************************/ |
| 8411 | /******************** Bit definition for SPDIFRX_CR register *******************/ |
| 8412 | #define SPDIFRX_CR_SPDIFEN ((uint32_t)0x00000003) /*!<Peripheral Block Enable */ |
| 8413 | #define SPDIFRX_CR_RXDMAEN ((uint32_t)0x00000004) /*!<Receiver DMA Enable for data flow */ |
| 8414 | #define SPDIFRX_CR_RXSTEO ((uint32_t)0x00000008) /*!<Stereo Mode */ |
| 8415 | #define SPDIFRX_CR_DRFMT ((uint32_t)0x00000030) /*!<RX Data format */ |
| 8416 | #define SPDIFRX_CR_PMSK ((uint32_t)0x00000040) /*!<Mask Parity error bit */ |
| 8417 | #define SPDIFRX_CR_VMSK ((uint32_t)0x00000080) /*!<Mask of Validity bit */ |
| 8418 | #define SPDIFRX_CR_CUMSK ((uint32_t)0x00000100) /*!<Mask of channel status and user bits */ |
| 8419 | #define SPDIFRX_CR_PTMSK ((uint32_t)0x00000200) /*!<Mask of Preamble Type bits */ |
| 8420 | #define SPDIFRX_CR_CBDMAEN ((uint32_t)0x00000400) /*!<Control Buffer DMA ENable for control flow */ |
| 8421 | #define SPDIFRX_CR_CHSEL ((uint32_t)0x00000800) /*!<Channel Selection */ |
| 8422 | #define SPDIFRX_CR_NBTR ((uint32_t)0x00003000) /*!<Maximum allowed re-tries during synchronization phase */ |
| 8423 | #define SPDIFRX_CR_WFA ((uint32_t)0x00004000) /*!<Wait For Activity */ |
| 8424 | #define SPDIFRX_CR_INSEL ((uint32_t)0x00070000) /*!<SPDIFRX input selection */ |
| 8425 | |
| 8426 | /******************* Bit definition for SPDIFRX_IMR register *******************/ |
| 8427 | #define SPDIFRX_IMR_RXNEIE ((uint32_t)0x00000001) /*!<RXNE interrupt enable */ |
| 8428 | #define SPDIFRX_IMR_CSRNEIE ((uint32_t)0x00000002) /*!<Control Buffer Ready Interrupt Enable */ |
| 8429 | #define SPDIFRX_IMR_PERRIE ((uint32_t)0x00000004) /*!<Parity error interrupt enable */ |
| 8430 | #define SPDIFRX_IMR_OVRIE ((uint32_t)0x00000008) /*!<Overrun error Interrupt Enable */ |
| 8431 | #define SPDIFRX_IMR_SBLKIE ((uint32_t)0x00000010) /*!<Synchronization Block Detected Interrupt Enable */ |
| 8432 | #define SPDIFRX_IMR_SYNCDIE ((uint32_t)0x00000020) /*!<Synchronization Done */ |
| 8433 | #define SPDIFRX_IMR_IFEIE ((uint32_t)0x00000040) /*!<Serial Interface Error Interrupt Enable */ |
| 8434 | |
| 8435 | /******************* Bit definition for SPDIFRX_SR register *******************/ |
| 8436 | #define SPDIFRX_SR_RXNE ((uint32_t)0x00000001) /*!<Read data register not empty */ |
| 8437 | #define SPDIFRX_SR_CSRNE ((uint32_t)0x00000002) /*!<The Control Buffer register is not empty */ |
| 8438 | #define SPDIFRX_SR_PERR ((uint32_t)0x00000004) /*!<Parity error */ |
| 8439 | #define SPDIFRX_SR_OVR ((uint32_t)0x00000008) /*!<Overrun error */ |
| 8440 | #define SPDIFRX_SR_SBD ((uint32_t)0x00000010) /*!<Synchronization Block Detected */ |
| 8441 | #define SPDIFRX_SR_SYNCD ((uint32_t)0x00000020) /*!<Synchronization Done */ |
| 8442 | #define SPDIFRX_SR_FERR ((uint32_t)0x00000040) /*!<Framing error */ |
| 8443 | #define SPDIFRX_SR_SERR ((uint32_t)0x00000080) /*!<Synchronization error */ |
| 8444 | #define SPDIFRX_SR_TERR ((uint32_t)0x00000100) /*!<Time-out error */ |
| 8445 | #define SPDIFRX_SR_WIDTH5 ((uint32_t)0x7FFF0000) /*!<Duration of 5 symbols counted with SPDIFRX_clk */ |
| 8446 | |
| 8447 | /******************* Bit definition for SPDIFRX_IFCR register *******************/ |
| 8448 | #define SPDIFRX_IFCR_PERRCF ((uint32_t)0x00000004) /*!<Clears the Parity error flag */ |
| 8449 | #define SPDIFRX_IFCR_OVRCF ((uint32_t)0x00000008) /*!<Clears the Overrun error flag */ |
| 8450 | #define SPDIFRX_IFCR_SBDCF ((uint32_t)0x00000010) /*!<Clears the Synchronization Block Detected flag */ |
| 8451 | #define SPDIFRX_IFCR_SYNCDCF ((uint32_t)0x00000020) /*!<Clears the Synchronization Done flag */ |
| 8452 | |
| 8453 | /******************* Bit definition for SPDIFRX_DR register (DRFMT = 0b00 case) *******************/ |
| 8454 | #define SPDIFRX_DR0_DR ((uint32_t)0x00FFFFFF) /*!<Data value */ |
| 8455 | #define SPDIFRX_DR0_PE ((uint32_t)0x01000000) /*!<Parity Error bit */ |
| 8456 | #define SPDIFRX_DR0_V ((uint32_t)0x02000000) /*!<Validity bit */ |
| 8457 | #define SPDIFRX_DR0_U ((uint32_t)0x04000000) /*!<User bit */ |
| 8458 | #define SPDIFRX_DR0_C ((uint32_t)0x08000000) /*!<Channel Status bit */ |
| 8459 | #define SPDIFRX_DR0_PT ((uint32_t)0x30000000) /*!<Preamble Type */ |
| 8460 | |
| 8461 | /******************* Bit definition for SPDIFRX_DR register (DRFMT = 0b01 case) *******************/ |
| 8462 | #define SPDIFRX_DR1_DR ((uint32_t)0xFFFFFF00) /*!<Data value */ |
| 8463 | #define SPDIFRX_DR1_PT ((uint32_t)0x00000030) /*!<Preamble Type */ |
| 8464 | #define SPDIFRX_DR1_C ((uint32_t)0x00000008) /*!<Channel Status bit */ |
| 8465 | #define SPDIFRX_DR1_U ((uint32_t)0x00000004) /*!<User bit */ |
| 8466 | #define SPDIFRX_DR1_V ((uint32_t)0x00000002) /*!<Validity bit */ |
| 8467 | #define SPDIFRX_DR1_PE ((uint32_t)0x00000001) /*!<Parity Error bit */ |
| 8468 | |
| 8469 | /******************* Bit definition for SPDIFRX_DR register (DRFMT = 0b10 case) *******************/ |
| 8470 | #define SPDIFRX_DR1_DRNL1 ((uint32_t)0xFFFF0000) /*!<Data value Channel B */ |
| 8471 | #define SPDIFRX_DR1_DRNL2 ((uint32_t)0x0000FFFF) /*!<Data value Channel A */ |
| 8472 | |
| 8473 | /******************* Bit definition for SPDIFRX_CSR register *******************/ |
| 8474 | #define SPDIFRX_CSR_USR ((uint32_t)0x0000FFFF) /*!<User data information */ |
| 8475 | #define SPDIFRX_CSR_CS ((uint32_t)0x00FF0000) /*!<Channel A status information */ |
| 8476 | #define SPDIFRX_CSR_SOB ((uint32_t)0x01000000) /*!<Start Of Block */ |
| 8477 | |
| 8478 | /******************* Bit definition for SPDIFRX_DIR register *******************/ |
| 8479 | #define SPDIFRX_DIR_THI ((uint32_t)0x000013FF) /*!<Threshold LOW */ |
| 8480 | #define SPDIFRX_DIR_TLO ((uint32_t)0x1FFF0000) /*!<Threshold HIGH */ |
| 8481 | #endif /* STM32F446xx */ |
| 8482 | |
| 8483 | /******************************************************************************/ |
| 8484 | /* */ |
| 8485 | /* SD host Interface */ |
| 8486 | /* */ |
| 8487 | /******************************************************************************/ |
| 8488 | /****************** Bit definition for SDIO_POWER register ******************/ |
| 8489 | #define SDIO_POWER_PWRCTRL ((uint8_t)0x03) /*!<PWRCTRL[1:0] bits (Power supply control bits) */ |
| 8490 | #define SDIO_POWER_PWRCTRL_0 ((uint8_t)0x01) /*!<Bit 0 */ |
| 8491 | #define SDIO_POWER_PWRCTRL_1 ((uint8_t)0x02) /*!<Bit 1 */ |
| 8492 | |
| 8493 | /****************** Bit definition for SDIO_CLKCR register ******************/ |
| 8494 | #define SDIO_CLKCR_CLKDIV ((uint16_t)0x00FF) /*!<Clock divide factor */ |
| 8495 | #define SDIO_CLKCR_CLKEN ((uint16_t)0x0100) /*!<Clock enable bit */ |
| 8496 | #define SDIO_CLKCR_PWRSAV ((uint16_t)0x0200) /*!<Power saving configuration bit */ |
| 8497 | #define SDIO_CLKCR_BYPASS ((uint16_t)0x0400) /*!<Clock divider bypass enable bit */ |
| 8498 | |
| 8499 | #define SDIO_CLKCR_WIDBUS ((uint16_t)0x1800) /*!<WIDBUS[1:0] bits (Wide bus mode enable bit) */ |
| 8500 | #define SDIO_CLKCR_WIDBUS_0 ((uint16_t)0x0800) /*!<Bit 0 */ |
| 8501 | #define SDIO_CLKCR_WIDBUS_1 ((uint16_t)0x1000) /*!<Bit 1 */ |
| 8502 | |
| 8503 | #define SDIO_CLKCR_NEGEDGE ((uint16_t)0x2000) /*!<SDIO_CK dephasing selection bit */ |
| 8504 | #define SDIO_CLKCR_HWFC_EN ((uint16_t)0x4000) /*!<HW Flow Control enable */ |
| 8505 | |
| 8506 | /******************* Bit definition for SDIO_ARG register *******************/ |
| 8507 | #define SDIO_ARG_CMDARG ((uint32_t)0xFFFFFFFF) /*!<Command argument */ |
| 8508 | |
| 8509 | /******************* Bit definition for SDIO_CMD register *******************/ |
| 8510 | #define SDIO_CMD_CMDINDEX ((uint16_t)0x003F) /*!<Command Index */ |
| 8511 | |
| 8512 | #define SDIO_CMD_WAITRESP ((uint16_t)0x00C0) /*!<WAITRESP[1:0] bits (Wait for response bits) */ |
| 8513 | #define SDIO_CMD_WAITRESP_0 ((uint16_t)0x0040) /*!< Bit 0 */ |
| 8514 | #define SDIO_CMD_WAITRESP_1 ((uint16_t)0x0080) /*!< Bit 1 */ |
| 8515 | |
| 8516 | #define SDIO_CMD_WAITINT ((uint16_t)0x0100) /*!<CPSM Waits for Interrupt Request */ |
| 8517 | #define SDIO_CMD_WAITPEND ((uint16_t)0x0200) /*!<CPSM Waits for ends of data transfer (CmdPend internal signal) */ |
| 8518 | #define SDIO_CMD_CPSMEN ((uint16_t)0x0400) /*!<Command path state machine (CPSM) Enable bit */ |
| 8519 | #define SDIO_CMD_SDIOSUSPEND ((uint16_t)0x0800) /*!<SD I/O suspend command */ |
| 8520 | #define SDIO_CMD_ENCMDCOMPL ((uint16_t)0x1000) /*!<Enable CMD completion */ |
| 8521 | #define SDIO_CMD_NIEN ((uint16_t)0x2000) /*!<Not Interrupt Enable */ |
| 8522 | #define SDIO_CMD_CEATACMD ((uint16_t)0x4000) /*!<CE-ATA command */ |
| 8523 | |
| 8524 | /***************** Bit definition for SDIO_RESPCMD register *****************/ |
| 8525 | #define SDIO_RESPCMD_RESPCMD ((uint8_t)0x3F) /*!<Response command index */ |
| 8526 | |
| 8527 | /****************** Bit definition for SDIO_RESP0 register ******************/ |
| 8528 | #define SDIO_RESP0_CARDSTATUS0 ((uint32_t)0xFFFFFFFF) /*!<Card Status */ |
| 8529 | |
| 8530 | /****************** Bit definition for SDIO_RESP1 register ******************/ |
| 8531 | #define SDIO_RESP1_CARDSTATUS1 ((uint32_t)0xFFFFFFFF) /*!<Card Status */ |
| 8532 | |
| 8533 | /****************** Bit definition for SDIO_RESP2 register ******************/ |
| 8534 | #define SDIO_RESP2_CARDSTATUS2 ((uint32_t)0xFFFFFFFF) /*!<Card Status */ |
| 8535 | |
| 8536 | /****************** Bit definition for SDIO_RESP3 register ******************/ |
| 8537 | #define SDIO_RESP3_CARDSTATUS3 ((uint32_t)0xFFFFFFFF) /*!<Card Status */ |
| 8538 | |
| 8539 | /****************** Bit definition for SDIO_RESP4 register ******************/ |
| 8540 | #define SDIO_RESP4_CARDSTATUS4 ((uint32_t)0xFFFFFFFF) /*!<Card Status */ |
| 8541 | |
| 8542 | /****************** Bit definition for SDIO_DTIMER register *****************/ |
| 8543 | #define SDIO_DTIMER_DATATIME ((uint32_t)0xFFFFFFFF) /*!<Data timeout period. */ |
| 8544 | |
| 8545 | /****************** Bit definition for SDIO_DLEN register *******************/ |
| 8546 | #define SDIO_DLEN_DATALENGTH ((uint32_t)0x01FFFFFF) /*!<Data length value */ |
| 8547 | |
| 8548 | /****************** Bit definition for SDIO_DCTRL register ******************/ |
| 8549 | #define SDIO_DCTRL_DTEN ((uint16_t)0x0001) /*!<Data transfer enabled bit */ |
| 8550 | #define SDIO_DCTRL_DTDIR ((uint16_t)0x0002) /*!<Data transfer direction selection */ |
| 8551 | #define SDIO_DCTRL_DTMODE ((uint16_t)0x0004) /*!<Data transfer mode selection */ |
| 8552 | #define SDIO_DCTRL_DMAEN ((uint16_t)0x0008) /*!<DMA enabled bit */ |
| 8553 | |
| 8554 | #define SDIO_DCTRL_DBLOCKSIZE ((uint16_t)0x00F0) /*!<DBLOCKSIZE[3:0] bits (Data block size) */ |
| 8555 | #define SDIO_DCTRL_DBLOCKSIZE_0 ((uint16_t)0x0010) /*!<Bit 0 */ |
| 8556 | #define SDIO_DCTRL_DBLOCKSIZE_1 ((uint16_t)0x0020) /*!<Bit 1 */ |
| 8557 | #define SDIO_DCTRL_DBLOCKSIZE_2 ((uint16_t)0x0040) /*!<Bit 2 */ |
| 8558 | #define SDIO_DCTRL_DBLOCKSIZE_3 ((uint16_t)0x0080) /*!<Bit 3 */ |
| 8559 | |
| 8560 | #define SDIO_DCTRL_RWSTART ((uint16_t)0x0100) /*!<Read wait start */ |
| 8561 | #define SDIO_DCTRL_RWSTOP ((uint16_t)0x0200) /*!<Read wait stop */ |
| 8562 | #define SDIO_DCTRL_RWMOD ((uint16_t)0x0400) /*!<Read wait mode */ |
| 8563 | #define SDIO_DCTRL_SDIOEN ((uint16_t)0x0800) /*!<SD I/O enable functions */ |
| 8564 | |
| 8565 | /****************** Bit definition for SDIO_DCOUNT register *****************/ |
| 8566 | #define SDIO_DCOUNT_DATACOUNT ((uint32_t)0x01FFFFFF) /*!<Data count value */ |
| 8567 | |
| 8568 | /****************** Bit definition for SDIO_STA register ********************/ |
| 8569 | #define SDIO_STA_CCRCFAIL ((uint32_t)0x00000001) /*!<Command response received (CRC check failed) */ |
| 8570 | #define SDIO_STA_DCRCFAIL ((uint32_t)0x00000002) /*!<Data block sent/received (CRC check failed) */ |
| 8571 | #define SDIO_STA_CTIMEOUT ((uint32_t)0x00000004) /*!<Command response timeout */ |
| 8572 | #define SDIO_STA_DTIMEOUT ((uint32_t)0x00000008) /*!<Data timeout */ |
| 8573 | #define SDIO_STA_TXUNDERR ((uint32_t)0x00000010) /*!<Transmit FIFO underrun error */ |
| 8574 | #define SDIO_STA_RXOVERR ((uint32_t)0x00000020) /*!<Received FIFO overrun error */ |
| 8575 | #define SDIO_STA_CMDREND ((uint32_t)0x00000040) /*!<Command response received (CRC check passed) */ |
| 8576 | #define SDIO_STA_CMDSENT ((uint32_t)0x00000080) /*!<Command sent (no response required) */ |
| 8577 | #define SDIO_STA_DATAEND ((uint32_t)0x00000100) /*!<Data end (data counter, SDIDCOUNT, is zero) */ |
| 8578 | #define SDIO_STA_STBITERR ((uint32_t)0x00000200) /*!<Start bit not detected on all data signals in wide bus mode */ |
| 8579 | #define SDIO_STA_DBCKEND ((uint32_t)0x00000400) /*!<Data block sent/received (CRC check passed) */ |
| 8580 | #define SDIO_STA_CMDACT ((uint32_t)0x00000800) /*!<Command transfer in progress */ |
| 8581 | #define SDIO_STA_TXACT ((uint32_t)0x00001000) /*!<Data transmit in progress */ |
| 8582 | #define SDIO_STA_RXACT ((uint32_t)0x00002000) /*!<Data receive in progress */ |
| 8583 | #define SDIO_STA_TXFIFOHE ((uint32_t)0x00004000) /*!<Transmit FIFO Half Empty: at least 8 words can be written into the FIFO */ |
| 8584 | #define SDIO_STA_RXFIFOHF ((uint32_t)0x00008000) /*!<Receive FIFO Half Full: there are at least 8 words in the FIFO */ |
| 8585 | #define SDIO_STA_TXFIFOF ((uint32_t)0x00010000) /*!<Transmit FIFO full */ |
| 8586 | #define SDIO_STA_RXFIFOF ((uint32_t)0x00020000) /*!<Receive FIFO full */ |
| 8587 | #define SDIO_STA_TXFIFOE ((uint32_t)0x00040000) /*!<Transmit FIFO empty */ |
| 8588 | #define SDIO_STA_RXFIFOE ((uint32_t)0x00080000) /*!<Receive FIFO empty */ |
| 8589 | #define SDIO_STA_TXDAVL ((uint32_t)0x00100000) /*!<Data available in transmit FIFO */ |
| 8590 | #define SDIO_STA_RXDAVL ((uint32_t)0x00200000) /*!<Data available in receive FIFO */ |
| 8591 | #define SDIO_STA_SDIOIT ((uint32_t)0x00400000) /*!<SDIO interrupt received */ |
| 8592 | #define SDIO_STA_CEATAEND ((uint32_t)0x00800000) /*!<CE-ATA command completion signal received for CMD61 */ |
| 8593 | |
| 8594 | /******************* Bit definition for SDIO_ICR register *******************/ |
| 8595 | #define SDIO_ICR_CCRCFAILC ((uint32_t)0x00000001) /*!<CCRCFAIL flag clear bit */ |
| 8596 | #define SDIO_ICR_DCRCFAILC ((uint32_t)0x00000002) /*!<DCRCFAIL flag clear bit */ |
| 8597 | #define SDIO_ICR_CTIMEOUTC ((uint32_t)0x00000004) /*!<CTIMEOUT flag clear bit */ |
| 8598 | #define SDIO_ICR_DTIMEOUTC ((uint32_t)0x00000008) /*!<DTIMEOUT flag clear bit */ |
| 8599 | #define SDIO_ICR_TXUNDERRC ((uint32_t)0x00000010) /*!<TXUNDERR flag clear bit */ |
| 8600 | #define SDIO_ICR_RXOVERRC ((uint32_t)0x00000020) /*!<RXOVERR flag clear bit */ |
| 8601 | #define SDIO_ICR_CMDRENDC ((uint32_t)0x00000040) /*!<CMDREND flag clear bit */ |
| 8602 | #define SDIO_ICR_CMDSENTC ((uint32_t)0x00000080) /*!<CMDSENT flag clear bit */ |
| 8603 | #define SDIO_ICR_DATAENDC ((uint32_t)0x00000100) /*!<DATAEND flag clear bit */ |
| 8604 | #define SDIO_ICR_STBITERRC ((uint32_t)0x00000200) /*!<STBITERR flag clear bit */ |
| 8605 | #define SDIO_ICR_DBCKENDC ((uint32_t)0x00000400) /*!<DBCKEND flag clear bit */ |
| 8606 | #define SDIO_ICR_SDIOITC ((uint32_t)0x00400000) /*!<SDIOIT flag clear bit */ |
| 8607 | #define SDIO_ICR_CEATAENDC ((uint32_t)0x00800000) /*!<CEATAEND flag clear bit */ |
| 8608 | |
| 8609 | /****************** Bit definition for SDIO_MASK register *******************/ |
| 8610 | #define SDIO_MASK_CCRCFAILIE ((uint32_t)0x00000001) /*!<Command CRC Fail Interrupt Enable */ |
| 8611 | #define SDIO_MASK_DCRCFAILIE ((uint32_t)0x00000002) /*!<Data CRC Fail Interrupt Enable */ |
| 8612 | #define SDIO_MASK_CTIMEOUTIE ((uint32_t)0x00000004) /*!<Command TimeOut Interrupt Enable */ |
| 8613 | #define SDIO_MASK_DTIMEOUTIE ((uint32_t)0x00000008) /*!<Data TimeOut Interrupt Enable */ |
| 8614 | #define SDIO_MASK_TXUNDERRIE ((uint32_t)0x00000010) /*!<Tx FIFO UnderRun Error Interrupt Enable */ |
| 8615 | #define SDIO_MASK_RXOVERRIE ((uint32_t)0x00000020) /*!<Rx FIFO OverRun Error Interrupt Enable */ |
| 8616 | #define SDIO_MASK_CMDRENDIE ((uint32_t)0x00000040) /*!<Command Response Received Interrupt Enable */ |
| 8617 | #define SDIO_MASK_CMDSENTIE ((uint32_t)0x00000080) /*!<Command Sent Interrupt Enable */ |
| 8618 | #define SDIO_MASK_DATAENDIE ((uint32_t)0x00000100) /*!<Data End Interrupt Enable */ |
| 8619 | #define SDIO_MASK_STBITERRIE ((uint32_t)0x00000200) /*!<Start Bit Error Interrupt Enable */ |
| 8620 | #define SDIO_MASK_DBCKENDIE ((uint32_t)0x00000400) /*!<Data Block End Interrupt Enable */ |
| 8621 | #define SDIO_MASK_CMDACTIE ((uint32_t)0x00000800) /*!<CCommand Acting Interrupt Enable */ |
| 8622 | #define SDIO_MASK_TXACTIE ((uint32_t)0x00001000) /*!<Data Transmit Acting Interrupt Enable */ |
| 8623 | #define SDIO_MASK_RXACTIE ((uint32_t)0x00002000) /*!<Data receive acting interrupt enabled */ |
| 8624 | #define SDIO_MASK_TXFIFOHEIE ((uint32_t)0x00004000) /*!<Tx FIFO Half Empty interrupt Enable */ |
| 8625 | #define SDIO_MASK_RXFIFOHFIE ((uint32_t)0x00008000) /*!<Rx FIFO Half Full interrupt Enable */ |
| 8626 | #define SDIO_MASK_TXFIFOFIE ((uint32_t)0x00010000) /*!<Tx FIFO Full interrupt Enable */ |
| 8627 | #define SDIO_MASK_RXFIFOFIE ((uint32_t)0x00020000) /*!<Rx FIFO Full interrupt Enable */ |
| 8628 | #define SDIO_MASK_TXFIFOEIE ((uint32_t)0x00040000) /*!<Tx FIFO Empty interrupt Enable */ |
| 8629 | #define SDIO_MASK_RXFIFOEIE ((uint32_t)0x00080000) /*!<Rx FIFO Empty interrupt Enable */ |
| 8630 | #define SDIO_MASK_TXDAVLIE ((uint32_t)0x00100000) /*!<Data available in Tx FIFO interrupt Enable */ |
| 8631 | #define SDIO_MASK_RXDAVLIE ((uint32_t)0x00200000) /*!<Data available in Rx FIFO interrupt Enable */ |
| 8632 | #define SDIO_MASK_SDIOITIE ((uint32_t)0x00400000) /*!<SDIO Mode Interrupt Received interrupt Enable */ |
| 8633 | #define SDIO_MASK_CEATAENDIE ((uint32_t)0x00800000) /*!<CE-ATA command completion signal received Interrupt Enable */ |
| 8634 | |
| 8635 | /***************** Bit definition for SDIO_FIFOCNT register *****************/ |
| 8636 | #define SDIO_FIFOCNT_FIFOCOUNT ((uint32_t)0x00FFFFFF) /*!<Remaining number of words to be written to or read from the FIFO */ |
| 8637 | |
| 8638 | /****************** Bit definition for SDIO_FIFO register *******************/ |
| 8639 | #define SDIO_FIFO_FIFODATA ((uint32_t)0xFFFFFFFF) /*!<Receive and transmit FIFO data */ |
| 8640 | |
| 8641 | /******************************************************************************/ |
| 8642 | /* */ |
| 8643 | /* Serial Peripheral Interface */ |
| 8644 | /* */ |
| 8645 | /******************************************************************************/ |
| 8646 | /******************* Bit definition for SPI_CR1 register ********************/ |
| 8647 | #define SPI_CR1_CPHA ((uint16_t)0x0001) /*!<Clock Phase */ |
| 8648 | #define SPI_CR1_CPOL ((uint16_t)0x0002) /*!<Clock Polarity */ |
| 8649 | #define SPI_CR1_MSTR ((uint16_t)0x0004) /*!<Master Selection */ |
| 8650 | |
| 8651 | #define SPI_CR1_BR ((uint16_t)0x0038) /*!<BR[2:0] bits (Baud Rate Control) */ |
| 8652 | #define SPI_CR1_BR_0 ((uint16_t)0x0008) /*!<Bit 0 */ |
| 8653 | #define SPI_CR1_BR_1 ((uint16_t)0x0010) /*!<Bit 1 */ |
| 8654 | #define SPI_CR1_BR_2 ((uint16_t)0x0020) /*!<Bit 2 */ |
| 8655 | |
| 8656 | #define SPI_CR1_SPE ((uint16_t)0x0040) /*!<SPI Enable */ |
| 8657 | #define SPI_CR1_LSBFIRST ((uint16_t)0x0080) /*!<Frame Format */ |
| 8658 | #define SPI_CR1_SSI ((uint16_t)0x0100) /*!<Internal slave select */ |
| 8659 | #define SPI_CR1_SSM ((uint16_t)0x0200) /*!<Software slave management */ |
| 8660 | #define SPI_CR1_RXONLY ((uint16_t)0x0400) /*!<Receive only */ |
| 8661 | #define SPI_CR1_DFF ((uint16_t)0x0800) /*!<Data Frame Format */ |
| 8662 | #define SPI_CR1_CRCNEXT ((uint16_t)0x1000) /*!<Transmit CRC next */ |
| 8663 | #define SPI_CR1_CRCEN ((uint16_t)0x2000) /*!<Hardware CRC calculation enable */ |
| 8664 | #define SPI_CR1_BIDIOE ((uint16_t)0x4000) /*!<Output enable in bidirectional mode */ |
| 8665 | #define SPI_CR1_BIDIMODE ((uint16_t)0x8000) /*!<Bidirectional data mode enable */ |
| 8666 | |
| 8667 | /******************* Bit definition for SPI_CR2 register ********************/ |
| 8668 | #define SPI_CR2_RXDMAEN ((uint8_t)0x01) /*!<Rx Buffer DMA Enable */ |
| 8669 | #define SPI_CR2_TXDMAEN ((uint8_t)0x02) /*!<Tx Buffer DMA Enable */ |
| 8670 | #define SPI_CR2_SSOE ((uint8_t)0x04) /*!<SS Output Enable */ |
| 8671 | #define SPI_CR2_ERRIE ((uint8_t)0x20) /*!<Error Interrupt Enable */ |
| 8672 | #define SPI_CR2_RXNEIE ((uint8_t)0x40) /*!<RX buffer Not Empty Interrupt Enable */ |
| 8673 | #define SPI_CR2_TXEIE ((uint8_t)0x80) /*!<Tx buffer Empty Interrupt Enable */ |
| 8674 | |
| 8675 | /******************** Bit definition for SPI_SR register ********************/ |
| 8676 | #define SPI_SR_RXNE ((uint8_t)0x01) /*!<Receive buffer Not Empty */ |
| 8677 | #define SPI_SR_TXE ((uint8_t)0x02) /*!<Transmit buffer Empty */ |
| 8678 | #define SPI_SR_CHSIDE ((uint8_t)0x04) /*!<Channel side */ |
| 8679 | #define SPI_SR_UDR ((uint8_t)0x08) /*!<Underrun flag */ |
| 8680 | #define SPI_SR_CRCERR ((uint8_t)0x10) /*!<CRC Error flag */ |
| 8681 | #define SPI_SR_MODF ((uint8_t)0x20) /*!<Mode fault */ |
| 8682 | #define SPI_SR_OVR ((uint8_t)0x40) /*!<Overrun flag */ |
| 8683 | #define SPI_SR_BSY ((uint8_t)0x80) /*!<Busy flag */ |
| 8684 | |
| 8685 | /******************** Bit definition for SPI_DR register ********************/ |
| 8686 | #define SPI_DR_DR ((uint16_t)0xFFFF) /*!<Data Register */ |
| 8687 | |
| 8688 | /******************* Bit definition for SPI_CRCPR register ******************/ |
| 8689 | #define SPI_CRCPR_CRCPOLY ((uint16_t)0xFFFF) /*!<CRC polynomial register */ |
| 8690 | |
| 8691 | /****************** Bit definition for SPI_RXCRCR register ******************/ |
| 8692 | #define SPI_RXCRCR_RXCRC ((uint16_t)0xFFFF) /*!<Rx CRC Register */ |
| 8693 | |
| 8694 | /****************** Bit definition for SPI_TXCRCR register ******************/ |
| 8695 | #define SPI_TXCRCR_TXCRC ((uint16_t)0xFFFF) /*!<Tx CRC Register */ |
| 8696 | |
| 8697 | /****************** Bit definition for SPI_I2SCFGR register *****************/ |
| 8698 | #define SPI_I2SCFGR_CHLEN ((uint16_t)0x0001) /*!<Channel length (number of bits per audio channel) */ |
| 8699 | |
| 8700 | #define SPI_I2SCFGR_DATLEN ((uint16_t)0x0006) /*!<DATLEN[1:0] bits (Data length to be transferred) */ |
| 8701 | #define SPI_I2SCFGR_DATLEN_0 ((uint16_t)0x0002) /*!<Bit 0 */ |
| 8702 | #define SPI_I2SCFGR_DATLEN_1 ((uint16_t)0x0004) /*!<Bit 1 */ |
| 8703 | |
| 8704 | #define SPI_I2SCFGR_CKPOL ((uint16_t)0x0008) /*!<steady state clock polarity */ |
| 8705 | |
| 8706 | #define SPI_I2SCFGR_I2SSTD ((uint16_t)0x0030) /*!<I2SSTD[1:0] bits (I2S standard selection) */ |
| 8707 | #define SPI_I2SCFGR_I2SSTD_0 ((uint16_t)0x0010) /*!<Bit 0 */ |
| 8708 | #define SPI_I2SCFGR_I2SSTD_1 ((uint16_t)0x0020) /*!<Bit 1 */ |
| 8709 | |
| 8710 | #define SPI_I2SCFGR_PCMSYNC ((uint16_t)0x0080) /*!<PCM frame synchronization */ |
| 8711 | |
| 8712 | #define SPI_I2SCFGR_I2SCFG ((uint16_t)0x0300) /*!<I2SCFG[1:0] bits (I2S configuration mode) */ |
| 8713 | #define SPI_I2SCFGR_I2SCFG_0 ((uint16_t)0x0100) /*!<Bit 0 */ |
| 8714 | #define SPI_I2SCFGR_I2SCFG_1 ((uint16_t)0x0200) /*!<Bit 1 */ |
| 8715 | |
| 8716 | #define SPI_I2SCFGR_I2SE ((uint16_t)0x0400) /*!<I2S Enable */ |
| 8717 | #define SPI_I2SCFGR_I2SMOD ((uint16_t)0x0800) /*!<I2S mode selection */ |
| 8718 | |
| 8719 | /****************** Bit definition for SPI_I2SPR register *******************/ |
| 8720 | #define SPI_I2SPR_I2SDIV ((uint16_t)0x00FF) /*!<I2S Linear prescaler */ |
| 8721 | #define SPI_I2SPR_ODD ((uint16_t)0x0100) /*!<Odd factor for the prescaler */ |
| 8722 | #define SPI_I2SPR_MCKOE ((uint16_t)0x0200) /*!<Master Clock Output Enable */ |
| 8723 | |
| 8724 | /******************************************************************************/ |
| 8725 | /* */ |
| 8726 | /* SYSCFG */ |
| 8727 | /* */ |
| 8728 | /******************************************************************************/ |
| 8729 | /****************** Bit definition for SYSCFG_MEMRMP register ***************/ |
| 8730 | #define SYSCFG_MEMRMP_MEM_MODE ((uint32_t)0x00000007) /*!< SYSCFG_Memory Remap Config */ |
| 8731 | #define SYSCFG_MEMRMP_MEM_MODE_0 ((uint32_t)0x00000001) /*!<Bit 0 */ |
| 8732 | #define SYSCFG_MEMRMP_MEM_MODE_1 ((uint32_t)0x00000002) /*!<Bit 1 */ |
| 8733 | #define SYSCFG_MEMRMP_MEM_MODE_2 ((uint32_t)0x00000004) /*!<Bit 2 */ |
| 8734 | |
| 8735 | #define SYSCFG_MEMRMP_FB_MODE ((uint32_t)0x00000100) /*!< User Flash Bank mode */ |
| 8736 | |
| 8737 | #define SYSCFG_MEMRMP_SWP_FMC ((uint32_t)0x00000C00) /*!< FMC memory mapping swap */ |
| 8738 | #define SYSCFG_MEMRMP_SWP_FMC_0 ((uint32_t)0x00000400) /*!<Bit 0 */ |
| 8739 | #define SYSCFG_MEMRMP_SWP_FMC_1 ((uint32_t)0x00000800) /*!<Bit 1 */ |
| 8740 | |
| 8741 | |
| 8742 | /****************** Bit definition for SYSCFG_PMC register ******************/ |
| 8743 | #define SYSCFG_PMC_ADCxDC2 ((uint32_t)0x00070000) /*!< Refer to AN4073 on how to use this bit */ |
| 8744 | #define SYSCFG_PMC_ADC1DC2 ((uint32_t)0x00010000) /*!< Refer to AN4073 on how to use this bit */ |
| 8745 | #define SYSCFG_PMC_ADC2DC2 ((uint32_t)0x00020000) /*!< Refer to AN4073 on how to use this bit */ |
| 8746 | #define SYSCFG_PMC_ADC3DC2 ((uint32_t)0x00040000) /*!< Refer to AN4073 on how to use this bit */ |
| 8747 | |
| 8748 | #define SYSCFG_PMC_MII_RMII_SEL ((uint32_t)0x00800000) /*!<Ethernet PHY interface selection */ |
| 8749 | /* Old MII_RMII_SEL bit definition, maintained for legacy purpose */ |
| 8750 | #define SYSCFG_PMC_MII_RMII SYSCFG_PMC_MII_RMII_SEL |
| 8751 | |
| 8752 | /***************** Bit definition for SYSCFG_EXTICR1 register ***************/ |
| 8753 | #define SYSCFG_EXTICR1_EXTI0 ((uint16_t)0x000F) /*!<EXTI 0 configuration */ |
| 8754 | #define SYSCFG_EXTICR1_EXTI1 ((uint16_t)0x00F0) /*!<EXTI 1 configuration */ |
| 8755 | #define SYSCFG_EXTICR1_EXTI2 ((uint16_t)0x0F00) /*!<EXTI 2 configuration */ |
| 8756 | #define SYSCFG_EXTICR1_EXTI3 ((uint16_t)0xF000) /*!<EXTI 3 configuration */ |
| 8757 | /** |
| 8758 | * @brief EXTI0 configuration |
| 8759 | */ |
| 8760 | #define SYSCFG_EXTICR1_EXTI0_PA ((uint16_t)0x0000) /*!<PA[0] pin */ |
| 8761 | #define SYSCFG_EXTICR1_EXTI0_PB ((uint16_t)0x0001) /*!<PB[0] pin */ |
| 8762 | #define SYSCFG_EXTICR1_EXTI0_PC ((uint16_t)0x0002) /*!<PC[0] pin */ |
| 8763 | #define SYSCFG_EXTICR1_EXTI0_PD ((uint16_t)0x0003) /*!<PD[0] pin */ |
| 8764 | #define SYSCFG_EXTICR1_EXTI0_PE ((uint16_t)0x0004) /*!<PE[0] pin */ |
| 8765 | #define SYSCFG_EXTICR1_EXTI0_PF ((uint16_t)0x0005) /*!<PF[0] pin */ |
| 8766 | #define SYSCFG_EXTICR1_EXTI0_PG ((uint16_t)0x0006) /*!<PG[0] pin */ |
| 8767 | #define SYSCFG_EXTICR1_EXTI0_PH ((uint16_t)0x0007) /*!<PH[0] pin */ |
| 8768 | #define SYSCFG_EXTICR1_EXTI0_PI ((uint16_t)0x0008) /*!<PI[0] pin */ |
| 8769 | #define SYSCFG_EXTICR1_EXTI0_PJ ((uint16_t)0x0009) /*!<PJ[0] pin */ |
| 8770 | #define SYSCFG_EXTICR1_EXTI0_PK ((uint16_t)0x000A) /*!<PK[0] pin */ |
| 8771 | |
| 8772 | /** |
| 8773 | * @brief EXTI1 configuration |
| 8774 | */ |
| 8775 | #define SYSCFG_EXTICR1_EXTI1_PA ((uint16_t)0x0000) /*!<PA[1] pin */ |
| 8776 | #define SYSCFG_EXTICR1_EXTI1_PB ((uint16_t)0x0010) /*!<PB[1] pin */ |
| 8777 | #define SYSCFG_EXTICR1_EXTI1_PC ((uint16_t)0x0020) /*!<PC[1] pin */ |
| 8778 | #define SYSCFG_EXTICR1_EXTI1_PD ((uint16_t)0x0030) /*!<PD[1] pin */ |
| 8779 | #define SYSCFG_EXTICR1_EXTI1_PE ((uint16_t)0x0040) /*!<PE[1] pin */ |
| 8780 | #define SYSCFG_EXTICR1_EXTI1_PF ((uint16_t)0x0050) /*!<PF[1] pin */ |
| 8781 | #define SYSCFG_EXTICR1_EXTI1_PG ((uint16_t)0x0060) /*!<PG[1] pin */ |
| 8782 | #define SYSCFG_EXTICR1_EXTI1_PH ((uint16_t)0x0070) /*!<PH[1] pin */ |
| 8783 | #define SYSCFG_EXTICR1_EXTI1_PI ((uint16_t)0x0080) /*!<PI[1] pin */ |
| 8784 | #define SYSCFG_EXTICR1_EXTI1_PJ ((uint16_t)0x0090) /*!<PJ[1] pin */ |
| 8785 | #define SYSCFG_EXTICR1_EXTI1_PK ((uint16_t)0x00A0) /*!<PK[1] pin */ |
| 8786 | |
| 8787 | /** |
| 8788 | * @brief EXTI2 configuration |
| 8789 | */ |
| 8790 | #define SYSCFG_EXTICR1_EXTI2_PA ((uint16_t)0x0000) /*!<PA[2] pin */ |
| 8791 | #define SYSCFG_EXTICR1_EXTI2_PB ((uint16_t)0x0100) /*!<PB[2] pin */ |
| 8792 | #define SYSCFG_EXTICR1_EXTI2_PC ((uint16_t)0x0200) /*!<PC[2] pin */ |
| 8793 | #define SYSCFG_EXTICR1_EXTI2_PD ((uint16_t)0x0300) /*!<PD[2] pin */ |
| 8794 | #define SYSCFG_EXTICR1_EXTI2_PE ((uint16_t)0x0400) /*!<PE[2] pin */ |
| 8795 | #define SYSCFG_EXTICR1_EXTI2_PF ((uint16_t)0x0500) /*!<PF[2] pin */ |
| 8796 | #define SYSCFG_EXTICR1_EXTI2_PG ((uint16_t)0x0600) /*!<PG[2] pin */ |
| 8797 | #define SYSCFG_EXTICR1_EXTI2_PH ((uint16_t)0x0700) /*!<PH[2] pin */ |
| 8798 | #define SYSCFG_EXTICR1_EXTI2_PI ((uint16_t)0x0800) /*!<PI[2] pin */ |
| 8799 | #define SYSCFG_EXTICR1_EXTI2_PJ ((uint16_t)0x0900) /*!<PJ[2] pin */ |
| 8800 | #define SYSCFG_EXTICR1_EXTI2_PK ((uint16_t)0x0A00) /*!<PK[2] pin */ |
| 8801 | |
| 8802 | /** |
| 8803 | * @brief EXTI3 configuration |
| 8804 | */ |
| 8805 | #define SYSCFG_EXTICR1_EXTI3_PA ((uint16_t)0x0000) /*!<PA[3] pin */ |
| 8806 | #define SYSCFG_EXTICR1_EXTI3_PB ((uint16_t)0x1000) /*!<PB[3] pin */ |
| 8807 | #define SYSCFG_EXTICR1_EXTI3_PC ((uint16_t)0x2000) /*!<PC[3] pin */ |
| 8808 | #define SYSCFG_EXTICR1_EXTI3_PD ((uint16_t)0x3000) /*!<PD[3] pin */ |
| 8809 | #define SYSCFG_EXTICR1_EXTI3_PE ((uint16_t)0x4000) /*!<PE[3] pin */ |
| 8810 | #define SYSCFG_EXTICR1_EXTI3_PF ((uint16_t)0x5000) /*!<PF[3] pin */ |
| 8811 | #define SYSCFG_EXTICR1_EXTI3_PG ((uint16_t)0x6000) /*!<PG[3] pin */ |
| 8812 | #define SYSCFG_EXTICR1_EXTI3_PH ((uint16_t)0x7000) /*!<PH[3] pin */ |
| 8813 | #define SYSCFG_EXTICR1_EXTI3_PI ((uint16_t)0x8000) /*!<PI[3] pin */ |
| 8814 | #define SYSCFG_EXTICR1_EXTI3_PJ ((uint16_t)0x9000) /*!<PJ[3] pin */ |
| 8815 | #define SYSCFG_EXTICR1_EXTI3_PK ((uint16_t)0xA000) /*!<PK[3] pin */ |
| 8816 | |
| 8817 | /***************** Bit definition for SYSCFG_EXTICR2 register ***************/ |
| 8818 | #define SYSCFG_EXTICR2_EXTI4 ((uint16_t)0x000F) /*!<EXTI 4 configuration */ |
| 8819 | #define SYSCFG_EXTICR2_EXTI5 ((uint16_t)0x00F0) /*!<EXTI 5 configuration */ |
| 8820 | #define SYSCFG_EXTICR2_EXTI6 ((uint16_t)0x0F00) /*!<EXTI 6 configuration */ |
| 8821 | #define SYSCFG_EXTICR2_EXTI7 ((uint16_t)0xF000) /*!<EXTI 7 configuration */ |
| 8822 | /** |
| 8823 | * @brief EXTI4 configuration |
| 8824 | */ |
| 8825 | #define SYSCFG_EXTICR2_EXTI4_PA ((uint16_t)0x0000) /*!<PA[4] pin */ |
| 8826 | #define SYSCFG_EXTICR2_EXTI4_PB ((uint16_t)0x0001) /*!<PB[4] pin */ |
| 8827 | #define SYSCFG_EXTICR2_EXTI4_PC ((uint16_t)0x0002) /*!<PC[4] pin */ |
| 8828 | #define SYSCFG_EXTICR2_EXTI4_PD ((uint16_t)0x0003) /*!<PD[4] pin */ |
| 8829 | #define SYSCFG_EXTICR2_EXTI4_PE ((uint16_t)0x0004) /*!<PE[4] pin */ |
| 8830 | #define SYSCFG_EXTICR2_EXTI4_PF ((uint16_t)0x0005) /*!<PF[4] pin */ |
| 8831 | #define SYSCFG_EXTICR2_EXTI4_PG ((uint16_t)0x0006) /*!<PG[4] pin */ |
| 8832 | #define SYSCFG_EXTICR2_EXTI4_PH ((uint16_t)0x0007) /*!<PH[4] pin */ |
| 8833 | #define SYSCFG_EXTICR2_EXTI4_PI ((uint16_t)0x0008) /*!<PI[4] pin */ |
| 8834 | #define SYSCFG_EXTICR2_EXTI4_PJ ((uint16_t)0x0009) /*!<PJ[4] pin */ |
| 8835 | #define SYSCFG_EXTICR2_EXTI4_PK ((uint16_t)0x000A) /*!<PK[4] pin */ |
| 8836 | |
| 8837 | /** |
| 8838 | * @brief EXTI5 configuration |
| 8839 | */ |
| 8840 | #define SYSCFG_EXTICR2_EXTI5_PA ((uint16_t)0x0000) /*!<PA[5] pin */ |
| 8841 | #define SYSCFG_EXTICR2_EXTI5_PB ((uint16_t)0x0010) /*!<PB[5] pin */ |
| 8842 | #define SYSCFG_EXTICR2_EXTI5_PC ((uint16_t)0x0020) /*!<PC[5] pin */ |
| 8843 | #define SYSCFG_EXTICR2_EXTI5_PD ((uint16_t)0x0030) /*!<PD[5] pin */ |
| 8844 | #define SYSCFG_EXTICR2_EXTI5_PE ((uint16_t)0x0040) /*!<PE[5] pin */ |
| 8845 | #define SYSCFG_EXTICR2_EXTI5_PF ((uint16_t)0x0050) /*!<PF[5] pin */ |
| 8846 | #define SYSCFG_EXTICR2_EXTI5_PG ((uint16_t)0x0060) /*!<PG[5] pin */ |
| 8847 | #define SYSCFG_EXTICR2_EXTI5_PH ((uint16_t)0x0070) /*!<PH[5] pin */ |
| 8848 | #define SYSCFG_EXTICR2_EXTI5_PI ((uint16_t)0x0080) /*!<PI[5] pin */ |
| 8849 | #define SYSCFG_EXTICR2_EXTI5_PJ ((uint16_t)0x0090) /*!<PJ[5] pin */ |
| 8850 | #define SYSCFG_EXTICR2_EXTI5_PK ((uint16_t)0x00A0) /*!<PK[5] pin */ |
| 8851 | |
| 8852 | /** |
| 8853 | * @brief EXTI6 configuration |
| 8854 | */ |
| 8855 | #define SYSCFG_EXTICR2_EXTI6_PA ((uint16_t)0x0000) /*!<PA[6] pin */ |
| 8856 | #define SYSCFG_EXTICR2_EXTI6_PB ((uint16_t)0x0100) /*!<PB[6] pin */ |
| 8857 | #define SYSCFG_EXTICR2_EXTI6_PC ((uint16_t)0x0200) /*!<PC[6] pin */ |
| 8858 | #define SYSCFG_EXTICR2_EXTI6_PD ((uint16_t)0x0300) /*!<PD[6] pin */ |
| 8859 | #define SYSCFG_EXTICR2_EXTI6_PE ((uint16_t)0x0400) /*!<PE[6] pin */ |
| 8860 | #define SYSCFG_EXTICR2_EXTI6_PF ((uint16_t)0x0500) /*!<PF[6] pin */ |
| 8861 | #define SYSCFG_EXTICR2_EXTI6_PG ((uint16_t)0x0600) /*!<PG[6] pin */ |
| 8862 | #define SYSCFG_EXTICR2_EXTI6_PH ((uint16_t)0x0700) /*!<PH[6] pin */ |
| 8863 | #define SYSCFG_EXTICR2_EXTI6_PI ((uint16_t)0x0800) /*!<PI[6] pin */ |
| 8864 | #define SYSCFG_EXTICR2_EXTI6_PJ ((uint16_t)0x0900) /*!<PJ[6] pin */ |
| 8865 | #define SYSCFG_EXTICR2_EXTI6_PK ((uint16_t)0x0A00) /*!<PK[6] pin */ |
| 8866 | |
| 8867 | /** |
| 8868 | * @brief EXTI7 configuration |
| 8869 | */ |
| 8870 | #define SYSCFG_EXTICR2_EXTI7_PA ((uint16_t)0x0000) /*!<PA[7] pin */ |
| 8871 | #define SYSCFG_EXTICR2_EXTI7_PB ((uint16_t)0x1000) /*!<PB[7] pin */ |
| 8872 | #define SYSCFG_EXTICR2_EXTI7_PC ((uint16_t)0x2000) /*!<PC[7] pin */ |
| 8873 | #define SYSCFG_EXTICR2_EXTI7_PD ((uint16_t)0x3000) /*!<PD[7] pin */ |
| 8874 | #define SYSCFG_EXTICR2_EXTI7_PE ((uint16_t)0x4000) /*!<PE[7] pin */ |
| 8875 | #define SYSCFG_EXTICR2_EXTI7_PF ((uint16_t)0x5000) /*!<PF[7] pin */ |
| 8876 | #define SYSCFG_EXTICR2_EXTI7_PG ((uint16_t)0x6000) /*!<PG[7] pin */ |
| 8877 | #define SYSCFG_EXTICR2_EXTI7_PH ((uint16_t)0x7000) /*!<PH[7] pin */ |
| 8878 | #define SYSCFG_EXTICR2_EXTI7_PI ((uint16_t)0x8000) /*!<PI[7] pin */ |
| 8879 | #define SYSCFG_EXTICR2_EXTI7_PJ ((uint16_t)0x9000) /*!<PJ[7] pin */ |
| 8880 | #define SYSCFG_EXTICR2_EXTI7_PK ((uint16_t)0xA000) /*!<PK[7] pin */ |
| 8881 | |
| 8882 | /***************** Bit definition for SYSCFG_EXTICR3 register ***************/ |
| 8883 | #define SYSCFG_EXTICR3_EXTI8 ((uint16_t)0x000F) /*!<EXTI 8 configuration */ |
| 8884 | #define SYSCFG_EXTICR3_EXTI9 ((uint16_t)0x00F0) /*!<EXTI 9 configuration */ |
| 8885 | #define SYSCFG_EXTICR3_EXTI10 ((uint16_t)0x0F00) /*!<EXTI 10 configuration */ |
| 8886 | #define SYSCFG_EXTICR3_EXTI11 ((uint16_t)0xF000) /*!<EXTI 11 configuration */ |
| 8887 | |
| 8888 | /** |
| 8889 | * @brief EXTI8 configuration |
| 8890 | */ |
| 8891 | #define SYSCFG_EXTICR3_EXTI8_PA ((uint16_t)0x0000) /*!<PA[8] pin */ |
| 8892 | #define SYSCFG_EXTICR3_EXTI8_PB ((uint16_t)0x0001) /*!<PB[8] pin */ |
| 8893 | #define SYSCFG_EXTICR3_EXTI8_PC ((uint16_t)0x0002) /*!<PC[8] pin */ |
| 8894 | #define SYSCFG_EXTICR3_EXTI8_PD ((uint16_t)0x0003) /*!<PD[8] pin */ |
| 8895 | #define SYSCFG_EXTICR3_EXTI8_PE ((uint16_t)0x0004) /*!<PE[8] pin */ |
| 8896 | #define SYSCFG_EXTICR3_EXTI8_PF ((uint16_t)0x0005) /*!<PF[8] pin */ |
| 8897 | #define SYSCFG_EXTICR3_EXTI8_PG ((uint16_t)0x0006) /*!<PG[8] pin */ |
| 8898 | #define SYSCFG_EXTICR3_EXTI8_PH ((uint16_t)0x0007) /*!<PH[8] pin */ |
| 8899 | #define SYSCFG_EXTICR3_EXTI8_PI ((uint16_t)0x0008) /*!<PI[8] pin */ |
| 8900 | #define SYSCFG_EXTICR3_EXTI8_PJ ((uint16_t)0x0009) /*!<PJ[8] pin */ |
| 8901 | |
| 8902 | /** |
| 8903 | * @brief EXTI9 configuration |
| 8904 | */ |
| 8905 | #define SYSCFG_EXTICR3_EXTI9_PA ((uint16_t)0x0000) /*!<PA[9] pin */ |
| 8906 | #define SYSCFG_EXTICR3_EXTI9_PB ((uint16_t)0x0010) /*!<PB[9] pin */ |
| 8907 | #define SYSCFG_EXTICR3_EXTI9_PC ((uint16_t)0x0020) /*!<PC[9] pin */ |
| 8908 | #define SYSCFG_EXTICR3_EXTI9_PD ((uint16_t)0x0030) /*!<PD[9] pin */ |
| 8909 | #define SYSCFG_EXTICR3_EXTI9_PE ((uint16_t)0x0040) /*!<PE[9] pin */ |
| 8910 | #define SYSCFG_EXTICR3_EXTI9_PF ((uint16_t)0x0050) /*!<PF[9] pin */ |
| 8911 | #define SYSCFG_EXTICR3_EXTI9_PG ((uint16_t)0x0060) /*!<PG[9] pin */ |
| 8912 | #define SYSCFG_EXTICR3_EXTI9_PH ((uint16_t)0x0070) /*!<PH[9] pin */ |
| 8913 | #define SYSCFG_EXTICR3_EXTI9_PI ((uint16_t)0x0080) /*!<PI[9] pin */ |
| 8914 | #define SYSCFG_EXTICR3_EXTI9_PJ ((uint16_t)0x0090) /*!<PJ[9] pin */ |
| 8915 | |
| 8916 | /** |
| 8917 | * @brief EXTI10 configuration |
| 8918 | */ |
| 8919 | #define SYSCFG_EXTICR3_EXTI10_PA ((uint16_t)0x0000) /*!<PA[10] pin */ |
| 8920 | #define SYSCFG_EXTICR3_EXTI10_PB ((uint16_t)0x0100) /*!<PB[10] pin */ |
| 8921 | #define SYSCFG_EXTICR3_EXTI10_PC ((uint16_t)0x0200) /*!<PC[10] pin */ |
| 8922 | #define SYSCFG_EXTICR3_EXTI10_PD ((uint16_t)0x0300) /*!<PD[10] pin */ |
| 8923 | #define SYSCFG_EXTICR3_EXTI10_PE ((uint16_t)0x0400) /*!<PE[10] pin */ |
| 8924 | #define SYSCFG_EXTICR3_EXTI10_PF ((uint16_t)0x0500) /*!<PF[10] pin */ |
| 8925 | #define SYSCFG_EXTICR3_EXTI10_PG ((uint16_t)0x0600) /*!<PG[10] pin */ |
| 8926 | #define SYSCFG_EXTICR3_EXTI10_PH ((uint16_t)0x0700) /*!<PH[10] pin */ |
| 8927 | #define SYSCFG_EXTICR3_EXTI10_PI ((uint16_t)0x0800) /*!<PI[10] pin */ |
| 8928 | #define SYSCFG_EXTICR3_EXTI10_PJ ((uint16_t)0x0900) /*!<PJ[10] pin */ |
| 8929 | |
| 8930 | /** |
| 8931 | * @brief EXTI11 configuration |
| 8932 | */ |
| 8933 | #define SYSCFG_EXTICR3_EXTI11_PA ((uint16_t)0x0000) /*!<PA[11] pin */ |
| 8934 | #define SYSCFG_EXTICR3_EXTI11_PB ((uint16_t)0x1000) /*!<PB[11] pin */ |
| 8935 | #define SYSCFG_EXTICR3_EXTI11_PC ((uint16_t)0x2000) /*!<PC[11] pin */ |
| 8936 | #define SYSCFG_EXTICR3_EXTI11_PD ((uint16_t)0x3000) /*!<PD[11] pin */ |
| 8937 | #define SYSCFG_EXTICR3_EXTI11_PE ((uint16_t)0x4000) /*!<PE[11] pin */ |
| 8938 | #define SYSCFG_EXTICR3_EXTI11_PF ((uint16_t)0x5000) /*!<PF[11] pin */ |
| 8939 | #define SYSCFG_EXTICR3_EXTI11_PG ((uint16_t)0x6000) /*!<PG[11] pin */ |
| 8940 | #define SYSCFG_EXTICR3_EXTI11_PH ((uint16_t)0x7000) /*!<PH[11] pin */ |
| 8941 | #define SYSCFG_EXTICR3_EXTI11_PI ((uint16_t)0x8000) /*!<PI[11] pin */ |
| 8942 | #define SYSCFG_EXTICR3_EXTI11_PJ ((uint16_t)0x9000) /*!<PJ[11] pin */ |
| 8943 | |
| 8944 | /***************** Bit definition for SYSCFG_EXTICR4 register ***************/ |
| 8945 | #define SYSCFG_EXTICR4_EXTI12 ((uint16_t)0x000F) /*!<EXTI 12 configuration */ |
| 8946 | #define SYSCFG_EXTICR4_EXTI13 ((uint16_t)0x00F0) /*!<EXTI 13 configuration */ |
| 8947 | #define SYSCFG_EXTICR4_EXTI14 ((uint16_t)0x0F00) /*!<EXTI 14 configuration */ |
| 8948 | #define SYSCFG_EXTICR4_EXTI15 ((uint16_t)0xF000) /*!<EXTI 15 configuration */ |
| 8949 | /** |
| 8950 | * @brief EXTI12 configuration |
| 8951 | */ |
| 8952 | #define SYSCFG_EXTICR4_EXTI12_PA ((uint16_t)0x0000) /*!<PA[12] pin */ |
| 8953 | #define SYSCFG_EXTICR4_EXTI12_PB ((uint16_t)0x0001) /*!<PB[12] pin */ |
| 8954 | #define SYSCFG_EXTICR4_EXTI12_PC ((uint16_t)0x0002) /*!<PC[12] pin */ |
| 8955 | #define SYSCFG_EXTICR4_EXTI12_PD ((uint16_t)0x0003) /*!<PD[12] pin */ |
| 8956 | #define SYSCFG_EXTICR4_EXTI12_PE ((uint16_t)0x0004) /*!<PE[12] pin */ |
| 8957 | #define SYSCFG_EXTICR4_EXTI12_PF ((uint16_t)0x0005) /*!<PF[12] pin */ |
| 8958 | #define SYSCFG_EXTICR4_EXTI12_PG ((uint16_t)0x0006) /*!<PG[12] pin */ |
| 8959 | #define SYSCFG_EXTICR4_EXTI12_PH ((uint16_t)0x0007) /*!<PH[12] pin */ |
| 8960 | #define SYSCFG_EXTICR4_EXTI12_PI ((uint16_t)0x0008) /*!<PI[12] pin */ |
| 8961 | #define SYSCFG_EXTICR4_EXTI12_PJ ((uint16_t)0x0009) /*!<PJ[12] pin */ |
| 8962 | |
| 8963 | /** |
| 8964 | * @brief EXTI13 configuration |
| 8965 | */ |
| 8966 | #define SYSCFG_EXTICR4_EXTI13_PA ((uint16_t)0x0000) /*!<PA[13] pin */ |
| 8967 | #define SYSCFG_EXTICR4_EXTI13_PB ((uint16_t)0x0010) /*!<PB[13] pin */ |
| 8968 | #define SYSCFG_EXTICR4_EXTI13_PC ((uint16_t)0x0020) /*!<PC[13] pin */ |
| 8969 | #define SYSCFG_EXTICR4_EXTI13_PD ((uint16_t)0x0030) /*!<PD[13] pin */ |
| 8970 | #define SYSCFG_EXTICR4_EXTI13_PE ((uint16_t)0x0040) /*!<PE[13] pin */ |
| 8971 | #define SYSCFG_EXTICR4_EXTI13_PF ((uint16_t)0x0050) /*!<PF[13] pin */ |
| 8972 | #define SYSCFG_EXTICR4_EXTI13_PG ((uint16_t)0x0060) /*!<PG[13] pin */ |
| 8973 | #define SYSCFG_EXTICR4_EXTI13_PH ((uint16_t)0x0070) /*!<PH[13] pin */ |
| 8974 | #define SYSCFG_EXTICR4_EXTI13_PI ((uint16_t)0x0008) /*!<PI[13] pin */ |
| 8975 | #define SYSCFG_EXTICR4_EXTI13_PJ ((uint16_t)0x0009) /*!<PJ[13] pin */ |
| 8976 | |
| 8977 | /** |
| 8978 | * @brief EXTI14 configuration |
| 8979 | */ |
| 8980 | #define SYSCFG_EXTICR4_EXTI14_PA ((uint16_t)0x0000) /*!<PA[14] pin */ |
| 8981 | #define SYSCFG_EXTICR4_EXTI14_PB ((uint16_t)0x0100) /*!<PB[14] pin */ |
| 8982 | #define SYSCFG_EXTICR4_EXTI14_PC ((uint16_t)0x0200) /*!<PC[14] pin */ |
| 8983 | #define SYSCFG_EXTICR4_EXTI14_PD ((uint16_t)0x0300) /*!<PD[14] pin */ |
| 8984 | #define SYSCFG_EXTICR4_EXTI14_PE ((uint16_t)0x0400) /*!<PE[14] pin */ |
| 8985 | #define SYSCFG_EXTICR4_EXTI14_PF ((uint16_t)0x0500) /*!<PF[14] pin */ |
| 8986 | #define SYSCFG_EXTICR4_EXTI14_PG ((uint16_t)0x0600) /*!<PG[14] pin */ |
| 8987 | #define SYSCFG_EXTICR4_EXTI14_PH ((uint16_t)0x0700) /*!<PH[14] pin */ |
| 8988 | #define SYSCFG_EXTICR4_EXTI14_PI ((uint16_t)0x0800) /*!<PI[14] pin */ |
| 8989 | #define SYSCFG_EXTICR4_EXTI14_PJ ((uint16_t)0x0900) /*!<PJ[14] pin */ |
| 8990 | |
| 8991 | /** |
| 8992 | * @brief EXTI15 configuration |
| 8993 | */ |
| 8994 | #define SYSCFG_EXTICR4_EXTI15_PA ((uint16_t)0x0000) /*!<PA[15] pin */ |
| 8995 | #define SYSCFG_EXTICR4_EXTI15_PB ((uint16_t)0x1000) /*!<PB[15] pin */ |
| 8996 | #define SYSCFG_EXTICR4_EXTI15_PC ((uint16_t)0x2000) /*!<PC[15] pin */ |
| 8997 | #define SYSCFG_EXTICR4_EXTI15_PD ((uint16_t)0x3000) /*!<PD[15] pin */ |
| 8998 | #define SYSCFG_EXTICR4_EXTI15_PE ((uint16_t)0x4000) /*!<PE[15] pin */ |
| 8999 | #define SYSCFG_EXTICR4_EXTI15_PF ((uint16_t)0x5000) /*!<PF[15] pin */ |
| 9000 | #define SYSCFG_EXTICR4_EXTI15_PG ((uint16_t)0x6000) /*!<PG[15] pin */ |
| 9001 | #define SYSCFG_EXTICR4_EXTI15_PH ((uint16_t)0x7000) /*!<PH[15] pin */ |
| 9002 | #define SYSCFG_EXTICR4_EXTI15_PI ((uint16_t)0x8000) /*!<PI[15] pin */ |
| 9003 | #define SYSCFG_EXTICR4_EXTI15_PJ ((uint16_t)0x9000) /*!<PJ[15] pin */ |
| 9004 | |
| 9005 | /****************** Bit definition for SYSCFG_CMPCR register ****************/ |
| 9006 | #define SYSCFG_CMPCR_CMP_PD ((uint32_t)0x00000001) /*!<Compensation cell ready flag */ |
| 9007 | #define SYSCFG_CMPCR_READY ((uint32_t)0x00000100) /*!<Compensation cell power-down */ |
| 9008 | |
| 9009 | /******************************************************************************/ |
| 9010 | /* */ |
| 9011 | /* TIM */ |
| 9012 | /* */ |
| 9013 | /******************************************************************************/ |
| 9014 | /******************* Bit definition for TIM_CR1 register ********************/ |
| 9015 | #define TIM_CR1_CEN ((uint16_t)0x0001) /*!<Counter enable */ |
| 9016 | #define TIM_CR1_UDIS ((uint16_t)0x0002) /*!<Update disable */ |
| 9017 | #define TIM_CR1_URS ((uint16_t)0x0004) /*!<Update request source */ |
| 9018 | #define TIM_CR1_OPM ((uint16_t)0x0008) /*!<One pulse mode */ |
| 9019 | #define TIM_CR1_DIR ((uint16_t)0x0010) /*!<Direction */ |
| 9020 | |
| 9021 | #define TIM_CR1_CMS ((uint16_t)0x0060) /*!<CMS[1:0] bits (Center-aligned mode selection) */ |
| 9022 | #define TIM_CR1_CMS_0 ((uint16_t)0x0020) /*!<Bit 0 */ |
| 9023 | #define TIM_CR1_CMS_1 ((uint16_t)0x0040) /*!<Bit 1 */ |
| 9024 | |
| 9025 | #define TIM_CR1_ARPE ((uint16_t)0x0080) /*!<Auto-reload preload enable */ |
| 9026 | |
| 9027 | #define TIM_CR1_CKD ((uint16_t)0x0300) /*!<CKD[1:0] bits (clock division) */ |
| 9028 | #define TIM_CR1_CKD_0 ((uint16_t)0x0100) /*!<Bit 0 */ |
| 9029 | #define TIM_CR1_CKD_1 ((uint16_t)0x0200) /*!<Bit 1 */ |
| 9030 | |
| 9031 | /******************* Bit definition for TIM_CR2 register ********************/ |
| 9032 | #define TIM_CR2_CCPC ((uint16_t)0x0001) /*!<Capture/Compare Preloaded Control */ |
| 9033 | #define TIM_CR2_CCUS ((uint16_t)0x0004) /*!<Capture/Compare Control Update Selection */ |
| 9034 | #define TIM_CR2_CCDS ((uint16_t)0x0008) /*!<Capture/Compare DMA Selection */ |
| 9035 | |
| 9036 | #define TIM_CR2_MMS ((uint16_t)0x0070) /*!<MMS[2:0] bits (Master Mode Selection) */ |
| 9037 | #define TIM_CR2_MMS_0 ((uint16_t)0x0010) /*!<Bit 0 */ |
| 9038 | #define TIM_CR2_MMS_1 ((uint16_t)0x0020) /*!<Bit 1 */ |
| 9039 | #define TIM_CR2_MMS_2 ((uint16_t)0x0040) /*!<Bit 2 */ |
| 9040 | |
| 9041 | #define TIM_CR2_TI1S ((uint16_t)0x0080) /*!<TI1 Selection */ |
| 9042 | #define TIM_CR2_OIS1 ((uint16_t)0x0100) /*!<Output Idle state 1 (OC1 output) */ |
| 9043 | #define TIM_CR2_OIS1N ((uint16_t)0x0200) /*!<Output Idle state 1 (OC1N output) */ |
| 9044 | #define TIM_CR2_OIS2 ((uint16_t)0x0400) /*!<Output Idle state 2 (OC2 output) */ |
| 9045 | #define TIM_CR2_OIS2N ((uint16_t)0x0800) /*!<Output Idle state 2 (OC2N output) */ |
| 9046 | #define TIM_CR2_OIS3 ((uint16_t)0x1000) /*!<Output Idle state 3 (OC3 output) */ |
| 9047 | #define TIM_CR2_OIS3N ((uint16_t)0x2000) /*!<Output Idle state 3 (OC3N output) */ |
| 9048 | #define TIM_CR2_OIS4 ((uint16_t)0x4000) /*!<Output Idle state 4 (OC4 output) */ |
| 9049 | |
| 9050 | /******************* Bit definition for TIM_SMCR register *******************/ |
| 9051 | #define TIM_SMCR_SMS ((uint16_t)0x0007) /*!<SMS[2:0] bits (Slave mode selection) */ |
| 9052 | #define TIM_SMCR_SMS_0 ((uint16_t)0x0001) /*!<Bit 0 */ |
| 9053 | #define TIM_SMCR_SMS_1 ((uint16_t)0x0002) /*!<Bit 1 */ |
| 9054 | #define TIM_SMCR_SMS_2 ((uint16_t)0x0004) /*!<Bit 2 */ |
| 9055 | |
| 9056 | #define TIM_SMCR_TS ((uint16_t)0x0070) /*!<TS[2:0] bits (Trigger selection) */ |
| 9057 | #define TIM_SMCR_TS_0 ((uint16_t)0x0010) /*!<Bit 0 */ |
| 9058 | #define TIM_SMCR_TS_1 ((uint16_t)0x0020) /*!<Bit 1 */ |
| 9059 | #define TIM_SMCR_TS_2 ((uint16_t)0x0040) /*!<Bit 2 */ |
| 9060 | |
| 9061 | #define TIM_SMCR_MSM ((uint16_t)0x0080) /*!<Master/slave mode */ |
| 9062 | |
| 9063 | #define TIM_SMCR_ETF ((uint16_t)0x0F00) /*!<ETF[3:0] bits (External trigger filter) */ |
| 9064 | #define TIM_SMCR_ETF_0 ((uint16_t)0x0100) /*!<Bit 0 */ |
| 9065 | #define TIM_SMCR_ETF_1 ((uint16_t)0x0200) /*!<Bit 1 */ |
| 9066 | #define TIM_SMCR_ETF_2 ((uint16_t)0x0400) /*!<Bit 2 */ |
| 9067 | #define TIM_SMCR_ETF_3 ((uint16_t)0x0800) /*!<Bit 3 */ |
| 9068 | |
| 9069 | #define TIM_SMCR_ETPS ((uint16_t)0x3000) /*!<ETPS[1:0] bits (External trigger prescaler) */ |
| 9070 | #define TIM_SMCR_ETPS_0 ((uint16_t)0x1000) /*!<Bit 0 */ |
| 9071 | #define TIM_SMCR_ETPS_1 ((uint16_t)0x2000) /*!<Bit 1 */ |
| 9072 | |
| 9073 | #define TIM_SMCR_ECE ((uint16_t)0x4000) /*!<External clock enable */ |
| 9074 | #define TIM_SMCR_ETP ((uint16_t)0x8000) /*!<External trigger polarity */ |
| 9075 | |
| 9076 | /******************* Bit definition for TIM_DIER register *******************/ |
| 9077 | #define TIM_DIER_UIE ((uint16_t)0x0001) /*!<Update interrupt enable */ |
| 9078 | #define TIM_DIER_CC1IE ((uint16_t)0x0002) /*!<Capture/Compare 1 interrupt enable */ |
| 9079 | #define TIM_DIER_CC2IE ((uint16_t)0x0004) /*!<Capture/Compare 2 interrupt enable */ |
| 9080 | #define TIM_DIER_CC3IE ((uint16_t)0x0008) /*!<Capture/Compare 3 interrupt enable */ |
| 9081 | #define TIM_DIER_CC4IE ((uint16_t)0x0010) /*!<Capture/Compare 4 interrupt enable */ |
| 9082 | #define TIM_DIER_COMIE ((uint16_t)0x0020) /*!<COM interrupt enable */ |
| 9083 | #define TIM_DIER_TIE ((uint16_t)0x0040) /*!<Trigger interrupt enable */ |
| 9084 | #define TIM_DIER_BIE ((uint16_t)0x0080) /*!<Break interrupt enable */ |
| 9085 | #define TIM_DIER_UDE ((uint16_t)0x0100) /*!<Update DMA request enable */ |
| 9086 | #define TIM_DIER_CC1DE ((uint16_t)0x0200) /*!<Capture/Compare 1 DMA request enable */ |
| 9087 | #define TIM_DIER_CC2DE ((uint16_t)0x0400) /*!<Capture/Compare 2 DMA request enable */ |
| 9088 | #define TIM_DIER_CC3DE ((uint16_t)0x0800) /*!<Capture/Compare 3 DMA request enable */ |
| 9089 | #define TIM_DIER_CC4DE ((uint16_t)0x1000) /*!<Capture/Compare 4 DMA request enable */ |
| 9090 | #define TIM_DIER_COMDE ((uint16_t)0x2000) /*!<COM DMA request enable */ |
| 9091 | #define TIM_DIER_TDE ((uint16_t)0x4000) /*!<Trigger DMA request enable */ |
| 9092 | |
| 9093 | /******************** Bit definition for TIM_SR register ********************/ |
| 9094 | #define TIM_SR_UIF ((uint16_t)0x0001) /*!<Update interrupt Flag */ |
| 9095 | #define TIM_SR_CC1IF ((uint16_t)0x0002) /*!<Capture/Compare 1 interrupt Flag */ |
| 9096 | #define TIM_SR_CC2IF ((uint16_t)0x0004) /*!<Capture/Compare 2 interrupt Flag */ |
| 9097 | #define TIM_SR_CC3IF ((uint16_t)0x0008) /*!<Capture/Compare 3 interrupt Flag */ |
| 9098 | #define TIM_SR_CC4IF ((uint16_t)0x0010) /*!<Capture/Compare 4 interrupt Flag */ |
| 9099 | #define TIM_SR_COMIF ((uint16_t)0x0020) /*!<COM interrupt Flag */ |
| 9100 | #define TIM_SR_TIF ((uint16_t)0x0040) /*!<Trigger interrupt Flag */ |
| 9101 | #define TIM_SR_BIF ((uint16_t)0x0080) /*!<Break interrupt Flag */ |
| 9102 | #define TIM_SR_CC1OF ((uint16_t)0x0200) /*!<Capture/Compare 1 Overcapture Flag */ |
| 9103 | #define TIM_SR_CC2OF ((uint16_t)0x0400) /*!<Capture/Compare 2 Overcapture Flag */ |
| 9104 | #define TIM_SR_CC3OF ((uint16_t)0x0800) /*!<Capture/Compare 3 Overcapture Flag */ |
| 9105 | #define TIM_SR_CC4OF ((uint16_t)0x1000) /*!<Capture/Compare 4 Overcapture Flag */ |
| 9106 | |
| 9107 | /******************* Bit definition for TIM_EGR register ********************/ |
| 9108 | #define TIM_EGR_UG ((uint8_t)0x01) /*!<Update Generation */ |
| 9109 | #define TIM_EGR_CC1G ((uint8_t)0x02) /*!<Capture/Compare 1 Generation */ |
| 9110 | #define TIM_EGR_CC2G ((uint8_t)0x04) /*!<Capture/Compare 2 Generation */ |
| 9111 | #define TIM_EGR_CC3G ((uint8_t)0x08) /*!<Capture/Compare 3 Generation */ |
| 9112 | #define TIM_EGR_CC4G ((uint8_t)0x10) /*!<Capture/Compare 4 Generation */ |
| 9113 | #define TIM_EGR_COMG ((uint8_t)0x20) /*!<Capture/Compare Control Update Generation */ |
| 9114 | #define TIM_EGR_TG ((uint8_t)0x40) /*!<Trigger Generation */ |
| 9115 | #define TIM_EGR_BG ((uint8_t)0x80) /*!<Break Generation */ |
| 9116 | |
| 9117 | /****************** Bit definition for TIM_CCMR1 register *******************/ |
| 9118 | #define TIM_CCMR1_CC1S ((uint16_t)0x0003) /*!<CC1S[1:0] bits (Capture/Compare 1 Selection) */ |
| 9119 | #define TIM_CCMR1_CC1S_0 ((uint16_t)0x0001) /*!<Bit 0 */ |
| 9120 | #define TIM_CCMR1_CC1S_1 ((uint16_t)0x0002) /*!<Bit 1 */ |
| 9121 | |
| 9122 | #define TIM_CCMR1_OC1FE ((uint16_t)0x0004) /*!<Output Compare 1 Fast enable */ |
| 9123 | #define TIM_CCMR1_OC1PE ((uint16_t)0x0008) /*!<Output Compare 1 Preload enable */ |
| 9124 | |
| 9125 | #define TIM_CCMR1_OC1M ((uint16_t)0x0070) /*!<OC1M[2:0] bits (Output Compare 1 Mode) */ |
| 9126 | #define TIM_CCMR1_OC1M_0 ((uint16_t)0x0010) /*!<Bit 0 */ |
| 9127 | #define TIM_CCMR1_OC1M_1 ((uint16_t)0x0020) /*!<Bit 1 */ |
| 9128 | #define TIM_CCMR1_OC1M_2 ((uint16_t)0x0040) /*!<Bit 2 */ |
| 9129 | |
| 9130 | #define TIM_CCMR1_OC1CE ((uint16_t)0x0080) /*!<Output Compare 1Clear Enable */ |
| 9131 | |
| 9132 | #define TIM_CCMR1_CC2S ((uint16_t)0x0300) /*!<CC2S[1:0] bits (Capture/Compare 2 Selection) */ |
| 9133 | #define TIM_CCMR1_CC2S_0 ((uint16_t)0x0100) /*!<Bit 0 */ |
| 9134 | #define TIM_CCMR1_CC2S_1 ((uint16_t)0x0200) /*!<Bit 1 */ |
| 9135 | |
| 9136 | #define TIM_CCMR1_OC2FE ((uint16_t)0x0400) /*!<Output Compare 2 Fast enable */ |
| 9137 | #define TIM_CCMR1_OC2PE ((uint16_t)0x0800) /*!<Output Compare 2 Preload enable */ |
| 9138 | |
| 9139 | #define TIM_CCMR1_OC2M ((uint16_t)0x7000) /*!<OC2M[2:0] bits (Output Compare 2 Mode) */ |
| 9140 | #define TIM_CCMR1_OC2M_0 ((uint16_t)0x1000) /*!<Bit 0 */ |
| 9141 | #define TIM_CCMR1_OC2M_1 ((uint16_t)0x2000) /*!<Bit 1 */ |
| 9142 | #define TIM_CCMR1_OC2M_2 ((uint16_t)0x4000) /*!<Bit 2 */ |
| 9143 | |
| 9144 | #define TIM_CCMR1_OC2CE ((uint16_t)0x8000) /*!<Output Compare 2 Clear Enable */ |
| 9145 | |
| 9146 | /*----------------------------------------------------------------------------*/ |
| 9147 | |
| 9148 | #define TIM_CCMR1_IC1PSC ((uint16_t)0x000C) /*!<IC1PSC[1:0] bits (Input Capture 1 Prescaler) */ |
| 9149 | #define TIM_CCMR1_IC1PSC_0 ((uint16_t)0x0004) /*!<Bit 0 */ |
| 9150 | #define TIM_CCMR1_IC1PSC_1 ((uint16_t)0x0008) /*!<Bit 1 */ |
| 9151 | |
| 9152 | #define TIM_CCMR1_IC1F ((uint16_t)0x00F0) /*!<IC1F[3:0] bits (Input Capture 1 Filter) */ |
| 9153 | #define TIM_CCMR1_IC1F_0 ((uint16_t)0x0010) /*!<Bit 0 */ |
| 9154 | #define TIM_CCMR1_IC1F_1 ((uint16_t)0x0020) /*!<Bit 1 */ |
| 9155 | #define TIM_CCMR1_IC1F_2 ((uint16_t)0x0040) /*!<Bit 2 */ |
| 9156 | #define TIM_CCMR1_IC1F_3 ((uint16_t)0x0080) /*!<Bit 3 */ |
| 9157 | |
| 9158 | #define TIM_CCMR1_IC2PSC ((uint16_t)0x0C00) /*!<IC2PSC[1:0] bits (Input Capture 2 Prescaler) */ |
| 9159 | #define TIM_CCMR1_IC2PSC_0 ((uint16_t)0x0400) /*!<Bit 0 */ |
| 9160 | #define TIM_CCMR1_IC2PSC_1 ((uint16_t)0x0800) /*!<Bit 1 */ |
| 9161 | |
| 9162 | #define TIM_CCMR1_IC2F ((uint16_t)0xF000) /*!<IC2F[3:0] bits (Input Capture 2 Filter) */ |
| 9163 | #define TIM_CCMR1_IC2F_0 ((uint16_t)0x1000) /*!<Bit 0 */ |
| 9164 | #define TIM_CCMR1_IC2F_1 ((uint16_t)0x2000) /*!<Bit 1 */ |
| 9165 | #define TIM_CCMR1_IC2F_2 ((uint16_t)0x4000) /*!<Bit 2 */ |
| 9166 | #define TIM_CCMR1_IC2F_3 ((uint16_t)0x8000) /*!<Bit 3 */ |
| 9167 | |
| 9168 | /****************** Bit definition for TIM_CCMR2 register *******************/ |
| 9169 | #define TIM_CCMR2_CC3S ((uint16_t)0x0003) /*!<CC3S[1:0] bits (Capture/Compare 3 Selection) */ |
| 9170 | #define TIM_CCMR2_CC3S_0 ((uint16_t)0x0001) /*!<Bit 0 */ |
| 9171 | #define TIM_CCMR2_CC3S_1 ((uint16_t)0x0002) /*!<Bit 1 */ |
| 9172 | |
| 9173 | #define TIM_CCMR2_OC3FE ((uint16_t)0x0004) /*!<Output Compare 3 Fast enable */ |
| 9174 | #define TIM_CCMR2_OC3PE ((uint16_t)0x0008) /*!<Output Compare 3 Preload enable */ |
| 9175 | |
| 9176 | #define TIM_CCMR2_OC3M ((uint16_t)0x0070) /*!<OC3M[2:0] bits (Output Compare 3 Mode) */ |
| 9177 | #define TIM_CCMR2_OC3M_0 ((uint16_t)0x0010) /*!<Bit 0 */ |
| 9178 | #define TIM_CCMR2_OC3M_1 ((uint16_t)0x0020) /*!<Bit 1 */ |
| 9179 | #define TIM_CCMR2_OC3M_2 ((uint16_t)0x0040) /*!<Bit 2 */ |
| 9180 | |
| 9181 | #define TIM_CCMR2_OC3CE ((uint16_t)0x0080) /*!<Output Compare 3 Clear Enable */ |
| 9182 | |
| 9183 | #define TIM_CCMR2_CC4S ((uint16_t)0x0300) /*!<CC4S[1:0] bits (Capture/Compare 4 Selection) */ |
| 9184 | #define TIM_CCMR2_CC4S_0 ((uint16_t)0x0100) /*!<Bit 0 */ |
| 9185 | #define TIM_CCMR2_CC4S_1 ((uint16_t)0x0200) /*!<Bit 1 */ |
| 9186 | |
| 9187 | #define TIM_CCMR2_OC4FE ((uint16_t)0x0400) /*!<Output Compare 4 Fast enable */ |
| 9188 | #define TIM_CCMR2_OC4PE ((uint16_t)0x0800) /*!<Output Compare 4 Preload enable */ |
| 9189 | |
| 9190 | #define TIM_CCMR2_OC4M ((uint16_t)0x7000) /*!<OC4M[2:0] bits (Output Compare 4 Mode) */ |
| 9191 | #define TIM_CCMR2_OC4M_0 ((uint16_t)0x1000) /*!<Bit 0 */ |
| 9192 | #define TIM_CCMR2_OC4M_1 ((uint16_t)0x2000) /*!<Bit 1 */ |
| 9193 | #define TIM_CCMR2_OC4M_2 ((uint16_t)0x4000) /*!<Bit 2 */ |
| 9194 | |
| 9195 | #define TIM_CCMR2_OC4CE ((uint16_t)0x8000) /*!<Output Compare 4 Clear Enable */ |
| 9196 | |
| 9197 | /*----------------------------------------------------------------------------*/ |
| 9198 | |
| 9199 | #define TIM_CCMR2_IC3PSC ((uint16_t)0x000C) /*!<IC3PSC[1:0] bits (Input Capture 3 Prescaler) */ |
| 9200 | #define TIM_CCMR2_IC3PSC_0 ((uint16_t)0x0004) /*!<Bit 0 */ |
| 9201 | #define TIM_CCMR2_IC3PSC_1 ((uint16_t)0x0008) /*!<Bit 1 */ |
| 9202 | |
| 9203 | #define TIM_CCMR2_IC3F ((uint16_t)0x00F0) /*!<IC3F[3:0] bits (Input Capture 3 Filter) */ |
| 9204 | #define TIM_CCMR2_IC3F_0 ((uint16_t)0x0010) /*!<Bit 0 */ |
| 9205 | #define TIM_CCMR2_IC3F_1 ((uint16_t)0x0020) /*!<Bit 1 */ |
| 9206 | #define TIM_CCMR2_IC3F_2 ((uint16_t)0x0040) /*!<Bit 2 */ |
| 9207 | #define TIM_CCMR2_IC3F_3 ((uint16_t)0x0080) /*!<Bit 3 */ |
| 9208 | |
| 9209 | #define TIM_CCMR2_IC4PSC ((uint16_t)0x0C00) /*!<IC4PSC[1:0] bits (Input Capture 4 Prescaler) */ |
| 9210 | #define TIM_CCMR2_IC4PSC_0 ((uint16_t)0x0400) /*!<Bit 0 */ |
| 9211 | #define TIM_CCMR2_IC4PSC_1 ((uint16_t)0x0800) /*!<Bit 1 */ |
| 9212 | |
| 9213 | #define TIM_CCMR2_IC4F ((uint16_t)0xF000) /*!<IC4F[3:0] bits (Input Capture 4 Filter) */ |
| 9214 | #define TIM_CCMR2_IC4F_0 ((uint16_t)0x1000) /*!<Bit 0 */ |
| 9215 | #define TIM_CCMR2_IC4F_1 ((uint16_t)0x2000) /*!<Bit 1 */ |
| 9216 | #define TIM_CCMR2_IC4F_2 ((uint16_t)0x4000) /*!<Bit 2 */ |
| 9217 | #define TIM_CCMR2_IC4F_3 ((uint16_t)0x8000) /*!<Bit 3 */ |
| 9218 | |
| 9219 | /******************* Bit definition for TIM_CCER register *******************/ |
| 9220 | #define TIM_CCER_CC1E ((uint16_t)0x0001) /*!<Capture/Compare 1 output enable */ |
| 9221 | #define TIM_CCER_CC1P ((uint16_t)0x0002) /*!<Capture/Compare 1 output Polarity */ |
| 9222 | #define TIM_CCER_CC1NE ((uint16_t)0x0004) /*!<Capture/Compare 1 Complementary output enable */ |
| 9223 | #define TIM_CCER_CC1NP ((uint16_t)0x0008) /*!<Capture/Compare 1 Complementary output Polarity */ |
| 9224 | #define TIM_CCER_CC2E ((uint16_t)0x0010) /*!<Capture/Compare 2 output enable */ |
| 9225 | #define TIM_CCER_CC2P ((uint16_t)0x0020) /*!<Capture/Compare 2 output Polarity */ |
| 9226 | #define TIM_CCER_CC2NE ((uint16_t)0x0040) /*!<Capture/Compare 2 Complementary output enable */ |
| 9227 | #define TIM_CCER_CC2NP ((uint16_t)0x0080) /*!<Capture/Compare 2 Complementary output Polarity */ |
| 9228 | #define TIM_CCER_CC3E ((uint16_t)0x0100) /*!<Capture/Compare 3 output enable */ |
| 9229 | #define TIM_CCER_CC3P ((uint16_t)0x0200) /*!<Capture/Compare 3 output Polarity */ |
| 9230 | #define TIM_CCER_CC3NE ((uint16_t)0x0400) /*!<Capture/Compare 3 Complementary output enable */ |
| 9231 | #define TIM_CCER_CC3NP ((uint16_t)0x0800) /*!<Capture/Compare 3 Complementary output Polarity */ |
| 9232 | #define TIM_CCER_CC4E ((uint16_t)0x1000) /*!<Capture/Compare 4 output enable */ |
| 9233 | #define TIM_CCER_CC4P ((uint16_t)0x2000) /*!<Capture/Compare 4 output Polarity */ |
| 9234 | #define TIM_CCER_CC4NP ((uint16_t)0x8000) /*!<Capture/Compare 4 Complementary output Polarity */ |
| 9235 | |
| 9236 | /******************* Bit definition for TIM_CNT register ********************/ |
| 9237 | #define TIM_CNT_CNT ((uint16_t)0xFFFF) /*!<Counter Value */ |
| 9238 | |
| 9239 | /******************* Bit definition for TIM_PSC register ********************/ |
| 9240 | #define TIM_PSC_PSC ((uint16_t)0xFFFF) /*!<Prescaler Value */ |
| 9241 | |
| 9242 | /******************* Bit definition for TIM_ARR register ********************/ |
| 9243 | #define TIM_ARR_ARR ((uint16_t)0xFFFF) /*!<actual auto-reload Value */ |
| 9244 | |
| 9245 | /******************* Bit definition for TIM_RCR register ********************/ |
| 9246 | #define TIM_RCR_REP ((uint8_t)0xFF) /*!<Repetition Counter Value */ |
| 9247 | |
| 9248 | /******************* Bit definition for TIM_CCR1 register *******************/ |
| 9249 | #define TIM_CCR1_CCR1 ((uint16_t)0xFFFF) /*!<Capture/Compare 1 Value */ |
| 9250 | |
| 9251 | /******************* Bit definition for TIM_CCR2 register *******************/ |
| 9252 | #define TIM_CCR2_CCR2 ((uint16_t)0xFFFF) /*!<Capture/Compare 2 Value */ |
| 9253 | |
| 9254 | /******************* Bit definition for TIM_CCR3 register *******************/ |
| 9255 | #define TIM_CCR3_CCR3 ((uint16_t)0xFFFF) /*!<Capture/Compare 3 Value */ |
| 9256 | |
| 9257 | /******************* Bit definition for TIM_CCR4 register *******************/ |
| 9258 | #define TIM_CCR4_CCR4 ((uint16_t)0xFFFF) /*!<Capture/Compare 4 Value */ |
| 9259 | |
| 9260 | /******************* Bit definition for TIM_BDTR register *******************/ |
| 9261 | #define TIM_BDTR_DTG ((uint16_t)0x00FF) /*!<DTG[0:7] bits (Dead-Time Generator set-up) */ |
| 9262 | #define TIM_BDTR_DTG_0 ((uint16_t)0x0001) /*!<Bit 0 */ |
| 9263 | #define TIM_BDTR_DTG_1 ((uint16_t)0x0002) /*!<Bit 1 */ |
| 9264 | #define TIM_BDTR_DTG_2 ((uint16_t)0x0004) /*!<Bit 2 */ |
| 9265 | #define TIM_BDTR_DTG_3 ((uint16_t)0x0008) /*!<Bit 3 */ |
| 9266 | #define TIM_BDTR_DTG_4 ((uint16_t)0x0010) /*!<Bit 4 */ |
| 9267 | #define TIM_BDTR_DTG_5 ((uint16_t)0x0020) /*!<Bit 5 */ |
| 9268 | #define TIM_BDTR_DTG_6 ((uint16_t)0x0040) /*!<Bit 6 */ |
| 9269 | #define TIM_BDTR_DTG_7 ((uint16_t)0x0080) /*!<Bit 7 */ |
| 9270 | |
| 9271 | #define TIM_BDTR_LOCK ((uint16_t)0x0300) /*!<LOCK[1:0] bits (Lock Configuration) */ |
| 9272 | #define TIM_BDTR_LOCK_0 ((uint16_t)0x0100) /*!<Bit 0 */ |
| 9273 | #define TIM_BDTR_LOCK_1 ((uint16_t)0x0200) /*!<Bit 1 */ |
| 9274 | |
| 9275 | #define TIM_BDTR_OSSI ((uint16_t)0x0400) /*!<Off-State Selection for Idle mode */ |
| 9276 | #define TIM_BDTR_OSSR ((uint16_t)0x0800) /*!<Off-State Selection for Run mode */ |
| 9277 | #define TIM_BDTR_BKE ((uint16_t)0x1000) /*!<Break enable */ |
| 9278 | #define TIM_BDTR_BKP ((uint16_t)0x2000) /*!<Break Polarity */ |
| 9279 | #define TIM_BDTR_AOE ((uint16_t)0x4000) /*!<Automatic Output enable */ |
| 9280 | #define TIM_BDTR_MOE ((uint16_t)0x8000) /*!<Main Output enable */ |
| 9281 | |
| 9282 | /******************* Bit definition for TIM_DCR register ********************/ |
| 9283 | #define TIM_DCR_DBA ((uint16_t)0x001F) /*!<DBA[4:0] bits (DMA Base Address) */ |
| 9284 | #define TIM_DCR_DBA_0 ((uint16_t)0x0001) /*!<Bit 0 */ |
| 9285 | #define TIM_DCR_DBA_1 ((uint16_t)0x0002) /*!<Bit 1 */ |
| 9286 | #define TIM_DCR_DBA_2 ((uint16_t)0x0004) /*!<Bit 2 */ |
| 9287 | #define TIM_DCR_DBA_3 ((uint16_t)0x0008) /*!<Bit 3 */ |
| 9288 | #define TIM_DCR_DBA_4 ((uint16_t)0x0010) /*!<Bit 4 */ |
| 9289 | |
| 9290 | #define TIM_DCR_DBL ((uint16_t)0x1F00) /*!<DBL[4:0] bits (DMA Burst Length) */ |
| 9291 | #define TIM_DCR_DBL_0 ((uint16_t)0x0100) /*!<Bit 0 */ |
| 9292 | #define TIM_DCR_DBL_1 ((uint16_t)0x0200) /*!<Bit 1 */ |
| 9293 | #define TIM_DCR_DBL_2 ((uint16_t)0x0400) /*!<Bit 2 */ |
| 9294 | #define TIM_DCR_DBL_3 ((uint16_t)0x0800) /*!<Bit 3 */ |
| 9295 | #define TIM_DCR_DBL_4 ((uint16_t)0x1000) /*!<Bit 4 */ |
| 9296 | |
| 9297 | /******************* Bit definition for TIM_DMAR register *******************/ |
| 9298 | #define TIM_DMAR_DMAB ((uint16_t)0xFFFF) /*!<DMA register for burst accesses */ |
| 9299 | |
| 9300 | /******************* Bit definition for TIM_OR register *********************/ |
| 9301 | #define TIM_OR_TI4_RMP ((uint16_t)0x00C0) /*!<TI4_RMP[1:0] bits (TIM5 Input 4 remap) */ |
| 9302 | #define TIM_OR_TI4_RMP_0 ((uint16_t)0x0040) /*!<Bit 0 */ |
| 9303 | #define TIM_OR_TI4_RMP_1 ((uint16_t)0x0080) /*!<Bit 1 */ |
| 9304 | #define TIM_OR_ITR1_RMP ((uint16_t)0x0C00) /*!<ITR1_RMP[1:0] bits (TIM2 Internal trigger 1 remap) */ |
| 9305 | #define TIM_OR_ITR1_RMP_0 ((uint16_t)0x0400) /*!<Bit 0 */ |
| 9306 | #define TIM_OR_ITR1_RMP_1 ((uint16_t)0x0800) /*!<Bit 1 */ |
| 9307 | |
| 9308 | |
| 9309 | /******************************************************************************/ |
| 9310 | /* */ |
| 9311 | /* Universal Synchronous Asynchronous Receiver Transmitter */ |
| 9312 | /* */ |
| 9313 | /******************************************************************************/ |
| 9314 | /******************* Bit definition for USART_SR register *******************/ |
| 9315 | #define USART_SR_PE ((uint16_t)0x0001) /*!<Parity Error */ |
| 9316 | #define USART_SR_FE ((uint16_t)0x0002) /*!<Framing Error */ |
| 9317 | #define USART_SR_NE ((uint16_t)0x0004) /*!<Noise Error Flag */ |
| 9318 | #define USART_SR_ORE ((uint16_t)0x0008) /*!<OverRun Error */ |
| 9319 | #define USART_SR_IDLE ((uint16_t)0x0010) /*!<IDLE line detected */ |
| 9320 | #define USART_SR_RXNE ((uint16_t)0x0020) /*!<Read Data Register Not Empty */ |
| 9321 | #define USART_SR_TC ((uint16_t)0x0040) /*!<Transmission Complete */ |
| 9322 | #define USART_SR_TXE ((uint16_t)0x0080) /*!<Transmit Data Register Empty */ |
| 9323 | #define USART_SR_LBD ((uint16_t)0x0100) /*!<LIN Break Detection Flag */ |
| 9324 | #define USART_SR_CTS ((uint16_t)0x0200) /*!<CTS Flag */ |
| 9325 | |
| 9326 | /******************* Bit definition for USART_DR register *******************/ |
| 9327 | #define USART_DR_DR ((uint16_t)0x01FF) /*!<Data value */ |
| 9328 | |
| 9329 | /****************** Bit definition for USART_BRR register *******************/ |
| 9330 | #define USART_BRR_DIV_Fraction ((uint16_t)0x000F) /*!<Fraction of USARTDIV */ |
| 9331 | #define USART_BRR_DIV_Mantissa ((uint16_t)0xFFF0) /*!<Mantissa of USARTDIV */ |
| 9332 | |
| 9333 | /****************** Bit definition for USART_CR1 register *******************/ |
| 9334 | #define USART_CR1_SBK ((uint16_t)0x0001) /*!<Send Break */ |
| 9335 | #define USART_CR1_RWU ((uint16_t)0x0002) /*!<Receiver wakeup */ |
| 9336 | #define USART_CR1_RE ((uint16_t)0x0004) /*!<Receiver Enable */ |
| 9337 | #define USART_CR1_TE ((uint16_t)0x0008) /*!<Transmitter Enable */ |
| 9338 | #define USART_CR1_IDLEIE ((uint16_t)0x0010) /*!<IDLE Interrupt Enable */ |
| 9339 | #define USART_CR1_RXNEIE ((uint16_t)0x0020) /*!<RXNE Interrupt Enable */ |
| 9340 | #define USART_CR1_TCIE ((uint16_t)0x0040) /*!<Transmission Complete Interrupt Enable */ |
| 9341 | #define USART_CR1_TXEIE ((uint16_t)0x0080) /*!<PE Interrupt Enable */ |
| 9342 | #define USART_CR1_PEIE ((uint16_t)0x0100) /*!<PE Interrupt Enable */ |
| 9343 | #define USART_CR1_PS ((uint16_t)0x0200) /*!<Parity Selection */ |
| 9344 | #define USART_CR1_PCE ((uint16_t)0x0400) /*!<Parity Control Enable */ |
| 9345 | #define USART_CR1_WAKE ((uint16_t)0x0800) /*!<Wakeup method */ |
| 9346 | #define USART_CR1_M ((uint16_t)0x1000) /*!<Word length */ |
| 9347 | #define USART_CR1_UE ((uint16_t)0x2000) /*!<USART Enable */ |
| 9348 | #define USART_CR1_OVER8 ((uint16_t)0x8000) /*!<USART Oversampling by 8 enable */ |
| 9349 | |
| 9350 | /****************** Bit definition for USART_CR2 register *******************/ |
| 9351 | #define USART_CR2_ADD ((uint16_t)0x000F) /*!<Address of the USART node */ |
| 9352 | #define USART_CR2_LBDL ((uint16_t)0x0020) /*!<LIN Break Detection Length */ |
| 9353 | #define USART_CR2_LBDIE ((uint16_t)0x0040) /*!<LIN Break Detection Interrupt Enable */ |
| 9354 | #define USART_CR2_LBCL ((uint16_t)0x0100) /*!<Last Bit Clock pulse */ |
| 9355 | #define USART_CR2_CPHA ((uint16_t)0x0200) /*!<Clock Phase */ |
| 9356 | #define USART_CR2_CPOL ((uint16_t)0x0400) /*!<Clock Polarity */ |
| 9357 | #define USART_CR2_CLKEN ((uint16_t)0x0800) /*!<Clock Enable */ |
| 9358 | |
| 9359 | #define USART_CR2_STOP ((uint16_t)0x3000) /*!<STOP[1:0] bits (STOP bits) */ |
| 9360 | #define USART_CR2_STOP_0 ((uint16_t)0x1000) /*!<Bit 0 */ |
| 9361 | #define USART_CR2_STOP_1 ((uint16_t)0x2000) /*!<Bit 1 */ |
| 9362 | |
| 9363 | #define USART_CR2_LINEN ((uint16_t)0x4000) /*!<LIN mode enable */ |
| 9364 | |
| 9365 | /****************** Bit definition for USART_CR3 register *******************/ |
| 9366 | #define USART_CR3_EIE ((uint16_t)0x0001) /*!<Error Interrupt Enable */ |
| 9367 | #define USART_CR3_IREN ((uint16_t)0x0002) /*!<IrDA mode Enable */ |
| 9368 | #define USART_CR3_IRLP ((uint16_t)0x0004) /*!<IrDA Low-Power */ |
| 9369 | #define USART_CR3_HDSEL ((uint16_t)0x0008) /*!<Half-Duplex Selection */ |
| 9370 | #define USART_CR3_NACK ((uint16_t)0x0010) /*!<Smartcard NACK enable */ |
| 9371 | #define USART_CR3_SCEN ((uint16_t)0x0020) /*!<Smartcard mode enable */ |
| 9372 | #define USART_CR3_DMAR ((uint16_t)0x0040) /*!<DMA Enable Receiver */ |
| 9373 | #define USART_CR3_DMAT ((uint16_t)0x0080) /*!<DMA Enable Transmitter */ |
| 9374 | #define USART_CR3_RTSE ((uint16_t)0x0100) /*!<RTS Enable */ |
| 9375 | #define USART_CR3_CTSE ((uint16_t)0x0200) /*!<CTS Enable */ |
| 9376 | #define USART_CR3_CTSIE ((uint16_t)0x0400) /*!<CTS Interrupt Enable */ |
| 9377 | #define USART_CR3_ONEBIT ((uint16_t)0x0800) /*!<USART One bit method enable */ |
| 9378 | |
| 9379 | /****************** Bit definition for USART_GTPR register ******************/ |
| 9380 | #define USART_GTPR_PSC ((uint16_t)0x00FF) /*!<PSC[7:0] bits (Prescaler value) */ |
| 9381 | #define USART_GTPR_PSC_0 ((uint16_t)0x0001) /*!<Bit 0 */ |
| 9382 | #define USART_GTPR_PSC_1 ((uint16_t)0x0002) /*!<Bit 1 */ |
| 9383 | #define USART_GTPR_PSC_2 ((uint16_t)0x0004) /*!<Bit 2 */ |
| 9384 | #define USART_GTPR_PSC_3 ((uint16_t)0x0008) /*!<Bit 3 */ |
| 9385 | #define USART_GTPR_PSC_4 ((uint16_t)0x0010) /*!<Bit 4 */ |
| 9386 | #define USART_GTPR_PSC_5 ((uint16_t)0x0020) /*!<Bit 5 */ |
| 9387 | #define USART_GTPR_PSC_6 ((uint16_t)0x0040) /*!<Bit 6 */ |
| 9388 | #define USART_GTPR_PSC_7 ((uint16_t)0x0080) /*!<Bit 7 */ |
| 9389 | |
| 9390 | #define USART_GTPR_GT ((uint16_t)0xFF00) /*!<Guard time value */ |
| 9391 | |
| 9392 | /******************************************************************************/ |
| 9393 | /* */ |
| 9394 | /* Window WATCHDOG */ |
| 9395 | /* */ |
| 9396 | /******************************************************************************/ |
| 9397 | /******************* Bit definition for WWDG_CR register ********************/ |
| 9398 | #define WWDG_CR_T ((uint8_t)0x7F) /*!<T[6:0] bits (7-Bit counter (MSB to LSB)) */ |
| 9399 | #define WWDG_CR_T0 ((uint8_t)0x01) /*!<Bit 0 */ |
| 9400 | #define WWDG_CR_T1 ((uint8_t)0x02) /*!<Bit 1 */ |
| 9401 | #define WWDG_CR_T2 ((uint8_t)0x04) /*!<Bit 2 */ |
| 9402 | #define WWDG_CR_T3 ((uint8_t)0x08) /*!<Bit 3 */ |
| 9403 | #define WWDG_CR_T4 ((uint8_t)0x10) /*!<Bit 4 */ |
| 9404 | #define WWDG_CR_T5 ((uint8_t)0x20) /*!<Bit 5 */ |
| 9405 | #define WWDG_CR_T6 ((uint8_t)0x40) /*!<Bit 6 */ |
| 9406 | |
| 9407 | #define WWDG_CR_WDGA ((uint8_t)0x80) /*!<Activation bit */ |
| 9408 | |
| 9409 | /******************* Bit definition for WWDG_CFR register *******************/ |
| 9410 | #define WWDG_CFR_W ((uint16_t)0x007F) /*!<W[6:0] bits (7-bit window value) */ |
| 9411 | #define WWDG_CFR_W0 ((uint16_t)0x0001) /*!<Bit 0 */ |
| 9412 | #define WWDG_CFR_W1 ((uint16_t)0x0002) /*!<Bit 1 */ |
| 9413 | #define WWDG_CFR_W2 ((uint16_t)0x0004) /*!<Bit 2 */ |
| 9414 | #define WWDG_CFR_W3 ((uint16_t)0x0008) /*!<Bit 3 */ |
| 9415 | #define WWDG_CFR_W4 ((uint16_t)0x0010) /*!<Bit 4 */ |
| 9416 | #define WWDG_CFR_W5 ((uint16_t)0x0020) /*!<Bit 5 */ |
| 9417 | #define WWDG_CFR_W6 ((uint16_t)0x0040) /*!<Bit 6 */ |
| 9418 | |
| 9419 | #define WWDG_CFR_WDGTB ((uint16_t)0x0180) /*!<WDGTB[1:0] bits (Timer Base) */ |
| 9420 | #define WWDG_CFR_WDGTB0 ((uint16_t)0x0080) /*!<Bit 0 */ |
| 9421 | #define WWDG_CFR_WDGTB1 ((uint16_t)0x0100) /*!<Bit 1 */ |
| 9422 | |
| 9423 | #define WWDG_CFR_EWI ((uint16_t)0x0200) /*!<Early Wakeup Interrupt */ |
| 9424 | |
| 9425 | /******************* Bit definition for WWDG_SR register ********************/ |
| 9426 | #define WWDG_SR_EWIF ((uint8_t)0x01) /*!<Early Wakeup Interrupt Flag */ |
| 9427 | |
| 9428 | |
| 9429 | /******************************************************************************/ |
| 9430 | /* */ |
| 9431 | /* DBG */ |
| 9432 | /* */ |
| 9433 | /******************************************************************************/ |
| 9434 | /******************** Bit definition for DBGMCU_IDCODE register *************/ |
| 9435 | #define DBGMCU_IDCODE_DEV_ID ((uint32_t)0x00000FFF) |
| 9436 | #define DBGMCU_IDCODE_REV_ID ((uint32_t)0xFFFF0000) |
| 9437 | |
| 9438 | /******************** Bit definition for DBGMCU_CR register *****************/ |
| 9439 | #define DBGMCU_CR_DBG_SLEEP ((uint32_t)0x00000001) |
| 9440 | #define DBGMCU_CR_DBG_STOP ((uint32_t)0x00000002) |
| 9441 | #define DBGMCU_CR_DBG_STANDBY ((uint32_t)0x00000004) |
| 9442 | #define DBGMCU_CR_TRACE_IOEN ((uint32_t)0x00000020) |
| 9443 | |
| 9444 | #define DBGMCU_CR_TRACE_MODE ((uint32_t)0x000000C0) |
| 9445 | #define DBGMCU_CR_TRACE_MODE_0 ((uint32_t)0x00000040)/*!<Bit 0 */ |
| 9446 | #define DBGMCU_CR_TRACE_MODE_1 ((uint32_t)0x00000080)/*!<Bit 1 */ |
| 9447 | |
| 9448 | /******************** Bit definition for DBGMCU_APB1_FZ register ************/ |
| 9449 | #define DBGMCU_APB1_FZ_DBG_TIM2_STOP ((uint32_t)0x00000001) |
| 9450 | #define DBGMCU_APB1_FZ_DBG_TIM3_STOP ((uint32_t)0x00000002) |
| 9451 | #define DBGMCU_APB1_FZ_DBG_TIM4_STOP ((uint32_t)0x00000004) |
| 9452 | #define DBGMCU_APB1_FZ_DBG_TIM5_STOP ((uint32_t)0x00000008) |
| 9453 | #define DBGMCU_APB1_FZ_DBG_TIM6_STOP ((uint32_t)0x00000010) |
| 9454 | #define DBGMCU_APB1_FZ_DBG_TIM7_STOP ((uint32_t)0x00000020) |
| 9455 | #define DBGMCU_APB1_FZ_DBG_TIM12_STOP ((uint32_t)0x00000040) |
| 9456 | #define DBGMCU_APB1_FZ_DBG_TIM13_STOP ((uint32_t)0x00000080) |
| 9457 | #define DBGMCU_APB1_FZ_DBG_TIM14_STOP ((uint32_t)0x00000100) |
| 9458 | #define DBGMCU_APB1_FZ_DBG_RTC_STOP ((uint32_t)0x00000400) |
| 9459 | #define DBGMCU_APB1_FZ_DBG_WWDG_STOP ((uint32_t)0x00000800) |
| 9460 | #define DBGMCU_APB1_FZ_DBG_IWDG_STOP ((uint32_t)0x00001000) |
| 9461 | #define DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT ((uint32_t)0x00200000) |
| 9462 | #define DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT ((uint32_t)0x00400000) |
| 9463 | #define DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT ((uint32_t)0x00800000) |
| 9464 | #define DBGMCU_APB1_FZ_DBG_CAN1_STOP ((uint32_t)0x02000000) |
| 9465 | #define DBGMCU_APB1_FZ_DBG_CAN2_STOP ((uint32_t)0x04000000) |
| 9466 | /* Old IWDGSTOP bit definition, maintained for legacy purpose */ |
| 9467 | #define DBGMCU_APB1_FZ_DBG_IWDEG_STOP DBGMCU_APB1_FZ_DBG_IWDG_STOP |
| 9468 | |
| 9469 | /******************** Bit definition for DBGMCU_APB1_FZ register ************/ |
| 9470 | #define DBGMCU_APB1_FZ_DBG_TIM1_STOP ((uint32_t)0x00000001) |
| 9471 | #define DBGMCU_APB1_FZ_DBG_TIM8_STOP ((uint32_t)0x00000002) |
| 9472 | #define DBGMCU_APB1_FZ_DBG_TIM9_STOP ((uint32_t)0x00010000) |
| 9473 | #define DBGMCU_APB1_FZ_DBG_TIM10_STOP ((uint32_t)0x00020000) |
| 9474 | #define DBGMCU_APB1_FZ_DBG_TIM11_STOP ((uint32_t)0x00040000) |
| 9475 | |
| 9476 | /******************************************************************************/ |
| 9477 | /* */ |
| 9478 | /* Ethernet MAC Registers bits definitions */ |
| 9479 | /* */ |
| 9480 | /******************************************************************************/ |
| 9481 | /* Bit definition for Ethernet MAC Control Register register */ |
| 9482 | #define ETH_MACCR_WD ((uint32_t)0x00800000) /* Watchdog disable */ |
| 9483 | #define ETH_MACCR_JD ((uint32_t)0x00400000) /* Jabber disable */ |
| 9484 | #define ETH_MACCR_IFG ((uint32_t)0x000E0000) /* Inter-frame gap */ |
| 9485 | #define ETH_MACCR_IFG_96Bit ((uint32_t)0x00000000) /* Minimum IFG between frames during transmission is 96Bit */ |
| 9486 | #define ETH_MACCR_IFG_88Bit ((uint32_t)0x00020000) /* Minimum IFG between frames during transmission is 88Bit */ |
| 9487 | #define ETH_MACCR_IFG_80Bit ((uint32_t)0x00040000) /* Minimum IFG between frames during transmission is 80Bit */ |
| 9488 | #define ETH_MACCR_IFG_72Bit ((uint32_t)0x00060000) /* Minimum IFG between frames during transmission is 72Bit */ |
| 9489 | #define ETH_MACCR_IFG_64Bit ((uint32_t)0x00080000) /* Minimum IFG between frames during transmission is 64Bit */ |
| 9490 | #define ETH_MACCR_IFG_56Bit ((uint32_t)0x000A0000) /* Minimum IFG between frames during transmission is 56Bit */ |
| 9491 | #define ETH_MACCR_IFG_48Bit ((uint32_t)0x000C0000) /* Minimum IFG between frames during transmission is 48Bit */ |
| 9492 | #define ETH_MACCR_IFG_40Bit ((uint32_t)0x000E0000) /* Minimum IFG between frames during transmission is 40Bit */ |
| 9493 | #define ETH_MACCR_CSD ((uint32_t)0x00010000) /* Carrier sense disable (during transmission) */ |
| 9494 | #define ETH_MACCR_FES ((uint32_t)0x00004000) /* Fast ethernet speed */ |
| 9495 | #define ETH_MACCR_ROD ((uint32_t)0x00002000) /* Receive own disable */ |
| 9496 | #define ETH_MACCR_LM ((uint32_t)0x00001000) /* loopback mode */ |
| 9497 | #define ETH_MACCR_DM ((uint32_t)0x00000800) /* Duplex mode */ |
| 9498 | #define ETH_MACCR_IPCO ((uint32_t)0x00000400) /* IP Checksum offload */ |
| 9499 | #define ETH_MACCR_RD ((uint32_t)0x00000200) /* Retry disable */ |
| 9500 | #define ETH_MACCR_APCS ((uint32_t)0x00000080) /* Automatic Pad/CRC stripping */ |
| 9501 | #define ETH_MACCR_BL ((uint32_t)0x00000060) /* Back-off limit: random integer number (r) of slot time delays before rescheduling |
| 9502 | a transmission attempt during retries after a collision: 0 =< r <2^k */ |
| 9503 | #define ETH_MACCR_BL_10 ((uint32_t)0x00000000) /* k = min (n, 10) */ |
| 9504 | #define ETH_MACCR_BL_8 ((uint32_t)0x00000020) /* k = min (n, 8) */ |
| 9505 | #define ETH_MACCR_BL_4 ((uint32_t)0x00000040) /* k = min (n, 4) */ |
| 9506 | #define ETH_MACCR_BL_1 ((uint32_t)0x00000060) /* k = min (n, 1) */ |
| 9507 | #define ETH_MACCR_DC ((uint32_t)0x00000010) /* Defferal check */ |
| 9508 | #define ETH_MACCR_TE ((uint32_t)0x00000008) /* Transmitter enable */ |
| 9509 | #define ETH_MACCR_RE ((uint32_t)0x00000004) /* Receiver enable */ |
| 9510 | |
| 9511 | /* Bit definition for Ethernet MAC Frame Filter Register */ |
| 9512 | #define ETH_MACFFR_RA ((uint32_t)0x80000000) /* Receive all */ |
| 9513 | #define ETH_MACFFR_HPF ((uint32_t)0x00000400) /* Hash or perfect filter */ |
| 9514 | #define ETH_MACFFR_SAF ((uint32_t)0x00000200) /* Source address filter enable */ |
| 9515 | #define ETH_MACFFR_SAIF ((uint32_t)0x00000100) /* SA inverse filtering */ |
| 9516 | #define ETH_MACFFR_PCF ((uint32_t)0x000000C0) /* Pass control frames: 3 cases */ |
| 9517 | #define ETH_MACFFR_PCF_BlockAll ((uint32_t)0x00000040) /* MAC filters all control frames from reaching the application */ |
| 9518 | #define ETH_MACFFR_PCF_ForwardAll ((uint32_t)0x00000080) /* MAC forwards all control frames to application even if they fail the Address Filter */ |
| 9519 | #define ETH_MACFFR_PCF_ForwardPassedAddrFilter ((uint32_t)0x000000C0) /* MAC forwards control frames that pass the Address Filter. */ |
| 9520 | #define ETH_MACFFR_BFD ((uint32_t)0x00000020) /* Broadcast frame disable */ |
| 9521 | #define ETH_MACFFR_PAM ((uint32_t)0x00000010) /* Pass all mutlicast */ |
| 9522 | #define ETH_MACFFR_DAIF ((uint32_t)0x00000008) /* DA Inverse filtering */ |
| 9523 | #define ETH_MACFFR_HM ((uint32_t)0x00000004) /* Hash multicast */ |
| 9524 | #define ETH_MACFFR_HU ((uint32_t)0x00000002) /* Hash unicast */ |
| 9525 | #define ETH_MACFFR_PM ((uint32_t)0x00000001) /* Promiscuous mode */ |
| 9526 | |
| 9527 | /* Bit definition for Ethernet MAC Hash Table High Register */ |
| 9528 | #define ETH_MACHTHR_HTH ((uint32_t)0xFFFFFFFF) /* Hash table high */ |
| 9529 | |
| 9530 | /* Bit definition for Ethernet MAC Hash Table Low Register */ |
| 9531 | #define ETH_MACHTLR_HTL ((uint32_t)0xFFFFFFFF) /* Hash table low */ |
| 9532 | |
| 9533 | /* Bit definition for Ethernet MAC MII Address Register */ |
| 9534 | #define ETH_MACMIIAR_PA ((uint32_t)0x0000F800) /* Physical layer address */ |
| 9535 | #define ETH_MACMIIAR_MR ((uint32_t)0x000007C0) /* MII register in the selected PHY */ |
| 9536 | #define ETH_MACMIIAR_CR ((uint32_t)0x0000001C) /* CR clock range: 6 cases */ |
| 9537 | #define ETH_MACMIIAR_CR_Div42 ((uint32_t)0x00000000) /* HCLK:60-100 MHz; MDC clock= HCLK/42 */ |
| 9538 | #define ETH_MACMIIAR_CR_Div62 ((uint32_t)0x00000004) /* HCLK:100-150 MHz; MDC clock= HCLK/62 */ |
| 9539 | #define ETH_MACMIIAR_CR_Div16 ((uint32_t)0x00000008) /* HCLK:20-35 MHz; MDC clock= HCLK/16 */ |
| 9540 | #define ETH_MACMIIAR_CR_Div26 ((uint32_t)0x0000000C) /* HCLK:35-60 MHz; MDC clock= HCLK/26 */ |
| 9541 | #define ETH_MACMIIAR_CR_Div102 ((uint32_t)0x00000010) /* HCLK:150-168 MHz; MDC clock= HCLK/102 */ |
| 9542 | #define ETH_MACMIIAR_MW ((uint32_t)0x00000002) /* MII write */ |
| 9543 | #define ETH_MACMIIAR_MB ((uint32_t)0x00000001) /* MII busy */ |
| 9544 | |
| 9545 | /* Bit definition for Ethernet MAC MII Data Register */ |
| 9546 | #define ETH_MACMIIDR_MD ((uint32_t)0x0000FFFF) /* MII data: read/write data from/to PHY */ |
| 9547 | |
| 9548 | /* Bit definition for Ethernet MAC Flow Control Register */ |
| 9549 | #define ETH_MACFCR_PT ((uint32_t)0xFFFF0000) /* Pause time */ |
| 9550 | #define ETH_MACFCR_ZQPD ((uint32_t)0x00000080) /* Zero-quanta pause disable */ |
| 9551 | #define ETH_MACFCR_PLT ((uint32_t)0x00000030) /* Pause low threshold: 4 cases */ |
| 9552 | #define ETH_MACFCR_PLT_Minus4 ((uint32_t)0x00000000) /* Pause time minus 4 slot times */ |
| 9553 | #define ETH_MACFCR_PLT_Minus28 ((uint32_t)0x00000010) /* Pause time minus 28 slot times */ |
| 9554 | #define ETH_MACFCR_PLT_Minus144 ((uint32_t)0x00000020) /* Pause time minus 144 slot times */ |
| 9555 | #define ETH_MACFCR_PLT_Minus256 ((uint32_t)0x00000030) /* Pause time minus 256 slot times */ |
| 9556 | #define ETH_MACFCR_UPFD ((uint32_t)0x00000008) /* Unicast pause frame detect */ |
| 9557 | #define ETH_MACFCR_RFCE ((uint32_t)0x00000004) /* Receive flow control enable */ |
| 9558 | #define ETH_MACFCR_TFCE ((uint32_t)0x00000002) /* Transmit flow control enable */ |
| 9559 | #define ETH_MACFCR_FCBBPA ((uint32_t)0x00000001) /* Flow control busy/backpressure activate */ |
| 9560 | |
| 9561 | /* Bit definition for Ethernet MAC VLAN Tag Register */ |
| 9562 | #define ETH_MACVLANTR_VLANTC ((uint32_t)0x00010000) /* 12-bit VLAN tag comparison */ |
| 9563 | #define ETH_MACVLANTR_VLANTI ((uint32_t)0x0000FFFF) /* VLAN tag identifier (for receive frames) */ |
| 9564 | |
| 9565 | /* Bit definition for Ethernet MAC Remote Wake-UpFrame Filter Register */ |
| 9566 | #define ETH_MACRWUFFR_D ((uint32_t)0xFFFFFFFF) /* Wake-up frame filter register data */ |
| 9567 | /* Eight sequential Writes to this address (offset 0x28) will write all Wake-UpFrame Filter Registers. |
| 9568 | Eight sequential Reads from this address (offset 0x28) will read all Wake-UpFrame Filter Registers. */ |
| 9569 | /* Wake-UpFrame Filter Reg0 : Filter 0 Byte Mask |
| 9570 | Wake-UpFrame Filter Reg1 : Filter 1 Byte Mask |
| 9571 | Wake-UpFrame Filter Reg2 : Filter 2 Byte Mask |
| 9572 | Wake-UpFrame Filter Reg3 : Filter 3 Byte Mask |
| 9573 | Wake-UpFrame Filter Reg4 : RSVD - Filter3 Command - RSVD - Filter2 Command - |
| 9574 | RSVD - Filter1 Command - RSVD - Filter0 Command |
| 9575 | Wake-UpFrame Filter Re5 : Filter3 Offset - Filter2 Offset - Filter1 Offset - Filter0 Offset |
| 9576 | Wake-UpFrame Filter Re6 : Filter1 CRC16 - Filter0 CRC16 |
| 9577 | Wake-UpFrame Filter Re7 : Filter3 CRC16 - Filter2 CRC16 */ |
| 9578 | |
| 9579 | /* Bit definition for Ethernet MAC PMT Control and Status Register */ |
| 9580 | #define ETH_MACPMTCSR_WFFRPR ((uint32_t)0x80000000) /* Wake-Up Frame Filter Register Pointer Reset */ |
| 9581 | #define ETH_MACPMTCSR_GU ((uint32_t)0x00000200) /* Global Unicast */ |
| 9582 | #define ETH_MACPMTCSR_WFR ((uint32_t)0x00000040) /* Wake-Up Frame Received */ |
| 9583 | #define ETH_MACPMTCSR_MPR ((uint32_t)0x00000020) /* Magic Packet Received */ |
| 9584 | #define ETH_MACPMTCSR_WFE ((uint32_t)0x00000004) /* Wake-Up Frame Enable */ |
| 9585 | #define ETH_MACPMTCSR_MPE ((uint32_t)0x00000002) /* Magic Packet Enable */ |
| 9586 | #define ETH_MACPMTCSR_PD ((uint32_t)0x00000001) /* Power Down */ |
| 9587 | |
| 9588 | /* Bit definition for Ethernet MAC Status Register */ |
| 9589 | #define ETH_MACSR_TSTS ((uint32_t)0x00000200) /* Time stamp trigger status */ |
| 9590 | #define ETH_MACSR_MMCTS ((uint32_t)0x00000040) /* MMC transmit status */ |
| 9591 | #define ETH_MACSR_MMMCRS ((uint32_t)0x00000020) /* MMC receive status */ |
| 9592 | #define ETH_MACSR_MMCS ((uint32_t)0x00000010) /* MMC status */ |
| 9593 | #define ETH_MACSR_PMTS ((uint32_t)0x00000008) /* PMT status */ |
| 9594 | |
| 9595 | /* Bit definition for Ethernet MAC Interrupt Mask Register */ |
| 9596 | #define ETH_MACIMR_TSTIM ((uint32_t)0x00000200) /* Time stamp trigger interrupt mask */ |
| 9597 | #define ETH_MACIMR_PMTIM ((uint32_t)0x00000008) /* PMT interrupt mask */ |
| 9598 | |
| 9599 | /* Bit definition for Ethernet MAC Address0 High Register */ |
| 9600 | #define ETH_MACA0HR_MACA0H ((uint32_t)0x0000FFFF) /* MAC address0 high */ |
| 9601 | |
| 9602 | /* Bit definition for Ethernet MAC Address0 Low Register */ |
| 9603 | #define ETH_MACA0LR_MACA0L ((uint32_t)0xFFFFFFFF) /* MAC address0 low */ |
| 9604 | |
| 9605 | /* Bit definition for Ethernet MAC Address1 High Register */ |
| 9606 | #define ETH_MACA1HR_AE ((uint32_t)0x80000000) /* Address enable */ |
| 9607 | #define ETH_MACA1HR_SA ((uint32_t)0x40000000) /* Source address */ |
| 9608 | #define ETH_MACA1HR_MBC ((uint32_t)0x3F000000) /* Mask byte control: bits to mask for comparison of the MAC Address bytes */ |
| 9609 | #define ETH_MACA1HR_MBC_HBits15_8 ((uint32_t)0x20000000) /* Mask MAC Address high reg bits [15:8] */ |
| 9610 | #define ETH_MACA1HR_MBC_HBits7_0 ((uint32_t)0x10000000) /* Mask MAC Address high reg bits [7:0] */ |
| 9611 | #define ETH_MACA1HR_MBC_LBits31_24 ((uint32_t)0x08000000) /* Mask MAC Address low reg bits [31:24] */ |
| 9612 | #define ETH_MACA1HR_MBC_LBits23_16 ((uint32_t)0x04000000) /* Mask MAC Address low reg bits [23:16] */ |
| 9613 | #define ETH_MACA1HR_MBC_LBits15_8 ((uint32_t)0x02000000) /* Mask MAC Address low reg bits [15:8] */ |
| 9614 | #define ETH_MACA1HR_MBC_LBits7_0 ((uint32_t)0x01000000) /* Mask MAC Address low reg bits [7:0] */ |
| 9615 | #define ETH_MACA1HR_MACA1H ((uint32_t)0x0000FFFF) /* MAC address1 high */ |
| 9616 | |
| 9617 | /* Bit definition for Ethernet MAC Address1 Low Register */ |
| 9618 | #define ETH_MACA1LR_MACA1L ((uint32_t)0xFFFFFFFF) /* MAC address1 low */ |
| 9619 | |
| 9620 | /* Bit definition for Ethernet MAC Address2 High Register */ |
| 9621 | #define ETH_MACA2HR_AE ((uint32_t)0x80000000) /* Address enable */ |
| 9622 | #define ETH_MACA2HR_SA ((uint32_t)0x40000000) /* Source address */ |
| 9623 | #define ETH_MACA2HR_MBC ((uint32_t)0x3F000000) /* Mask byte control */ |
| 9624 | #define ETH_MACA2HR_MBC_HBits15_8 ((uint32_t)0x20000000) /* Mask MAC Address high reg bits [15:8] */ |
| 9625 | #define ETH_MACA2HR_MBC_HBits7_0 ((uint32_t)0x10000000) /* Mask MAC Address high reg bits [7:0] */ |
| 9626 | #define ETH_MACA2HR_MBC_LBits31_24 ((uint32_t)0x08000000) /* Mask MAC Address low reg bits [31:24] */ |
| 9627 | #define ETH_MACA2HR_MBC_LBits23_16 ((uint32_t)0x04000000) /* Mask MAC Address low reg bits [23:16] */ |
| 9628 | #define ETH_MACA2HR_MBC_LBits15_8 ((uint32_t)0x02000000) /* Mask MAC Address low reg bits [15:8] */ |
| 9629 | #define ETH_MACA2HR_MBC_LBits7_0 ((uint32_t)0x01000000) /* Mask MAC Address low reg bits [70] */ |
| 9630 | #define ETH_MACA2HR_MACA2H ((uint32_t)0x0000FFFF) /* MAC address1 high */ |
| 9631 | |
| 9632 | /* Bit definition for Ethernet MAC Address2 Low Register */ |
| 9633 | #define ETH_MACA2LR_MACA2L ((uint32_t)0xFFFFFFFF) /* MAC address2 low */ |
| 9634 | |
| 9635 | /* Bit definition for Ethernet MAC Address3 High Register */ |
| 9636 | #define ETH_MACA3HR_AE ((uint32_t)0x80000000) /* Address enable */ |
| 9637 | #define ETH_MACA3HR_SA ((uint32_t)0x40000000) /* Source address */ |
| 9638 | #define ETH_MACA3HR_MBC ((uint32_t)0x3F000000) /* Mask byte control */ |
| 9639 | #define ETH_MACA3HR_MBC_HBits15_8 ((uint32_t)0x20000000) /* Mask MAC Address high reg bits [15:8] */ |
| 9640 | #define ETH_MACA3HR_MBC_HBits7_0 ((uint32_t)0x10000000) /* Mask MAC Address high reg bits [7:0] */ |
| 9641 | #define ETH_MACA3HR_MBC_LBits31_24 ((uint32_t)0x08000000) /* Mask MAC Address low reg bits [31:24] */ |
| 9642 | #define ETH_MACA3HR_MBC_LBits23_16 ((uint32_t)0x04000000) /* Mask MAC Address low reg bits [23:16] */ |
| 9643 | #define ETH_MACA3HR_MBC_LBits15_8 ((uint32_t)0x02000000) /* Mask MAC Address low reg bits [15:8] */ |
| 9644 | #define ETH_MACA3HR_MBC_LBits7_0 ((uint32_t)0x01000000) /* Mask MAC Address low reg bits [70] */ |
| 9645 | #define ETH_MACA3HR_MACA3H ((uint32_t)0x0000FFFF) /* MAC address3 high */ |
| 9646 | |
| 9647 | /* Bit definition for Ethernet MAC Address3 Low Register */ |
| 9648 | #define ETH_MACA3LR_MACA3L ((uint32_t)0xFFFFFFFF) /* MAC address3 low */ |
| 9649 | |
| 9650 | /******************************************************************************/ |
| 9651 | /* Ethernet MMC Registers bits definition */ |
| 9652 | /******************************************************************************/ |
| 9653 | |
| 9654 | /* Bit definition for Ethernet MMC Contol Register */ |
| 9655 | #define ETH_MMCCR_MCFHP ((uint32_t)0x00000020) /* MMC counter Full-Half preset */ |
| 9656 | #define ETH_MMCCR_MCP ((uint32_t)0x00000010) /* MMC counter preset */ |
| 9657 | #define ETH_MMCCR_MCF ((uint32_t)0x00000008) /* MMC Counter Freeze */ |
| 9658 | #define ETH_MMCCR_ROR ((uint32_t)0x00000004) /* Reset on Read */ |
| 9659 | #define ETH_MMCCR_CSR ((uint32_t)0x00000002) /* Counter Stop Rollover */ |
| 9660 | #define ETH_MMCCR_CR ((uint32_t)0x00000001) /* Counters Reset */ |
| 9661 | |
| 9662 | /* Bit definition for Ethernet MMC Receive Interrupt Register */ |
| 9663 | #define ETH_MMCRIR_RGUFS ((uint32_t)0x00020000) /* Set when Rx good unicast frames counter reaches half the maximum value */ |
| 9664 | #define ETH_MMCRIR_RFAES ((uint32_t)0x00000040) /* Set when Rx alignment error counter reaches half the maximum value */ |
| 9665 | #define ETH_MMCRIR_RFCES ((uint32_t)0x00000020) /* Set when Rx crc error counter reaches half the maximum value */ |
| 9666 | |
| 9667 | /* Bit definition for Ethernet MMC Transmit Interrupt Register */ |
| 9668 | #define ETH_MMCTIR_TGFS ((uint32_t)0x00200000) /* Set when Tx good frame count counter reaches half the maximum value */ |
| 9669 | #define ETH_MMCTIR_TGFMSCS ((uint32_t)0x00008000) /* Set when Tx good multi col counter reaches half the maximum value */ |
| 9670 | #define ETH_MMCTIR_TGFSCS ((uint32_t)0x00004000) /* Set when Tx good single col counter reaches half the maximum value */ |
| 9671 | |
| 9672 | /* Bit definition for Ethernet MMC Receive Interrupt Mask Register */ |
| 9673 | #define ETH_MMCRIMR_RGUFM ((uint32_t)0x00020000) /* Mask the interrupt when Rx good unicast frames counter reaches half the maximum value */ |
| 9674 | #define ETH_MMCRIMR_RFAEM ((uint32_t)0x00000040) /* Mask the interrupt when when Rx alignment error counter reaches half the maximum value */ |
| 9675 | #define ETH_MMCRIMR_RFCEM ((uint32_t)0x00000020) /* Mask the interrupt when Rx crc error counter reaches half the maximum value */ |
| 9676 | |
| 9677 | /* Bit definition for Ethernet MMC Transmit Interrupt Mask Register */ |
| 9678 | #define ETH_MMCTIMR_TGFM ((uint32_t)0x00200000) /* Mask the interrupt when Tx good frame count counter reaches half the maximum value */ |
| 9679 | #define ETH_MMCTIMR_TGFMSCM ((uint32_t)0x00008000) /* Mask the interrupt when Tx good multi col counter reaches half the maximum value */ |
| 9680 | #define ETH_MMCTIMR_TGFSCM ((uint32_t)0x00004000) /* Mask the interrupt when Tx good single col counter reaches half the maximum value */ |
| 9681 | |
| 9682 | /* Bit definition for Ethernet MMC Transmitted Good Frames after Single Collision Counter Register */ |
| 9683 | #define ETH_MMCTGFSCCR_TGFSCC ((uint32_t)0xFFFFFFFF) /* Number of successfully transmitted frames after a single collision in Half-duplex mode. */ |
| 9684 | |
| 9685 | /* Bit definition for Ethernet MMC Transmitted Good Frames after More than a Single Collision Counter Register */ |
| 9686 | #define ETH_MMCTGFMSCCR_TGFMSCC ((uint32_t)0xFFFFFFFF) /* Number of successfully transmitted frames after more than a single collision in Half-duplex mode. */ |
| 9687 | |
| 9688 | /* Bit definition for Ethernet MMC Transmitted Good Frames Counter Register */ |
| 9689 | #define ETH_MMCTGFCR_TGFC ((uint32_t)0xFFFFFFFF) /* Number of good frames transmitted. */ |
| 9690 | |
| 9691 | /* Bit definition for Ethernet MMC Received Frames with CRC Error Counter Register */ |
| 9692 | #define ETH_MMCRFCECR_RFCEC ((uint32_t)0xFFFFFFFF) /* Number of frames received with CRC error. */ |
| 9693 | |
| 9694 | /* Bit definition for Ethernet MMC Received Frames with Alignement Error Counter Register */ |
| 9695 | #define ETH_MMCRFAECR_RFAEC ((uint32_t)0xFFFFFFFF) /* Number of frames received with alignment (dribble) error */ |
| 9696 | |
| 9697 | /* Bit definition for Ethernet MMC Received Good Unicast Frames Counter Register */ |
| 9698 | #define ETH_MMCRGUFCR_RGUFC ((uint32_t)0xFFFFFFFF) /* Number of good unicast frames received. */ |
| 9699 | |
| 9700 | /******************************************************************************/ |
| 9701 | /* Ethernet PTP Registers bits definition */ |
| 9702 | /******************************************************************************/ |
| 9703 | |
| 9704 | /* Bit definition for Ethernet PTP Time Stamp Contol Register */ |
| 9705 | #define ETH_PTPTSCR_TSCNT ((uint32_t)0x00030000) /* Time stamp clock node type */ |
| 9706 | #define ETH_PTPTSSR_TSSMRME ((uint32_t)0x00008000) /* Time stamp snapshot for message relevant to master enable */ |
| 9707 | #define ETH_PTPTSSR_TSSEME ((uint32_t)0x00004000) /* Time stamp snapshot for event message enable */ |
| 9708 | #define ETH_PTPTSSR_TSSIPV4FE ((uint32_t)0x00002000) /* Time stamp snapshot for IPv4 frames enable */ |
| 9709 | #define ETH_PTPTSSR_TSSIPV6FE ((uint32_t)0x00001000) /* Time stamp snapshot for IPv6 frames enable */ |
| 9710 | #define ETH_PTPTSSR_TSSPTPOEFE ((uint32_t)0x00000800) /* Time stamp snapshot for PTP over ethernet frames enable */ |
| 9711 | #define ETH_PTPTSSR_TSPTPPSV2E ((uint32_t)0x00000400) /* Time stamp PTP packet snooping for version2 format enable */ |
| 9712 | #define ETH_PTPTSSR_TSSSR ((uint32_t)0x00000200) /* Time stamp Sub-seconds rollover */ |
| 9713 | #define ETH_PTPTSSR_TSSARFE ((uint32_t)0x00000100) /* Time stamp snapshot for all received frames enable */ |
| 9714 | |
| 9715 | #define ETH_PTPTSCR_TSARU ((uint32_t)0x00000020) /* Addend register update */ |
| 9716 | #define ETH_PTPTSCR_TSITE ((uint32_t)0x00000010) /* Time stamp interrupt trigger enable */ |
| 9717 | #define ETH_PTPTSCR_TSSTU ((uint32_t)0x00000008) /* Time stamp update */ |
| 9718 | #define ETH_PTPTSCR_TSSTI ((uint32_t)0x00000004) /* Time stamp initialize */ |
| 9719 | #define ETH_PTPTSCR_TSFCU ((uint32_t)0x00000002) /* Time stamp fine or coarse update */ |
| 9720 | #define ETH_PTPTSCR_TSE ((uint32_t)0x00000001) /* Time stamp enable */ |
| 9721 | |
| 9722 | /* Bit definition for Ethernet PTP Sub-Second Increment Register */ |
| 9723 | #define ETH_PTPSSIR_STSSI ((uint32_t)0x000000FF) /* System time Sub-second increment value */ |
| 9724 | |
| 9725 | /* Bit definition for Ethernet PTP Time Stamp High Register */ |
| 9726 | #define ETH_PTPTSHR_STS ((uint32_t)0xFFFFFFFF) /* System Time second */ |
| 9727 | |
| 9728 | /* Bit definition for Ethernet PTP Time Stamp Low Register */ |
| 9729 | #define ETH_PTPTSLR_STPNS ((uint32_t)0x80000000) /* System Time Positive or negative time */ |
| 9730 | #define ETH_PTPTSLR_STSS ((uint32_t)0x7FFFFFFF) /* System Time sub-seconds */ |
| 9731 | |
| 9732 | /* Bit definition for Ethernet PTP Time Stamp High Update Register */ |
| 9733 | #define ETH_PTPTSHUR_TSUS ((uint32_t)0xFFFFFFFF) /* Time stamp update seconds */ |
| 9734 | |
| 9735 | /* Bit definition for Ethernet PTP Time Stamp Low Update Register */ |
| 9736 | #define ETH_PTPTSLUR_TSUPNS ((uint32_t)0x80000000) /* Time stamp update Positive or negative time */ |
| 9737 | #define ETH_PTPTSLUR_TSUSS ((uint32_t)0x7FFFFFFF) /* Time stamp update sub-seconds */ |
| 9738 | |
| 9739 | /* Bit definition for Ethernet PTP Time Stamp Addend Register */ |
| 9740 | #define ETH_PTPTSAR_TSA ((uint32_t)0xFFFFFFFF) /* Time stamp addend */ |
| 9741 | |
| 9742 | /* Bit definition for Ethernet PTP Target Time High Register */ |
| 9743 | #define ETH_PTPTTHR_TTSH ((uint32_t)0xFFFFFFFF) /* Target time stamp high */ |
| 9744 | |
| 9745 | /* Bit definition for Ethernet PTP Target Time Low Register */ |
| 9746 | #define ETH_PTPTTLR_TTSL ((uint32_t)0xFFFFFFFF) /* Target time stamp low */ |
| 9747 | |
| 9748 | /* Bit definition for Ethernet PTP Time Stamp Status Register */ |
| 9749 | #define ETH_PTPTSSR_TSTTR ((uint32_t)0x00000020) /* Time stamp target time reached */ |
| 9750 | #define ETH_PTPTSSR_TSSO ((uint32_t)0x00000010) /* Time stamp seconds overflow */ |
| 9751 | |
| 9752 | /******************************************************************************/ |
| 9753 | /* Ethernet DMA Registers bits definition */ |
| 9754 | /******************************************************************************/ |
| 9755 | |
| 9756 | /* Bit definition for Ethernet DMA Bus Mode Register */ |
| 9757 | #define ETH_DMABMR_AAB ((uint32_t)0x02000000) /* Address-Aligned beats */ |
| 9758 | #define ETH_DMABMR_FPM ((uint32_t)0x01000000) /* 4xPBL mode */ |
| 9759 | #define ETH_DMABMR_USP ((uint32_t)0x00800000) /* Use separate PBL */ |
| 9760 | #define ETH_DMABMR_RDP ((uint32_t)0x007E0000) /* RxDMA PBL */ |
| 9761 | #define ETH_DMABMR_RDP_1Beat ((uint32_t)0x00020000) /* maximum number of beats to be transferred in one RxDMA transaction is 1 */ |
| 9762 | #define ETH_DMABMR_RDP_2Beat ((uint32_t)0x00040000) /* maximum number of beats to be transferred in one RxDMA transaction is 2 */ |
| 9763 | #define ETH_DMABMR_RDP_4Beat ((uint32_t)0x00080000) /* maximum number of beats to be transferred in one RxDMA transaction is 4 */ |
| 9764 | #define ETH_DMABMR_RDP_8Beat ((uint32_t)0x00100000) /* maximum number of beats to be transferred in one RxDMA transaction is 8 */ |
| 9765 | #define ETH_DMABMR_RDP_16Beat ((uint32_t)0x00200000) /* maximum number of beats to be transferred in one RxDMA transaction is 16 */ |
| 9766 | #define ETH_DMABMR_RDP_32Beat ((uint32_t)0x00400000) /* maximum number of beats to be transferred in one RxDMA transaction is 32 */ |
| 9767 | #define ETH_DMABMR_RDP_4xPBL_4Beat ((uint32_t)0x01020000) /* maximum number of beats to be transferred in one RxDMA transaction is 4 */ |
| 9768 | #define ETH_DMABMR_RDP_4xPBL_8Beat ((uint32_t)0x01040000) /* maximum number of beats to be transferred in one RxDMA transaction is 8 */ |
| 9769 | #define ETH_DMABMR_RDP_4xPBL_16Beat ((uint32_t)0x01080000) /* maximum number of beats to be transferred in one RxDMA transaction is 16 */ |
| 9770 | #define ETH_DMABMR_RDP_4xPBL_32Beat ((uint32_t)0x01100000) /* maximum number of beats to be transferred in one RxDMA transaction is 32 */ |
| 9771 | #define ETH_DMABMR_RDP_4xPBL_64Beat ((uint32_t)0x01200000) /* maximum number of beats to be transferred in one RxDMA transaction is 64 */ |
| 9772 | #define ETH_DMABMR_RDP_4xPBL_128Beat ((uint32_t)0x01400000) /* maximum number of beats to be transferred in one RxDMA transaction is 128 */ |
| 9773 | #define ETH_DMABMR_FB ((uint32_t)0x00010000) /* Fixed Burst */ |
| 9774 | #define ETH_DMABMR_RTPR ((uint32_t)0x0000C000) /* Rx Tx priority ratio */ |
| 9775 | #define ETH_DMABMR_RTPR_1_1 ((uint32_t)0x00000000) /* Rx Tx priority ratio */ |
| 9776 | #define ETH_DMABMR_RTPR_2_1 ((uint32_t)0x00004000) /* Rx Tx priority ratio */ |
| 9777 | #define ETH_DMABMR_RTPR_3_1 ((uint32_t)0x00008000) /* Rx Tx priority ratio */ |
| 9778 | #define ETH_DMABMR_RTPR_4_1 ((uint32_t)0x0000C000) /* Rx Tx priority ratio */ |
| 9779 | #define ETH_DMABMR_PBL ((uint32_t)0x00003F00) /* Programmable burst length */ |
| 9780 | #define ETH_DMABMR_PBL_1Beat ((uint32_t)0x00000100) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 1 */ |
| 9781 | #define ETH_DMABMR_PBL_2Beat ((uint32_t)0x00000200) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 2 */ |
| 9782 | #define ETH_DMABMR_PBL_4Beat ((uint32_t)0x00000400) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 4 */ |
| 9783 | #define ETH_DMABMR_PBL_8Beat ((uint32_t)0x00000800) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 8 */ |
| 9784 | #define ETH_DMABMR_PBL_16Beat ((uint32_t)0x00001000) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 16 */ |
| 9785 | #define ETH_DMABMR_PBL_32Beat ((uint32_t)0x00002000) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 32 */ |
| 9786 | #define ETH_DMABMR_PBL_4xPBL_4Beat ((uint32_t)0x01000100) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 4 */ |
| 9787 | #define ETH_DMABMR_PBL_4xPBL_8Beat ((uint32_t)0x01000200) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 8 */ |
| 9788 | #define ETH_DMABMR_PBL_4xPBL_16Beat ((uint32_t)0x01000400) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 16 */ |
| 9789 | #define ETH_DMABMR_PBL_4xPBL_32Beat ((uint32_t)0x01000800) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 32 */ |
| 9790 | #define ETH_DMABMR_PBL_4xPBL_64Beat ((uint32_t)0x01001000) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 64 */ |
| 9791 | #define ETH_DMABMR_PBL_4xPBL_128Beat ((uint32_t)0x01002000) /* maximum number of beats to be transferred in one TxDMA (or both) transaction is 128 */ |
| 9792 | #define ETH_DMABMR_EDE ((uint32_t)0x00000080) /* Enhanced Descriptor Enable */ |
| 9793 | #define ETH_DMABMR_DSL ((uint32_t)0x0000007C) /* Descriptor Skip Length */ |
| 9794 | #define ETH_DMABMR_DA ((uint32_t)0x00000002) /* DMA arbitration scheme */ |
| 9795 | #define ETH_DMABMR_SR ((uint32_t)0x00000001) /* Software reset */ |
| 9796 | |
| 9797 | /* Bit definition for Ethernet DMA Transmit Poll Demand Register */ |
| 9798 | #define ETH_DMATPDR_TPD ((uint32_t)0xFFFFFFFF) /* Transmit poll demand */ |
| 9799 | |
| 9800 | /* Bit definition for Ethernet DMA Receive Poll Demand Register */ |
| 9801 | #define ETH_DMARPDR_RPD ((uint32_t)0xFFFFFFFF) /* Receive poll demand */ |
| 9802 | |
| 9803 | /* Bit definition for Ethernet DMA Receive Descriptor List Address Register */ |
| 9804 | #define ETH_DMARDLAR_SRL ((uint32_t)0xFFFFFFFF) /* Start of receive list */ |
| 9805 | |
| 9806 | /* Bit definition for Ethernet DMA Transmit Descriptor List Address Register */ |
| 9807 | #define ETH_DMATDLAR_STL ((uint32_t)0xFFFFFFFF) /* Start of transmit list */ |
| 9808 | |
| 9809 | /* Bit definition for Ethernet DMA Status Register */ |
| 9810 | #define ETH_DMASR_TSTS ((uint32_t)0x20000000) /* Time-stamp trigger status */ |
| 9811 | #define ETH_DMASR_PMTS ((uint32_t)0x10000000) /* PMT status */ |
| 9812 | #define ETH_DMASR_MMCS ((uint32_t)0x08000000) /* MMC status */ |
| 9813 | #define ETH_DMASR_EBS ((uint32_t)0x03800000) /* Error bits status */ |
| 9814 | /* combination with EBS[2:0] for GetFlagStatus function */ |
| 9815 | #define ETH_DMASR_EBS_DescAccess ((uint32_t)0x02000000) /* Error bits 0-data buffer, 1-desc. access */ |
| 9816 | #define ETH_DMASR_EBS_ReadTransf ((uint32_t)0x01000000) /* Error bits 0-write trnsf, 1-read transfr */ |
| 9817 | #define ETH_DMASR_EBS_DataTransfTx ((uint32_t)0x00800000) /* Error bits 0-Rx DMA, 1-Tx DMA */ |
| 9818 | #define ETH_DMASR_TPS ((uint32_t)0x00700000) /* Transmit process state */ |
| 9819 | #define ETH_DMASR_TPS_Stopped ((uint32_t)0x00000000) /* Stopped - Reset or Stop Tx Command issued */ |
| 9820 | #define ETH_DMASR_TPS_Fetching ((uint32_t)0x00100000) /* Running - fetching the Tx descriptor */ |
| 9821 | #define ETH_DMASR_TPS_Waiting ((uint32_t)0x00200000) /* Running - waiting for status */ |
| 9822 | #define ETH_DMASR_TPS_Reading ((uint32_t)0x00300000) /* Running - reading the data from host memory */ |
| 9823 | #define ETH_DMASR_TPS_Suspended ((uint32_t)0x00600000) /* Suspended - Tx Descriptor unavailabe */ |
| 9824 | #define ETH_DMASR_TPS_Closing ((uint32_t)0x00700000) /* Running - closing Rx descriptor */ |
| 9825 | #define ETH_DMASR_RPS ((uint32_t)0x000E0000) /* Receive process state */ |
| 9826 | #define ETH_DMASR_RPS_Stopped ((uint32_t)0x00000000) /* Stopped - Reset or Stop Rx Command issued */ |
| 9827 | #define ETH_DMASR_RPS_Fetching ((uint32_t)0x00020000) /* Running - fetching the Rx descriptor */ |
| 9828 | #define ETH_DMASR_RPS_Waiting ((uint32_t)0x00060000) /* Running - waiting for packet */ |
| 9829 | #define ETH_DMASR_RPS_Suspended ((uint32_t)0x00080000) /* Suspended - Rx Descriptor unavailable */ |
| 9830 | #define ETH_DMASR_RPS_Closing ((uint32_t)0x000A0000) /* Running - closing descriptor */ |
| 9831 | #define ETH_DMASR_RPS_Queuing ((uint32_t)0x000E0000) /* Running - queuing the recieve frame into host memory */ |
| 9832 | #define ETH_DMASR_NIS ((uint32_t)0x00010000) /* Normal interrupt summary */ |
| 9833 | #define ETH_DMASR_AIS ((uint32_t)0x00008000) /* Abnormal interrupt summary */ |
| 9834 | #define ETH_DMASR_ERS ((uint32_t)0x00004000) /* Early receive status */ |
| 9835 | #define ETH_DMASR_FBES ((uint32_t)0x00002000) /* Fatal bus error status */ |
| 9836 | #define ETH_DMASR_ETS ((uint32_t)0x00000400) /* Early transmit status */ |
| 9837 | #define ETH_DMASR_RWTS ((uint32_t)0x00000200) /* Receive watchdog timeout status */ |
| 9838 | #define ETH_DMASR_RPSS ((uint32_t)0x00000100) /* Receive process stopped status */ |
| 9839 | #define ETH_DMASR_RBUS ((uint32_t)0x00000080) /* Receive buffer unavailable status */ |
| 9840 | #define ETH_DMASR_RS ((uint32_t)0x00000040) /* Receive status */ |
| 9841 | #define ETH_DMASR_TUS ((uint32_t)0x00000020) /* Transmit underflow status */ |
| 9842 | #define ETH_DMASR_ROS ((uint32_t)0x00000010) /* Receive overflow status */ |
| 9843 | #define ETH_DMASR_TJTS ((uint32_t)0x00000008) /* Transmit jabber timeout status */ |
| 9844 | #define ETH_DMASR_TBUS ((uint32_t)0x00000004) /* Transmit buffer unavailable status */ |
| 9845 | #define ETH_DMASR_TPSS ((uint32_t)0x00000002) /* Transmit process stopped status */ |
| 9846 | #define ETH_DMASR_TS ((uint32_t)0x00000001) /* Transmit status */ |
| 9847 | |
| 9848 | /* Bit definition for Ethernet DMA Operation Mode Register */ |
| 9849 | #define ETH_DMAOMR_DTCEFD ((uint32_t)0x04000000) /* Disable Dropping of TCP/IP checksum error frames */ |
| 9850 | #define ETH_DMAOMR_RSF ((uint32_t)0x02000000) /* Receive store and forward */ |
| 9851 | #define ETH_DMAOMR_DFRF ((uint32_t)0x01000000) /* Disable flushing of received frames */ |
| 9852 | #define ETH_DMAOMR_TSF ((uint32_t)0x00200000) /* Transmit store and forward */ |
| 9853 | #define ETH_DMAOMR_FTF ((uint32_t)0x00100000) /* Flush transmit FIFO */ |
| 9854 | #define ETH_DMAOMR_TTC ((uint32_t)0x0001C000) /* Transmit threshold control */ |
| 9855 | #define ETH_DMAOMR_TTC_64Bytes ((uint32_t)0x00000000) /* threshold level of the MTL Transmit FIFO is 64 Bytes */ |
| 9856 | #define ETH_DMAOMR_TTC_128Bytes ((uint32_t)0x00004000) /* threshold level of the MTL Transmit FIFO is 128 Bytes */ |
| 9857 | #define ETH_DMAOMR_TTC_192Bytes ((uint32_t)0x00008000) /* threshold level of the MTL Transmit FIFO is 192 Bytes */ |
| 9858 | #define ETH_DMAOMR_TTC_256Bytes ((uint32_t)0x0000C000) /* threshold level of the MTL Transmit FIFO is 256 Bytes */ |
| 9859 | #define ETH_DMAOMR_TTC_40Bytes ((uint32_t)0x00010000) /* threshold level of the MTL Transmit FIFO is 40 Bytes */ |
| 9860 | #define ETH_DMAOMR_TTC_32Bytes ((uint32_t)0x00014000) /* threshold level of the MTL Transmit FIFO is 32 Bytes */ |
| 9861 | #define ETH_DMAOMR_TTC_24Bytes ((uint32_t)0x00018000) /* threshold level of the MTL Transmit FIFO is 24 Bytes */ |
| 9862 | #define ETH_DMAOMR_TTC_16Bytes ((uint32_t)0x0001C000) /* threshold level of the MTL Transmit FIFO is 16 Bytes */ |
| 9863 | #define ETH_DMAOMR_ST ((uint32_t)0x00002000) /* Start/stop transmission command */ |
| 9864 | #define ETH_DMAOMR_FEF ((uint32_t)0x00000080) /* Forward error frames */ |
| 9865 | #define ETH_DMAOMR_FUGF ((uint32_t)0x00000040) /* Forward undersized good frames */ |
| 9866 | #define ETH_DMAOMR_RTC ((uint32_t)0x00000018) /* receive threshold control */ |
| 9867 | #define ETH_DMAOMR_RTC_64Bytes ((uint32_t)0x00000000) /* threshold level of the MTL Receive FIFO is 64 Bytes */ |
| 9868 | #define ETH_DMAOMR_RTC_32Bytes ((uint32_t)0x00000008) /* threshold level of the MTL Receive FIFO is 32 Bytes */ |
| 9869 | #define ETH_DMAOMR_RTC_96Bytes ((uint32_t)0x00000010) /* threshold level of the MTL Receive FIFO is 96 Bytes */ |
| 9870 | #define ETH_DMAOMR_RTC_128Bytes ((uint32_t)0x00000018) /* threshold level of the MTL Receive FIFO is 128 Bytes */ |
| 9871 | #define ETH_DMAOMR_OSF ((uint32_t)0x00000004) /* operate on second frame */ |
| 9872 | #define ETH_DMAOMR_SR ((uint32_t)0x00000002) /* Start/stop receive */ |
| 9873 | |
| 9874 | /* Bit definition for Ethernet DMA Interrupt Enable Register */ |
| 9875 | #define ETH_DMAIER_NISE ((uint32_t)0x00010000) /* Normal interrupt summary enable */ |
| 9876 | #define ETH_DMAIER_AISE ((uint32_t)0x00008000) /* Abnormal interrupt summary enable */ |
| 9877 | #define ETH_DMAIER_ERIE ((uint32_t)0x00004000) /* Early receive interrupt enable */ |
| 9878 | #define ETH_DMAIER_FBEIE ((uint32_t)0x00002000) /* Fatal bus error interrupt enable */ |
| 9879 | #define ETH_DMAIER_ETIE ((uint32_t)0x00000400) /* Early transmit interrupt enable */ |
| 9880 | #define ETH_DMAIER_RWTIE ((uint32_t)0x00000200) /* Receive watchdog timeout interrupt enable */ |
| 9881 | #define ETH_DMAIER_RPSIE ((uint32_t)0x00000100) /* Receive process stopped interrupt enable */ |
| 9882 | #define ETH_DMAIER_RBUIE ((uint32_t)0x00000080) /* Receive buffer unavailable interrupt enable */ |
| 9883 | #define ETH_DMAIER_RIE ((uint32_t)0x00000040) /* Receive interrupt enable */ |
| 9884 | #define ETH_DMAIER_TUIE ((uint32_t)0x00000020) /* Transmit Underflow interrupt enable */ |
| 9885 | #define ETH_DMAIER_ROIE ((uint32_t)0x00000010) /* Receive Overflow interrupt enable */ |
| 9886 | #define ETH_DMAIER_TJTIE ((uint32_t)0x00000008) /* Transmit jabber timeout interrupt enable */ |
| 9887 | #define ETH_DMAIER_TBUIE ((uint32_t)0x00000004) /* Transmit buffer unavailable interrupt enable */ |
| 9888 | #define ETH_DMAIER_TPSIE ((uint32_t)0x00000002) /* Transmit process stopped interrupt enable */ |
| 9889 | #define ETH_DMAIER_TIE ((uint32_t)0x00000001) /* Transmit interrupt enable */ |
| 9890 | |
| 9891 | /* Bit definition for Ethernet DMA Missed Frame and Buffer Overflow Counter Register */ |
| 9892 | #define ETH_DMAMFBOCR_OFOC ((uint32_t)0x10000000) /* Overflow bit for FIFO overflow counter */ |
| 9893 | #define ETH_DMAMFBOCR_MFA ((uint32_t)0x0FFE0000) /* Number of frames missed by the application */ |
| 9894 | #define ETH_DMAMFBOCR_OMFC ((uint32_t)0x00010000) /* Overflow bit for missed frame counter */ |
| 9895 | #define ETH_DMAMFBOCR_MFC ((uint32_t)0x0000FFFF) /* Number of frames missed by the controller */ |
| 9896 | |
| 9897 | /* Bit definition for Ethernet DMA Current Host Transmit Descriptor Register */ |
| 9898 | #define ETH_DMACHTDR_HTDAP ((uint32_t)0xFFFFFFFF) /* Host transmit descriptor address pointer */ |
| 9899 | |
| 9900 | /* Bit definition for Ethernet DMA Current Host Receive Descriptor Register */ |
| 9901 | #define ETH_DMACHRDR_HRDAP ((uint32_t)0xFFFFFFFF) /* Host receive descriptor address pointer */ |
| 9902 | |
| 9903 | /* Bit definition for Ethernet DMA Current Host Transmit Buffer Address Register */ |
| 9904 | #define ETH_DMACHTBAR_HTBAP ((uint32_t)0xFFFFFFFF) /* Host transmit buffer address pointer */ |
| 9905 | |
| 9906 | /* Bit definition for Ethernet DMA Current Host Receive Buffer Address Register */ |
| 9907 | #define ETH_DMACHRBAR_HRBAP ((uint32_t)0xFFFFFFFF) /* Host receive buffer address pointer */ |
| 9908 | |
| 9909 | /** |
| 9910 | * |
| 9911 | */ |
| 9912 | |
| 9913 | /** |
| 9914 | * @} |
| 9915 | */ |
| 9916 | |
| 9917 | #ifdef USE_STDPERIPH_DRIVER |
| 9918 | #include "stm32f4xx_conf.h" |
| 9919 | #endif /* USE_STDPERIPH_DRIVER */ |
| 9920 | |
| 9921 | /** @addtogroup Exported_macro |
| 9922 | * @{ |
| 9923 | */ |
| 9924 | |
| 9925 | #define SET_BIT(REG, BIT) ((REG) |= (BIT)) |
| 9926 | |
| 9927 | #define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT)) |
| 9928 | |
| 9929 | #define READ_BIT(REG, BIT) ((REG) & (BIT)) |
| 9930 | |
| 9931 | #define CLEAR_REG(REG) ((REG) = (0x0)) |
| 9932 | |
| 9933 | #define WRITE_REG(REG, VAL) ((REG) = (VAL)) |
| 9934 | |
| 9935 | #define READ_REG(REG) ((REG)) |
| 9936 | |
| 9937 | #define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK))) |
| 9938 | |
| 9939 | /** |
| 9940 | * @} |
| 9941 | */ |
| 9942 | |
| 9943 | #ifdef __cplusplus |
| 9944 | } |
| 9945 | #endif /* __cplusplus */ |
| 9946 | |
| 9947 | #endif /* __STM32F4xx_H */ |
| 9948 | |
| 9949 | /** |
| 9950 | * @} |
| 9951 | */ |
| 9952 | |
| 9953 | /** |
| 9954 | * @} |
| 9955 | */ |
| 9956 | |
| 9957 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |