Skip to content

Commit d69a2f8

Browse files
committed
[F3] Update STM32F3xx HAL Drivers to v1.5.5
Included in STM32CubeF3 FW v1.11.2 Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 8888918 commit d69a2f8

File tree

75 files changed

+6328
-3069
lines changed

Some content is hidden

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

75 files changed

+6328
-3069
lines changed

system/Drivers/STM32F3xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h

Lines changed: 161 additions & 26 deletions
Large diffs are not rendered by default.

system/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_adc_ex.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ typedef struct
8888
New conversion starts only when the previous conversion (for regular group) or previous sequence (for injected group) has been treated by user software.
8989
This feature automatically adapts the speed of ADC to the speed of the system that reads the data. Moreover, this avoids risk of overrun for low frequency applications.
9090
This parameter can be set to ENABLE or DISABLE.
91-
Note: Do not use with interruption or DMA (HAL_ADC_Start_IT(), HAL_ADC_Start_DMA()) since they have to clear immediately the EOC flag to free the IRQ vector sequencer.
92-
Do use with polling: 1. Start conversion with HAL_ADC_Start(), 2. Later on, when conversion data is needed: use HAL_ADC_PollForConversion() to ensure that conversion is completed
91+
Note: It is not recommended to use with interruption or DMA (HAL_ADC_Start_IT(), HAL_ADC_Start_DMA()) since these modes have to clear immediately the EOC flag (by CPU to free the IRQ pending event or by DMA).
92+
Auto wait will work but fort a very short time, discarding its intended benefit (except specific case of high load of CPU or DMA transfers which can justify usage of auto wait).
93+
Do use with polling: 1. Start conversion with HAL_ADC_Start(), 2. Later on, when ADC conversion data is needed:
9394
and use HAL_ADC_GetValue() to retrieve conversion result and trig another conversion (in case of usage of injected group, use the equivalent functions HAL_ADCExInjected_Start(), HAL_ADCEx_InjectedGetValue(), ...). */
9495
FunctionalState ContinuousConvMode; /*!< Specifies whether the conversion is performed in single mode (one conversion) or continuous mode for regular group,
9596
after the selected trigger occurred (software start or external trigger).
@@ -765,6 +766,7 @@ typedef struct
765766
#define ADC_EXTERNALTRIGCONV_T1_CC1 ADC1_EXTERNALTRIG_T1_CC1
766767
#define ADC_EXTERNALTRIGCONV_T1_CC2 ADC1_EXTERNALTRIG_T1_CC2
767768
#define ADC_EXTERNALTRIGCONV_T1_CC3 ADC1_EXTERNALTRIG_T1_CC3
769+
#define ADC_EXTERNALTRIGCONV_T2_CC2 ADC1_EXTERNALTRIG_T2_CC2
768770
#define ADC_EXTERNALTRIGCONV_EXT_IT11 ADC1_EXTERNALTRIG_EXT_IT11
769771
#define ADC_EXTERNALTRIGCONV_T1_TRGO ADC1_EXTERNALTRIG_T1_TRGO
770772
#define ADC_EXTERNALTRIGCONV_T1_TRGO2 ADC1_EXTERNALTRIG_T1_TRGO2
@@ -1633,6 +1635,7 @@ typedef struct
16331635
#define ADC1_EXTERNALTRIG_T1_CC1 (0x00000000U)
16341636
#define ADC1_EXTERNALTRIG_T1_CC2 ((uint32_t)ADC_CFGR_EXTSEL_0)
16351637
#define ADC1_EXTERNALTRIG_T1_CC3 ((uint32_t)ADC_CFGR_EXTSEL_1)
1638+
#define ADC1_EXTERNALTRIG_T2_CC2 ((uint32_t)(ADC_CFGR_EXTSEL_1 | ADC_CFGR_EXTSEL_0))
16361639
#define ADC1_EXTERNALTRIG_EXT_IT11 ((uint32_t)(ADC_CFGR_EXTSEL_2 | ADC_CFGR_EXTSEL_1))
16371640
#define ADC1_EXTERNALTRIG_T1_TRGO ((uint32_t)(ADC_CFGR_EXTSEL_3 | ADC_CFGR_EXTSEL_0))
16381641
#define ADC1_EXTERNALTRIG_T1_TRGO2 ((uint32_t)(ADC_CFGR_EXTSEL_3 | ADC_CFGR_EXTSEL_1))
@@ -3203,6 +3206,7 @@ typedef struct
32033206
#define IS_ADC_EXTTRIG(REGTRIG) (((REGTRIG) == ADC_EXTERNALTRIGCONV_T1_CC1) || \
32043207
((REGTRIG) == ADC_EXTERNALTRIGCONV_T1_CC2) || \
32053208
((REGTRIG) == ADC_EXTERNALTRIGCONV_T1_CC3) || \
3209+
((REGTRIG) == ADC_EXTERNALTRIGCONV_T2_CC2) || \
32063210
((REGTRIG) == ADC_EXTERNALTRIGCONV_EXT_IT11) || \
32073211
((REGTRIG) == ADC_EXTERNALTRIGCONV_T1_TRGO) || \
32083212
((REGTRIG) == ADC_EXTERNALTRIGCONV_T1_TRGO2) || \

system/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_cec.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ typedef struct
121121
* b6 Error information
122122
* 0 : No Error
123123
* 1 : Error
124-
* b5 IP initilisation status
124+
* b5 IP initialization status
125125
* 0 : Reset (IP not initialized)
126126
* 1 : Init done (IP initialized. HAL CEC Init function already called)
127127
* b4-b3 (not used)
@@ -138,7 +138,7 @@ typedef struct
138138
* RxState value coding follow below described bitmap :
139139
* b7-b6 (not used)
140140
* xx : Should be set to 00
141-
* b5 IP initilisation status
141+
* b5 IP initialization status
142142
* 0 : Reset (IP not initialized)
143143
* 1 : Init done (IP initialized)
144144
* b4-b2 (not used)

system/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828

2929
/* Includes ------------------------------------------------------------------*/
3030
#include "stm32f3xx.h"
31-
#if defined USE_LEGACY
3231
#include "Legacy/stm32_hal_legacy.h"
33-
#endif
3432
#include <stddef.h>
3533

3634
/* Exported types ------------------------------------------------------------*/
@@ -108,7 +106,14 @@ typedef enum
108106
}while (0U)
109107
#endif /* USE_RTOS */
110108

111-
#if defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
109+
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler V6 */
110+
#ifndef __weak
111+
#define __weak __attribute__((weak))
112+
#endif
113+
#ifndef __packed
114+
#define __packed __attribute__((packed))
115+
#endif
116+
#elif defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
112117
#ifndef __weak
113118
#define __weak __attribute__((weak))
114119
#endif /* __weak */
@@ -119,7 +124,14 @@ typedef enum
119124

120125

121126
/* Macro to get variable aligned on 4-bytes, for __ICCARM__ the directive "#pragma data_alignment=4" must be used instead */
122-
#if defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
127+
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler V6 */
128+
#ifndef __ALIGN_BEGIN
129+
#define __ALIGN_BEGIN
130+
#endif
131+
#ifndef __ALIGN_END
132+
#define __ALIGN_END __attribute__ ((aligned (4)))
133+
#endif
134+
#elif defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
123135
#ifndef __ALIGN_END
124136
#define __ALIGN_END __attribute__ ((aligned (4)))
125137
#endif /* __ALIGN_END */
@@ -131,7 +143,7 @@ typedef enum
131143
#define __ALIGN_END
132144
#endif /* __ALIGN_END */
133145
#ifndef __ALIGN_BEGIN
134-
#if defined (__CC_ARM) /* ARM Compiler */
146+
#if defined (__CC_ARM) /* ARM Compiler V5*/
135147
#define __ALIGN_BEGIN __align(4)
136148
#elif defined (__ICCARM__) /* IAR Compiler */
137149
#define __ALIGN_BEGIN
@@ -142,9 +154,9 @@ typedef enum
142154
/**
143155
* @brief __NOINLINE definition
144156
*/
145-
#if defined ( __CC_ARM ) || defined ( __GNUC__ )
146-
/* ARM & GNUCompiler
147-
----------------
157+
#if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) || defined ( __GNUC__ )
158+
/* ARM V4/V5 and V6 & GNU Compiler
159+
-------------------------------
148160
*/
149161
#define __NOINLINE __attribute__ ( (noinline) )
150162

system/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_exti.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -302,21 +302,21 @@ typedef struct
302302
/** @defgroup EXTI_Private_Macros EXTI Private Macros
303303
* @{
304304
*/
305-
#define IS_EXTI_LINE(__LINE__) ((((__LINE__) & ~(EXTI_PROPERTY_MASK | EXTI_REG_MASK | EXTI_PIN_MASK)) == 0x00u) && \
306-
((((__LINE__) & EXTI_PROPERTY_MASK) == EXTI_DIRECT) || \
307-
(((__LINE__) & EXTI_PROPERTY_MASK) == EXTI_CONFIG) || \
308-
(((__LINE__) & EXTI_PROPERTY_MASK) == EXTI_GPIO)) && \
309-
(((__LINE__) & (EXTI_REG_MASK | EXTI_PIN_MASK)) < \
310-
(((EXTI_LINE_NB / 32u) << EXTI_REG_SHIFT) | (EXTI_LINE_NB % 32u))))
305+
#define IS_EXTI_LINE(__EXTI_LINE__) ((((__EXTI_LINE__) & ~(EXTI_PROPERTY_MASK | EXTI_REG_MASK | EXTI_PIN_MASK)) == 0x00u) && \
306+
((((__EXTI_LINE__) & EXTI_PROPERTY_MASK) == EXTI_DIRECT) || \
307+
(((__EXTI_LINE__) & EXTI_PROPERTY_MASK) == EXTI_CONFIG) || \
308+
(((__EXTI_LINE__) & EXTI_PROPERTY_MASK) == EXTI_GPIO)) && \
309+
(((__EXTI_LINE__) & (EXTI_REG_MASK | EXTI_PIN_MASK)) < \
310+
(((EXTI_LINE_NB / 32u) << EXTI_REG_SHIFT) | (EXTI_LINE_NB % 32u))))
311311

312-
#define IS_EXTI_MODE(__LINE__) ((((__LINE__) & EXTI_MODE_MASK) != 0x00u) && \
313-
(((__LINE__) & ~EXTI_MODE_MASK) == 0x00u))
312+
#define IS_EXTI_MODE(__EXTI_LINE__) ((((__EXTI_LINE__) & EXTI_MODE_MASK) != 0x00u) && \
313+
(((__EXTI_LINE__) & ~EXTI_MODE_MASK) == 0x00u))
314314

315-
#define IS_EXTI_TRIGGER(__LINE__) (((__LINE__) & ~EXTI_TRIGGER_MASK) == 0x00u)
315+
#define IS_EXTI_TRIGGER(__EXTI_LINE__) (((__EXTI_LINE__) & ~EXTI_TRIGGER_MASK) == 0x00u)
316316

317-
#define IS_EXTI_PENDING_EDGE(__LINE__) ((__LINE__) == EXTI_TRIGGER_RISING_FALLING)
317+
#define IS_EXTI_PENDING_EDGE(__EXTI_LINE__) ((__EXTI_LINE__) == EXTI_TRIGGER_RISING_FALLING)
318318

319-
#define IS_EXTI_CONFIG_LINE(__LINE__) (((__LINE__) & EXTI_CONFIG) != 0x00u)
319+
#define IS_EXTI_CONFIG_LINE(__EXTI_LINE__) (((__EXTI_LINE__) & EXTI_CONFIG) != 0x00u)
320320

321321
#if defined(GPIOH)
322322
#define IS_EXTI_GPIO_PORT(__PORT__) (((__PORT__) == EXTI_GPIOA) || \

0 commit comments

Comments
 (0)