Skip to content

Commit 0c7b6dc

Browse files
committed
[TARGET_STM32F3]: Update Hal 1.5.0
1 parent 76c8be6 commit 0c7b6dc

File tree

132 files changed

+112297
-57687
lines changed

Some content is hidden

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

132 files changed

+112297
-57687
lines changed

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/TARGET_DISCO_F303VC/stm32f303xc.h

Lines changed: 11212 additions & 4908 deletions
Large diffs are not rendered by default.

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/TARGET_DISCO_F303VC/stm32f3xx.h

Lines changed: 48 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
******************************************************************************
33
* @file stm32f3xx.h
44
* @author MCD Application Team
5-
* @version V2.0.1
6-
* @date 18-June-2014
5+
* @version V2.3.0
6+
* @date 29-April-2015
77
* @brief CMSIS STM32F3xx Device Peripheral Access Layer Header File.
88
*
99
* The file is the unique include file that the application programmer
@@ -18,7 +18,7 @@
1818
******************************************************************************
1919
* @attention
2020
*
21-
* <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
21+
* <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
2222
*
2323
* Redistribution and use in source and binary forms, with or without modification,
2424
* are permitted provided that the following conditions are met:
@@ -64,31 +64,48 @@
6464
* @{
6565
*/
6666

67+
/**
68+
* @brief STM32 Family
69+
*/
70+
#if !defined (STM32F3)
71+
#define STM32F3
72+
#endif /* STM32F3 */
73+
6774
/* Uncomment the line below according to the target STM32 device used in your
6875
application
6976
*/
7077

71-
#if !defined (STM32F301x8) && !defined (STM32F318xx) && \
72-
!defined (STM32F302x8) && !defined (STM32F302xC) && \
73-
!defined (STM32F303x8) && \
74-
!defined (STM32F303xC) && !defined (STM32F358xx) && \
75-
!defined (STM32F373xC) && !defined (STM32F378xx) && \
76-
!defined (STM32F334x8) && !defined (STM32F328xx)
78+
#if !defined (STM32F301x8) && !defined (STM32F302x8) && !defined (STM32F318xx) && \
79+
!defined (STM32F302xC) && !defined (STM32F303xC) && !defined (STM32F358xx) && \
80+
!defined (STM32F303x8) && !defined (STM32F334x8) && !defined (STM32F328xx) && \
81+
!defined (STM32F302xE) && !defined (STM32F303xE) && !defined (STM32F398xx) && \
82+
!defined (STM32F373xC) && !defined (STM32F378xx)
83+
7784
/* #define STM32F301x8 */ /*!< STM32F301K6, STM32F301K8, STM32F301C6, STM32F301C8,
7885
STM32F301R6 and STM32F301R8 Devices */
7986
/* #define STM32F302x8 */ /*!< STM32F302K6, STM32F302K8, STM32F302C6, STM32F302C8,
8087
STM32F302R6 and STM32F302R8 Devices */
81-
/* #define STM32F302xC */ /*!< STM32F302CB, STM32F302CC, STM32F302RB, STM32F302RC, STM32F302VB and STM32F302VC Devices */
88+
/* #define STM32F302xC */ /*!< STM32F302CB, STM32F302CC, STM32F302RB, STM32F302RC,
89+
STM32F302VB and STM32F302VC Devices */
90+
/* #define STM32F302xE */ /*!< STM32F302RE, STM32F302VE, STM32F302ZE, STM32F302RD,
91+
STM32F302VD and STM32F302ZD Devices */
8292
/* #define STM32F303x8 */ /*!< STM32F303K6, STM32F303K8, STM32F303C6, STM32F303C8,
8393
STM32F303R6 and STM32F303R8 Devices */
84-
#define STM32F303xC /*!< STM32F303CB, STM32F303CC, STM32F303RB, STM32F303RC, STM32F303VB and STM32F303VC Devices */
85-
/* #define STM32F373xC */ /*!< STM32F373C8, STM32F373CB, STM32F373CC, STM32F373R8, STM32F373RB, STM32F373RC,
94+
#define STM32F303xC /*!< STM32F303CB, STM32F303CC, STM32F303RB, STM32F303RC,
95+
STM32F303VB and STM32F303VC Devices */
96+
/* #define STM32F303xE */ /*!< STM32F303RE, STM32F303VE, STM32F303ZE, STM32F303RD,
97+
STM32F303VD and STM32F303ZD Devices */
98+
/* #define STM32F373xC */ /*!< STM32F373C8, STM32F373CB, STM32F373CC,
99+
STM32F373R8, STM32F373RB, STM32F373RC,
86100
STM32F373V8, STM32F373VB and STM32F373VC Devices */
87-
/* #define STM32F334x8 */ /*!< STM32F334C4, STM32F334C6, STM32F334C8, STM32F334R4, STM32F334R6 and STM32F334R8 Devices */
101+
/* #define STM32F334x8 */ /*!< STM32F334K4, STM32F334K6, STM32F334K8,
102+
STM32F334C4, STM32F334C6, STM32F334C8,
103+
STM32F334R4, STM32F334R6 and STM32F334R8 Devices */
88104
/* #define STM32F318xx */ /*!< STM32F318K8, STM32F318C8: STM32F301x8 with regulator off: STM32F318xx Devices */
89105
/* #define STM32F328xx */ /*!< STM32F328C8, STM32F328R8: STM32F334x8 with regulator off: STM32F328xx Devices */
90106
/* #define STM32F358xx */ /*!< STM32F358CC, STM32F358RC, STM32F358VC: STM32F303xC with regulator off: STM32F358xx Devices */
91107
/* #define STM32F378xx */ /*!< STM32F378CC, STM32F378RC, STM32F378VC: STM32F373xC with regulator off: STM32F378xx Devices */
108+
/* #define STM32F398xx */ /*!< STM32F398VE: STM32F303xE with regulator off: STM32F398xx Devices */
92109
#endif
93110

94111
/* Tip: To avoid modifying this file each time you need to switch between these
@@ -100,21 +117,21 @@
100117
In this case, these drivers will not be included and the application code will
101118
be based on direct access to peripherals registers
102119
*/
103-
#define USE_HAL_DRIVER
120+
/*#define USE_HAL_DRIVER */
104121
#endif /* USE_HAL_DRIVER */
105122

106123
/**
107-
* @brief CMSIS Device version number V2.0.1
108-
*/
109-
#define __STM32F3xx_CMSIS_DEVICE_VERSION_MAIN (0x02) /*!< [31:24] main version */
110-
#define __STM32F3xx_CMSIS_DEVICE_VERSION_SUB1 (0x00) /*!< [23:16] sub1 version */
111-
#define __STM32F3xx_CMSIS_DEVICE_VERSION_SUB2 (0x01) /*!< [15:8] sub2 version */
112-
#define __STM32F3xx_CMSIS_DEVICE_VERSION_RC (0x00) /*!< [7:0] release candidate */
113-
#define __STM32F3xx_CMSIS_DEVICE_VERSION ((__CMSIS_DEVICE_VERSION_MAIN << 24)\
114-
|(__CMSIS_DEVICE_HAL_VERSION_SUB1 << 16)\
115-
|(__CMSIS_DEVICE_HAL_VERSION_SUB2 << 8 )\
116-
|(__CMSIS_DEVICE_HAL_VERSION_RC))
117-
124+
* @brief CMSIS Device version number V2.3.0
125+
*/
126+
#define __STM32F3_CMSIS_VERSION_MAIN (0x02) /*!< [31:24] main version */
127+
#define __STM32F3_CMSIS_VERSION_SUB1 (0x03) /*!< [23:16] sub1 version */
128+
#define __STM32F3_CMSIS_VERSION_SUB2 (0x00) /*!< [15:8] sub2 version */
129+
#define __STM32F3_CMSIS_VERSION_RC (0x00) /*!< [7:0] release candidate */
130+
#define __STM32F3_CMSIS_VERSION ((__STM32F3_CMSIS_VERSION_MAIN << 24)\
131+
|(__STM32F3_CMSIS_VERSION_SUB1 << 16)\
132+
|(__STM32F3_CMSIS_VERSION_SUB2 << 8 )\
133+
|(__STM32F3_CMSIS_VERSION_RC))
134+
118135
/**
119136
* @}
120137
*/
@@ -129,10 +146,14 @@
129146
#include "stm32f302x8.h"
130147
#elif defined(STM32F302xC)
131148
#include "stm32f302xc.h"
149+
#elif defined(STM32F302xE)
150+
#include "stm32f302xe.h"
132151
#elif defined(STM32F303x8)
133152
#include "stm32f303x8.h"
134153
#elif defined(STM32F303xC)
135154
#include "stm32f303xc.h"
155+
#elif defined(STM32F303xE)
156+
#include "stm32f303xe.h"
136157
#elif defined(STM32F373xC)
137158
#include "stm32f373xc.h"
138159
#elif defined(STM32F334x8)
@@ -145,6 +166,8 @@
145166
#include "stm32f358xx.h"
146167
#elif defined(STM32F378xx)
147168
#include "stm32f378xx.h"
169+
#elif defined(STM32F398xx)
170+
#include "stm32f398xx.h"
148171
#else
149172
#error "Please select first the target STM32F3xx device used in your application (in stm32f3xx.h file)"
150173
#endif

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/TARGET_DISCO_F303VC/system_stm32f3xx.c

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
******************************************************************************
33
* @file system_stm32f3xx.c
44
* @author MCD Application Team
5-
* @version V2.1.0
6-
* @date 12-Sept-2014
5+
* @version V2.3.0
6+
* @date 29-April-2015
77
* @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
88
*
99
* 1. This file provides two functions and one global variable to be called from
@@ -44,7 +44,7 @@
4444
******************************************************************************
4545
* @attention
4646
*
47-
* <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
47+
* <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
4848
*
4949
* Redistribution and use in source and binary forms, with or without modification,
5050
* are permitted provided that the following conditions are met:
@@ -147,6 +147,7 @@
147147
*/
148148
uint32_t SystemCoreClock = 72000000;
149149
const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
150+
const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4};
150151

151152
/**
152153
* @}
@@ -185,28 +186,28 @@ void SystemInit(void)
185186

186187
/* Reset the RCC clock configuration to the default reset state ------------*/
187188
/* Set HSION bit */
188-
RCC->CR |= (uint32_t)0x00000001;
189+
RCC->CR |= 0x00000001U;
189190

190191
/* Reset CFGR register */
191-
RCC->CFGR &= 0xF87FC00C;
192+
RCC->CFGR &= 0xF87FC00CU;
192193

193194
/* Reset HSEON, CSSON and PLLON bits */
194-
RCC->CR &= (uint32_t)0xFEF6FFFF;
195+
RCC->CR &= 0xFEF6FFFFU;
195196

196197
/* Reset HSEBYP bit */
197-
RCC->CR &= (uint32_t)0xFFFBFFFF;
198+
RCC->CR &= 0xFFFBFFFFU;
198199

199200
/* Reset PLLSRC, PLLXTPRE, PLLMUL and USBPRE bits */
200-
RCC->CFGR &= (uint32_t)0xFF80FFFF;
201+
RCC->CFGR &= 0xFF80FFFFU;
201202

202203
/* Reset PREDIV1[3:0] bits */
203-
RCC->CFGR2 &= (uint32_t)0xFFFFFFF0;
204+
RCC->CFGR2 &= 0xFFFFFFF0U;
204205

205206
/* Reset USARTSW[1:0], I2CSW and TIMs bits */
206-
RCC->CFGR3 &= (uint32_t)0xFF00FCCC;
207+
RCC->CFGR3 &= 0xFF00FCCCU;
207208

208209
/* Disable all interrupts */
209-
RCC->CIR = 0x00000000;
210+
RCC->CIR = 0x00000000U;
210211

211212
#ifdef VECT_TAB_SRAM
212213
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/TARGET_DISCO_F303VC/system_stm32f3xx.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
******************************************************************************
33
* @file system_stm32f3xx.h
44
* @author MCD Application Team
5-
* @version V2.1.0
6-
* @date 12-Sept-2014
5+
* @version V2.3.0
6+
* @date 29-April-2015
77
* @brief CMSIS Cortex-M4 Device System Source File for STM32F3xx devices.
88
******************************************************************************
99
* @attention
1010
*
11-
* <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
11+
* <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
1212
*
1313
* Redistribution and use in source and binary forms, with or without modification,
1414
* are permitted provided that the following conditions are met:
@@ -74,6 +74,8 @@
7474
variable is updated automatically.
7575
*/
7676
extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
77+
extern const uint8_t AHBPrescTable[16]; /*!< AHB prescalers table values */
78+
extern const uint8_t APBPrescTable[8]; /*!< APB prescalers table values */
7779

7880

7981
/**

0 commit comments

Comments
 (0)