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