1 /** 2 ****************************************************************************** 3 * @file stm32h7xx_hal.h 4 * @author MCD Application Team 5 * @brief This file contains all the functions prototypes for the HAL 6 * module driver. 7 ****************************************************************************** 8 * @attention 9 * 10 * Copyright (c) 2017 STMicroelectronics. 11 * All rights reserved. 12 * 13 * This software is licensed under terms that can be found in the LICENSE file 14 * in the root directory of this software component. 15 * If no LICENSE file comes with this software, it is provided AS-IS. 16 * 17 ****************************************************************************** 18 */ 19 20 /* Define to prevent recursive inclusion -------------------------------------*/ 21 #ifndef STM32H7xx_HAL_H 22 #define STM32H7xx_HAL_H 23 24 #ifdef __cplusplus 25 extern "C" { 26 #endif 27 28 /* Includes ------------------------------------------------------------------*/ 29 #include "stm32h7xx_hal_conf.h" 30 31 /** @addtogroup STM32H7xx_HAL_Driver 32 * @{ 33 */ 34 35 /** @addtogroup HAL 36 * @{ 37 */ 38 39 /* Exported types ------------------------------------------------------------*/ 40 /** @defgroup HAL_TICK_FREQ Tick Frequency 41 * @{ 42 */ 43 typedef enum 44 { 45 HAL_TICK_FREQ_10HZ = 100U, 46 HAL_TICK_FREQ_100HZ = 10U, 47 HAL_TICK_FREQ_1KHZ = 1U, 48 HAL_TICK_FREQ_DEFAULT = HAL_TICK_FREQ_1KHZ 49 } HAL_TickFreqTypeDef; 50 /** 51 * @} 52 */ 53 54 /* Exported constants --------------------------------------------------------*/ 55 /** @defgroup HAL_Exported_Constants HAL Exported Constants 56 * @{ 57 */ 58 /** @defgroup REV_ID device revision ID 59 * @{ 60 */ 61 #define REV_ID_Y ((uint32_t)0x1003) /*!< STM32H7 rev.Y */ 62 #define REV_ID_B ((uint32_t)0x2000) /*!< STM32H7 rev.B */ 63 #define REV_ID_X ((uint32_t)0x2001) /*!< STM32H7 rev.X */ 64 #define REV_ID_V ((uint32_t)0x2003) /*!< STM32H7 rev.V */ 65 66 /** 67 * @} 68 */ 69 70 /** @defgroup SYSCFG_Exported_Constants SYSCFG Exported Constants 71 * @{ 72 */ 73 74 /** @defgroup SYSCFG_VREFBUF_VoltageScale VREFBUF Voltage Scale 75 * @{ 76 */ 77 #define SYSCFG_VREFBUF_VOLTAGE_SCALE0 VREFBUF_CSR_VRS_OUT1 /*!< Voltage reference scale 0 (VREF_OUT1) */ 78 #define SYSCFG_VREFBUF_VOLTAGE_SCALE1 VREFBUF_CSR_VRS_OUT2 /*!< Voltage reference scale 1 (VREF_OUT2) */ 79 #define SYSCFG_VREFBUF_VOLTAGE_SCALE2 VREFBUF_CSR_VRS_OUT3 /*!< Voltage reference scale 2 (VREF_OUT3) */ 80 #define SYSCFG_VREFBUF_VOLTAGE_SCALE3 VREFBUF_CSR_VRS_OUT4 /*!< Voltage reference scale 3 (VREF_OUT4) */ 81 82 83 #define IS_SYSCFG_VREFBUF_VOLTAGE_SCALE(__SCALE__) (((__SCALE__) == SYSCFG_VREFBUF_VOLTAGE_SCALE0) || \ 84 ((__SCALE__) == SYSCFG_VREFBUF_VOLTAGE_SCALE1) || \ 85 ((__SCALE__) == SYSCFG_VREFBUF_VOLTAGE_SCALE2) || \ 86 ((__SCALE__) == SYSCFG_VREFBUF_VOLTAGE_SCALE3)) 87 88 89 /** 90 * @} 91 */ 92 93 /** @defgroup SYSCFG_VREFBUF_HighImpedance VREFBUF High Impedance 94 * @{ 95 */ 96 #define SYSCFG_VREFBUF_HIGH_IMPEDANCE_DISABLE ((uint32_t)0x00000000) /*!< VREF_plus pin is internally connected to Voltage reference buffer output */ 97 #define SYSCFG_VREFBUF_HIGH_IMPEDANCE_ENABLE VREFBUF_CSR_HIZ /*!< VREF_plus pin is high impedance */ 98 99 #define IS_SYSCFG_VREFBUF_HIGH_IMPEDANCE(__VALUE__) (((__VALUE__) == SYSCFG_VREFBUF_HIGH_IMPEDANCE_DISABLE) || \ 100 ((__VALUE__) == SYSCFG_VREFBUF_HIGH_IMPEDANCE_ENABLE)) 101 102 #define IS_SYSCFG_VREFBUF_TRIMMING(__VALUE__) (((__VALUE__) > 0UL) && ((__VALUE__) <= VREFBUF_CCR_TRIM)) 103 104 /** 105 * @} 106 */ 107 108 #if !defined(SYSCFG_PMCR_BOOSTEN) 109 /** @defgroup SYSCFG_FastModePlus_GPIO Fast-mode Plus on GPIO 110 * @{ 111 */ 112 113 /** @brief Fast-mode Plus driving capability on a specific GPIO 114 */ 115 #define SYSCFG_FASTMODEPLUS_PB6 SYSCFG_PMCR_I2C_PB6_FMP /*!< Enable Fast-mode Plus on PB6 */ 116 #define SYSCFG_FASTMODEPLUS_PB7 SYSCFG_PMCR_I2C_PB7_FMP /*!< Enable Fast-mode Plus on PB7 */ 117 #define SYSCFG_FASTMODEPLUS_PB8 SYSCFG_PMCR_I2C_PB8_FMP /*!< Enable Fast-mode Plus on PB8 */ 118 #define SYSCFG_FASTMODEPLUS_PB9 SYSCFG_PMCR_I2C_PB9_FMP /*!< Enable Fast-mode Plus on PB9 */ 119 120 #define IS_SYSCFG_FASTMODEPLUS(__PIN__) ((((__PIN__) & SYSCFG_FASTMODEPLUS_PB6) == SYSCFG_FASTMODEPLUS_PB6) || \ 121 (((__PIN__) & SYSCFG_FASTMODEPLUS_PB7) == SYSCFG_FASTMODEPLUS_PB7) || \ 122 (((__PIN__) & SYSCFG_FASTMODEPLUS_PB8) == SYSCFG_FASTMODEPLUS_PB8) || \ 123 (((__PIN__) & SYSCFG_FASTMODEPLUS_PB9) == SYSCFG_FASTMODEPLUS_PB9)) 124 125 /** 126 * @} 127 */ 128 #endif /* ! SYSCFG_PMCR_BOOSTEN */ 129 130 131 #if defined(SYSCFG_ADC2ALT_ADC2_ROUT0) || defined(SYSCFG_ADC2ALT_ADC2_ROUT1) 132 /** @defgroup SYSCFG_Adc2_Alternate_Connection SYSCFG ADC2 Alternate Connection 133 * @{ 134 */ 135 136 /** @brief Adc2 Alternate Connection on Vinp[16] and Vinp[17] 137 */ 138 #define SYSCFG_ADC2_ROUT0_DAC1_1 ((uint32_t)0x00000000) /*!< DAC1_out1 connected to ADC2 VINP[16] */ 139 #define SYSCFG_ADC2_ROUT0_VBAT4 SYSCFG_ADC2ALT_ADC2_ROUT0 /*!< VBAT/4 connected to ADC2 VINP[16] */ 140 #define SYSCFG_ADC2_ROUT1_DAC1_2 ((uint32_t)0x00000000) /*!< DAC1_out2 connected to ADC2 VINP[17] */ 141 #define SYSCFG_ADC2_ROUT1_VREFINT SYSCFG_ADC2ALT_ADC2_ROUT1 /*!< VREFINT connected to ADC2 VINP[17] */ 142 143 #define IS_SYSCFG_ADC2ALT_ROUT0(__VALUE__) (((__VALUE__) == SYSCFG_ADC2_ROUT0_DAC1_1) || \ 144 ((__VALUE__) == SYSCFG_ADC2_ROUT0_VBAT4)) 145 #define IS_SYSCFG_ADC2ALT_ROUT1(__VALUE__) (((__VALUE__) == SYSCFG_ADC2_ROUT1_DAC1_2) || \ 146 ((__VALUE__) == SYSCFG_ADC2_ROUT1_VREFINT)) 147 148 /** 149 * @} 150 */ 151 #endif /*SYSCFG_ADC2ALT_ADC2_ROUT0 || SYSCFG_ADC2ALT_ADC2_ROUT1*/ 152 153 154 /** @defgroup SYSCFG_Ethernet_Config Ethernet Config 155 * @{ 156 */ 157 #define SYSCFG_ETH_MII ((uint32_t)0x00000000) /*!< Select the Media Independent Interface */ 158 #define SYSCFG_ETH_RMII SYSCFG_PMCR_EPIS_SEL_2 /*!< Select the Reduced Media Independent Interface */ 159 160 #define IS_SYSCFG_ETHERNET_CONFIG(CONFIG) (((CONFIG) == SYSCFG_ETH_MII) || \ 161 ((CONFIG) == SYSCFG_ETH_RMII)) 162 163 /** 164 * @} 165 */ 166 167 168 /** @defgroup SYSCFG_Analog_Switch_Config Analog Switch Config 169 * @{ 170 */ 171 #define SYSCFG_SWITCH_PA0 SYSCFG_PMCR_PA0SO /*!< Select PA0 analog switch */ 172 #define SYSCFG_SWITCH_PA1 SYSCFG_PMCR_PA1SO /*!< Select PA1 analog switch */ 173 #define SYSCFG_SWITCH_PC2 SYSCFG_PMCR_PC2SO /*!< Select PC2 analog switch */ 174 #define SYSCFG_SWITCH_PC3 SYSCFG_PMCR_PC3SO /*!< Select PC3 analog switch */ 175 176 177 178 179 #define SYSCFG_SWITCH_PA0_OPEN SYSCFG_PMCR_PA0SO /*!< PA0 analog switch opened */ 180 #define SYSCFG_SWITCH_PA0_CLOSE ((uint32_t)0x00000000) /*!< PA0 analog switch closed */ 181 #define SYSCFG_SWITCH_PA1_OPEN SYSCFG_PMCR_PA1SO /*!< PA1 analog switch opened */ 182 #define SYSCFG_SWITCH_PA1_CLOSE ((uint32_t)0x00000000) /*!< PA1 analog switch closed*/ 183 #define SYSCFG_SWITCH_PC2_OPEN SYSCFG_PMCR_PC2SO /*!< PC2 analog switch opened */ 184 #define SYSCFG_SWITCH_PC2_CLOSE ((uint32_t)0x00000000) /*!< PC2 analog switch closed */ 185 #define SYSCFG_SWITCH_PC3_OPEN SYSCFG_PMCR_PC3SO /*!< PC3 analog switch opened */ 186 #define SYSCFG_SWITCH_PC3_CLOSE ((uint32_t)0x00000000) /*!< PC3 analog switch closed */ 187 188 /** 189 * @} 190 */ 191 192 #define IS_SYSCFG_ANALOG_SWITCH(SWITCH) ((((SWITCH) & SYSCFG_SWITCH_PA0) == SYSCFG_SWITCH_PA0)|| \ 193 (((SWITCH) & SYSCFG_SWITCH_PA1) == SYSCFG_SWITCH_PA1) || \ 194 (((SWITCH) & SYSCFG_SWITCH_PC2) == SYSCFG_SWITCH_PC2) || \ 195 (((SWITCH) & SYSCFG_SWITCH_PC3) == SYSCFG_SWITCH_PC3)) 196 197 198 #define IS_SYSCFG_SWITCH_STATE(STATE) ((((STATE) & SYSCFG_SWITCH_PA0_OPEN) == SYSCFG_SWITCH_PA0_OPEN) || \ 199 (((STATE) & SYSCFG_SWITCH_PA0_CLOSE) == SYSCFG_SWITCH_PA0_CLOSE) || \ 200 (((STATE) & SYSCFG_SWITCH_PA1_OPEN) == SYSCFG_SWITCH_PA1_OPEN) || \ 201 (((STATE) & SYSCFG_SWITCH_PA1_CLOSE) == SYSCFG_SWITCH_PA1_CLOSE) || \ 202 (((STATE) & SYSCFG_SWITCH_PC2_OPEN) == SYSCFG_SWITCH_PC2_OPEN) || \ 203 (((STATE) & SYSCFG_SWITCH_PC2_CLOSE) == SYSCFG_SWITCH_PC2_CLOSE) || \ 204 (((STATE) & SYSCFG_SWITCH_PC3_OPEN) == SYSCFG_SWITCH_PC3_OPEN) || \ 205 (((STATE) & SYSCFG_SWITCH_PC3_CLOSE) == SYSCFG_SWITCH_PC3_CLOSE)) 206 207 208 /** @defgroup SYSCFG_Boot_Config Boot Config 209 * @{ 210 */ 211 #define SYSCFG_BOOT_ADDR0 ((uint32_t)0x00000000) /*!< Select Boot address0 */ 212 #define SYSCFG_BOOT_ADDR1 ((uint32_t)0x00000001) /*!< Select Boot address1 */ 213 214 #define IS_SYSCFG_BOOT_REGISTER(REGISTER) (((REGISTER) == SYSCFG_BOOT_ADDR0)|| \ 215 ((REGISTER) == SYSCFG_BOOT_ADDR1)) 216 217 #define IS_SYSCFG_BOOT_ADDRESS(ADDRESS) ((ADDRESS) < PERIPH_BASE) 218 219 /** 220 * @} 221 */ 222 223 224 /** @defgroup SYSCFG_IOCompenstionCell_Config IOCompenstionCell Config 225 * @{ 226 */ 227 #define SYSCFG_CELL_CODE ((uint32_t)0x00000000) /*!< Select Code from the cell */ 228 #define SYSCFG_REGISTER_CODE SYSCFG_CCCSR_CS /*!< Code from the SYSCFG compensation cell code register */ 229 230 #define IS_SYSCFG_CODE_SELECT(SELECT) (((SELECT) == SYSCFG_CELL_CODE)|| \ 231 ((SELECT) == SYSCFG_REGISTER_CODE)) 232 233 #define IS_SYSCFG_CODE_CONFIG(CONFIG) ((CONFIG) < (0x10UL)) 234 235 /** 236 * @} 237 */ 238 239 /** 240 * @} 241 */ 242 243 244 /** @defgroup EXTI_Event_Input_Config Event Input Config 245 * @{ 246 */ 247 248 #define EXTI_MODE_IT ((uint32_t)0x00010000) 249 #define EXTI_MODE_EVT ((uint32_t)0x00020000) 250 #define EXTI_RISING_EDGE ((uint32_t)0x00100000) 251 #define EXTI_FALLING_EDGE ((uint32_t)0x00200000) 252 253 #define IS_EXTI_EDGE_LINE(EDGE) (((EDGE) == EXTI_RISING_EDGE) || ((EDGE) == EXTI_FALLING_EDGE)) 254 #define IS_EXTI_MODE_LINE(MODE) (((MODE) == EXTI_MODE_IT) || ((MODE) == EXTI_MODE_EVT)) 255 256 #define EXTI_LINE0 ((uint32_t)0x00) /*!< External interrupt LINE 0 */ 257 #define EXTI_LINE1 ((uint32_t)0x01) /*!< External interrupt LINE 1 */ 258 #define EXTI_LINE2 ((uint32_t)0x02) /*!< External interrupt LINE 2 */ 259 #define EXTI_LINE3 ((uint32_t)0x03) /*!< External interrupt LINE 3 */ 260 #define EXTI_LINE4 ((uint32_t)0x04) /*!< External interrupt LINE 4 */ 261 #define EXTI_LINE5 ((uint32_t)0x05) /*!< External interrupt LINE 5 */ 262 #define EXTI_LINE6 ((uint32_t)0x06) /*!< External interrupt LINE 6 */ 263 #define EXTI_LINE7 ((uint32_t)0x07) /*!< External interrupt LINE 7 */ 264 #define EXTI_LINE8 ((uint32_t)0x08) /*!< External interrupt LINE 8 */ 265 #define EXTI_LINE9 ((uint32_t)0x09) /*!< External interrupt LINE 9 */ 266 #define EXTI_LINE10 ((uint32_t)0x0A) /*!< External interrupt LINE 10 */ 267 #define EXTI_LINE11 ((uint32_t)0x0B) /*!< External interrupt LINE 11 */ 268 #define EXTI_LINE12 ((uint32_t)0x0C) /*!< External interrupt LINE 12 */ 269 #define EXTI_LINE13 ((uint32_t)0x0D) /*!< External interrupt LINE 13 */ 270 #define EXTI_LINE14 ((uint32_t)0x0E) /*!< External interrupt LINE 14 */ 271 #define EXTI_LINE15 ((uint32_t)0x0F) /*!< External interrupt LINE 15 */ 272 #define EXTI_LINE16 ((uint32_t)0x10) 273 #define EXTI_LINE17 ((uint32_t)0x11) 274 #define EXTI_LINE18 ((uint32_t)0x12) 275 #define EXTI_LINE19 ((uint32_t)0x13) 276 #define EXTI_LINE20 ((uint32_t)0x14) 277 #define EXTI_LINE21 ((uint32_t)0x15) 278 #define EXTI_LINE22 ((uint32_t)0x16) 279 #define EXTI_LINE23 ((uint32_t)0x17) 280 #define EXTI_LINE24 ((uint32_t)0x18) 281 #define EXTI_LINE25 ((uint32_t)0x19) 282 #define EXTI_LINE26 ((uint32_t)0x1A) 283 #define EXTI_LINE27 ((uint32_t)0x1B) 284 #define EXTI_LINE28 ((uint32_t)0x1C) 285 #define EXTI_LINE29 ((uint32_t)0x1D) 286 #define EXTI_LINE30 ((uint32_t)0x1E) 287 #define EXTI_LINE31 ((uint32_t)0x1F) 288 #define EXTI_LINE32 ((uint32_t)0x20) 289 #define EXTI_LINE33 ((uint32_t)0x21) 290 #define EXTI_LINE34 ((uint32_t)0x22) 291 #define EXTI_LINE35 ((uint32_t)0x23) 292 #define EXTI_LINE36 ((uint32_t)0x24) 293 #define EXTI_LINE37 ((uint32_t)0x25) 294 #define EXTI_LINE38 ((uint32_t)0x26) 295 #define EXTI_LINE39 ((uint32_t)0x27) 296 297 #define EXTI_LINE40 ((uint32_t)0x28) 298 #define EXTI_LINE41 ((uint32_t)0x29) 299 #define EXTI_LINE42 ((uint32_t)0x2A) 300 #define EXTI_LINE43 ((uint32_t)0x2B) 301 #define EXTI_LINE44 ((uint32_t)0x2C) /* Not available in all family lines */ 302 /* EXTI_LINE45 Reserved */ 303 #if defined(DUAL_CORE) 304 #define EXTI_LINE46 ((uint32_t)0x2E) 305 #else 306 /* EXTI_LINE46 Reserved */ 307 #endif /* DUAL_CORE */ 308 #define EXTI_LINE47 ((uint32_t)0x2F) 309 #define EXTI_LINE48 ((uint32_t)0x30) 310 #define EXTI_LINE49 ((uint32_t)0x31) 311 #define EXTI_LINE50 ((uint32_t)0x32) 312 #define EXTI_LINE51 ((uint32_t)0x33) 313 #define EXTI_LINE52 ((uint32_t)0x34) 314 #define EXTI_LINE53 ((uint32_t)0x35) 315 #define EXTI_LINE54 ((uint32_t)0x36) 316 #define EXTI_LINE55 ((uint32_t)0x37) 317 #define EXTI_LINE56 ((uint32_t)0x38) 318 #define EXTI_LINE57 ((uint32_t)0x39) 319 #define EXTI_LINE58 ((uint32_t)0x3A) 320 #define EXTI_LINE59 ((uint32_t)0x3B) 321 #define EXTI_LINE60 ((uint32_t)0x3C) 322 #define EXTI_LINE61 ((uint32_t)0x3D) 323 #define EXTI_LINE62 ((uint32_t)0x3E) 324 #define EXTI_LINE63 ((uint32_t)0x3F) 325 #define EXTI_LINE64 ((uint32_t)0x40) 326 #define EXTI_LINE65 ((uint32_t)0x41) 327 #define EXTI_LINE66 ((uint32_t)0x42) 328 #define EXTI_LINE67 ((uint32_t)0x43) 329 #define EXTI_LINE68 ((uint32_t)0x44) 330 #define EXTI_LINE69 ((uint32_t)0x45) 331 #define EXTI_LINE70 ((uint32_t)0x46) 332 #define EXTI_LINE71 ((uint32_t)0x47) 333 #define EXTI_LINE72 ((uint32_t)0x48) 334 #define EXTI_LINE73 ((uint32_t)0x49) 335 #define EXTI_LINE74 ((uint32_t)0x4A) 336 #define EXTI_LINE75 ((uint32_t)0x4B) /* Not available in all family lines */ 337 #define EXTI_LINE76 ((uint32_t)0x4C) /* Not available in all family lines */ 338 #if defined(DUAL_CORE) 339 #define EXTI_LINE77 ((uint32_t)0x4D) 340 #define EXTI_LINE78 ((uint32_t)0x4E) 341 #define EXTI_LINE79 ((uint32_t)0x4F) 342 #define EXTI_LINE80 ((uint32_t)0x50) 343 #else 344 /* EXTI_LINE77 Reserved */ 345 /* EXTI_LINE78 Reserved */ 346 /* EXTI_LINE79 Reserved */ 347 /* EXTI_LINE80 Reserved */ 348 #endif /* DUAL_CORE */ 349 /* EXTI_LINE81 Reserved */ 350 #if defined(DUAL_CORE) 351 #define EXTI_LINE82 ((uint32_t)0x52) 352 #else 353 /* EXTI_LINE82 Reserved */ 354 #endif /* DUAL_CORE */ 355 /* EXTI_LINE83 Reserved */ 356 #if defined(DUAL_CORE) 357 #define EXTI_LINE84 ((uint32_t)0x54) 358 #else 359 /* EXTI_LINE84 Reserved */ 360 #endif /* DUAL_CORE */ 361 #define EXTI_LINE85 ((uint32_t)0x55) 362 #define EXTI_LINE86 ((uint32_t)0x56) /* Not available in all family lines */ 363 #define EXTI_LINE87 ((uint32_t)0x57) 364 #define EXTI_LINE88 ((uint32_t)0x58) /* Not available in all family lines */ 365 #define EXTI_LINE89 ((uint32_t)0x59) /* Not available in all family lines */ 366 #define EXTI_LINE90 ((uint32_t)0x5A) /* Not available in all family lines */ 367 #define EXTI_LINE91 ((uint32_t)0x5B) /* Not available in all family lines */ 368 369 #if defined(DUAL_CORE) 370 #define IS_HAL_EXTI_CONFIG_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \ 371 ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \ 372 ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \ 373 ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \ 374 ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \ 375 ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \ 376 ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \ 377 ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \ 378 ((LINE) == EXTI_LINE16) || ((LINE) == EXTI_LINE17) || \ 379 ((LINE) == EXTI_LINE18) || ((LINE) == EXTI_LINE19) || \ 380 ((LINE) == EXTI_LINE20) || ((LINE) == EXTI_LINE21) || \ 381 ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE51) || \ 382 ((LINE) == EXTI_LINE82) || ((LINE) == EXTI_LINE84) || \ 383 ((LINE) == EXTI_LINE85) || ((LINE) == EXTI_LINE86)) 384 #else 385 #define IS_HAL_EXTI_CONFIG_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1)|| \ 386 ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \ 387 ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \ 388 ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \ 389 ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \ 390 ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \ 391 ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \ 392 ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \ 393 ((LINE) == EXTI_LINE16) || ((LINE) == EXTI_LINE17) || \ 394 ((LINE) == EXTI_LINE18) || ((LINE) == EXTI_LINE19) || \ 395 ((LINE) == EXTI_LINE20) || ((LINE) == EXTI_LINE21) || \ 396 ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE51) || \ 397 ((LINE) == EXTI_LINE85) || ((LINE) == EXTI_LINE86)) 398 #endif /* DUAL_CORE */ 399 400 #if defined(DUAL_CORE) 401 #define IS_EXTI_ALL_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \ 402 ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \ 403 ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \ 404 ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \ 405 ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \ 406 ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \ 407 ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \ 408 ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \ 409 ((LINE) == EXTI_LINE16) || ((LINE) == EXTI_LINE17) || \ 410 ((LINE) == EXTI_LINE18) || ((LINE) == EXTI_LINE19) || \ 411 ((LINE) == EXTI_LINE20) || ((LINE) == EXTI_LINE21) || \ 412 ((LINE) == EXTI_LINE22) || ((LINE) == EXTI_LINE23) || \ 413 ((LINE) == EXTI_LINE24) || ((LINE) == EXTI_LINE25) || \ 414 ((LINE) == EXTI_LINE26) || ((LINE) == EXTI_LINE27) || \ 415 ((LINE) == EXTI_LINE28) || ((LINE) == EXTI_LINE29) || \ 416 ((LINE) == EXTI_LINE30) || ((LINE) == EXTI_LINE31) || \ 417 ((LINE) == EXTI_LINE32) || ((LINE) == EXTI_LINE33) || \ 418 ((LINE) == EXTI_LINE34) || ((LINE) == EXTI_LINE35) || \ 419 ((LINE) == EXTI_LINE36) || ((LINE) == EXTI_LINE37) || \ 420 ((LINE) == EXTI_LINE38) || ((LINE) == EXTI_LINE39) || \ 421 ((LINE) == EXTI_LINE40) || ((LINE) == EXTI_LINE41) || \ 422 ((LINE) == EXTI_LINE42) || ((LINE) == EXTI_LINE43) || \ 423 ((LINE) == EXTI_LINE44) || ((LINE) == EXTI_LINE46) || \ 424 ((LINE) == EXTI_LINE47) || ((LINE) == EXTI_LINE48) || \ 425 ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE50) || \ 426 ((LINE) == EXTI_LINE51) || ((LINE) == EXTI_LINE52) || \ 427 ((LINE) == EXTI_LINE53) || ((LINE) == EXTI_LINE54) || \ 428 ((LINE) == EXTI_LINE55) || ((LINE) == EXTI_LINE56) || \ 429 ((LINE) == EXTI_LINE57) || ((LINE) == EXTI_LINE58) || \ 430 ((LINE) == EXTI_LINE59) || ((LINE) == EXTI_LINE60) || \ 431 ((LINE) == EXTI_LINE61) || ((LINE) == EXTI_LINE62) || \ 432 ((LINE) == EXTI_LINE63) || ((LINE) == EXTI_LINE64) || \ 433 ((LINE) == EXTI_LINE65) || ((LINE) == EXTI_LINE66) || \ 434 ((LINE) == EXTI_LINE67) || ((LINE) == EXTI_LINE68) || \ 435 ((LINE) == EXTI_LINE69) || ((LINE) == EXTI_LINE70) || \ 436 ((LINE) == EXTI_LINE71) || ((LINE) == EXTI_LINE72) || \ 437 ((LINE) == EXTI_LINE73) || ((LINE) == EXTI_LINE74) || \ 438 ((LINE) == EXTI_LINE75) || ((LINE) == EXTI_LINE76) || \ 439 ((LINE) == EXTI_LINE77) || ((LINE) == EXTI_LINE79) || \ 440 ((LINE) == EXTI_LINE84) || ((LINE) == EXTI_LINE85) || \ 441 ((LINE) == EXTI_LINE86) || ((LINE) == EXTI_LINE87) || \ 442 ((LINE) == EXTI_LINE78) || \ 443 ((LINE) == EXTI_LINE80) || ((LINE) == EXTI_LINE82)) 444 #else 445 #define IS_EXTI_ALL_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \ 446 ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \ 447 ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \ 448 ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \ 449 ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \ 450 ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \ 451 ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \ 452 ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \ 453 ((LINE) == EXTI_LINE16) || ((LINE) == EXTI_LINE17) || \ 454 ((LINE) == EXTI_LINE18) || ((LINE) == EXTI_LINE19) || \ 455 ((LINE) == EXTI_LINE20) || ((LINE) == EXTI_LINE21) || \ 456 ((LINE) == EXTI_LINE22) || ((LINE) == EXTI_LINE23) || \ 457 ((LINE) == EXTI_LINE24) || ((LINE) == EXTI_LINE25) || \ 458 ((LINE) == EXTI_LINE26) || ((LINE) == EXTI_LINE27) || \ 459 ((LINE) == EXTI_LINE28) || ((LINE) == EXTI_LINE29) || \ 460 ((LINE) == EXTI_LINE30) || ((LINE) == EXTI_LINE31) || \ 461 ((LINE) == EXTI_LINE32) || ((LINE) == EXTI_LINE33) || \ 462 ((LINE) == EXTI_LINE34) || ((LINE) == EXTI_LINE35) || \ 463 ((LINE) == EXTI_LINE36) || ((LINE) == EXTI_LINE37) || \ 464 ((LINE) == EXTI_LINE38) || ((LINE) == EXTI_LINE39) || \ 465 ((LINE) == EXTI_LINE40) || ((LINE) == EXTI_LINE41) || \ 466 ((LINE) == EXTI_LINE42) || ((LINE) == EXTI_LINE43) || \ 467 ((LINE) == EXTI_LINE44) || \ 468 ((LINE) == EXTI_LINE47) || ((LINE) == EXTI_LINE48) || \ 469 ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE50) || \ 470 ((LINE) == EXTI_LINE51) || ((LINE) == EXTI_LINE52) || \ 471 ((LINE) == EXTI_LINE53) || ((LINE) == EXTI_LINE54) || \ 472 ((LINE) == EXTI_LINE55) || ((LINE) == EXTI_LINE56) || \ 473 ((LINE) == EXTI_LINE57) || ((LINE) == EXTI_LINE58) || \ 474 ((LINE) == EXTI_LINE59) || ((LINE) == EXTI_LINE60) || \ 475 ((LINE) == EXTI_LINE61) || ((LINE) == EXTI_LINE62) || \ 476 ((LINE) == EXTI_LINE63) || ((LINE) == EXTI_LINE64) || \ 477 ((LINE) == EXTI_LINE65) || ((LINE) == EXTI_LINE66) || \ 478 ((LINE) == EXTI_LINE67) || ((LINE) == EXTI_LINE68) || \ 479 ((LINE) == EXTI_LINE69) || ((LINE) == EXTI_LINE70) || \ 480 ((LINE) == EXTI_LINE71) || ((LINE) == EXTI_LINE72) || \ 481 ((LINE) == EXTI_LINE73) || ((LINE) == EXTI_LINE74) || \ 482 ((LINE) == EXTI_LINE75) || ((LINE) == EXTI_LINE76) || \ 483 ((LINE) == EXTI_LINE85) || \ 484 ((LINE) == EXTI_LINE86) || ((LINE) == EXTI_LINE87) || \ 485 ((LINE) == EXTI_LINE88) || ((LINE) == EXTI_LINE89) || \ 486 ((LINE) == EXTI_LINE90) || ((LINE) == EXTI_LINE91)) 487 #endif /*DUAL_CORE*/ 488 489 #if defined(DUAL_CORE) 490 #define IS_EXTI_D1_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \ 491 ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \ 492 ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \ 493 ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \ 494 ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \ 495 ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \ 496 ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \ 497 ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \ 498 ((LINE) == EXTI_LINE16) || ((LINE) == EXTI_LINE17) || \ 499 ((LINE) == EXTI_LINE18) || ((LINE) == EXTI_LINE19) || \ 500 ((LINE) == EXTI_LINE20) || ((LINE) == EXTI_LINE21) || \ 501 ((LINE) == EXTI_LINE22) || ((LINE) == EXTI_LINE23) || \ 502 ((LINE) == EXTI_LINE24) || ((LINE) == EXTI_LINE25) || \ 503 ((LINE) == EXTI_LINE26) || ((LINE) == EXTI_LINE27) || \ 504 ((LINE) == EXTI_LINE28) || ((LINE) == EXTI_LINE29) || \ 505 ((LINE) == EXTI_LINE30) || ((LINE) == EXTI_LINE31) || \ 506 ((LINE) == EXTI_LINE32) || ((LINE) == EXTI_LINE33) || \ 507 ((LINE) == EXTI_LINE34) || ((LINE) == EXTI_LINE35) || \ 508 ((LINE) == EXTI_LINE36) || ((LINE) == EXTI_LINE37) || \ 509 ((LINE) == EXTI_LINE38) || ((LINE) == EXTI_LINE39) || \ 510 ((LINE) == EXTI_LINE40) || ((LINE) == EXTI_LINE41) || \ 511 ((LINE) == EXTI_LINE42) || ((LINE) == EXTI_LINE43) || \ 512 ((LINE) == EXTI_LINE44) || ((LINE) == EXTI_LINE46) || \ 513 ((LINE) == EXTI_LINE47) || ((LINE) == EXTI_LINE48) || \ 514 ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE50) || \ 515 ((LINE) == EXTI_LINE51) || ((LINE) == EXTI_LINE52) || \ 516 ((LINE) == EXTI_LINE53) || ((LINE) == EXTI_LINE54) || \ 517 ((LINE) == EXTI_LINE55) || ((LINE) == EXTI_LINE56) || \ 518 ((LINE) == EXTI_LINE57) || ((LINE) == EXTI_LINE58) || \ 519 ((LINE) == EXTI_LINE59) || ((LINE) == EXTI_LINE60) || \ 520 ((LINE) == EXTI_LINE61) || ((LINE) == EXTI_LINE62) || \ 521 ((LINE) == EXTI_LINE63) || ((LINE) == EXTI_LINE64) || \ 522 ((LINE) == EXTI_LINE65) || ((LINE) == EXTI_LINE66) || \ 523 ((LINE) == EXTI_LINE67) || ((LINE) == EXTI_LINE68) || \ 524 ((LINE) == EXTI_LINE69) || ((LINE) == EXTI_LINE70) || \ 525 ((LINE) == EXTI_LINE71) || ((LINE) == EXTI_LINE72) || \ 526 ((LINE) == EXTI_LINE73) || ((LINE) == EXTI_LINE74) || \ 527 ((LINE) == EXTI_LINE75) || ((LINE) == EXTI_LINE76) || \ 528 ((LINE) == EXTI_LINE77) || ((LINE) == EXTI_LINE79) || \ 529 ((LINE) == EXTI_LINE84) || ((LINE) == EXTI_LINE85) || \ 530 ((LINE) == EXTI_LINE86) || ((LINE) == EXTI_LINE87)) 531 #else 532 #define IS_EXTI_D1_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \ 533 ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \ 534 ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \ 535 ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \ 536 ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \ 537 ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \ 538 ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \ 539 ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \ 540 ((LINE) == EXTI_LINE16) || ((LINE) == EXTI_LINE17) || \ 541 ((LINE) == EXTI_LINE18) || ((LINE) == EXTI_LINE19) || \ 542 ((LINE) == EXTI_LINE20) || ((LINE) == EXTI_LINE21) || \ 543 ((LINE) == EXTI_LINE22) || ((LINE) == EXTI_LINE23) || \ 544 ((LINE) == EXTI_LINE24) || ((LINE) == EXTI_LINE25) || \ 545 ((LINE) == EXTI_LINE26) || ((LINE) == EXTI_LINE27) || \ 546 ((LINE) == EXTI_LINE28) || ((LINE) == EXTI_LINE29) || \ 547 ((LINE) == EXTI_LINE30) || ((LINE) == EXTI_LINE31) || \ 548 ((LINE) == EXTI_LINE32) || ((LINE) == EXTI_LINE33) || \ 549 ((LINE) == EXTI_LINE34) || ((LINE) == EXTI_LINE35) || \ 550 ((LINE) == EXTI_LINE36) || ((LINE) == EXTI_LINE37) || \ 551 ((LINE) == EXTI_LINE38) || ((LINE) == EXTI_LINE39) || \ 552 ((LINE) == EXTI_LINE40) || ((LINE) == EXTI_LINE41) || \ 553 ((LINE) == EXTI_LINE42) || ((LINE) == EXTI_LINE43) || \ 554 ((LINE) == EXTI_LINE44) || \ 555 ((LINE) == EXTI_LINE47) || ((LINE) == EXTI_LINE48) || \ 556 ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE50) || \ 557 ((LINE) == EXTI_LINE51) || ((LINE) == EXTI_LINE52) || \ 558 ((LINE) == EXTI_LINE53) || ((LINE) == EXTI_LINE54) || \ 559 ((LINE) == EXTI_LINE55) || ((LINE) == EXTI_LINE56) || \ 560 ((LINE) == EXTI_LINE57) || ((LINE) == EXTI_LINE58) || \ 561 ((LINE) == EXTI_LINE59) || ((LINE) == EXTI_LINE60) || \ 562 ((LINE) == EXTI_LINE61) || ((LINE) == EXTI_LINE62) || \ 563 ((LINE) == EXTI_LINE63) || ((LINE) == EXTI_LINE64) || \ 564 ((LINE) == EXTI_LINE65) || ((LINE) == EXTI_LINE66) || \ 565 ((LINE) == EXTI_LINE67) || ((LINE) == EXTI_LINE68) || \ 566 ((LINE) == EXTI_LINE69) || ((LINE) == EXTI_LINE70) || \ 567 ((LINE) == EXTI_LINE71) || ((LINE) == EXTI_LINE72) || \ 568 ((LINE) == EXTI_LINE73) || ((LINE) == EXTI_LINE74) || \ 569 ((LINE) == EXTI_LINE75) || ((LINE) == EXTI_LINE76) || \ 570 ((LINE) == EXTI_LINE85) || \ 571 ((LINE) == EXTI_LINE86) || ((LINE) == EXTI_LINE87) || \ 572 ((LINE) == EXTI_LINE88) || ((LINE) == EXTI_LINE89) || \ 573 ((LINE) == EXTI_LINE90) || ((LINE) == EXTI_LINE91)) 574 #endif /*DUAL_CORE*/ 575 576 #if defined(DUAL_CORE) 577 #define IS_EXTI_D2_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \ 578 ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \ 579 ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \ 580 ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \ 581 ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \ 582 ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \ 583 ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \ 584 ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \ 585 ((LINE) == EXTI_LINE16) || ((LINE) == EXTI_LINE17) || \ 586 ((LINE) == EXTI_LINE18) || ((LINE) == EXTI_LINE19) || \ 587 ((LINE) == EXTI_LINE20) || ((LINE) == EXTI_LINE21) || \ 588 ((LINE) == EXTI_LINE22) || ((LINE) == EXTI_LINE23) || \ 589 ((LINE) == EXTI_LINE24) || ((LINE) == EXTI_LINE25) || \ 590 ((LINE) == EXTI_LINE26) || ((LINE) == EXTI_LINE27) || \ 591 ((LINE) == EXTI_LINE28) || ((LINE) == EXTI_LINE29) || \ 592 ((LINE) == EXTI_LINE30) || ((LINE) == EXTI_LINE31) || \ 593 ((LINE) == EXTI_LINE32) || ((LINE) == EXTI_LINE33) || \ 594 ((LINE) == EXTI_LINE34) || ((LINE) == EXTI_LINE35) || \ 595 ((LINE) == EXTI_LINE36) || ((LINE) == EXTI_LINE37) || \ 596 ((LINE) == EXTI_LINE38) || ((LINE) == EXTI_LINE39) || \ 597 ((LINE) == EXTI_LINE40) || ((LINE) == EXTI_LINE41) || \ 598 ((LINE) == EXTI_LINE42) || ((LINE) == EXTI_LINE43) || \ 599 ((LINE) == EXTI_LINE44) || ((LINE) == EXTI_LINE46) || \ 600 ((LINE) == EXTI_LINE47) || ((LINE) == EXTI_LINE48) || \ 601 ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE50) || \ 602 ((LINE) == EXTI_LINE51) || ((LINE) == EXTI_LINE52) || \ 603 ((LINE) == EXTI_LINE53) || ((LINE) == EXTI_LINE54) || \ 604 ((LINE) == EXTI_LINE55) || ((LINE) == EXTI_LINE56) || \ 605 ((LINE) == EXTI_LINE57) || ((LINE) == EXTI_LINE58) || \ 606 ((LINE) == EXTI_LINE59) || ((LINE) == EXTI_LINE60) || \ 607 ((LINE) == EXTI_LINE61) || ((LINE) == EXTI_LINE62) || \ 608 ((LINE) == EXTI_LINE63) || ((LINE) == EXTI_LINE64) || \ 609 ((LINE) == EXTI_LINE65) || ((LINE) == EXTI_LINE66) || \ 610 ((LINE) == EXTI_LINE67) || ((LINE) == EXTI_LINE68) || \ 611 ((LINE) == EXTI_LINE69) || ((LINE) == EXTI_LINE70) || \ 612 ((LINE) == EXTI_LINE71) || ((LINE) == EXTI_LINE72) || \ 613 ((LINE) == EXTI_LINE73) || ((LINE) == EXTI_LINE74) || \ 614 ((LINE) == EXTI_LINE75) || ((LINE) == EXTI_LINE76) || \ 615 ((LINE) == EXTI_LINE78) || ((LINE) == EXTI_LINE80) || \ 616 ((LINE) == EXTI_LINE82) || ((LINE) == EXTI_LINE85) || \ 617 ((LINE) == EXTI_LINE86) || ((LINE) == EXTI_LINE87)) 618 #endif /*DUAL_CORE*/ 619 620 #if defined(DUAL_CORE) 621 #define IS_EXTI_D3_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \ 622 ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \ 623 ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \ 624 ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \ 625 ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \ 626 ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \ 627 ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \ 628 ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \ 629 ((LINE) == EXTI_LINE19) || ((LINE) == EXTI_LINE20) || \ 630 ((LINE) == EXTI_LINE21) || ((LINE) == EXTI_LINE25) || \ 631 ((LINE) == EXTI_LINE34) || ((LINE) == EXTI_LINE35) || \ 632 ((LINE) == EXTI_LINE41) || ((LINE) == EXTI_LINE48) || \ 633 ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE50) || \ 634 ((LINE) == EXTI_LINE51) || ((LINE) == EXTI_LINE52) || \ 635 ((LINE) == EXTI_LINE53)) 636 #elif (POWER_DOMAINS_NUMBER == 3U) 637 #define IS_EXTI_D3_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \ 638 ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \ 639 ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \ 640 ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \ 641 ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \ 642 ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \ 643 ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \ 644 ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \ 645 ((LINE) == EXTI_LINE19) || ((LINE) == EXTI_LINE20) || \ 646 ((LINE) == EXTI_LINE21) || ((LINE) == EXTI_LINE25) || \ 647 ((LINE) == EXTI_LINE34) || ((LINE) == EXTI_LINE35) || \ 648 ((LINE) == EXTI_LINE41) || ((LINE) == EXTI_LINE48) || \ 649 ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE50) || \ 650 ((LINE) == EXTI_LINE51) || ((LINE) == EXTI_LINE52) || \ 651 ((LINE) == EXTI_LINE53) || ((LINE) == EXTI_LINE88)) 652 #else 653 #define IS_EXTI_D3_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \ 654 ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \ 655 ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \ 656 ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \ 657 ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \ 658 ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \ 659 ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \ 660 ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \ 661 ((LINE) == EXTI_LINE19) || ((LINE) == EXTI_LINE20) || \ 662 ((LINE) == EXTI_LINE21) || ((LINE) == EXTI_LINE25) || \ 663 ((LINE) == EXTI_LINE34) || ((LINE) == EXTI_LINE35) || \ 664 ((LINE) == EXTI_LINE41) || ((LINE) == EXTI_LINE48) || \ 665 ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE50) || \ 666 ((LINE) == EXTI_LINE51) || ((LINE) == EXTI_LINE88)) 667 #endif /*DUAL_CORE*/ 668 669 670 #define BDMA_CH6_CLEAR ((uint32_t)0x00000000) /*!< BDMA ch6 event selected as D3 domain pendclear source*/ 671 #define BDMA_CH7_CLEAR ((uint32_t)0x00000001) /*!< BDMA ch7 event selected as D3 domain pendclear source*/ 672 #if defined (LPTIM4) 673 #define LPTIM4_OUT_CLEAR ((uint32_t)0x00000002) /*!< LPTIM4 out selected as D3 domain pendclear source*/ 674 #else 675 #define LPTIM2_OUT_CLEAR ((uint32_t)0x00000002) /*!< LPTIM2 out selected as D3 domain pendclear source*/ 676 #endif /* LPTIM4 */ 677 #if defined (LPTIM5) 678 #define LPTIM5_OUT_CLEAR ((uint32_t)0x00000003) /*!< LPTIM5 out selected as D3 domain pendclear source*/ 679 #else 680 #define LPTIM3_OUT_CLEAR ((uint32_t)0x00000003) /*!< LPTIM3 out selected as D3 domain pendclear source*/ 681 #endif /* LPTIM5 */ 682 #if defined (LPTIM4) && defined (LPTIM5) 683 #define IS_EXTI_D3_CLEAR(SOURCE) (((SOURCE) == BDMA_CH6_CLEAR) || ((SOURCE) == BDMA_CH7_CLEAR) || \ 684 ((SOURCE) == LPTIM4_OUT_CLEAR) || ((SOURCE) == LPTIM5_OUT_CLEAR)) 685 #else 686 #define IS_EXTI_D3_CLEAR(SOURCE) (((SOURCE) == BDMA_CH6_CLEAR) || ((SOURCE) == BDMA_CH7_CLEAR) || \ 687 ((SOURCE) == LPTIM2_OUT_CLEAR) || ((SOURCE) == LPTIM3_OUT_CLEAR)) 688 #endif /* LPTIM4 LPTIM5 */ 689 /** 690 * @} 691 */ 692 693 694 /** @defgroup FMC_SwapBankMapping_Config SwapBankMapping Config 695 * @{ 696 */ 697 #define FMC_SWAPBMAP_DISABLE (0x00000000U) 698 #define FMC_SWAPBMAP_SDRAM_SRAM FMC_BCR1_BMAP_0 699 #define FMC_SWAPBMAP_SDRAMB2 FMC_BCR1_BMAP_1 700 701 #define IS_FMC_SWAPBMAP_MODE(__MODE__) (((__MODE__) == FMC_SWAPBMAP_DISABLE) || \ 702 ((__MODE__) == FMC_SWAPBMAP_SDRAM_SRAM) || \ 703 ((__MODE__) == FMC_SWAPBMAP_SDRAMB2)) 704 /** 705 * @} 706 */ 707 /** 708 * @} 709 */ 710 711 /* Exported macro ------------------------------------------------------------*/ 712 /** @defgroup HAL_Exported_Macros HAL Exported Macros 713 * @{ 714 */ 715 #if defined(DUAL_CORE) 716 /** @defgroup ART_Exported_Macros ART Exported Macros 717 * @{ 718 */ 719 720 /** @brief ART Enable Macro. 721 * Enable the Cortex-M4 ART cache. 722 */ 723 #define __HAL_ART_ENABLE() SET_BIT(ART->CTR, ART_CTR_EN) 724 725 /** @brief ART Disable Macro. 726 * Disable the Cortex-M4 ART cache. 727 */ 728 #define __HAL_ART_DISABLE() CLEAR_BIT(ART->CTR, ART_CTR_EN) 729 730 /** @brief ART Cache BaseAddress Config. 731 * Configure the Cortex-M4 ART cache Base Address. 732 */ 733 #define __HAL_ART_CONFIG_BASE_ADDRESS(__BASE_ADDRESS__) MODIFY_REG(ART->CTR, ART_CTR_PCACHEADDR, (((__BASE_ADDRESS__) >> 12U) & 0x000FFF00UL)) 734 735 /** 736 * @} 737 */ 738 #endif /* DUAL_CORE */ 739 740 /** @defgroup SYSCFG_Exported_Macros SYSCFG Exported Macros 741 * @{ 742 */ 743 744 /** @brief SYSCFG Break AXIRAM double ECC lock. 745 * Enable and lock the connection of AXIRAM double ECC error to TIM1/8/15/16/17 and HRTIMER Break input. 746 * @note The selected configuration is locked and can be unlocked only by system reset. 747 This feature is available on STM32H7 rev.B and above. 748 */ 749 #define __HAL_SYSCFG_BREAK_AXISRAM_DBL_ECC_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_AXISRAML) 750 751 /** @brief SYSCFG Break ITCM double ECC lock. 752 * Enable and lock the connection of ITCM double ECC error to TIM1/8/15/16/17 and HRTIMER Break input. 753 * @note The selected configuration is locked and can be unlocked only by system reset. 754 This feature is available on STM32H7 rev.B and above. 755 */ 756 #define __HAL_SYSCFG_BREAK_ITCM_DBL_ECC_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_ITCML) 757 758 /** @brief SYSCFG Break DTCM double ECC lock. 759 * Enable and lock the connection of DTCM double ECC error to TIM1/8/15/16/17 and HRTIMER Break input. 760 * @note The selected configuration is locked and can be unlocked only by system reset. 761 This feature is available on STM32H7 rev.B and above. 762 */ 763 #define __HAL_SYSCFG_BREAK_DTCM_DBL_ECC_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_DTCML) 764 765 /** @brief SYSCFG Break SRAM1 double ECC lock. 766 * Enable and lock the connection of SRAM1 double ECC error to TIM1/8/15/16/17 and HRTIMER Break input. 767 * @note The selected configuration is locked and can be unlocked only by system reset. 768 This feature is available on STM32H7 rev.B and above. 769 */ 770 #define __HAL_SYSCFG_BREAK_SRAM1_DBL_ECC_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_SRAM1L) 771 772 /** @brief SYSCFG Break SRAM2 double ECC lock. 773 * Enable and lock the connection of SRAM2 double ECC error to TIM1/8/15/16/17 and HRTIMER Break input. 774 * @note The selected configuration is locked and can be unlocked only by system reset. 775 This feature is available on STM32H7 rev.B and above. 776 */ 777 #define __HAL_SYSCFG_BREAK_SRAM2_DBL_ECC_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_SRAM2L) 778 779 /** @brief SYSCFG Break SRAM3 double ECC lock. 780 * Enable and lock the connection of SRAM3 double ECC error to TIM1/8/15/16/17 and HRTIMER Break input. 781 * @note The selected configuration is locked and can be unlocked only by system reset. 782 This feature is available on STM32H7 rev.B and above. 783 */ 784 #define __HAL_SYSCFG_BREAK_SRAM3_DBL_ECC_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_SRAM3L) 785 786 /** @brief SYSCFG Break SRAM4 double ECC lock. 787 * Enable and lock the connection of SRAM4 double ECC error to TIM1/8/15/16/17 and HRTIMER Break input. 788 * @note The selected configuration is locked and can be unlocked only by system reset. 789 This feature is available on STM32H7 rev.B and above. 790 */ 791 #define __HAL_SYSCFG_BREAK_SRAM4_DBL_ECC_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_SRAM4L) 792 793 /** @brief SYSCFG Break Backup SRAM double ECC lock. 794 * Enable and lock the connection of Backup SRAM double ECC error to TIM1/8/15/16/17 and HRTIMER Break input. 795 * @note The selected configuration is locked and can be unlocked only by system reset. 796 This feature is available on STM32H7 rev.B and above. 797 */ 798 #define __HAL_SYSCFG_BREAK_BKRAM_DBL_ECC_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_BKRAML) 799 800 /** @brief SYSCFG Break Cortex-M7 Lockup lock. 801 * Enable and lock the connection of Cortex-M7 LOCKUP output to TIM1/8/15/16/17 and HRTIMER Break input. 802 * @note The selected configuration is locked and can be unlocked only by system reset. 803 This feature is available on STM32H7 rev.B and above. 804 */ 805 #define __HAL_SYSCFG_BREAK_CM7_LOCKUP_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_CM7L) 806 807 /** @brief SYSCFG Break FLASH double ECC lock. 808 * Enable and lock the connection of Flash double ECC error connection to TIM1/8/15/16/17 and HRTIMER Break input. 809 * @note The selected configuration is locked and can be unlocked only by system reset. 810 This feature is available on STM32H7 rev.B and above. 811 */ 812 #define __HAL_SYSCFG_BREAK_FLASH_DBL_ECC_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_FLASHL) 813 814 /** @brief SYSCFG Break PVD lock. 815 * Enable and lock the PVD connection to Timer1/8/15/16/17 and HRTIMER Break input, as well as the PVDE and PLS[2:0] in the PWR_CR1 register. 816 * @note The selected configuration is locked and can be unlocked only by system reset. 817 This feature is available on STM32H7 rev.B and above. 818 */ 819 #define __HAL_SYSCFG_BREAK_PVD_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_PVDL) 820 821 #if defined(DUAL_CORE) 822 /** @brief SYSCFG Break Cortex-M4 Lockup lock. 823 * Enable and lock the connection of Cortex-M4 LOCKUP output to TIM1/8/15/16/17 and HRTIMER Break input. 824 * @note The selected configuration is locked and can be unlocked only by system reset. 825 This feature is available on STM32H7 rev.B and above. 826 */ 827 #define __HAL_SYSCFG_BREAK_CM4_LOCKUP_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_CM4L) 828 #endif /* DUAL_CORE */ 829 830 #if !defined(SYSCFG_PMCR_BOOSTEN) 831 /** @brief Fast-mode Plus driving capability enable/disable macros 832 * @param __FASTMODEPLUS__ This parameter can be a value of : 833 * @arg @ref SYSCFG_FASTMODEPLUS_PB6 Fast-mode Plus driving capability activation on PB6 834 * @arg @ref SYSCFG_FASTMODEPLUS_PB7 Fast-mode Plus driving capability activation on PB7 835 * @arg @ref SYSCFG_FASTMODEPLUS_PB8 Fast-mode Plus driving capability activation on PB8 836 * @arg @ref SYSCFG_FASTMODEPLUS_PB9 Fast-mode Plus driving capability activation on PB9 837 */ 838 #define __HAL_SYSCFG_FASTMODEPLUS_ENABLE(__FASTMODEPLUS__) do {assert_param(IS_SYSCFG_FASTMODEPLUS((__FASTMODEPLUS__)));\ 839 SET_BIT(SYSCFG->PMCR, (__FASTMODEPLUS__));\ 840 }while(0) 841 842 #define __HAL_SYSCFG_FASTMODEPLUS_DISABLE(__FASTMODEPLUS__) do {assert_param(IS_SYSCFG_FASTMODEPLUS((__FASTMODEPLUS__)));\ 843 CLEAR_BIT(SYSCFG->PMCR, (__FASTMODEPLUS__));\ 844 }while(0) 845 846 #endif /* !SYSCFG_PMCR_BOOSTEN */ 847 /** 848 * @} 849 */ 850 851 /** @defgroup DBG_Exported_Macros DBG Exported Macros 852 * @{ 853 */ 854 855 /** @brief Freeze/Unfreeze Peripherals in Debug mode 856 */ 857 #define __HAL_DBGMCU_FREEZE_WWDG1() (DBGMCU->APB3FZ1 |= (DBGMCU_APB3FZ1_DBG_WWDG1)) 858 859 #define __HAL_DBGMCU_FREEZE_TIM2() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_TIM2)) 860 #define __HAL_DBGMCU_FREEZE_TIM3() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_TIM3)) 861 #define __HAL_DBGMCU_FREEZE_TIM4() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_TIM4)) 862 #define __HAL_DBGMCU_FREEZE_TIM5() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_TIM5)) 863 #define __HAL_DBGMCU_FREEZE_TIM6() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_TIM6)) 864 #define __HAL_DBGMCU_FREEZE_TIM7() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_TIM7)) 865 #define __HAL_DBGMCU_FREEZE_TIM12() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_TIM12)) 866 #define __HAL_DBGMCU_FREEZE_TIM13() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_TIM13)) 867 #define __HAL_DBGMCU_FREEZE_TIM14() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_TIM14)) 868 #define __HAL_DBGMCU_FREEZE_LPTIM1() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_LPTIM1)) 869 #define __HAL_DBGMCU_FREEZE_I2C1() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_I2C1)) 870 #define __HAL_DBGMCU_FREEZE_I2C2() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_I2C2)) 871 #define __HAL_DBGMCU_FREEZE_I2C3() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_I2C3)) 872 #if defined(I2C5) 873 #define __HAL_DBGMCU_FREEZE_I2C5() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_I2C5)) 874 #endif /*I2C5*/ 875 #if defined(DBGMCU_APB1HFZ1_DBG_FDCAN) 876 #define __HAL_DBGMCU_FREEZE_FDCAN() (DBGMCU->APB1HFZ1 |= (DBGMCU_APB1HFZ1_DBG_FDCAN)) 877 #endif /*DBGMCU_APB1HFZ1_DBG_FDCAN*/ 878 879 #if defined(TIM23) 880 #define __HAL_DBGMCU_FREEZE_TIM23() (DBGMCU->APB1HFZ1 |= (DBGMCU_APB1HFZ1_DBG_TIM23)) 881 #endif /*TIM23*/ 882 #if defined(TIM24) 883 #define __HAL_DBGMCU_FREEZE_TIM24() (DBGMCU->APB1HFZ1 |= (DBGMCU_APB1HFZ1_DBG_TIM24)) 884 #endif /*TIM24*/ 885 886 #define __HAL_DBGMCU_FREEZE_TIM1() (DBGMCU->APB2FZ1 |= (DBGMCU_APB2FZ1_DBG_TIM1)) 887 #define __HAL_DBGMCU_FREEZE_TIM8() (DBGMCU->APB2FZ1 |= (DBGMCU_APB2FZ1_DBG_TIM8)) 888 #define __HAL_DBGMCU_FREEZE_TIM15() (DBGMCU->APB2FZ1 |= (DBGMCU_APB2FZ1_DBG_TIM15)) 889 #define __HAL_DBGMCU_FREEZE_TIM16() (DBGMCU->APB2FZ1 |= (DBGMCU_APB2FZ1_DBG_TIM16)) 890 #define __HAL_DBGMCU_FREEZE_TIM17() (DBGMCU->APB2FZ1 |= (DBGMCU_APB2FZ1_DBG_TIM17)) 891 #define __HAL_DBGMCU_FREEZE_HRTIM() (DBGMCU->APB2FZ1 |= (DBGMCU_APB2FZ1_DBG_HRTIM)) 892 893 #define __HAL_DBGMCU_FREEZE_I2C4() (DBGMCU->APB4FZ1 |= (DBGMCU_APB4FZ1_DBG_I2C4)) 894 #define __HAL_DBGMCU_FREEZE_LPTIM2() (DBGMCU->APB4FZ1 |= (DBGMCU_APB4FZ1_DBG_LPTIM2)) 895 #define __HAL_DBGMCU_FREEZE_LPTIM3() (DBGMCU->APB4FZ1 |= (DBGMCU_APB4FZ1_DBG_LPTIM3)) 896 #define __HAL_DBGMCU_FREEZE_LPTIM4() (DBGMCU->APB4FZ1 |= (DBGMCU_APB4FZ1_DBG_LPTIM4)) 897 #define __HAL_DBGMCU_FREEZE_LPTIM5() (DBGMCU->APB4FZ1 |= (DBGMCU_APB4FZ1_DBG_LPTIM5)) 898 #define __HAL_DBGMCU_FREEZE_RTC() (DBGMCU->APB4FZ1 |= (DBGMCU_APB4FZ1_DBG_RTC)) 899 #define __HAL_DBGMCU_FREEZE_IWDG1() (DBGMCU->APB4FZ1 |= (DBGMCU_APB4FZ1_DBG_IWDG1)) 900 901 902 #define __HAL_DBGMCU_UnFreeze_WWDG1() (DBGMCU->APB3FZ1 &= ~ (DBGMCU_APB3FZ1_DBG_WWDG1)) 903 904 #define __HAL_DBGMCU_UnFreeze_TIM2() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_TIM2)) 905 #define __HAL_DBGMCU_UnFreeze_TIM3() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_TIM3)) 906 #define __HAL_DBGMCU_UnFreeze_TIM4() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_TIM4)) 907 #define __HAL_DBGMCU_UnFreeze_TIM5() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_TIM5)) 908 #define __HAL_DBGMCU_UnFreeze_TIM6() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_TIM6)) 909 #define __HAL_DBGMCU_UnFreeze_TIM7() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_TIM7)) 910 #define __HAL_DBGMCU_UnFreeze_TIM12() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_TIM12)) 911 #define __HAL_DBGMCU_UnFreeze_TIM13() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_TIM13)) 912 #define __HAL_DBGMCU_UnFreeze_TIM14() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_TIM14)) 913 #define __HAL_DBGMCU_UnFreeze_LPTIM1() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_LPTIM1)) 914 #define __HAL_DBGMCU_UnFreeze_I2C1() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_I2C1)) 915 #define __HAL_DBGMCU_UnFreeze_I2C2() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_I2C2)) 916 #define __HAL_DBGMCU_UnFreeze_I2C3() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_I2C3)) 917 #if defined(I2C5) 918 #define __HAL_DBGMCU_UnFreeze_I2C5() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_I2C5)) 919 #endif /*I2C5*/ 920 #if defined(DBGMCU_APB1HFZ1_DBG_FDCAN) 921 #define __HAL_DBGMCU_UnFreeze_FDCAN() (DBGMCU->APB1HFZ1 &= ~ (DBGMCU_APB1HFZ1_DBG_FDCAN)) 922 #endif /*DBGMCU_APB1HFZ1_DBG_FDCAN*/ 923 924 #if defined(TIM23) 925 #define __HAL_DBGMCU_UnFreeze_TIM23() (DBGMCU->APB1HFZ1 &= ~ (DBGMCU_APB1HFZ1_DBG_TIM23)) 926 #endif /*TIM23*/ 927 #if defined(TIM24) 928 #define __HAL_DBGMCU_UnFreeze_TIM24() (DBGMCU->APB1HFZ1 &= ~ (DBGMCU_APB1HFZ1_DBG_TIM24)) 929 #endif /*TIM24*/ 930 931 #define __HAL_DBGMCU_UnFreeze_TIM1() (DBGMCU->APB2FZ1 &= ~ (DBGMCU_APB2FZ1_DBG_TIM1)) 932 #define __HAL_DBGMCU_UnFreeze_TIM8() (DBGMCU->APB2FZ1 &= ~ (DBGMCU_APB2FZ1_DBG_TIM8)) 933 #define __HAL_DBGMCU_UnFreeze_TIM15() (DBGMCU->APB2FZ1 &= ~ (DBGMCU_APB2FZ1_DBG_TIM15)) 934 #define __HAL_DBGMCU_UnFreeze_TIM16() (DBGMCU->APB2FZ1 &= ~ (DBGMCU_APB2FZ1_DBG_TIM16)) 935 #define __HAL_DBGMCU_UnFreeze_TIM17() (DBGMCU->APB2FZ1 &= ~ (DBGMCU_APB2FZ1_DBG_TIM17)) 936 #define __HAL_DBGMCU_UnFreeze_HRTIM() (DBGMCU->APB2FZ1 &= ~ (DBGMCU_APB2FZ1_DBG_HRTIM)) 937 938 #define __HAL_DBGMCU_UnFreeze_I2C4() (DBGMCU->APB4FZ1 &= ~ (DBGMCU_APB4FZ1_DBG_I2C4)) 939 #define __HAL_DBGMCU_UnFreeze_LPTIM2() (DBGMCU->APB4FZ1 &= ~ (DBGMCU_APB4FZ1_DBG_LPTIM2)) 940 #define __HAL_DBGMCU_UnFreeze_LPTIM3() (DBGMCU->APB4FZ1 &= ~ (DBGMCU_APB4FZ1_DBG_LPTIM3)) 941 #define __HAL_DBGMCU_UnFreeze_LPTIM4() (DBGMCU->APB4FZ1 &= ~ (DBGMCU_APB4FZ1_DBG_LPTIM4)) 942 #define __HAL_DBGMCU_UnFreeze_LPTIM5() (DBGMCU->APB4FZ1 &= ~ (DBGMCU_APB4FZ1_DBG_LPTIM5)) 943 #define __HAL_DBGMCU_UnFreeze_RTC() (DBGMCU->APB4FZ1 &= ~ (DBGMCU_APB4FZ1_DBG_RTC)) 944 #define __HAL_DBGMCU_UnFreeze_IWDG1() (DBGMCU->APB4FZ1 &= ~ (DBGMCU_APB4FZ1_DBG_IWDG1)) 945 946 947 #if defined(DUAL_CORE) 948 #define __HAL_DBGMCU_FREEZE2_IWDG2() (DBGMCU->APB4FZ2 |= (DBGMCU_APB4FZ2_DBG_IWDG2)) 949 #define __HAL_DBGMCU_FREEZE2_WWDG2() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_WWDG2)) 950 951 #define __HAL_DBGMCU_UnFreeze2_IWDG2() (DBGMCU->APB4FZ2 &= ~ (DBGMCU_APB4FZ2_DBG_IWDG2)) 952 #define __HAL_DBGMCU_UnFreeze2_WWDG2() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_WWDG2)) 953 954 955 #define __HAL_DBGMCU_FREEZE2_WWDG1() (DBGMCU->APB3FZ2 |= (DBGMCU_APB3FZ2_DBG_WWDG1)) 956 957 #define __HAL_DBGMCU_FREEZE2_TIM2() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_TIM2)) 958 #define __HAL_DBGMCU_FREEZE2_TIM3() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_TIM3)) 959 #define __HAL_DBGMCU_FREEZE2_TIM4() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_TIM4)) 960 #define __HAL_DBGMCU_FREEZE2_TIM5() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_TIM5)) 961 #define __HAL_DBGMCU_FREEZE2_TIM6() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_TIM6)) 962 #define __HAL_DBGMCU_FREEZE2_TIM7() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_TIM7)) 963 #define __HAL_DBGMCU_FREEZE2_TIM12() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_TIM12)) 964 #define __HAL_DBGMCU_FREEZE2_TIM13() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_TIM13)) 965 #define __HAL_DBGMCU_FREEZE2_TIM14() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_TIM14)) 966 #define __HAL_DBGMCU_FREEZE2_LPTIM1() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_LPTIM1)) 967 #define __HAL_DBGMCU_FREEZE2_I2C1() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_I2C1)) 968 #define __HAL_DBGMCU_FREEZE2_I2C2() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_I2C2)) 969 #define __HAL_DBGMCU_FREEZE2_I2C3() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_I2C3)) 970 #define __HAL_DBGMCU_FREEZE2_FDCAN() (DBGMCU->APB1HFZ2 |= (DBGMCU_APB1HFZ2_DBG_FDCAN)) 971 972 973 #define __HAL_DBGMCU_FREEZE2_TIM1() (DBGMCU->APB2FZ2 |= (DBGMCU_APB2FZ2_DBG_TIM1)) 974 #define __HAL_DBGMCU_FREEZE2_TIM8() (DBGMCU->APB2FZ2 |= (DBGMCU_APB2FZ2_DBG_TIM8)) 975 #define __HAL_DBGMCU_FREEZE2_TIM15() (DBGMCU->APB2FZ2 |= (DBGMCU_APB2FZ2_DBG_TIM15)) 976 #define __HAL_DBGMCU_FREEZE2_TIM16() (DBGMCU->APB2FZ2 |= (DBGMCU_APB2FZ2_DBG_TIM16)) 977 #define __HAL_DBGMCU_FREEZE2_TIM17() (DBGMCU->APB2FZ2 |= (DBGMCU_APB2FZ2_DBG_TIM17)) 978 #define __HAL_DBGMCU_FREEZE2_HRTIM() (DBGMCU->APB2FZ2 |= (DBGMCU_APB2FZ2_DBG_HRTIM)) 979 980 #define __HAL_DBGMCU_FREEZE2_I2C4() (DBGMCU->APB4FZ2 |= (DBGMCU_APB4FZ2_DBG_I2C4)) 981 #define __HAL_DBGMCU_FREEZE2_LPTIM2() (DBGMCU->APB4FZ2 |= (DBGMCU_APB4FZ2_DBG_LPTIM2)) 982 #define __HAL_DBGMCU_FREEZE2_LPTIM3() (DBGMCU->APB4FZ2 |= (DBGMCU_APB4FZ2_DBG_LPTIM3)) 983 #define __HAL_DBGMCU_FREEZE2_LPTIM4() (DBGMCU->APB4FZ2 |= (DBGMCU_APB4FZ2_DBG_LPTIM4)) 984 #define __HAL_DBGMCU_FREEZE2_LPTIM5() (DBGMCU->APB4FZ2 |= (DBGMCU_APB4FZ2_DBG_LPTIM5)) 985 #define __HAL_DBGMCU_FREEZE2_RTC() (DBGMCU->APB4FZ2 |= (DBGMCU_APB4FZ2_DBG_RTC)) 986 #define __HAL_DBGMCU_FREEZE2_IWDG1() (DBGMCU->APB4FZ2 |= (DBGMCU_APB4FZ2_DBG_IWDG1)) 987 988 #define __HAL_DBGMCU_UnFreeze2_WWDG1() (DBGMCU->APB3FZ2 &= ~ (DBGMCU_APB3FZ2_DBG_WWDG1)) 989 990 #define __HAL_DBGMCU_UnFreeze2_TIM2() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_TIM2)) 991 #define __HAL_DBGMCU_UnFreeze2_TIM3() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_TIM3)) 992 #define __HAL_DBGMCU_UnFreeze2_TIM4() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_TIM4)) 993 #define __HAL_DBGMCU_UnFreeze2_TIM5() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_TIM5)) 994 #define __HAL_DBGMCU_UnFreeze2_TIM6() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_TIM6)) 995 #define __HAL_DBGMCU_UnFreeze2_TIM7() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_TIM7)) 996 #define __HAL_DBGMCU_UnFreeze2_TIM12() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_TIM12)) 997 #define __HAL_DBGMCU_UnFreeze2_TIM13() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_TIM13)) 998 #define __HAL_DBGMCU_UnFreeze2_TIM14() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_TIM14)) 999 #define __HAL_DBGMCU_UnFreeze2_LPTIM1() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_LPTIM1)) 1000 #define __HAL_DBGMCU_UnFreeze2_I2C1() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_I2C1)) 1001 #define __HAL_DBGMCU_UnFreeze2_I2C2() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_I2C2)) 1002 #define __HAL_DBGMCU_UnFreeze2_I2C3() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_I2C3)) 1003 #define __HAL_DBGMCU_UnFreeze2_FDCAN() (DBGMCU->APB1HFZ2 &= ~ (DBGMCU_APB1HFZ2_DBG_FDCAN)) 1004 1005 1006 #define __HAL_DBGMCU_UnFreeze2_TIM1() (DBGMCU->APB2FZ2 &= ~ (DBGMCU_APB2FZ2_DBG_TIM1)) 1007 #define __HAL_DBGMCU_UnFreeze2_TIM8() (DBGMCU->APB2FZ2 &= ~ (DBGMCU_APB2FZ2_DBG_TIM8)) 1008 #define __HAL_DBGMCU_UnFreeze2_TIM15() (DBGMCU->APB2FZ2 &= ~ (DBGMCU_APB2FZ2_DBG_TIM15)) 1009 #define __HAL_DBGMCU_UnFreeze2_TIM16() (DBGMCU->APB2FZ2 &= ~ (DBGMCU_APB2FZ2_DBG_TIM16)) 1010 #define __HAL_DBGMCU_UnFreeze2_TIM17() (DBGMCU->APB2FZ2 &= ~ (DBGMCU_APB2FZ2_DBG_TIM17)) 1011 #define __HAL_DBGMCU_UnFreeze2_HRTIM() (DBGMCU->APB2FZ2 &= ~ (DBGMCU_APB2FZ2_DBG_HRTIM)) 1012 1013 #define __HAL_DBGMCU_UnFreeze2_I2C4() (DBGMCU->APB4FZ2 &= ~ (DBGMCU_APB4FZ2_DBG_I2C4)) 1014 #define __HAL_DBGMCU_UnFreeze2_LPTIM2() (DBGMCU->APB4FZ2 &= ~ (DBGMCU_APB4FZ2_DBG_LPTIM2)) 1015 #define __HAL_DBGMCU_UnFreeze2_LPTIM3() (DBGMCU->APB4FZ2 &= ~ (DBGMCU_APB4FZ2_DBG_LPTIM3)) 1016 #define __HAL_DBGMCU_UnFreeze2_LPTIM4() (DBGMCU->APB4FZ2 &= ~ (DBGMCU_APB4FZ2_DBG_LPTIM4)) 1017 #define __HAL_DBGMCU_UnFreeze2_LPTIM5() (DBGMCU->APB4FZ2 &= ~ (DBGMCU_APB4FZ2_DBG_LPTIM5)) 1018 #define __HAL_DBGMCU_UnFreeze2_RTC() (DBGMCU->APB4FZ2 &= ~ (DBGMCU_APB4FZ2_DBG_RTC)) 1019 #define __HAL_DBGMCU_UnFreeze2_IWDG1() (DBGMCU->APB4FZ2 &= ~ (DBGMCU_APB4FZ2_DBG_IWDG1)) 1020 1021 #endif /*DUAL_CORE*/ 1022 /** 1023 * @} 1024 */ 1025 /** 1026 * @} 1027 */ 1028 1029 /** @defgroup HAL_Private_Macros HAL Private Macros 1030 * @{ 1031 */ 1032 #define IS_TICKFREQ(FREQ) (((FREQ) == HAL_TICK_FREQ_10HZ) || \ 1033 ((FREQ) == HAL_TICK_FREQ_100HZ) || \ 1034 ((FREQ) == HAL_TICK_FREQ_1KHZ)) 1035 /** 1036 * @} 1037 */ 1038 1039 /* Exported variables --------------------------------------------------------*/ 1040 1041 /** @addtogroup HAL_Exported_Variables 1042 * @{ 1043 */ 1044 extern __IO uint32_t uwTick; 1045 extern uint32_t uwTickPrio; 1046 extern HAL_TickFreqTypeDef uwTickFreq; 1047 /** 1048 * @} 1049 */ 1050 1051 /* Exported functions --------------------------------------------------------*/ 1052 /** @defgroup HAL_Exported_Functions HAL Exported Functions 1053 * @{ 1054 */ 1055 /* Initialization and de-initialization functions ******************************/ 1056 /** @defgroup HAL_Group1 Initialization and de-initialization Functions 1057 * @{ 1058 */ 1059 HAL_StatusTypeDef HAL_Init(void); 1060 HAL_StatusTypeDef HAL_DeInit(void); 1061 void HAL_MspInit(void); 1062 void HAL_MspDeInit(void); 1063 HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority); 1064 1065 /** 1066 * @} 1067 */ 1068 1069 /* Peripheral Control functions ************************************************/ 1070 /** @defgroup HAL_Group2 HAL Control functions 1071 * 1072 */ 1073 void HAL_IncTick(void); 1074 void HAL_Delay(uint32_t Delay); 1075 uint32_t HAL_GetTick(void); 1076 uint32_t HAL_GetTickPrio(void); 1077 HAL_StatusTypeDef HAL_SetTickFreq(HAL_TickFreqTypeDef Freq); 1078 HAL_TickFreqTypeDef HAL_GetTickFreq(void); 1079 void HAL_SuspendTick(void); 1080 void HAL_ResumeTick(void); 1081 uint32_t HAL_GetHalVersion(void); 1082 uint32_t HAL_GetREVID(void); 1083 uint32_t HAL_GetDEVID(void); 1084 uint32_t HAL_GetUIDw0(void); 1085 uint32_t HAL_GetUIDw1(void); 1086 uint32_t HAL_GetUIDw2(void); 1087 #if defined(SYSCFG_PMCR_EPIS_SEL) 1088 void HAL_SYSCFG_ETHInterfaceSelect(uint32_t SYSCFG_ETHInterface); 1089 #endif /* SYSCFG_PMCR_EPIS_SEL */ 1090 void HAL_SYSCFG_AnalogSwitchConfig(uint32_t SYSCFG_AnalogSwitch , uint32_t SYSCFG_SwitchState ); 1091 #if defined(SYSCFG_PMCR_BOOSTEN) 1092 void HAL_SYSCFG_EnableBOOST(void); 1093 void HAL_SYSCFG_DisableBOOST(void); 1094 #endif /* SYSCFG_PMCR_BOOSTEN */ 1095 1096 #if defined (SYSCFG_UR2_BOOT_ADD0) || defined (SYSCFG_UR2_BCM7_ADD0) 1097 void HAL_SYSCFG_CM7BootAddConfig(uint32_t BootRegister, uint32_t BootAddress); 1098 #endif /* SYSCFG_UR2_BOOT_ADD0 || SYSCFG_UR2_BCM7_ADD0*/ 1099 1100 #if defined(DUAL_CORE) 1101 void HAL_SYSCFG_CM4BootAddConfig(uint32_t BootRegister, uint32_t BootAddress); 1102 void HAL_SYSCFG_EnableCM7BOOT(void); 1103 void HAL_SYSCFG_DisableCM7BOOT(void); 1104 void HAL_SYSCFG_EnableCM4BOOT(void); 1105 void HAL_SYSCFG_DisableCM4BOOT(void); 1106 #endif /*DUAL_CORE*/ 1107 void HAL_EnableCompensationCell(void); 1108 void HAL_DisableCompensationCell(void); 1109 void HAL_SYSCFG_EnableIOSpeedOptimize(void); 1110 void HAL_SYSCFG_DisableIOSpeedOptimize(void); 1111 void HAL_SYSCFG_CompensationCodeSelect(uint32_t SYSCFG_CompCode); 1112 void HAL_SYSCFG_CompensationCodeConfig(uint32_t SYSCFG_PMOSCode, uint32_t SYSCFG_NMOSCode); 1113 #if defined(SYSCFG_CCCR_NCC_MMC) 1114 void HAL_SYSCFG_VDDMMC_CompensationCodeConfig(uint32_t SYSCFG_PMOSCode, uint32_t SYSCFG_NMOSCode); 1115 #endif /* SYSCFG_CCCR_NCC_MMC */ 1116 void HAL_DBGMCU_EnableDBGSleepMode(void); 1117 void HAL_DBGMCU_DisableDBGSleepMode(void); 1118 void HAL_DBGMCU_EnableDBGStopMode(void); 1119 void HAL_DBGMCU_DisableDBGStopMode(void); 1120 void HAL_DBGMCU_EnableDBGStandbyMode(void); 1121 void HAL_DBGMCU_DisableDBGStandbyMode(void); 1122 #if defined(DUAL_CORE) 1123 void HAL_EnableDomain2DBGSleepMode(void); 1124 void HAL_DisableDomain2DBGSleepMode(void); 1125 void HAL_EnableDomain2DBGStopMode(void); 1126 void HAL_DisableDomain2DBGStopMode(void); 1127 void HAL_EnableDomain2DBGStandbyMode(void); 1128 void HAL_DisableDomain2DBGStandbyMode(void); 1129 #endif /*DUAL_CORE*/ 1130 #if defined(DBGMCU_CR_DBG_STOPD3) 1131 void HAL_EnableDomain3DBGStopMode(void); 1132 void HAL_DisableDomain3DBGStopMode(void); 1133 #endif /*DBGMCU_CR_DBG_STOPD3*/ 1134 #if defined(DBGMCU_CR_DBG_STANDBYD3) 1135 void HAL_EnableDomain3DBGStandbyMode(void); 1136 void HAL_DisableDomain3DBGStandbyMode(void); 1137 #endif /*DBGMCU_CR_DBG_STANDBYD3*/ 1138 void HAL_EXTI_EdgeConfig(uint32_t EXTI_Line , uint32_t EXTI_Edge ); 1139 void HAL_EXTI_GenerateSWInterrupt(uint32_t EXTI_Line); 1140 #if defined(DUAL_CORE) 1141 void HAL_EXTI_D2_ClearFlag(uint32_t EXTI_Line); 1142 #endif /*DUAL_CORE*/ 1143 void HAL_EXTI_D1_ClearFlag(uint32_t EXTI_Line); 1144 void HAL_EXTI_D1_EventInputConfig(uint32_t EXTI_Line , uint32_t EXTI_Mode, uint32_t EXTI_LineCmd); 1145 #if defined(DUAL_CORE) 1146 void HAL_EXTI_D2_EventInputConfig(uint32_t EXTI_Line , uint32_t EXTI_Mode, uint32_t EXTI_LineCmd); 1147 #endif /*DUAL_CORE*/ 1148 void HAL_EXTI_D3_EventInputConfig(uint32_t EXTI_Line, uint32_t EXTI_LineCmd , uint32_t EXTI_ClearSrc); 1149 void HAL_SetFMCMemorySwappingConfig(uint32_t BankMapConfig); 1150 uint32_t HAL_GetFMCMemorySwappingConfig(void); 1151 void HAL_SYSCFG_VREFBUF_VoltageScalingConfig(uint32_t VoltageScaling); 1152 void HAL_SYSCFG_VREFBUF_HighImpedanceConfig(uint32_t Mode); 1153 void HAL_SYSCFG_VREFBUF_TrimmingConfig(uint32_t TrimmingValue); 1154 HAL_StatusTypeDef HAL_SYSCFG_EnableVREFBUF(void); 1155 void HAL_SYSCFG_DisableVREFBUF(void); 1156 #if defined(SYSCFG_ADC2ALT_ADC2_ROUT0) 1157 void HAL_SYSCFG_ADC2ALT_Rout0Config(uint32_t Adc2AltRout0); 1158 #endif /*SYSCFG_ADC2ALT_ADC2_ROUT0*/ 1159 #if defined(SYSCFG_ADC2ALT_ADC2_ROUT1) 1160 void HAL_SYSCFG_ADC2ALT_Rout1Config(uint32_t Adc2AltRout1); 1161 #endif /*SYSCFG_ADC2ALT_ADC2_ROUT1*/ 1162 1163 /** 1164 * @} 1165 */ 1166 1167 /** 1168 * @} 1169 */ 1170 1171 /** 1172 * @} 1173 */ 1174 1175 /** 1176 * @} 1177 */ 1178 1179 #ifdef __cplusplus 1180 } 1181 #endif 1182 1183 #endif /* STM32H7xx_HAL_H */ 1184 1185