Skip to content

Commit 33fede2

Browse files
committed
system: WL: add STM32WLxx CMSIS Drivers to v1.0.0
Included in STM32CubeWL FW v1.0.0 Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent cfbcc7c commit 33fede2

30 files changed

+50059
-0
lines changed

system/Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wl54xx.h

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

system/Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wl55xx.h

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

system/Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wle4xx.h

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

system/Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wle5xx.h

Lines changed: 9746 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 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+
* <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
20+
* All rights reserved.</center></h2>
21+
*
22+
* This software component is licensed by ST under Apache License, Version 2.0,
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/Apache-2.0
26+
*
27+
******************************************************************************
28+
*/
29+
30+
/** @addtogroup CMSIS
31+
* @{
32+
*/
33+
34+
/** @addtogroup stm32wlxx
35+
* @{
36+
*/
37+
38+
#ifndef __STM32WLxx_H
39+
#define __STM32WLxx_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 (STM32WL)
53+
#define STM32WL
54+
#endif /* STM32WL */
55+
56+
/* Uncomment the line below according to the target STM32WL device used in your
57+
application
58+
*/
59+
60+
#if !defined (STM32WL55xx) && !defined (STM32WL54xx) && !defined (STM32WLE5xx) && !defined (STM32WLE4xx)
61+
/* #define STM32WL55xx */ /*!< STM32WL55xx Devices */
62+
/* #define STM32WL54xx */ /*!< STM32WL54xx Devices */
63+
/* #define STM32WLE5xx */ /*!< STM32WLE5xx Devices */
64+
/* #define STM32WLE4xx */ /*!< STM32WLE4xx 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+
#if !defined (USE_HAL_DRIVER)
71+
/**
72+
* @brief Comment the line below if you will not use the peripherals drivers.
73+
In this case, these drivers will not be included and the application code will
74+
be based on direct access to peripherals registers
75+
*/
76+
/*#define USE_HAL_DRIVER */
77+
#endif /* USE_HAL_DRIVER */
78+
79+
/**
80+
* @brief CMSIS Device version number
81+
*/
82+
#define __STM32WLxx_CMSIS_VERSION_MAIN (0x01U) /*!< [31:24] main version */
83+
#define __STM32WLxx_CMSIS_VERSION_SUB1 (0x00U) /*!< [23:16] sub1 version */
84+
#define __STM32WLxx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
85+
#define __STM32WLxx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
86+
#define __STM32WLxx_CMSIS_DEVICE_VERSION ((__STM32WLxx_CMSIS_VERSION_MAIN << 24)\
87+
|(__STM32WLxx_CMSIS_VERSION_SUB1 << 16)\
88+
|(__STM32WLxx_CMSIS_VERSION_SUB2 << 8 )\
89+
|(__STM32WLxx_CMSIS_VERSION_RC))
90+
91+
/**
92+
* @}
93+
*/
94+
95+
/** @addtogroup Device_Included
96+
* @{
97+
*/
98+
99+
#if defined(STM32WL55xx)
100+
#include "stm32wl55xx.h"
101+
#elif defined(STM32WLE5xx)
102+
#include "stm32wle5xx.h"
103+
#elif defined(STM32WL54xx)
104+
#include "stm32wl54xx.h"
105+
#elif defined(STM32WLE4xx)
106+
#include "stm32wle4xx.h"
107+
#else
108+
#error "Please select first the target STM32WLxx device used in your application, for instance xxx (in stm32wlxx.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+
#if defined(CORE_CM0PLUS)
160+
#else
161+
#define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
162+
#endif
163+
/**
164+
* @}
165+
*/
166+
167+
#if defined (USE_HAL_DRIVER)
168+
#include "stm32wlxx_hal.h"
169+
#endif /* USE_HAL_DRIVER */
170+
171+
#ifdef __cplusplus
172+
}
173+
#endif /* __cplusplus */
174+
175+
#endif /* __STM32WLxx_H */
176+
/**
177+
* @}
178+
*/
179+
180+
/**
181+
* @}
182+
*/
183+
184+
185+
186+
187+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
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+
* <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
10+
* All rights reserved.</center></h2>
11+
*
12+
* This software component is licensed by ST under Apache License, Version 2.0,
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/Apache-2.0
16+
*
17+
******************************************************************************
18+
*/
19+
20+
/** @addtogroup CMSIS
21+
* @{
22+
*/
23+
24+
/** @addtogroup stm32wlxx_system
25+
* @{
26+
*/
27+
28+
/**
29+
* @brief Define to prevent recursive inclusion
30+
*/
31+
#ifndef __SYSTEM_STM32WLXX_H
32+
#define __SYSTEM_STM32WLXX_H
33+
34+
#ifdef __cplusplus
35+
extern "C" {
36+
#endif
37+
38+
#include <stdint.h>
39+
40+
/** @addtogroup STM32WLxx_System_Includes
41+
* @{
42+
*/
43+
44+
/**
45+
* @}
46+
*/
47+
48+
49+
/** @addtogroup STM32WLxx_System_Exported_types
50+
* @{
51+
*/
52+
/* The SystemCoreClock variable is updated in three ways:
53+
1) from within HAL_Init()
54+
2) by calling CMSIS function SystemCoreClockUpdate()
55+
3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
56+
*/
57+
58+
extern uint32_t SystemCoreClock; /*!< System Clock Frequency */
59+
60+
extern const uint32_t AHBPrescTable[16]; /*!< AHB prescalers table values */
61+
extern const uint32_t APBPrescTable[8]; /*!< APB prescalers table values */
62+
extern const uint32_t MSIRangeTable[16]; /*!< MSI ranges table values */
63+
64+
/**
65+
* @}
66+
*/
67+
68+
/** @addtogroup STM32WLxx_System_Exported_Constants
69+
* @{
70+
*/
71+
72+
/**
73+
* @}
74+
*/
75+
76+
/** @addtogroup STM32WLxx_System_Exported_Macros
77+
* @{
78+
*/
79+
80+
/**
81+
* @}
82+
*/
83+
84+
/** @addtogroup STM32WLxx_System_Exported_Functions
85+
* @{
86+
*/
87+
88+
extern void SystemInit(void);
89+
extern void SystemCoreClockUpdate(void);
90+
/**
91+
* @}
92+
*/
93+
94+
#ifdef __cplusplus
95+
}
96+
#endif
97+
98+
#endif /*__SYSTEM_STM32WLXX_H */
99+
100+
/**
101+
* @}
102+
*/
103+
104+
/**
105+
* @}
106+
*/
107+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
Apache License
2+
Version 2.0, January 2004
3+
http://www.apache.org/licenses/
4+
5+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6+
7+
1. Definitions.
8+
9+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
10+
11+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12+
13+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14+
15+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16+
17+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18+
19+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20+
21+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
22+
23+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24+
25+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26+
27+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28+
29+
2. Grant of Copyright License.
30+
31+
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
32+
33+
3. Grant of Patent License.
34+
35+
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
36+
37+
4. Redistribution.
38+
39+
You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
40+
1.You must give any other recipients of the Work or Derivative Works a copy of this License; and
41+
2.You must cause any modified files to carry prominent notices stating that You changed the files; and
42+
3.You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
43+
4.If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
44+
45+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
46+
47+
5. Submission of Contributions.
48+
49+
Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
50+
51+
6. Trademarks.
52+
53+
This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
54+
55+
7. Disclaimer of Warranty.
56+
57+
Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
58+
59+
8. Limitation of Liability.
60+
61+
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
62+
63+
9. Accepting Warranty or Additional Liability.
64+
65+
While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
66+
67+
END OF TERMS AND CONDITIONS
68+
69+
APPENDIX:
70+
71+
Copyright [2019] [STMicroelectronics]
72+
73+
Licensed under the Apache License, Version 2.0 (the "License");
74+
you may not use this file except in compliance with the License.
75+
You may obtain a copy of the License at
76+
77+
http://www.apache.org/licenses/LICENSE-2.0
78+
79+
Unless required by applicable law or agreed to in writing, software
80+
distributed under the License is distributed on an "AS IS" BASIS,
81+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
82+
See the License for the specific language governing permissions and
83+
limitations under the License.

0 commit comments

Comments
 (0)