2 ******************************************************************************
4 * @author MCD Application Team
5 * @brief CMSIS STM32H7xx Device Peripheral Access Layer Header File.
7 * The file is the unique include file that the application programmer
8 * is using in the C source code, usually in main.c. This file contains:
9 * - Configuration section that allows to select:
10 * - The STM32H7xx device used in the target application
11 * - To use or not the peripheral’s drivers in application code(i.e.
12 * code will be based on direct access to peripheral’s registers
13 * rather than drivers API), this option is controlled by
14 * "#define USE_HAL_DRIVER"
16 ******************************************************************************
19 * <h2><center>© Copyright (c) 2017 STMicroelectronics.
20 * All rights reserved.</center></h2>
22 * This software component is licensed by ST under BSD 3-Clause license,
23 * the "License"; You may not use this file except in compliance with the
24 * License. You may obtain a copy of the License at:
25 * opensource.org/licenses/BSD-3-Clause
27 ******************************************************************************
34 /** @addtogroup stm32h7xx
43 #endif /* __cplusplus */
45 /** @addtogroup Library_configuration_section
52 #if !defined (STM32H7)
57 /* Uncomment the line below according to the target STM32H7 device used in your
61 #if !defined (STM32H743xx) && !defined (STM32H753xx) && !defined (STM32H750xx) && !defined (STM32H742xx) && \
62 !defined (STM32H745xx) && !defined (STM32H755xx) && !defined (STM32H747xx) && !defined (STM32H757xx) && \
63 !defined (STM32H7A3xx) && !defined (STM32H7A3xxQ) && !defined (STM32H7B3xx) && !defined (STM32H7B3xxQ) && !defined (STM32H7B0xx) && !defined (STM32H7B0xxQ)
64 /* #define STM32H742xx */ /*!< STM32H742VI, STM32H742ZI, STM32H742AI, STM32H742II, STM32H742BI, STM32H742XI Devices */
65 /* #define STM32H743xx */ /*!< STM32H743VI, STM32H743ZI, STM32H743AI, STM32H743II, STM32H743BI, STM32H743XI Devices */
66 /* #define STM32H753xx */ /*!< STM32H753VI, STM32H753ZI, STM32H753AI, STM32H753II, STM32H753BI, STM32H753XI Devices */
67 /* #define STM32H750xx */ /*!< STM32H750V, STM32H750I, STM32H750X Devices */
68 /* #define STM32H747xx */ /*!< STM32H747ZI, STM32H747AI, STM32H747II, STM32H747BI, STM32H747XI Devices */
69 /* #define STM32H757xx */ /*!< STM32H757ZI, STM32H757AI, STM32H757II, STM32H757BI, STM32H757XI Devices */
70 /* #define STM32H745xx */ /*!< STM32H745ZI, STM32H745II, STM32H745BI, STM32H745XI Devices */
71 /* #define STM32H755xx */ /*!< STM32H755ZI, STM32H755II, STM32H755BI, STM32H755XI Devices */
72 /* #define STM32H7B0xx */ /*!< STM32H7B0ABIxQ, STM32H7B0IBTx, STM32H7B0RBTx, STM32H7B0VBTx, STM32H7B0ZBTx, STM32H7B0IBKxQ */
73 /* #define STM32H7A3xx */ /*!< STM32H7A3IIK6, STM32H7A3IIT6, STM32H7A3NIH6, STM32H7A3RIT6, STM32H7A3VIH6, STM32H7A3VIT6, STM32H7A3ZIT6 */
74 /* #define STM32H7A3xxQ */ /*!< STM32H7A3QIY6Q, STM32H7A3IIK6Q, STM32H7A3IIT6Q, STM32H7A3LIH6Q, STM32H7A3VIH6Q, STM32H7A3VIT6Q, STM32H7A3AII6Q, STM32H7A3ZIT6Q */
75 /* #define STM32H7B3xx */ /*!< STM32H7B3IIK6, STM32H7B3IIT6, STM32H7B3NIH6, STM32H7B3RIT6, STM32H7B3VIH6, STM32H7B3VIT6, STM32H7B3ZIT6 */
76 /* #define STM32H7B3xxQ */ /*!< STM32H7B3QIY6Q, STM32H7B3IIK6Q, STM32H7B3IIT6Q, STM32H7B3LIH6Q, STM32H7B3VIH6Q, STM32H7B3VIT6Q, STM32H7B3AII6Q, STM32H7B3ZIT6Q */
79 /* Tip: To avoid modifying this file each time you need to switch between these
80 devices, you can define the device in your toolchain compiler preprocessor.
83 #if defined(DUAL_CORE) && !defined(CORE_CM4) && !defined(CORE_CM7)
84 #error "Dual core device, please select CORE_CM4 or CORE_CM7"
87 #if !defined (USE_HAL_DRIVER)
89 * @brief Comment the line below if you will not use the peripherals drivers.
90 In this case, these drivers will not be included and the application code will
91 be based on direct access to peripherals registers
93 /*#define USE_HAL_DRIVER */
94 #endif /* USE_HAL_DRIVER */
97 * @brief CMSIS Device version number V1.7.0
99 #define __STM32H7xx_CMSIS_DEVICE_VERSION_MAIN (0x01) /*!< [31:24] main version */
100 #define __STM32H7xx_CMSIS_DEVICE_VERSION_SUB1 (0x07) /*!< [23:16] sub1 version */
101 #define __STM32H7xx_CMSIS_DEVICE_VERSION_SUB2 (0x00) /*!< [15:8] sub2 version */
102 #define __STM32H7xx_CMSIS_DEVICE_VERSION_RC (0x00) /*!< [7:0] release candidate */
103 #define __STM32H7xx_CMSIS_DEVICE_VERSION ((__CMSIS_DEVICE_VERSION_MAIN << 24)\
104 |(__CMSIS_DEVICE_HAL_VERSION_SUB1 << 16)\
105 |(__CMSIS_DEVICE_HAL_VERSION_SUB2 << 8 )\
106 |(__CMSIS_DEVICE_HAL_VERSION_RC))
112 /** @addtogroup Device_Included
116 #if defined(STM32H743xx)
117 #include "stm32h743xx.h"
118 #elif defined(STM32H753xx)
119 #include "stm32h753xx.h"
120 #elif defined(STM32H750xx)
121 #include "stm32h750xx.h"
122 #elif defined(STM32H742xx)
123 #include "stm32h742xx.h"
124 #elif defined(STM32H745xx)
125 #include "stm32h745xx.h"
126 #elif defined(STM32H755xx)
127 #include "stm32h755xx.h"
128 #elif defined(STM32H747xx)
129 #include "stm32h747xx.h"
130 #elif defined(STM32H757xx)
131 #include "stm32h757xx.h"
132 #elif defined(STM32H7B0xx)
133 #include "stm32h7b0xx.h"
134 #elif defined(STM32H7B0xxQ)
135 #include "stm32h7b0xxq.h"
136 #elif defined(STM32H7A3xx)
137 #include "stm32h7a3xx.h"
138 #elif defined(STM32H7B3xx)
139 #include "stm32h7b3xx.h"
140 #elif defined(STM32H7A3xxQ)
141 #include "stm32h7a3xxq.h"
142 #elif defined(STM32H7B3xxQ)
143 #include "stm32h7b3xxq.h"
145 #error "Please select first the target STM32H7xx device used in your application (in stm32h7xx.h file)"
152 /** @addtogroup Exported_types
159 } FlagStatus
, ITStatus
;
166 #define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
179 /** @addtogroup Exported_macros
182 #define SET_BIT(REG, BIT) ((REG) |= (BIT))
184 #define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
186 #define READ_BIT(REG, BIT) ((REG) & (BIT))
188 #define CLEAR_REG(REG) ((REG) = (0x0))
190 #define WRITE_REG(REG, VAL) ((REG) = (VAL))
192 #define READ_REG(REG) ((REG))
194 #define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
196 #define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
203 #if defined (USE_HAL_DRIVER)
204 #include "stm32h7xx_hal.h"
205 #endif /* USE_HAL_DRIVER */
210 #endif /* __cplusplus */
212 #endif /* STM32H7xx_H */
224 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/