Skip to content

Commit 0e1a889

Browse files
pi-anldpgeorge
authored andcommitted
Import STM32CubeWL v1.1.0 on 22-Jul-2021.
From https://github.com/STMicroelectronics/STM32CubeWL.git tag v1.1.0
1 parent 0171355 commit 0e1a889

File tree

179 files changed

+230505
-0
lines changed

Some content is hidden

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

179 files changed

+230505
-0
lines changed

CMSIS/STM32WLxx/Include/stm32wl54xx.h

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

CMSIS/STM32WLxx/Include/stm32wl55xx.h

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

CMSIS/STM32WLxx/Include/stm32wle4xx.h

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

CMSIS/STM32WLxx/Include/stm32wle5xx.h

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

CMSIS/STM32WLxx/Include/stm32wlxx.h

Lines changed: 282 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,282 @@
1+
/**
2+
******************************************************************************
3+
* @file stm32wlxx.h
4+
* @author MCD Application Team
5+
* @brief CMSIS STM32WLxx 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 STM32WLxx 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+
* Copyright (c) 2020(-2021) STMicroelectronics.
20+
* All rights reserved.
21+
*
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.
25+
*
26+
******************************************************************************
27+
*/
28+
29+
/** @addtogroup CMSIS
30+
* @{
31+
*/
32+
33+
/** @addtogroup stm32wlxx
34+
* @{
35+
*/
36+
37+
#ifndef __STM32WLxx_H
38+
#define __STM32WLxx_H
39+
40+
#ifdef __cplusplus
41+
extern "C" {
42+
#endif /* __cplusplus */
43+
44+
/** @addtogroup Library_configuration_section
45+
* @{
46+
*/
47+
48+
/**
49+
* @brief STM32 Family
50+
*/
51+
#if !defined (STM32WL)
52+
#define STM32WL
53+
#endif /* STM32WL */
54+
55+
/* Uncomment the line below according to the target STM32WL device used in your
56+
application
57+
*/
58+
59+
#if !defined (STM32WL55xx) && !defined (STM32WL54xx) && !defined (STM32WLE5xx) && !defined (STM32WLE4xx)
60+
/* #define STM32WL55xx */ /*!< STM32WL55xx Devices */
61+
/* #define STM32WL54xx */ /*!< STM32WL54xx Devices */
62+
/* #define STM32WLE5xx */ /*!< STM32WLE5xx Devices */
63+
/* #define STM32WLE4xx */ /*!< STM32WLE4xx Devices */
64+
#endif
65+
66+
/* Tip: To avoid modifying this file each time you need to switch between these
67+
devices, you can define the device in your toolchain compiler preprocessor.
68+
*/
69+
#if !defined (USE_HAL_DRIVER)
70+
/**
71+
* @brief Comment the line below if you will not use the peripherals drivers.
72+
In this case, these drivers will not be included and the application code will
73+
be based on direct access to peripherals registers
74+
*/
75+
/*#define USE_HAL_DRIVER */
76+
#endif /* USE_HAL_DRIVER */
77+
78+
/**
79+
* @brief CMSIS Device version number
80+
*/
81+
#define __STM32WLxx_CMSIS_VERSION_MAIN (0x01U) /*!< [31:24] main version */
82+
#define __STM32WLxx_CMSIS_VERSION_SUB1 (0x01U) /*!< [23:16] sub1 version */
83+
#define __STM32WLxx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
84+
#define __STM32WLxx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
85+
#define __STM32WLxx_CMSIS_DEVICE_VERSION ((__STM32WLxx_CMSIS_VERSION_MAIN << 24)\
86+
|(__STM32WLxx_CMSIS_VERSION_SUB1 << 16)\
87+
|(__STM32WLxx_CMSIS_VERSION_SUB2 << 8 )\
88+
|(__STM32WLxx_CMSIS_VERSION_RC))
89+
90+
/**
91+
* @}
92+
*/
93+
94+
/** @addtogroup Device_Included
95+
* @{
96+
*/
97+
98+
#if defined(STM32WL55xx)
99+
#include "stm32wl55xx.h"
100+
#elif defined(STM32WLE5xx)
101+
#include "stm32wle5xx.h"
102+
#elif defined(STM32WL54xx)
103+
#include "stm32wl54xx.h"
104+
#elif defined(STM32WLE4xx)
105+
#include "stm32wle4xx.h"
106+
#else
107+
#error "Please select first the target STM32WLxx device used in your application, for instance xxx (in stm32wlxx.h file)"
108+
#endif
109+
110+
/**
111+
* @}
112+
*/
113+
114+
/** @addtogroup Exported_types
115+
* @{
116+
*/
117+
typedef enum
118+
{
119+
RESET = 0,
120+
SET = !RESET
121+
} FlagStatus, ITStatus;
122+
123+
typedef enum
124+
{
125+
DISABLE = 0,
126+
ENABLE = !DISABLE
127+
} FunctionalState;
128+
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
129+
130+
typedef enum
131+
{
132+
ERROR = 0,
133+
SUCCESS = !ERROR
134+
} ErrorStatus;
135+
136+
/**
137+
* @}
138+
*/
139+
140+
141+
/** @addtogroup Exported_macros
142+
* @{
143+
*/
144+
#define SET_BIT(REG, BIT) ((REG) |= (BIT))
145+
146+
#define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
147+
148+
#define READ_BIT(REG, BIT) ((REG) & (BIT))
149+
150+
#define CLEAR_REG(REG) ((REG) = (0x0))
151+
152+
#define WRITE_REG(REG, VAL) ((REG) = (VAL))
153+
154+
#define READ_REG(REG) ((REG))
155+
156+
#define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
157+
158+
#if defined(CORE_CM0PLUS)
159+
/* Use of interrupt control for register exclusive access (privileged mode only) */
160+
/* Atomic 32-bit register access macro to set one or several bits */
161+
#define ATOMIC_SET_BIT(REG, BIT) \
162+
do { \
163+
uint32_t primask; \
164+
primask = __get_PRIMASK(); \
165+
__set_PRIMASK(1); \
166+
SET_BIT((REG), (BIT)); \
167+
__set_PRIMASK(primask); \
168+
} while(0)
169+
170+
/* Atomic 32-bit register access macro to clear one or several bits */
171+
#define ATOMIC_CLEAR_BIT(REG, BIT) \
172+
do { \
173+
uint32_t primask; \
174+
primask = __get_PRIMASK(); \
175+
__set_PRIMASK(1); \
176+
CLEAR_BIT((REG), (BIT)); \
177+
__set_PRIMASK(primask); \
178+
} while(0)
179+
180+
/* Atomic 32-bit register access macro to clear and set one or several bits */
181+
#define ATOMIC_MODIFY_REG(REG, CLEARMSK, SETMASK) \
182+
do { \
183+
uint32_t primask; \
184+
primask = __get_PRIMASK(); \
185+
__set_PRIMASK(1); \
186+
MODIFY_REG((REG), (CLEARMSK), (SETMASK)); \
187+
__set_PRIMASK(primask); \
188+
} while(0)
189+
190+
/* Atomic 16-bit register access macro to set one or several bits */
191+
#define ATOMIC_SETH_BIT(REG, BIT) ATOMIC_SET_BIT(REG, BIT)
192+
193+
/* Atomic 16-bit register access macro to clear one or several bits */
194+
#define ATOMIC_CLEARH_BIT(REG, BIT) ATOMIC_CLEAR_BIT(REG, BIT)
195+
196+
/* Atomic 16-bit register access macro to clear and set one or several bits */
197+
#define ATOMIC_MODIFYH_REG(REG, CLEARMSK, SETMASK) ATOMIC_MODIFY_REG(REG, CLEARMSK, SETMASK)
198+
199+
#else
200+
/* Use of CMSIS compiler intrinsics for register exclusive access */
201+
/* Atomic 32-bit register access macro to set one or several bits */
202+
#define ATOMIC_SET_BIT(REG, BIT) \
203+
do { \
204+
uint32_t val; \
205+
do { \
206+
val = __LDREXW((__IO uint32_t *)&(REG)) | (BIT); \
207+
} while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
208+
} while(0)
209+
210+
/* Atomic 32-bit register access macro to clear one or several bits */
211+
#define ATOMIC_CLEAR_BIT(REG, BIT) \
212+
do { \
213+
uint32_t val; \
214+
do { \
215+
val = __LDREXW((__IO uint32_t *)&(REG)) & ~(BIT); \
216+
} while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
217+
} while(0)
218+
219+
/* Atomic 32-bit register access macro to clear and set one or several bits */
220+
#define ATOMIC_MODIFY_REG(REG, CLEARMSK, SETMASK) \
221+
do { \
222+
uint32_t val; \
223+
do { \
224+
val = (__LDREXW((__IO uint32_t *)&(REG)) & ~(CLEARMSK)) | (SETMASK); \
225+
} while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
226+
} while(0)
227+
228+
/* Atomic 16-bit register access macro to set one or several bits */
229+
#define ATOMIC_SETH_BIT(REG, BIT) \
230+
do { \
231+
uint16_t val; \
232+
do { \
233+
val = __LDREXH((__IO uint16_t *)&(REG)) | (BIT); \
234+
} while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
235+
} while(0)
236+
237+
/* Atomic 16-bit register access macro to clear one or several bits */
238+
#define ATOMIC_CLEARH_BIT(REG, BIT) \
239+
do { \
240+
uint16_t val; \
241+
do { \
242+
val = __LDREXH((__IO uint16_t *)&(REG)) & ~(BIT); \
243+
} while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
244+
} while(0)
245+
246+
/* Atomic 16-bit register access macro to clear and set one or several bits */
247+
#define ATOMIC_MODIFYH_REG(REG, CLEARMSK, SETMASK) \
248+
do { \
249+
uint16_t val; \
250+
do { \
251+
val = (__LDREXH((__IO uint16_t *)&(REG)) & ~(CLEARMSK)) | (SETMASK); \
252+
} while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
253+
} while(0)
254+
255+
#define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
256+
#endif /* CORE_CM0PLUS */
257+
258+
/**
259+
* @}
260+
*/
261+
262+
#if defined (USE_HAL_DRIVER)
263+
#include "stm32wlxx_hal.h"
264+
#endif /* USE_HAL_DRIVER */
265+
266+
#ifdef __cplusplus
267+
}
268+
#endif /* __cplusplus */
269+
270+
#endif /* __STM32WLxx_H */
271+
/**
272+
* @}
273+
*/
274+
275+
/**
276+
* @}
277+
*/
278+
279+
280+
281+
282+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
/**
2+
******************************************************************************
3+
* @file system_stm32wlxx.h
4+
* @author MCD Application Team
5+
* @brief CMSIS Cortex Device System Source File for STM32WLxx devices.
6+
******************************************************************************
7+
* @attention
8+
*
9+
* Copyright (c) 2020(-2021) STMicroelectronics.
10+
* All rights reserved.
11+
*
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.
15+
*
16+
******************************************************************************
17+
*/
18+
19+
/** @addtogroup CMSIS
20+
* @{
21+
*/
22+
23+
/** @addtogroup stm32wlxx_system
24+
* @{
25+
*/
26+
27+
/**
28+
* @brief Define to prevent recursive inclusion
29+
*/
30+
#ifndef __SYSTEM_STM32WLXX_H
31+
#define __SYSTEM_STM32WLXX_H
32+
33+
#ifdef __cplusplus
34+
extern "C" {
35+
#endif
36+
37+
#include <stdint.h>
38+
39+
/** @addtogroup STM32WLxx_System_Includes
40+
* @{
41+
*/
42+
43+
/**
44+
* @}
45+
*/
46+
47+
48+
/** @addtogroup STM32WLxx_System_Exported_types
49+
* @{
50+
*/
51+
/* The SystemCoreClock variable is updated in three ways:
52+
1) from within HAL_Init()
53+
2) by calling CMSIS function SystemCoreClockUpdate()
54+
3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
55+
*/
56+
57+
extern uint32_t SystemCoreClock; /*!< System Clock Frequency */
58+
59+
extern const uint32_t AHBPrescTable[16]; /*!< AHB prescalers table values */
60+
extern const uint32_t APBPrescTable[8]; /*!< APB prescalers table values */
61+
extern const uint32_t MSIRangeTable[16]; /*!< MSI ranges table values */
62+
63+
/**
64+
* @}
65+
*/
66+
67+
/** @addtogroup STM32WLxx_System_Exported_Constants
68+
* @{
69+
*/
70+
71+
/**
72+
* @}
73+
*/
74+
75+
/** @addtogroup STM32WLxx_System_Exported_Macros
76+
* @{
77+
*/
78+
79+
/**
80+
* @}
81+
*/
82+
83+
/** @addtogroup STM32WLxx_System_Exported_Functions
84+
* @{
85+
*/
86+
87+
extern void SystemInit(void);
88+
extern void SystemCoreClockUpdate(void);
89+
/**
90+
* @}
91+
*/
92+
93+
#ifdef __cplusplus
94+
}
95+
#endif
96+
97+
#endif /*__SYSTEM_STM32WLXX_H */
98+
99+
/**
100+
* @}
101+
*/
102+
103+
/**
104+
* @}
105+
*/
106+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy