Skip to content

Commit 48f976f

Browse files
committed
system(WB) update STM32WBxx HAL Drivers to v1.14.0
Included in STM32CubeWB FW v1.17.0 Signed-off-by: Frederic Pillon <[email protected]>
1 parent 8ff274a commit 48f976f

Some content is hidden

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

58 files changed

+1756
-1322
lines changed

Diff for: system/Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h

+9-7
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,12 @@ extern "C" {
3737
#define AES_CLEARFLAG_CCF CRYP_CLEARFLAG_CCF
3838
#define AES_CLEARFLAG_RDERR CRYP_CLEARFLAG_RDERR
3939
#define AES_CLEARFLAG_WRERR CRYP_CLEARFLAG_WRERR
40-
#if defined(STM32U5) || defined(STM32H7) || defined(STM32MP1)
40+
#if defined(STM32H7) || defined(STM32MP1)
4141
#define CRYP_DATATYPE_32B CRYP_NO_SWAP
4242
#define CRYP_DATATYPE_16B CRYP_HALFWORD_SWAP
4343
#define CRYP_DATATYPE_8B CRYP_BYTE_SWAP
4444
#define CRYP_DATATYPE_1B CRYP_BIT_SWAP
45-
#if defined(STM32U5)
46-
#define CRYP_CCF_CLEAR CRYP_CLEAR_CCF
47-
#define CRYP_ERR_CLEAR CRYP_CLEAR_RWEIF
48-
#endif /* STM32U5 */
49-
#endif /* STM32U5 || STM32H7 || STM32MP1 */
45+
#endif /* STM32H7 || STM32MP1 */
5046
/**
5147
* @}
5248
*/
@@ -279,7 +275,7 @@ extern "C" {
279275
#define DAC_WAVEGENERATION_NOISE DAC_WAVE_NOISE
280276
#define DAC_WAVEGENERATION_TRIANGLE DAC_WAVE_TRIANGLE
281277

282-
#if defined(STM32G4) || defined(STM32L5) || defined(STM32H7) || defined (STM32U5)
278+
#if defined(STM32G4) || defined(STM32H7) || defined (STM32U5)
283279
#define DAC_CHIPCONNECT_DISABLE DAC_CHIPCONNECT_EXTERNAL
284280
#define DAC_CHIPCONNECT_ENABLE DAC_CHIPCONNECT_INTERNAL
285281
#endif
@@ -3931,6 +3927,12 @@ extern "C" {
39313927
__HAL_RTC_TAMPER_TIMESTAMP_EXTI_GENERATE_SWIT()))
39323928
#endif /* STM32F1 */
39333929

3930+
#if defined (STM32F0) || defined (STM32F2) || defined (STM32F3) || defined (STM32F4) || defined (STM32F7) || \
3931+
defined (STM32H7) || \
3932+
defined (STM32L0) || defined (STM32L1)
3933+
#define __HAL_RTC_TAMPER_GET_IT __HAL_RTC_TAMPER_GET_FLAG
3934+
#endif
3935+
39343936
#define IS_ALARM IS_RTC_ALARM
39353937
#define IS_ALARM_MASK IS_RTC_ALARM_MASK
39363938
#define IS_TAMPER IS_RTC_TAMPER

Diff for: system/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_comp.h

+52-44
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ typedef struct
5151
#if defined(COMP2)
5252
uint32_t WindowMode; /*!< Set window mode of a pair of comparators instances
5353
(2 consecutive instances odd and even COMP<x> and COMP<x+1>).
54-
Note: HAL COMP driver allows to set window mode from any COMP instance of the pair of COMP instances composing window mode.
54+
Note: HAL COMP driver allows to set window mode from any COMP
55+
instance of the pair of COMP instances composing window mode.
5556
This parameter can be a value of @ref COMP_WindowMode */
5657
#endif /* COMP2 */
5758

@@ -153,17 +154,25 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
153154
* @}
154155
*/
155156

157+
156158
#if defined(COMP2)
157159
/** @defgroup COMP_WindowMode COMP Window Mode
158160
* @{
159161
*/
160-
#define COMP_WINDOWMODE_DISABLE (0x00000000UL) /*!< Window mode disable: Comparators instances pair COMP1 and COMP2 are independent */
161-
#define COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON (COMP_CSR_WINMODE) /*!< Window mode enable: Comparators instances pair COMP1 and COMP2 have their input plus connected together. The common input is COMP1 input plus (COMP2 input plus is no more accessible). */
162+
#define COMP_WINDOWMODE_DISABLE (0x00000000UL) /*!< Window mode disable: Comparators instances
163+
pair COMP1 and COMP2 are independent */
164+
#define COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON (COMP_CSR_WINMODE) /*!< Window mode enable: Comparators instances
165+
pair COMP1 and COMP2 have their input plus
166+
connected together. The common input is
167+
COMP1 input plus
168+
(COMP2 input plus is no more accessible). */
162169
/**
163170
* @}
164171
*/
165172
#endif /* COMP2 */
166173

174+
175+
167176
/** @defgroup COMP_PowerMode COMP power mode
168177
* @{
169178
*/
@@ -198,7 +207,7 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
198207
#define COMP_INPUT_MINUS_1_2VREFINT ( COMP_CSR_INMSEL_0 | COMP_CSR_SCALEN | COMP_CSR_BRGEN) /*!< Comparator input minus connected to 1/2 VrefInt */
199208
#define COMP_INPUT_MINUS_3_4VREFINT ( COMP_CSR_INMSEL_1 | COMP_CSR_SCALEN | COMP_CSR_BRGEN) /*!< Comparator input minus connected to 3/4 VrefInt */
200209
#define COMP_INPUT_MINUS_VREFINT ( COMP_CSR_INMSEL_1 | COMP_CSR_INMSEL_0 | COMP_CSR_SCALEN ) /*!< Comparator input minus connected to VrefInt */
201-
#define COMP_INPUT_MINUS_IO1 (COMP_CSR_INMSEL_2 | COMP_CSR_INMSEL_1 ) /*!< Comparator input minus connected to IO1 (pin PB1 for COMP1, pin PB3 for COMP2) */
210+
#define COMP_INPUT_MINUS_IO1 (COMP_CSR_INMSEL_2 | COMP_CSR_INMSEL_1 ) /*!< Comparator input minus connected to IO1 (pin PB1 for COMP1, pin PB3 for COMP2) */
202211
#if defined(STM32WB15xx) || defined(STM32WB10xx) || defined(STM32WB1Mxx)
203212
/* COMP_INPUT_MINUS_IO2 not available on this device */
204213
#else
@@ -312,14 +321,14 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
312321
* @param __HANDLE__ COMP handle
313322
* @retval None
314323
*/
315-
#define __HAL_COMP_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_EN)
324+
#define __HAL_COMP_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_EN)
316325

317326
/**
318327
* @brief Disable the specified comparator.
319328
* @param __HANDLE__ COMP handle
320329
* @retval None
321330
*/
322-
#define __HAL_COMP_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_EN)
331+
#define __HAL_COMP_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_EN)
323332

324333
/**
325334
* @brief Lock the specified comparator configuration.
@@ -330,14 +339,14 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
330339
* @param __HANDLE__ COMP handle
331340
* @retval None
332341
*/
333-
#define __HAL_COMP_LOCK(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_LOCK)
342+
#define __HAL_COMP_LOCK(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_LOCK)
334343

335344
/**
336345
* @brief Check whether the specified comparator is locked.
337346
* @param __HANDLE__ COMP handle
338347
* @retval Value 0 if COMP instance is not locked, value 1 if COMP instance is locked
339348
*/
340-
#define __HAL_COMP_IS_LOCKED(__HANDLE__) (READ_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_LOCK) == COMP_CSR_LOCK)
349+
#define __HAL_COMP_IS_LOCKED(__HANDLE__) (READ_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_LOCK) == COMP_CSR_LOCK)
341350

342351
/**
343352
* @}
@@ -346,7 +355,6 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
346355
/** @defgroup COMP_Exti_Management COMP external interrupt line management
347356
* @{
348357
*/
349-
350358
/**
351359
* @brief Enable the COMP1 EXTI line rising edge trigger.
352360
* @retval None
@@ -375,19 +383,19 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
375383
* @brief Enable the COMP1 EXTI line rising & falling edge trigger.
376384
* @retval None
377385
*/
378-
#define __HAL_COMP_COMP1_EXTI_ENABLE_RISING_FALLING_EDGE() do { \
379-
LL_EXTI_EnableRisingTrig_0_31(COMP_EXTI_LINE_COMP1); \
380-
LL_EXTI_EnableFallingTrig_0_31(COMP_EXTI_LINE_COMP1); \
381-
} while(0)
386+
#define __HAL_COMP_COMP1_EXTI_ENABLE_RISING_FALLING_EDGE() do { \
387+
LL_EXTI_EnableRisingTrig_0_31(COMP_EXTI_LINE_COMP1); \
388+
LL_EXTI_EnableFallingTrig_0_31(COMP_EXTI_LINE_COMP1);\
389+
} while(0)
382390

383391
/**
384392
* @brief Disable the COMP1 EXTI line rising & falling edge trigger.
385393
* @retval None
386394
*/
387-
#define __HAL_COMP_COMP1_EXTI_DISABLE_RISING_FALLING_EDGE() do { \
388-
LL_EXTI_DisableRisingTrig_0_31(COMP_EXTI_LINE_COMP1); \
389-
LL_EXTI_DisableFallingTrig_0_31(COMP_EXTI_LINE_COMP1); \
390-
} while(0)
395+
#define __HAL_COMP_COMP1_EXTI_DISABLE_RISING_FALLING_EDGE() do { \
396+
LL_EXTI_DisableRisingTrig_0_31(COMP_EXTI_LINE_COMP1); \
397+
LL_EXTI_DisableFallingTrig_0_31(COMP_EXTI_LINE_COMP1);\
398+
} while(0)
391399

392400
/**
393401
* @brief Enable the COMP1 EXTI line in interrupt mode.
@@ -460,19 +468,19 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
460468
* @brief Enable the COMP2 EXTI line rising & falling edge trigger.
461469
* @retval None
462470
*/
463-
#define __HAL_COMP_COMP2_EXTI_ENABLE_RISING_FALLING_EDGE() do { \
464-
LL_EXTI_EnableRisingTrig_0_31(COMP_EXTI_LINE_COMP2); \
465-
LL_EXTI_EnableFallingTrig_0_31(COMP_EXTI_LINE_COMP2); \
466-
} while(0)
471+
#define __HAL_COMP_COMP2_EXTI_ENABLE_RISING_FALLING_EDGE() do { \
472+
LL_EXTI_EnableRisingTrig_0_31(COMP_EXTI_LINE_COMP2); \
473+
LL_EXTI_EnableFallingTrig_0_31(COMP_EXTI_LINE_COMP2); \
474+
} while(0)
467475

468476
/**
469477
* @brief Disable the COMP2 EXTI line rising & falling edge trigger.
470478
* @retval None
471-
*/
472-
#define __HAL_COMP_COMP2_EXTI_DISABLE_RISING_FALLING_EDGE() do { \
473-
LL_EXTI_DisableRisingTrig_0_31(COMP_EXTI_LINE_COMP2); \
474-
LL_EXTI_DisableFallingTrig_0_31(COMP_EXTI_LINE_COMP2); \
475-
} while(0)
479+
*/
480+
#define __HAL_COMP_COMP2_EXTI_DISABLE_RISING_FALLING_EDGE() do { \
481+
LL_EXTI_DisableRisingTrig_0_31(COMP_EXTI_LINE_COMP2); \
482+
LL_EXTI_DisableFallingTrig_0_31(COMP_EXTI_LINE_COMP2);\
483+
} while(0)
476484

477485
/**
478486
* @brief Enable the COMP2 EXTI line in interrupt mode.
@@ -607,23 +615,23 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
607615
/* However, comparator instance kept as macro parameter for */
608616
/* compatibility with other STM32 families. */
609617
#if defined(COMP_INPUT_MINUS_IO2)
610-
#define IS_COMP_INPUT_MINUS(__COMP_INSTANCE__, __INPUT_MINUS__) (((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_4VREFINT) || \
611-
((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_2VREFINT) || \
612-
((__INPUT_MINUS__) == COMP_INPUT_MINUS_3_4VREFINT) || \
613-
((__INPUT_MINUS__) == COMP_INPUT_MINUS_VREFINT) || \
614-
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO1) || \
615-
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO2) || \
616-
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO3) || \
617-
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO4) || \
618+
#define IS_COMP_INPUT_MINUS(__COMP_INSTANCE__, __INPUT_MINUS__) (((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_4VREFINT) ||\
619+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_2VREFINT) ||\
620+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_3_4VREFINT) ||\
621+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_VREFINT) ||\
622+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO1) ||\
623+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO2) ||\
624+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO3) ||\
625+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO4) ||\
618626
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO5))
619627
#else
620-
#define IS_COMP_INPUT_MINUS(__COMP_INSTANCE__, __INPUT_MINUS__) (((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_4VREFINT) || \
621-
((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_2VREFINT) || \
622-
((__INPUT_MINUS__) == COMP_INPUT_MINUS_3_4VREFINT) || \
623-
((__INPUT_MINUS__) == COMP_INPUT_MINUS_VREFINT) || \
624-
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO1) || \
625-
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO3) || \
626-
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO4) || \
628+
#define IS_COMP_INPUT_MINUS(__COMP_INSTANCE__, __INPUT_MINUS__) (((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_4VREFINT) ||\
629+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_2VREFINT) ||\
630+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_3_4VREFINT) ||\
631+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_VREFINT) ||\
632+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO1) ||\
633+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO3) ||\
634+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO4) ||\
627635
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO5))
628636
#endif
629637

@@ -637,14 +645,14 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
637645

638646
#define IS_COMP_BLANKINGSRCE(__OUTPUT_BLANKING_SOURCE__) \
639647
( ((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_NONE) \
640-
|| ((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_TIM1_OC5) \
641-
|| ((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_TIM2_OC3) \
648+
|| ((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_TIM1_OC5) \
649+
|| ((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_TIM2_OC3) \
642650
)
643651

644652
/* Note: Output blanking source common to all COMP instances */
645653
/* Macro kept for compatibility with other STM32 series */
646654
#define IS_COMP_BLANKINGSRC_INSTANCE(__INSTANCE__, __OUTPUT_BLANKING_SOURCE__) \
647-
(IS_COMP_BLANKINGSRCE(__OUTPUT_BLANKING_SOURCE__))
655+
(IS_COMP_BLANKINGSRCE(__OUTPUT_BLANKING_SOURCE__))
648656

649657

650658
#define IS_COMP_TRIGGERMODE(__MODE__) (((__MODE__) == COMP_TRIGGERMODE_NONE) || \

Diff for: system/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_crc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t
318318
/** @defgroup CRC_Exported_Functions_Group3 Peripheral State functions
319319
* @{
320320
*/
321-
HAL_CRC_StateTypeDef HAL_CRC_GetState(CRC_HandleTypeDef *hcrc);
321+
HAL_CRC_StateTypeDef HAL_CRC_GetState(const CRC_HandleTypeDef *hcrc);
322322
/**
323323
* @}
324324
*/

0 commit comments

Comments
 (0)