Skip to content

Commit 6013956

Browse files
committed
system(WB) update STM32WBxx HAL Drivers to v1.14.3
Included in STM32CubeWB FW v1.20.0 Signed-off-by: Frederic Pillon <[email protected]>
1 parent edd1785 commit 6013956

15 files changed

+257
-126
lines changed

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

+23-2
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,21 @@ extern "C" {
806806
#define GPIO_AF0_S2DSTOP GPIO_AF0_SRDSTOP
807807
#define GPIO_AF11_LPGPIO GPIO_AF11_LPGPIO1
808808
#endif /* STM32U5 */
809+
810+
#if defined(STM32WBA)
811+
#define GPIO_AF11_RF_ANTSW0 GPIO_AF11_RF
812+
#define GPIO_AF11_RF_ANTSW1 GPIO_AF11_RF
813+
#define GPIO_AF11_RF_ANTSW2 GPIO_AF11_RF
814+
#define GPIO_AF11_RF_IO1 GPIO_AF11_RF
815+
#define GPIO_AF11_RF_IO2 GPIO_AF11_RF
816+
#define GPIO_AF11_RF_IO3 GPIO_AF11_RF
817+
#define GPIO_AF11_RF_IO4 GPIO_AF11_RF
818+
#define GPIO_AF11_RF_IO5 GPIO_AF11_RF
819+
#define GPIO_AF11_RF_IO6 GPIO_AF11_RF
820+
#define GPIO_AF11_RF_IO7 GPIO_AF11_RF
821+
#define GPIO_AF11_RF_IO8 GPIO_AF11_RF
822+
#define GPIO_AF11_RF_IO9 GPIO_AF11_RF
823+
#endif /* STM32WBA */
809824
/**
810825
* @}
811826
*/
@@ -1817,7 +1832,7 @@ extern "C" {
18171832
#define HAL_FMPI2CEx_AnalogFilter_Config HAL_FMPI2CEx_ConfigAnalogFilter
18181833
#define HAL_FMPI2CEx_DigitalFilter_Config HAL_FMPI2CEx_ConfigDigitalFilter
18191834

1820-
#define HAL_I2CFastModePlusConfig(SYSCFG_I2CFastModePlus, cmd) ((cmd == ENABLE)? \
1835+
#define HAL_I2CFastModePlusConfig(SYSCFG_I2CFastModePlus, cmd) (((cmd) == ENABLE)? \
18211836
HAL_I2CEx_EnableFastModePlus(SYSCFG_I2CFastModePlus): \
18221837
HAL_I2CEx_DisableFastModePlus(SYSCFG_I2CFastModePlus))
18231838

@@ -2731,6 +2746,12 @@ extern "C" {
27312746
#define __APB1_RELEASE_RESET __HAL_RCC_APB1_RELEASE_RESET
27322747
#define __APB2_FORCE_RESET __HAL_RCC_APB2_FORCE_RESET
27332748
#define __APB2_RELEASE_RESET __HAL_RCC_APB2_RELEASE_RESET
2749+
#if defined(STM32C0)
2750+
#define __HAL_RCC_APB1_FORCE_RESET __HAL_RCC_APB1_GRP1_FORCE_RESET
2751+
#define __HAL_RCC_APB1_RELEASE_RESET __HAL_RCC_APB1_GRP1_RELEASE_RESET
2752+
#define __HAL_RCC_APB2_FORCE_RESET __HAL_RCC_APB1_GRP2_FORCE_RESET
2753+
#define __HAL_RCC_APB2_RELEASE_RESET __HAL_RCC_APB1_GRP2_RELEASE_RESET
2754+
#endif /* STM32C0 */
27342755
#define __BKP_CLK_DISABLE __HAL_RCC_BKP_CLK_DISABLE
27352756
#define __BKP_CLK_ENABLE __HAL_RCC_BKP_CLK_ENABLE
27362757
#define __BKP_FORCE_RESET __HAL_RCC_BKP_FORCE_RESET
@@ -3910,7 +3931,7 @@ extern "C" {
39103931
*/
39113932
#if defined (STM32G0) || defined (STM32L5) || defined (STM32L412xx) || defined (STM32L422xx) || \
39123933
defined (STM32L4P5xx)|| defined (STM32L4Q5xx) || defined (STM32G4) || defined (STM32WL) || defined (STM32U5) || \
3913-
defined (STM32WBA) || defined (STM32H5) || defined (STM32C0) || defined (STM32H7RS) || defined (STM32U0)
3934+
defined (STM32WBA) || defined (STM32H5) || defined (STM32C0) || defined (STM32H7RS) || defined (STM32U0)
39143935
#else
39153936
#define __HAL_RTC_CLEAR_FLAG __HAL_RTC_EXTI_CLEAR_FLAG
39163937
#endif

system/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_comp.h

+36-34
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,15 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
159159
/** @defgroup COMP_WindowMode COMP Window Mode
160160
* @{
161161
*/
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). */
162+
#define COMP_WINDOWMODE_DISABLE (0x00000000UL) /*!< Window mode disable: Comparators
163+
instances pair COMP1 and COMP2 are
164+
independent */
165+
#define COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON (COMP_CSR_WINMODE) /*!< Window mode enable: Comparators instances
166+
pair COMP1 and COMP2 have their input
167+
plus connected together.
168+
The common input is COMP1 input plus
169+
(COMP2 input plus is no more accessible).
170+
*/
169171
/**
170172
* @}
171173
*/
@@ -383,16 +385,16 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
383385
* @brief Enable the COMP1 EXTI line rising & falling edge trigger.
384386
* @retval None
385387
*/
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);\
388+
#define __HAL_COMP_COMP1_EXTI_ENABLE_RISING_FALLING_EDGE() do { \
389+
LL_EXTI_EnableRisingTrig_0_31(COMP_EXTI_LINE_COMP1); \
390+
LL_EXTI_EnableFallingTrig_0_31(COMP_EXTI_LINE_COMP1); \
389391
} while(0)
390392

391393
/**
392394
* @brief Disable the COMP1 EXTI line rising & falling edge trigger.
393395
* @retval None
394396
*/
395-
#define __HAL_COMP_COMP1_EXTI_DISABLE_RISING_FALLING_EDGE() do { \
397+
#define __HAL_COMP_COMP1_EXTI_DISABLE_RISING_FALLING_EDGE() do { \
396398
LL_EXTI_DisableRisingTrig_0_31(COMP_EXTI_LINE_COMP1); \
397399
LL_EXTI_DisableFallingTrig_0_31(COMP_EXTI_LINE_COMP1);\
398400
} while(0)
@@ -468,16 +470,16 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
468470
* @brief Enable the COMP2 EXTI line rising & falling edge trigger.
469471
* @retval None
470472
*/
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); \
473+
#define __HAL_COMP_COMP2_EXTI_ENABLE_RISING_FALLING_EDGE() do { \
474+
LL_EXTI_EnableRisingTrig_0_31(COMP_EXTI_LINE_COMP2); \
475+
LL_EXTI_EnableFallingTrig_0_31(COMP_EXTI_LINE_COMP2); \
474476
} while(0)
475477

476478
/**
477479
* @brief Disable the COMP2 EXTI line rising & falling edge trigger.
478480
* @retval None
479481
*/
480-
#define __HAL_COMP_COMP2_EXTI_DISABLE_RISING_FALLING_EDGE() do { \
482+
#define __HAL_COMP_COMP2_EXTI_DISABLE_RISING_FALLING_EDGE() do { \
481483
LL_EXTI_DisableRisingTrig_0_31(COMP_EXTI_LINE_COMP2); \
482484
LL_EXTI_DisableFallingTrig_0_31(COMP_EXTI_LINE_COMP2);\
483485
} while(0)
@@ -613,25 +615,25 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
613615
/* Note: On this STM32 series, comparator input minus parameters are */
614616
/* the same on all COMP instances. */
615617
/* However, comparator instance kept as macro parameter for */
616-
/* compatibility with other STM32 families. */
618+
/* compatibility with other STM32 series. */
617619
#if defined(COMP_INPUT_MINUS_IO2)
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) ||\
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_IO2) || \
626+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO3) || \
627+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO4) || \
626628
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO5))
627629
#else
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) ||\
630+
#define IS_COMP_INPUT_MINUS(__COMP_INSTANCE__, __INPUT_MINUS__) (((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_4VREFINT) || \
631+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_2VREFINT) || \
632+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_3_4VREFINT) || \
633+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_VREFINT) || \
634+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO1) || \
635+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO3) || \
636+
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO4) || \
635637
((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO5))
636638
#endif
637639

@@ -644,9 +646,9 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
644646
((__POL__) == COMP_OUTPUTPOL_INVERTED))
645647

646648
#define IS_COMP_BLANKINGSRCE(__OUTPUT_BLANKING_SOURCE__) \
647-
( ((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_NONE) \
648-
|| ((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_TIM1_OC5) \
649-
|| ((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_TIM2_OC3) \
649+
(((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_NONE) \
650+
|| ((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_TIM1_OC5) \
651+
|| ((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_TIM2_OC3) \
650652
)
651653

652654
/* Note: Output blanking source common to all COMP instances */

system/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_uart.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,7 @@ typedef void (*pUART_RxEventCallbackTypeDef)
12321232
/** @defgroup UART_Private_Macros UART Private Macros
12331233
* @{
12341234
*/
1235-
/** @brief Get UART clok division factor from clock prescaler value.
1235+
/** @brief Get UART clock division factor from clock prescaler value.
12361236
* @param __CLOCKPRESCALER__ UART prescaler value.
12371237
* @retval UART clock division factor
12381238
*/
@@ -1247,8 +1247,7 @@ typedef void (*pUART_RxEventCallbackTypeDef)
12471247
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV16) ? 16U : \
12481248
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV32) ? 32U : \
12491249
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV64) ? 64U : \
1250-
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV128) ? 128U : \
1251-
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV256) ? 256U : 1U)
1250+
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV128) ? 128U : 256U)
12521251

12531252
#if defined(LPUART1)
12541253
/** @brief BRR division operation to set BRR register with LPUART.

system/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_lpuart.h

+15
Original file line numberDiff line numberDiff line change
@@ -2605,6 +2605,21 @@ __STATIC_INLINE void LL_LPUART_RequestRxDataFlush(USART_TypeDef *LPUARTx)
26052605
SET_BIT(LPUARTx->RQR, (uint16_t)USART_RQR_RXFRQ);
26062606
}
26072607

2608+
/**
2609+
* @brief Request a Transmit data FIFO flush
2610+
* @note TXFRQ bit is set to flush the whole FIFO when FIFO mode is enabled. This
2611+
* also sets the flag TXFE (TXFIFO empty bit in the LPUART_ISR register).
2612+
* @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not
2613+
* FIFO mode feature is supported by the USARTx instance.
2614+
* @rmtoll RQR TXFRQ LL_LPUART_RequestTxDataFlush
2615+
* @param LPUARTx LPUART Instance
2616+
* @retval None
2617+
*/
2618+
__STATIC_INLINE void LL_LPUART_RequestTxDataFlush(USART_TypeDef *LPUARTx)
2619+
{
2620+
SET_BIT(LPUARTx->RQR, (uint16_t)USART_RQR_TXFRQ);
2621+
}
2622+
26082623
/**
26092624
* @}
26102625
*/

system/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rng.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ __STATIC_INLINE uint32_t LL_RNG_ReadRandData32(const RNG_TypeDef *RNGx)
369369
/** @defgroup RNG_LL_EF_Init Initialization and de-initialization functions
370370
* @{
371371
*/
372-
ErrorStatus LL_RNG_Init(RNG_TypeDef *RNGx, LL_RNG_InitTypeDef *RNG_InitStruct);
372+
ErrorStatus LL_RNG_Init(RNG_TypeDef *RNGx, const LL_RNG_InitTypeDef *RNG_InitStruct);
373373
void LL_RNG_StructInit(LL_RNG_InitTypeDef *RNG_InitStruct);
374374
ErrorStatus LL_RNG_DeInit(const RNG_TypeDef *RNGx);
375375

0 commit comments

Comments
 (0)