Skip to content

Commit 6fe352b

Browse files
committed
Import STM32CubeWB v1.23.0 on 23-Sept-2025.
From https://github.com/STMicroelectronics/STM32CubeWB.git tag v1.23.0 Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
1 parent a16924c commit 6fe352b

File tree

193 files changed

+57474
-15435
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+57474
-15435
lines changed

CMSIS/STM32WBxx/Include/stm32wb10xx.h

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

CMSIS/STM32WBxx/Include/stm32wb15xx.h

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

CMSIS/STM32WBxx/Include/stm32wb1mxx.h

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

CMSIS/STM32WBxx/Include/stm32wb30xx.h

Lines changed: 104 additions & 94 deletions
Large diffs are not rendered by default.

CMSIS/STM32WBxx/Include/stm32wb35xx.h

Lines changed: 108 additions & 100 deletions
Large diffs are not rendered by default.

CMSIS/STM32WBxx/Include/stm32wb50xx.h

Lines changed: 104 additions & 94 deletions
Large diffs are not rendered by default.

CMSIS/STM32WBxx/Include/stm32wb55xx.h

Lines changed: 108 additions & 100 deletions
Large diffs are not rendered by default.

CMSIS/STM32WBxx/Include/stm32wb5mxx.h

Lines changed: 108 additions & 100 deletions
Large diffs are not rendered by default.

CMSIS/STM32WBxx/Include/stm32wbxx.h

Lines changed: 79 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@
1616
******************************************************************************
1717
* @attention
1818
*
19-
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
20-
* All rights reserved.</center></h2>
19+
* Copyright (c) 2019-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
*/
@@ -39,7 +38,7 @@
3938
#define __STM32WBxx_H
4039

4140
#ifdef __cplusplus
42-
extern "C" {
41+
extern "C" {
4342
#endif /* __cplusplus */
4443

4544
/** @addtogroup Library_configuration_section
@@ -58,19 +57,19 @@
5857
*/
5958
#if !defined (USE_HAL_DRIVER)
6059
/**
61-
* @brief Comment the line below if you will not use the peripherals drivers.
60+
* @brief Comment the line below if you will not use the peripherals drivers.
6261
In this case, these drivers will not be included and the application code will
6362
be based on direct access to peripherals registers
6463
*/
65-
/*#define USE_HAL_DRIVER */
64+
/*#define USE_HAL_DRIVER */
6665
#endif /* USE_HAL_DRIVER */
6766

6867
/**
6968
* @brief CMSIS Device version number
7069
*/
7170
#define __STM32WBxx_CMSIS_VERSION_MAIN (0x01U) /*!< [31:24] main version */
72-
#define __STM32WBxx_CMSIS_VERSION_SUB1 (0x07U) /*!< [23:16] sub1 version */
73-
#define __STM32WBxx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
71+
#define __STM32WBxx_CMSIS_VERSION_SUB1 (0x0CU) /*!< [23:16] sub1 version */
72+
#define __STM32WBxx_CMSIS_VERSION_SUB2 (0x03U) /*!< [15:8] sub2 version */
7473
#define __STM32WBxx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
7574
#define __STM32WBxx_CMSIS_DEVICE_VERSION ((__STM32WBxx_CMSIS_VERSION_MAIN << 24)\
7675
|(__STM32WBxx_CMSIS_VERSION_SUB1 << 16)\
@@ -86,17 +85,23 @@
8685
*/
8786

8887
#if defined(STM32WB55xx)
89-
#include "stm32wb55xx.h"
88+
#include "stm32wb55xx.h"
9089
#elif defined(STM32WB5Mxx)
91-
#include "stm32wb5mxx.h"
90+
#include "stm32wb5mxx.h"
9291
#elif defined(STM32WB50xx)
93-
#include "stm32wb50xx.h"
92+
#include "stm32wb50xx.h"
9493
#elif defined(STM32WB35xx)
95-
#include "stm32wb35xx.h"
94+
#include "stm32wb35xx.h"
9695
#elif defined(STM32WB30xx)
97-
#include "stm32wb30xx.h"
96+
#include "stm32wb30xx.h"
97+
#elif defined(STM32WB15xx)
98+
#include "stm32wb15xx.h"
99+
#elif defined(STM32WB10xx)
100+
#include "stm32wb10xx.h"
101+
#elif defined(STM32WB1Mxx)
102+
#include "stm32wb1mxx.h"
98103
#else
99-
#error "Please select first the target STM32WBxx device used in your application, for instance xxx (in stm32wbxx.h file)"
104+
#error "Please select first the target STM32WBxx device used in your application, for instance xxx (in stm32wbxx.h file)"
100105
#endif
101106
/**
102107
* @}
@@ -146,13 +151,69 @@ typedef enum
146151

147152
#define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
148153

154+
/* Use of CMSIS compiler intrinsics for register exclusive access */
155+
/* Atomic 32-bit register access macro to set one or several bits */
156+
#define ATOMIC_SET_BIT(REG, BIT) \
157+
do { \
158+
uint32_t val; \
159+
do { \
160+
val = __LDREXW((__IO uint32_t *)&(REG)) | (BIT); \
161+
} while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
162+
} while(0)
163+
164+
/* Atomic 32-bit register access macro to clear one or several bits */
165+
#define ATOMIC_CLEAR_BIT(REG, BIT) \
166+
do { \
167+
uint32_t val; \
168+
do { \
169+
val = __LDREXW((__IO uint32_t *)&(REG)) & ~(BIT); \
170+
} while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
171+
} while(0)
172+
173+
/* Atomic 32-bit register access macro to clear and set one or several bits */
174+
#define ATOMIC_MODIFY_REG(REG, CLEARMSK, SETMASK) \
175+
do { \
176+
uint32_t val; \
177+
do { \
178+
val = (__LDREXW((__IO uint32_t *)&(REG)) & ~(CLEARMSK)) | (SETMASK); \
179+
} while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
180+
} while(0)
181+
182+
/* Atomic 16-bit register access macro to set one or several bits */
183+
#define ATOMIC_SETH_BIT(REG, BIT) \
184+
do { \
185+
uint16_t val; \
186+
do { \
187+
val = __LDREXH((__IO uint16_t *)&(REG)) | (BIT); \
188+
} while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
189+
} while(0)
190+
191+
/* Atomic 16-bit register access macro to clear one or several bits */
192+
#define ATOMIC_CLEARH_BIT(REG, BIT) \
193+
do { \
194+
uint16_t val; \
195+
do { \
196+
val = __LDREXH((__IO uint16_t *)&(REG)) & ~(BIT); \
197+
} while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
198+
} while(0)
199+
200+
/* Atomic 16-bit register access macro to clear and set one or several bits */
201+
#define ATOMIC_MODIFYH_REG(REG, CLEARMSK, SETMASK) \
202+
do { \
203+
uint16_t val; \
204+
do { \
205+
val = (__LDREXH((__IO uint16_t *)&(REG)) & ~(CLEARMSK)) | (SETMASK); \
206+
} while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
207+
} while(0)
208+
149209
#define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
210+
150211
/**
151212
* @}
152213
*/
153214

154215
#if defined (USE_HAL_DRIVER)
155-
#include "stm32wbxx_hal.h"
216+
#include "stm32wbxx_hal.h"
156217
#endif /* USE_HAL_DRIVER */
157218

158219
#ifdef __cplusplus
@@ -167,8 +228,3 @@ typedef enum
167228
/**
168229
* @}
169230
*/
170-
171-
172-
173-
174-
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

CMSIS/STM32WBxx/Include/system_stm32wbxx.h

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66
******************************************************************************
77
* @attention
88
*
9-
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
10-
* All rights reserved.</center></h2>
9+
* Copyright (c) 2019-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
*/
@@ -32,7 +31,7 @@
3231
#define __SYSTEM_STM32WBXX_H
3332

3433
#ifdef __cplusplus
35-
extern "C" {
34+
extern "C" {
3635
#endif
3736

3837
#include <stdint.h>
@@ -49,22 +48,22 @@
4948
/** @addtogroup STM32WBxx_System_Exported_types
5049
* @{
5150
*/
52-
/* The SystemCoreClock variable is updated in three ways:
53-
1) by calling CMSIS function SystemCoreClockUpdate()
54-
2) by calling HAL API function HAL_RCC_GetSysClockFreq()
55-
3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
56-
Note: If you use this function to configure the system clock; then there
57-
is no need to call the 2 first functions listed above, since SystemCoreClock
58-
variable is updated automatically.
59-
*/
51+
/* The SystemCoreClock variable is updated in three ways:
52+
1) by calling CMSIS function SystemCoreClockUpdate()
53+
2) by calling HAL API function HAL_RCC_GetSysClockFreq()
54+
3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
55+
Note: If you use this function to configure the system clock; then there
56+
is no need to call the 2 first functions listed above, since SystemCoreClock
57+
variable is updated automatically.
58+
*/
6059

6160
extern uint32_t SystemCoreClock; /*!< System Clock Frequency */
6261

6362
extern const uint32_t AHBPrescTable[16]; /*!< AHB prescalers table values */
6463
extern const uint32_t APBPrescTable[8]; /*!< APB prescalers table values */
6564
extern const uint32_t MSIRangeTable[16]; /*!< MSI ranges table values */
6665

67-
#if defined(STM32WB55xx) || defined(STM32WB5Mxx) || defined(STM32WB35xx)
66+
#if defined(STM32WB55xx) || defined(STM32WB5Mxx) || defined(STM32WB35xx) || defined (STM32WB15xx) || defined (STM32WB1Mxx)
6867
extern const uint32_t SmpsPrescalerTable[4][6]; /*!< SMPS factor ranges table values */
6968
#endif
7069
/**
@@ -110,4 +109,3 @@ extern void SystemCoreClockUpdate(void);
110109
/**
111110
* @}
112111
*/
113-
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

0 commit comments

Comments
 (0)