Skip to content

Commit 3ea2380

Browse files
gautierg-sterwango
authored andcommitted
stm32cube: update stm32wb to cube version V1.20.0
Update Cube version for STM32WBxx series on https://github.com/STMicroelectronics from version v1.19.1 to version v1.20.0 Signed-off-by: Guillaume Gautier <[email protected]>
1 parent 2b7bda2 commit 3ea2380

16 files changed

+358
-281
lines changed

stm32cube/stm32wbxx/README

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Origin:
66
http://www.st.com/en/embedded-software/stm32cubewb.html
77

88
Status:
9-
version v1.19.1
9+
version v1.20.0
1010

1111
Purpose:
1212
ST Microelectronics official MCU package for STM32WB series.
@@ -23,7 +23,7 @@ URL:
2323
https://github.com/STMicroelectronics/STM32CubeWB
2424

2525
Commit:
26-
ea5475b0d214489a3a3556f7b3f66d0954d006e0
26+
529e571e91c93d4bf1aae6e0d69b9a5dcf4d828d
2727

2828
Maintained-by:
2929
External

stm32cube/stm32wbxx/drivers/include/Legacy/stm32_hal_legacy.h

Lines changed: 23 additions & 2 deletions
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

stm32cube/stm32wbxx/drivers/include/stm32wbxx_hal_comp.h

Lines changed: 36 additions & 34 deletions
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 */

stm32cube/stm32wbxx/drivers/include/stm32wbxx_hal_uart.h

Lines changed: 2 additions & 3 deletions
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.

stm32cube/stm32wbxx/drivers/include/stm32wbxx_ll_lpuart.h

Lines changed: 15 additions & 0 deletions
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
*/

stm32cube/stm32wbxx/drivers/include/stm32wbxx_ll_rng.h

Lines changed: 1 addition & 1 deletion
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

stm32cube/stm32wbxx/drivers/src/stm32wbxx_hal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
*/
5757
#define __STM32WBxx_HAL_VERSION_MAIN (0x01U) /*!< [31:24] main version */
5858
#define __STM32WBxx_HAL_VERSION_SUB1 (0x0EU) /*!< [23:16] sub1 version */
59-
#define __STM32WBxx_HAL_VERSION_SUB2 (0x02U) /*!< [15:8] sub2 version */
59+
#define __STM32WBxx_HAL_VERSION_SUB2 (0x03U) /*!< [15:8] sub2 version */
6060
#define __STM32WBxx_HAL_VERSION_RC (0x00U) /*!< [7:0] release candidate */
6161
#define __STM32WBxx_HAL_VERSION ((__STM32WBxx_HAL_VERSION_MAIN << 24U)\
6262
|(__STM32WBxx_HAL_VERSION_SUB1 << 16U)\

stm32cube/stm32wbxx/drivers/src/stm32wbxx_hal_comp.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
[..]
2929
The STM32WBxx device family integrates two analog comparators instances:
3030
COMP1, COMP2 except for the STM32WB15xx, STM32WB10xx products featuring only
31-
one instance: COMP1.
32-
In the rest of the file, all comments related to a pair of comparators are not
33-
applicable to STM32WB15xx, STM32WB10xx.
31+
one instance: COMP1 (in this case, all comments related to pair of comparators are not applicable)
3432
(#) Comparators input minus (inverting input) and input plus (non inverting input)
3533
can be set to internal references or to GPIO pins
3634
(refer to GPIO list in reference manual).
@@ -260,7 +258,7 @@ HAL_StatusTypeDef HAL_COMP_Init(COMP_HandleTypeDef *hcomp)
260258

261259
#if defined(COMP2)
262260
assert_param(IS_COMP_WINDOWMODE(hcomp->Init.WindowMode));
263-
#endif
261+
#endif /* COMP2 */
264262

265263

266264
if (hcomp->State == HAL_COMP_STATE_RESET)
@@ -318,7 +316,7 @@ HAL_StatusTypeDef HAL_COMP_Init(COMP_HandleTypeDef *hcomp)
318316
#else
319317
MODIFY_REG(hcomp->Instance->CSR,
320318
COMP_CSR_PWRMODE | COMP_CSR_INMSEL | COMP_CSR_INPSEL |
321-
COMP_CSR_POLARITY | COMP_CSR_HYST |
319+
COMP_CSR_POLARITY | COMP_CSR_HYST |
322320
COMP_CSR_BLANKING | COMP_CSR_BRGEN | COMP_CSR_SCALEN | COMP_CSR_INMESEL,
323321
tmp_csr
324322
);

0 commit comments

Comments
 (0)