Skip to content

Commit 3fbf5f0

Browse files
committed
Add STM32H7xx CMSIS v1.4.0
Official 1.4.0 CMSIS, not released thanks STM32CubeMX Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 40236a9 commit 3fbf5f0

File tree

11 files changed

+82003
-0
lines changed

11 files changed

+82003
-0
lines changed

system/Drivers/CMSIS/Device/ST/STM32H7xx/Include/stm32h743xx.h

Lines changed: 26137 additions & 0 deletions
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32H7xx/Include/stm32h750xx.h

Lines changed: 26403 additions & 0 deletions
Large diffs are not rendered by default.

system/Drivers/CMSIS/Device/ST/STM32H7xx/Include/stm32h753xx.h

Lines changed: 26403 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
/**
2+
******************************************************************************
3+
* @file stm32h7xx.h
4+
* @author MCD Application Team
5+
* @brief CMSIS STM32H7xx Device Peripheral Access Layer Header File.
6+
*
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"
15+
*
16+
******************************************************************************
17+
* @attention
18+
*
19+
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
20+
* All rights reserved.</center></h2>
21+
*
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
26+
*
27+
******************************************************************************
28+
*/
29+
30+
/** @addtogroup CMSIS
31+
* @{
32+
*/
33+
34+
/** @addtogroup stm32h7xx
35+
* @{
36+
*/
37+
38+
#ifndef STM32H7xx_H
39+
#define STM32H7xx_H
40+
41+
#ifdef __cplusplus
42+
extern "C" {
43+
#endif /* __cplusplus */
44+
45+
/** @addtogroup Library_configuration_section
46+
* @{
47+
*/
48+
49+
/**
50+
* @brief STM32 Family
51+
*/
52+
#if !defined (STM32H7)
53+
#define STM32H7
54+
#endif /* STM32H7 */
55+
56+
57+
/* Uncomment the line below according to the target STM32H7 device used in your
58+
application
59+
*/
60+
61+
#if !defined (STM32H743xx) && !defined (STM32H753xx) && !defined (STM32H750xx)
62+
/* #define STM32H743xx */ /*!< STM32H743VI, STM32H743ZI, STM32H743AI, STM32H743II, STM32H743BI, STM32H743XI Devices */
63+
/* #define STM32H753xx */ /*!< STM32H753VI, STM32H753ZI, STM32H753AI, STM32H753II, STM32H753BI, STM32H753XI Devices */
64+
/* #define STM32H750xx */ /*!< STM32H750V, STM32H750I, STM32H750X Devices */
65+
#endif
66+
67+
/* Tip: To avoid modifying this file each time you need to switch between these
68+
devices, you can define the device in your toolchain compiler preprocessor.
69+
*/
70+
71+
72+
#if !defined (USE_HAL_DRIVER)
73+
/**
74+
* @brief Comment the line below if you will not use the peripherals drivers.
75+
In this case, these drivers will not be included and the application code will
76+
be based on direct access to peripherals registers
77+
*/
78+
/*#define USE_HAL_DRIVER */
79+
#endif /* USE_HAL_DRIVER */
80+
81+
/**
82+
* @brief CMSIS Device version number V1.4.0
83+
*/
84+
#define __STM32H7xx_CMSIS_DEVICE_VERSION_MAIN (0x01) /*!< [31:24] main version */
85+
#define __STM32H7xx_CMSIS_DEVICE_VERSION_SUB1 (0x04) /*!< [23:16] sub1 version */
86+
#define __STM32H7xx_CMSIS_DEVICE_VERSION_SUB2 (0x00) /*!< [15:8] sub2 version */
87+
#define __STM32H7xx_CMSIS_DEVICE_VERSION_RC (0x00) /*!< [7:0] release candidate */
88+
#define __STM32H7xx_CMSIS_DEVICE_VERSION ((__CMSIS_DEVICE_VERSION_MAIN << 24)\
89+
|(__CMSIS_DEVICE_HAL_VERSION_SUB1 << 16)\
90+
|(__CMSIS_DEVICE_HAL_VERSION_SUB2 << 8 )\
91+
|(__CMSIS_DEVICE_HAL_VERSION_RC))
92+
93+
/**
94+
* @}
95+
*/
96+
97+
/** @addtogroup Device_Included
98+
* @{
99+
*/
100+
101+
#if defined(STM32H743xx)
102+
#include "stm32h743xx.h"
103+
#elif defined(STM32H753xx)
104+
#include "stm32h753xx.h"
105+
#elif defined(STM32H750xx)
106+
#include "stm32h750xx.h"
107+
#else
108+
#error "Please select first the target STM32H7xx device used in your application (in stm32h7xx.h file)"
109+
#endif
110+
111+
/**
112+
* @}
113+
*/
114+
115+
/** @addtogroup Exported_types
116+
* @{
117+
*/
118+
typedef enum
119+
{
120+
RESET = 0,
121+
SET = !RESET
122+
} FlagStatus, ITStatus;
123+
124+
typedef enum
125+
{
126+
DISABLE = 0,
127+
ENABLE = !DISABLE
128+
} FunctionalState;
129+
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
130+
131+
typedef enum
132+
{
133+
ERROR = 0,
134+
SUCCESS = !ERROR
135+
} ErrorStatus;
136+
137+
/**
138+
* @}
139+
*/
140+
141+
142+
/** @addtogroup Exported_macros
143+
* @{
144+
*/
145+
#define SET_BIT(REG, BIT) ((REG) |= (BIT))
146+
147+
#define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
148+
149+
#define READ_BIT(REG, BIT) ((REG) & (BIT))
150+
151+
#define CLEAR_REG(REG) ((REG) = (0x0))
152+
153+
#define WRITE_REG(REG, VAL) ((REG) = (VAL))
154+
155+
#define READ_REG(REG) ((REG))
156+
157+
#define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
158+
159+
#define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
160+
161+
162+
/**
163+
* @}
164+
*/
165+
166+
#if defined (USE_HAL_DRIVER)
167+
#include "stm32h7xx_hal.h"
168+
#endif /* USE_HAL_DRIVER */
169+
170+
171+
#ifdef __cplusplus
172+
}
173+
#endif /* __cplusplus */
174+
175+
#endif /* STM32H7xx_H */
176+
/**
177+
* @}
178+
*/
179+
180+
/**
181+
* @}
182+
*/
183+
184+
185+
186+
187+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
/**
2+
******************************************************************************
3+
* @file system_stm32h7xx.h
4+
* @author MCD Application Team
5+
* @brief CMSIS Cortex-Mx Device System Source File for STM32H7xx devices.
6+
******************************************************************************
7+
* @attention
8+
*
9+
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
10+
* All rights reserved.</center></h2>
11+
*
12+
* This software component is licensed by ST under BSD 3-Clause license,
13+
* the "License"; You may not use this file except in compliance with the
14+
* License. You may obtain a copy of the License at:
15+
* opensource.org/licenses/BSD-3-Clause
16+
*
17+
******************************************************************************
18+
*/
19+
20+
/** @addtogroup CMSIS
21+
* @{
22+
*/
23+
24+
/** @addtogroup stm32h7xx_system
25+
* @{
26+
*/
27+
28+
/**
29+
* @brief Define to prevent recursive inclusion
30+
*/
31+
#ifndef SYSTEM_STM32H7XX_H
32+
#define SYSTEM_STM32H7XX_H
33+
34+
#ifdef __cplusplus
35+
extern "C" {
36+
#endif
37+
38+
/** @addtogroup STM32H7xx_System_Includes
39+
* @{
40+
*/
41+
42+
/**
43+
* @}
44+
*/
45+
46+
47+
/** @addtogroup STM32H7xx_System_Exported_types
48+
* @{
49+
*/
50+
/* This variable is updated in three ways:
51+
1) by calling CMSIS function SystemCoreClockUpdate()
52+
2) by calling HAL API function HAL_RCC_GetSysClockFreq()
53+
3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
54+
Note: If you use this function to configure the system clock; then there
55+
is no need to call the 2 first functions listed above, since SystemCoreClock
56+
variable is updated automatically.
57+
*/
58+
extern uint32_t SystemCoreClock; /*!< System Domain1 Clock Frequency */
59+
extern uint32_t SystemD2Clock; /*!< System Domain2 Clock Frequency */
60+
extern const uint8_t D1CorePrescTable[16] ; /*!< D1CorePrescTable prescalers table values */
61+
62+
/**
63+
* @}
64+
*/
65+
66+
/** @addtogroup STM32H7xx_System_Exported_Constants
67+
* @{
68+
*/
69+
70+
/**
71+
* @}
72+
*/
73+
74+
/** @addtogroup STM32H7xx_System_Exported_Macros
75+
* @{
76+
*/
77+
78+
/**
79+
* @}
80+
*/
81+
82+
/** @addtogroup STM32H7xx_System_Exported_Functions
83+
* @{
84+
*/
85+
86+
extern void SystemInit(void);
87+
extern void SystemCoreClockUpdate(void);
88+
/**
89+
* @}
90+
*/
91+
92+
#ifdef __cplusplus
93+
}
94+
#endif
95+
96+
#endif /* SYSTEM_STM32H7XX_H */
97+
98+
/**
99+
* @}
100+
*/
101+
102+
/**
103+
* @}
104+
*/
105+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

0 commit comments

Comments
 (0)