Skip to content

Commit 43ff4ae

Browse files
authored
Merge pull request #13874 from jeromecoutant/PR_F3_11
STM32F3 update drivers version to CUBE V1.11.1
2 parents 0909f6f + 56a7afd commit 43ff4ae

File tree

267 files changed

+190110
-65853
lines changed

Some content is hidden

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

267 files changed

+190110
-65853
lines changed
Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,56 +38,91 @@ extern "C" {
3838

3939
typedef enum {
4040
ADC_1 = (int)ADC1_BASE,
41+
#if defined ADC2_BASE
4142
ADC_2 = (int)ADC2_BASE,
43+
#endif
44+
#if defined ADC3_BASE
4245
ADC_3 = (int)ADC3_BASE,
46+
#endif
47+
#if defined ADC4_BASE
4348
ADC_4 = (int)ADC4_BASE
49+
#endif
4450
} ADCName;
4551

4652
typedef enum {
47-
DAC_1 = (int)DAC_BASE
53+
DAC_1 = (int)DAC1_BASE,
54+
#if defined DAC2_BASE
55+
DAC_2 = (int)DAC2_BASE
56+
#endif
4857
} DACName;
4958

5059
typedef enum {
5160
UART_1 = (int)USART1_BASE,
5261
UART_2 = (int)USART2_BASE,
5362
UART_3 = (int)USART3_BASE,
63+
#if defined UART4_BASE
5464
UART_4 = (int)UART4_BASE,
65+
#endif
66+
#if defined UART5_BASE
5567
UART_5 = (int)UART5_BASE
68+
#endif
5669
} UARTName;
5770

5871
#define DEVICE_SPI_COUNT 4
5972
typedef enum {
73+
#if defined SPI1_BASE
6074
SPI_1 = (int)SPI1_BASE,
75+
#endif
76+
#if defined SPI2_BASE
6177
SPI_2 = (int)SPI2_BASE,
78+
#endif
79+
#if defined SPI3_BASE
6280
SPI_3 = (int)SPI3_BASE,
81+
#endif
82+
#if defined SPI4_BASE
6383
SPI_4 = (int)SPI4_BASE
84+
#endif
6485
} SPIName;
6586

6687
typedef enum {
6788
I2C_1 = (int)I2C1_BASE,
89+
#if defined I2C2_BASE
6890
I2C_2 = (int)I2C2_BASE,
91+
#endif
92+
#if defined I2C3_BASE
6993
I2C_3 = (int)I2C3_BASE
94+
#endif
7095
} I2CName;
7196

7297
typedef enum {
7398
PWM_1 = (int)TIM1_BASE,
7499
PWM_2 = (int)TIM2_BASE,
100+
#if defined TIM3_BASE
75101
PWM_3 = (int)TIM3_BASE,
102+
#endif
103+
#if defined TIM4_BASE
76104
PWM_4 = (int)TIM4_BASE,
105+
#endif
106+
#if defined TIM8_BASE
77107
PWM_8 = (int)TIM8_BASE,
108+
#endif
78109
PWM_15 = (int)TIM15_BASE,
79110
PWM_16 = (int)TIM16_BASE,
80111
PWM_17 = (int)TIM17_BASE,
112+
#if defined TIM20_BASE
81113
PWM_20 = (int)TIM20_BASE
114+
#endif
82115
} PWMName;
83116

84117
typedef enum {
85118
CAN_1 = (int)CAN_BASE
86119
} CANName;
87120

121+
#if defined USB_BASE
88122
typedef enum {
89123
USB_FS = (int)USB_BASE,
90124
} USBName;
125+
#endif
91126

92127
#ifdef __cplusplus
93128
}

targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMSIS/stm32f301x8.h

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

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F302x8/device/stm32f302x8.h renamed to targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMSIS/stm32f302x8.h

Lines changed: 3886 additions & 3885 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMSIS/stm32f302xc.h

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

targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMSIS/stm32f302xe.h

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

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/device/stm32f303x8.h renamed to targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMSIS/stm32f303x8.h

Lines changed: 3853 additions & 3874 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xC/device/stm32f303xc.h renamed to targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMSIS/stm32f303xc.h

Lines changed: 4382 additions & 4303 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xE/device/stm32f303xe.h renamed to targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMSIS/stm32f303xe.h

Lines changed: 5261 additions & 5181 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMSIS/stm32f318xx.h

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

targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMSIS/stm32f328xx.h

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

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F334x8/device/stm32f334x8.h renamed to targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMSIS/stm32f334x8.h

Lines changed: 4894 additions & 4909 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMSIS/stm32f358xx.h

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

targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMSIS/stm32f373xc.h

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

targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMSIS/stm32f378xx.h

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

targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMSIS/stm32f398xx.h

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

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F302x8/device/stm32f3xx.h renamed to targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMSIS/stm32f3xx.h

Lines changed: 18 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,13 @@
1616
******************************************************************************
1717
* @attention
1818
*
19-
* <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
19+
* <h2><center>&copy; Copyright (c) 2016 STMicroelectronics.
20+
* All rights reserved.</center></h2>
2021
*
21-
* Redistribution and use in source and binary forms, with or without modification,
22-
* are permitted provided that the following conditions are met:
23-
* 1. Redistributions of source code must retain the above copyright notice,
24-
* this list of conditions and the following disclaimer.
25-
* 2. Redistributions in binary form must reproduce the above copyright notice,
26-
* this list of conditions and the following disclaimer in the documentation
27-
* and/or other materials provided with the distribution.
28-
* 3. Neither the name of STMicroelectronics nor the names of its contributors
29-
* may be used to endorse or promote products derived from this software
30-
* without specific prior written permission.
31-
*
32-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
33-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
35-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
36-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
38-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
39-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
40-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
41-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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
4226
*
4327
******************************************************************************
4428
*/
@@ -81,7 +65,7 @@
8165

8266
/* #define STM32F301x8 */ /*!< STM32F301K6, STM32F301K8, STM32F301C6, STM32F301C8,
8367
STM32F301R6 and STM32F301R8 Devices */
84-
#define STM32F302x8 /*!< STM32F302K6, STM32F302K8, STM32F302C6, STM32F302C8,
68+
/* #define STM32F302x8 */ /*!< STM32F302K6, STM32F302K8, STM32F302C6, STM32F302C8,
8569
STM32F302R6 and STM32F302R8 Devices */
8670
/* #define STM32F302xC */ /*!< STM32F302CB, STM32F302CC, STM32F302RB, STM32F302RC,
8771
STM32F302VB and STM32F302VC Devices */
@@ -115,15 +99,15 @@
11599
In this case, these drivers will not be included and the application code will
116100
be based on direct access to peripherals registers
117101
*/
118-
#define USE_HAL_DRIVER
102+
/*#define USE_HAL_DRIVER */
119103
#endif /* USE_HAL_DRIVER */
120104

121105
/**
122-
* @brief CMSIS Device version number V2.3.2
106+
* @brief CMSIS Device version number V2.3.4
123107
*/
124-
#define __STM32F3_CMSIS_VERSION_MAIN (0x02) /*!< [31:24] main version */
108+
#define __STM32F3_CMSIS_VERSION_MAIN (0x02) /*!< [31:24] main version */
125109
#define __STM32F3_CMSIS_VERSION_SUB1 (0x03) /*!< [23:16] sub1 version */
126-
#define __STM32F3_CMSIS_VERSION_SUB2 (0x02) /*!< [15:8] sub2 version */
110+
#define __STM32F3_CMSIS_VERSION_SUB2 (0x04) /*!< [15:8] sub2 version */
127111
#define __STM32F3_CMSIS_VERSION_RC (0x00) /*!< [7:0] release candidate */
128112
#define __STM32F3_CMSIS_VERSION ((__STM32F3_CMSIS_VERSION_MAIN << 24)\
129113
|(__STM32F3_CMSIS_VERSION_SUB1 << 16)\
@@ -179,21 +163,21 @@
179163
*/
180164
typedef enum
181165
{
182-
RESET = 0,
166+
RESET = 0U,
183167
SET = !RESET
184168
} FlagStatus, ITStatus;
185169

186170
typedef enum
187171
{
188-
DISABLE = 0,
172+
DISABLE = 0U,
189173
ENABLE = !DISABLE
190174
} FunctionalState;
191175
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
192176

193177
typedef enum
194178
{
195-
ERROR = 0,
196-
SUCCESS = !ERROR
179+
SUCCESS = 0U,
180+
ERROR = !SUCCESS
197181
} ErrorStatus;
198182

199183
/**
@@ -221,15 +205,13 @@ typedef enum
221205
#define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
222206

223207

224-
#if defined (USE_HAL_DRIVER)
225-
#include "stm32f3xx_hal.h"
226-
#endif /* USE_HAL_DRIVER */
227-
228-
229208
/**
230209
* @}
231210
*/
232211

212+
#if defined (USE_HAL_DRIVER)
213+
#include "stm32f3xx_hal.h"
214+
#endif /* USE_HAL_DRIVER */
233215

234216
#ifdef __cplusplus
235217
}

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F302x8/device/system_stm32f3xx.h renamed to targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMSIS/system_stm32f3xx.h

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,16 @@
66
******************************************************************************
77
* @attention
88
*
9-
* <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
9+
* <h2><center>&copy; Copyright (c) 2016 STMicroelectronics.
10+
* All rights reserved.</center></h2>
1011
*
11-
* Redistribution and use in source and binary forms, with or without modification,
12-
* are permitted provided that the following conditions are met:
13-
* 1. Redistributions of source code must retain the above copyright notice,
14-
* this list of conditions and the following disclaimer.
15-
* 2. Redistributions in binary form must reproduce the above copyright notice,
16-
* this list of conditions and the following disclaimer in the documentation
17-
* and/or other materials provided with the distribution.
18-
* 3. Neither the name of STMicroelectronics nor the names of its contributors
19-
* may be used to endorse or promote products derived from this software
20-
* without specific prior written permission.
21-
*
22-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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
3216
*
3317
******************************************************************************
34-
*/
18+
*/
3519

3620
/** @addtogroup CMSIS
3721
* @{
@@ -102,8 +86,6 @@ extern const uint8_t APBPrescTable[8]; /*!< APB prescalers table values */
10286

10387
extern void SystemInit(void);
10488
extern void SystemCoreClockUpdate(void);
105-
extern void SetSysClock(void);
106-
10789
/**
10890
* @}
10991
*/

0 commit comments

Comments
 (0)