Skip to content

Commit 5f189eb

Browse files
committed
Add STM32WBxx CMSIS to v1.0.0
Included in STM32CubeWB FW V1.0.0 Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 1995657 commit 5f189eb

File tree

10 files changed

+16729
-0
lines changed

10 files changed

+16729
-0
lines changed

system/Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h

Lines changed: 13718 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
/**
2+
******************************************************************************
3+
* @file stm32wbxx.h
4+
* @author MCD Application Team
5+
* @brief CMSIS STM32WBxx 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 STM32WBxx 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) 2019 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 stm32wbxx
35+
* @{
36+
*/
37+
38+
#ifndef __STM32WBxx_H
39+
#define __STM32WBxx_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 (STM32WB)
53+
#define STM32WB
54+
#endif /* STM32WB */
55+
56+
/* Tip: To avoid modifying this file each time you need to switch between these
57+
devices, you can define the device in your toolchain compiler preprocessor.
58+
*/
59+
#if !defined (USE_HAL_DRIVER)
60+
/**
61+
* @brief Comment the line below if you will not use the peripherals drivers.
62+
In this case, these drivers will not be included and the application code will
63+
be based on direct access to peripherals registers
64+
*/
65+
/*#define USE_HAL_DRIVER */
66+
#endif /* USE_HAL_DRIVER */
67+
68+
/**
69+
* @brief CMSIS Device version number
70+
*/
71+
#define __STM32WBxx_CMSIS_VERSION_MAIN (0x01U) /*!< [31:24] main version */
72+
#define __STM32WBxx_CMSIS_VERSION_SUB1 (0x00U) /*!< [23:16] sub1 version */
73+
#define __STM32WBxx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
74+
#define __STM32WBxx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
75+
#define __STM32WBxx_CMSIS_DEVICE_VERSION ((__STM32WBxx_CMSIS_VERSION_MAIN << 24)\
76+
|(__STM32WBxx_CMSIS_VERSION_SUB1 << 16)\
77+
|(__STM32WBxx_CMSIS_VERSION_SUB2 << 8 )\
78+
|(__STM32WBxx_CMSIS_VERSION_RC))
79+
80+
/**
81+
* @}
82+
*/
83+
84+
/** @addtogroup Device_Included
85+
* @{
86+
*/
87+
88+
#if defined(STM32WB55xx)
89+
#include "stm32wb55xx.h"
90+
#else
91+
#error "Please select first the target STM32WBxx device used in your application, for instance xxx (in stm32wbxx.h file)"
92+
#endif
93+
94+
/**
95+
* @}
96+
*/
97+
98+
/** @addtogroup Exported_types
99+
* @{
100+
*/
101+
typedef enum
102+
{
103+
RESET = 0,
104+
SET = !RESET
105+
} FlagStatus, ITStatus;
106+
107+
typedef enum
108+
{
109+
DISABLE = 0,
110+
ENABLE = !DISABLE
111+
} FunctionalState;
112+
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
113+
114+
typedef enum
115+
{
116+
SUCCESS = 0,
117+
ERROR = !SUCCESS
118+
} ErrorStatus;
119+
120+
/**
121+
* @}
122+
*/
123+
124+
125+
/** @addtogroup Exported_macros
126+
* @{
127+
*/
128+
#define SET_BIT(REG, BIT) ((REG) |= (BIT))
129+
130+
#define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
131+
132+
#define READ_BIT(REG, BIT) ((REG) & (BIT))
133+
134+
#define CLEAR_REG(REG) ((REG) = (0x0))
135+
136+
#define WRITE_REG(REG, VAL) ((REG) = (VAL))
137+
138+
#define READ_REG(REG) ((REG))
139+
140+
#define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
141+
142+
#define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
143+
/**
144+
* @}
145+
*/
146+
147+
#if defined (USE_HAL_DRIVER)
148+
#include "stm32wbxx_hal.h"
149+
#endif /* USE_HAL_DRIVER */
150+
151+
#ifdef __cplusplus
152+
}
153+
#endif /* __cplusplus */
154+
155+
#endif /* __STM32WBxx_H */
156+
/**
157+
* @}
158+
*/
159+
160+
/**
161+
* @}
162+
*/
163+
164+
165+
166+
167+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
/**
2+
******************************************************************************
3+
* @file system_stm32wbxx.h
4+
* @author MCD Application Team
5+
* @brief CMSIS Cortex Device System Source File for STM32WBxx devices.
6+
******************************************************************************
7+
* @attention
8+
*
9+
* <h2><center>&copy; Copyright (c) 2019 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 stm32wbxx_system
25+
* @{
26+
*/
27+
28+
/**
29+
* @brief Define to prevent recursive inclusion
30+
*/
31+
#ifndef __SYSTEM_STM32WBXX_H
32+
#define __SYSTEM_STM32WBXX_H
33+
34+
#ifdef __cplusplus
35+
extern "C" {
36+
#endif
37+
38+
#include <stdint.h>
39+
40+
/** @addtogroup STM32WBxx_System_Includes
41+
* @{
42+
*/
43+
44+
/**
45+
* @}
46+
*/
47+
48+
49+
/** @addtogroup STM32WBxx_System_Exported_types
50+
* @{
51+
*/
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+
*/
60+
61+
extern uint32_t SystemCoreClock; /*!< System Clock Frequency */
62+
63+
extern const uint32_t AHBPrescTable[16]; /*!< AHB prescalers table values */
64+
extern const uint32_t APBPrescTable[8]; /*!< APB prescalers table values */
65+
extern const uint32_t MSIRangeTable[16]; /*!< MSI ranges table values */
66+
67+
extern const uint32_t SmpsPrescalerTable[4][6]; /*!< SMPS factor ranges table values */
68+
/**
69+
* @}
70+
*/
71+
72+
/** @addtogroup STM32WBxx_System_Exported_Constants
73+
* @{
74+
*/
75+
76+
/**
77+
* @}
78+
*/
79+
80+
/** @addtogroup STM32WBxx_System_Exported_Macros
81+
* @{
82+
*/
83+
84+
/**
85+
* @}
86+
*/
87+
88+
/** @addtogroup STM32WBxx_System_Exported_Functions
89+
* @{
90+
*/
91+
92+
extern void SystemInit(void);
93+
extern void SystemCoreClockUpdate(void);
94+
/**
95+
* @}
96+
*/
97+
98+
#ifdef __cplusplus
99+
}
100+
#endif
101+
102+
#endif /*__SYSTEM_STM32WBXX_H */
103+
104+
/**
105+
* @}
106+
*/
107+
108+
/**
109+
* @}
110+
*/
111+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<!DOCTYPE html>
2+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="generator" content="pandoc" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
7+
<title>Release Notes for STM32WBxx CMSIS</title>
8+
<style type="text/css">
9+
code{white-space: pre-wrap;}
10+
span.smallcaps{font-variant: small-caps;}
11+
span.underline{text-decoration: underline;}
12+
div.column{display: inline-block; vertical-align: top; width: 50%;}
13+
</style>
14+
<link rel="stylesheet" href="_htmresc/mini-st.css" />
15+
<!--[if lt IE 9]>
16+
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
17+
<![endif]-->
18+
</head>
19+
<body>
20+
<div class="row">
21+
<div class="col-sm-12 col-lg-4">
22+
<div class="card fluid">
23+
<div class="sectione dark">
24+
<center>
25+
<h1 id="release-notes-for-stm32wbxx-cmsis"><small>Release Notes for</small> STM32WBxx CMSIS</h1>
26+
<p>Copyright © 2019 STMicroelectronics<br />
27+
</p>
28+
<a href="https://www.st.com" class="logo"><img src="_htmresc/st_logo.png" alt="ST logo" /></a>
29+
</center>
30+
</div>
31+
</div>
32+
<h1 id="license">License</h1>
33+
<p>This software component is licensed by ST under BSD 3-Clause license, the “License”; You may not use this component except in compliance with the License. You may obtain a copy of the License at:</p>
34+
<p><a href="https://opensource.org/licenses/BSD-3-Clause">https://opensource.org/licenses/BSD-3-Clause</a></p>
35+
<h1 id="purpose">Purpose</h1>
36+
<p>This driver provides the CMSIS device for the stm32wbxx products. This covers</p>
37+
<ul>
38+
<li>STM32WB55xx devices</li>
39+
</ul>
40+
<p>This driver is composed of the descriptions of the registers under “Include” directory.</p>
41+
<p>Various template file are provided to easily build an application. They can be adapted to fit applications requirements.</p>
42+
<ul>
43+
<li>Templates/system_stm32wbxx.c contains the initialization code referred as SystemInit.</li>
44+
<li>Startup files are provided as example for IAR©, KEIL© and SW4STM32©.</li>
45+
<li>Linker files are provided as example for IAR©, KEIL© and SW4STM32©.</li>
46+
</ul>
47+
</div>
48+
<div class="col-sm-12 col-lg-8">
49+
<h1 id="update-history">Update History</h1>
50+
<div class="collapse">
51+
<input type="checkbox" id="collapse-section4" checked aria-hidden="true"> <label for="collapse-section4" aria-hidden="true">V1.0.0 / 06-February-2019</label>
52+
<div>
53+
<h2 id="main-changes">Main Changes</h2>
54+
<h3 id="first-release">First release</h3>
55+
<p>Add support of STM32WB55xx.</p>
56+
</div>
57+
</div>
58+
</div>
59+
</div>
60+
<footer class="sticky">
61+
<p>For complete documentation on STM32WBxx, visit: [<a href="http://www.st.com/stm32wb">www.st.com/stm32wb</a>]</p>
62+
<em>This release note uses up to date web standards and, for this reason, should not be opened with Internet Explorer but preferably with popular browsers such as Google Chrome, Mozilla Firefox, Opera or Microsoft Edge.</em>
63+
</footer>
64+
</body>
65+
</html>

0 commit comments

Comments
 (0)