Skip to content

Commit 7c1d207

Browse files
committed
system(F2): update STM32F2xx CMSIS Drivers to v2.2.6
Included in STM32CubeF2 FW v1.9.4 Signed-off-by: Frederic Pillon <[email protected]>
1 parent fe35cd7 commit 7c1d207

19 files changed

+883
-575
lines changed

Diff for: system/Drivers/CMSIS/Device/ST/STM32F2xx/Include/stm32f205xx.h

+6-8
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@
77
* This file contains :
88
* - Data structures and the address mapping for all peripherals
99
* - Peripherals registers declarations and bits definition
10-
* - Macros to access peripherals registers hardware
10+
* - Macros to access peripheral's registers hardware
1111
*
1212
******************************************************************************
1313
* @attention
1414
*
15-
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
16-
* All rights reserved.</center></h2>
15+
* Copyright (c) 2017-2021 STMicroelectronics.
16+
* All rights reserved.
1717
*
18-
* This software component is licensed by ST under BSD 3-Clause license,
19-
* the "License"; You may not use this file except in compliance with the
20-
* License. You may obtain a copy of the License at:
21-
* opensource.org/licenses/BSD-3-Clause
18+
* This software is licensed under terms that can be found in the LICENSE file
19+
* in the root directory of this software component.
20+
* If no LICENSE file comes with this software, it is provided AS-IS.
2221
*
2322
******************************************************************************
2423
*/
@@ -13718,5 +13717,4 @@ USB_OTG_HostChannelTypeDef;
1371813717

1371913718
#endif /* __STM32F205xx_H */
1372013719

13721-
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
1372213720

Diff for: system/Drivers/CMSIS/Device/ST/STM32F2xx/Include/stm32f207xx.h

+6-8
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@
77
* This file contains :
88
* - Data structures and the address mapping for all peripherals
99
* - Peripherals registers declarations and bits definition
10-
* - Macros to access peripherals registers hardware
10+
* - Macros to access peripheral's registers hardware
1111
*
1212
******************************************************************************
1313
* @attention
1414
*
15-
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
16-
* All rights reserved.</center></h2>
15+
* Copyright (c) 2017-2021 STMicroelectronics.
16+
* All rights reserved.
1717
*
18-
* This software component is licensed by ST under BSD 3-Clause license,
19-
* the "License"; You may not use this file except in compliance with the
20-
* License. You may obtain a copy of the License at:
21-
* opensource.org/licenses/BSD-3-Clause
18+
* This software is licensed under terms that can be found in the LICENSE file
19+
* in the root directory of this software component.
20+
* If no LICENSE file comes with this software, it is provided AS-IS.
2221
*
2322
******************************************************************************
2423
*/
@@ -15009,5 +15008,4 @@ USB_OTG_HostChannelTypeDef;
1500915008

1501015009
#endif /* __STM32F207xx_H */
1501115010

15012-
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
1501315011

Diff for: system/Drivers/CMSIS/Device/ST/STM32F2xx/Include/stm32f215xx.h

+6-8
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@
77
* This file contains :
88
* - Data structures and the address mapping for all peripherals
99
* - Peripherals registers declarations and bits definition
10-
* - Macros to access peripherals registers hardware
10+
* - Macros to access peripheral's registers hardware
1111
*
1212
******************************************************************************
1313
* @attention
1414
*
15-
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
16-
* All rights reserved.</center></h2>
15+
* Copyright (c) 2017-2021 STMicroelectronics.
16+
* All rights reserved.
1717
*
18-
* This software component is licensed by ST under BSD 3-Clause license,
19-
* the "License"; You may not use this file except in compliance with the
20-
* License. You may obtain a copy of the License at:
21-
* opensource.org/licenses/BSD-3-Clause
18+
* This software is licensed under terms that can be found in the LICENSE file
19+
* in the root directory of this software component.
20+
* If no LICENSE file comes with this software, it is provided AS-IS.
2221
*
2322
******************************************************************************
2423
*/
@@ -13973,5 +13972,4 @@ USB_OTG_HostChannelTypeDef;
1397313972

1397413973
#endif /* __STM32F215xx_H */
1397513974

13976-
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
1397713975

Diff for: system/Drivers/CMSIS/Device/ST/STM32F2xx/Include/stm32f217xx.h

+6-8
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@
77
* This file contains :
88
* - Data structures and the address mapping for all peripherals
99
* - Peripherals registers declarations and bits definition
10-
* - Macros to access peripherals registers hardware
10+
* - Macros to access peripheral's registers hardware
1111
*
1212
******************************************************************************
1313
* @attention
1414
*
15-
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
16-
* All rights reserved.</center></h2>
15+
* Copyright (c) 2017-2021 STMicroelectronics.
16+
* All rights reserved.
1717
*
18-
* This software component is licensed by ST under BSD 3-Clause license,
19-
* the "License"; You may not use this file except in compliance with the
20-
* License. You may obtain a copy of the License at:
21-
* opensource.org/licenses/BSD-3-Clause
18+
* This software is licensed under terms that can be found in the LICENSE file
19+
* in the root directory of this software component.
20+
* If no LICENSE file comes with this software, it is provided AS-IS.
2221
*
2322
******************************************************************************
2423
*/
@@ -15264,5 +15263,4 @@ USB_OTG_HostChannelTypeDef;
1526415263

1526515264
#endif /* __STM32F217xx_H */
1526615265

15267-
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
1526815266

Diff for: system/Drivers/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h

+63-11
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,20 @@
88
* is using in the C source code, usually in main.c. This file contains:
99
* - Configuration section that allows to select:
1010
* - The STM32F2xx device used in the target application
11-
* - To use or not the peripherals drivers in application code(i.e.
12-
* code will be based on direct access to peripherals registers
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
1313
* rather than drivers API), this option is controlled by
1414
* "#define USE_HAL_DRIVER"
1515
*
1616
******************************************************************************
1717
* @attention
1818
*
19-
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
20-
* All rights reserved.</center></h2>
19+
* Copyright (c) 2017-2021 STMicroelectronics.
20+
* All rights reserved.
2121
*
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
22+
* This software is licensed under terms that can be found in the LICENSE file
23+
* in the root directory of this software component.
24+
* If no LICENSE file comes with this software, it is provided AS-IS.
2625
*
2726
******************************************************************************
2827
*/
@@ -81,11 +80,11 @@
8180
#endif /* USE_HAL_DRIVER */
8281

8382
/**
84-
* @brief CMSIS Device version number V2.2.5
83+
* @brief CMSIS Device version number
8584
*/
8685
#define __STM32F2xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
8786
#define __STM32F2xx_CMSIS_VERSION_SUB1 (0x02U) /*!< [23:16] sub1 version */
88-
#define __STM32F2xx_CMSIS_VERSION_SUB2 (0x05U) /*!< [15:8] sub2 version */
87+
#define __STM32F2xx_CMSIS_VERSION_SUB2 (0x06U) /*!< [15:8] sub2 version */
8988
#define __STM32F2xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
9089
#define __STM32F2xx_CMSIS_VERSION ((__STM32F2xx_CMSIS_VERSION_MAIN << 24)\
9190
|(__STM32F2xx_CMSIS_VERSION_SUB1 << 16)\
@@ -162,6 +161,60 @@ typedef enum
162161

163162
#define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
164163

164+
/* Use of CMSIS compiler intrinsics for register exclusive access */
165+
/* Atomic 32-bit register access macro to set one or several bits */
166+
#define ATOMIC_SET_BIT(REG, BIT) \
167+
do { \
168+
uint32_t val; \
169+
do { \
170+
val = __LDREXW((__IO uint32_t *)&(REG)) | (BIT); \
171+
} while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
172+
} while(0)
173+
174+
/* Atomic 32-bit register access macro to clear one or several bits */
175+
#define ATOMIC_CLEAR_BIT(REG, BIT) \
176+
do { \
177+
uint32_t val; \
178+
do { \
179+
val = __LDREXW((__IO uint32_t *)&(REG)) & ~(BIT); \
180+
} while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
181+
} while(0)
182+
183+
/* Atomic 32-bit register access macro to clear and set one or several bits */
184+
#define ATOMIC_MODIFY_REG(REG, CLEARMSK, SETMASK) \
185+
do { \
186+
uint32_t val; \
187+
do { \
188+
val = (__LDREXW((__IO uint32_t *)&(REG)) & ~(CLEARMSK)) | (SETMASK); \
189+
} while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
190+
} while(0)
191+
192+
/* Atomic 16-bit register access macro to set one or several bits */
193+
#define ATOMIC_SETH_BIT(REG, BIT) \
194+
do { \
195+
uint16_t val; \
196+
do { \
197+
val = __LDREXH((__IO uint16_t *)&(REG)) | (BIT); \
198+
} while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
199+
} while(0)
200+
201+
/* Atomic 16-bit register access macro to clear one or several bits */
202+
#define ATOMIC_CLEARH_BIT(REG, BIT) \
203+
do { \
204+
uint16_t val; \
205+
do { \
206+
val = __LDREXH((__IO uint16_t *)&(REG)) & ~(BIT); \
207+
} while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
208+
} while(0)
209+
210+
/* Atomic 16-bit register access macro to clear and set one or several bits */
211+
#define ATOMIC_MODIFYH_REG(REG, CLEARMSK, SETMASK) \
212+
do { \
213+
uint16_t val; \
214+
do { \
215+
val = (__LDREXH((__IO uint16_t *)&(REG)) & ~(CLEARMSK)) | (SETMASK); \
216+
} while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
217+
} while(0)
165218

166219
/**
167220
* @}
@@ -188,4 +241,3 @@ typedef enum
188241

189242

190243

191-
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

Diff for: system/Drivers/CMSIS/Device/ST/STM32F2xx/Include/system_stm32f2xx.h

+6-8
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66
****************************************************************************
77
* @attention
88
*
9-
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
10-
* All rights reserved.</center></h2>
9+
* Copyright (c) 2017-2021 STMicroelectronics.
10+
* All rights reserved.
1111
*
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
12+
* This software is licensed under terms that can be found in the LICENSE file
13+
* in the root directory of this software component.
14+
* If no LICENSE file comes with this software, it is provided AS-IS.
1615
*
1716
******************************************************************************
1817
*/
@@ -102,5 +101,4 @@ extern void SystemCoreClockUpdate(void);
102101

103102
/**
104103
* @}
105-
*/
106-
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
104+
*/

0 commit comments

Comments
 (0)