Release Notes for

STM32WBxx HAL Drivers

Copyright © 2019 STMicroelectronics

Purpose

The STM32Cube HAL and LL, an STM32 abstraction layer embedded software, ensure maximized portability across STM32 portfolio.

The Portable APIs layer provides a generic, multi instanced and simple set of APIs to interact with the upper layer (application, libraries and stacks). It is composed of native and extended APIs set. It is directly built around a generic architecture and allows the build-upon layers, like the middleware layer, to implement its functions without knowing in-depth the used STM32 device. This improves the library code reusability and guarantees an easy portability on other devices and STM32 families.

The Low Layer (LL) drivers are part of the STM32Cube firmware HAL that provide basic set of optimized and one shot services. The Low layer drivers, contrary to the HAL ones are not Fully Portable across the STM32 families; the availability of some functions depend on the physical availability of the relative features on the product. The Low Layer (LL) drivers are designed to offer the following features:

Update History

Main Changes

  • Maintenance release of HAL and Low Layer drivers to include latest corrections
  • All source files: update disclaimer to add reference to the new license agreement
  • Correct English spelling errors and typos

Contents

HAL Drivers updates

  • HAL ADC driver
    • Enhance ADC calibration to reduce noise effect
  • HAL GPIO driver
    • Reorder EXTI configuration sequence in order to avoid unexpected level detection
  • HAL I2C driver
    • Update I2C_TransferConfig() function to avoid write to reserved bit 28 in I2C_CR2 register
    • Update header description of I2C_WaitOnFlagUntilTimeout() function
    • Update driver to handle errors in polling mode
    • Update I2C_IsAcknowledgeFailed() API to avoid I2C in busy state if NACK received after transmitting register address
    • Rename I2C_IsAcknowledgeFailed() to I2C_IsErrorOccurred() and correctly manage when error occurs
  • HAL IRDA driver
    • Improve description of IRDA_WaitOnFlagUntilTimeout() function header
  • HAL IWDG driver
    • Fix HAL_GetTick() timeout vulnerability
    • Update HAL_IWDG_DEFAULT_TIMEOUT value to take into account LSI startup time
  • HAL LPTIM driver
    • Add check on PRIMASK register to prevent from enabling unwanted global interrupts within LPTIM_Disable() and LL_LPTIM_Disable() funstions
  • HAL PKA driver
    • Fix Incorrect length for R and S in HAL_PKA_ECDSASign_GetResult() function
  • HAL RCC driver
    • Enhance RCC_MCOx in order to support both MCO number and AF mapping
    • Add missing RCC_RNGCLKSOURCE_PLLSAI1 in RNG clock sources
  • HAL SMARTCARD driver
    • Improve description of SMARTCARD_WaitOnFlagUntilTimeout() function header
  • HAL SMBUS driver
    • Add new APIs:
      • HAL_SMBUSEx_EnableWakeUp()
      • HAL_SMBUSEx_DisableWakeUp()
  • HAL TIM driver
    • Reorder function calls in HAL_TIM_IC_Start_DMA() and HAL_TIM_Encoder_Start_DMA() functions to enable the timer when configuration is done
  • HAL UART driver
    • Improve description of UART_WaitOnFlagUntilTimeout() function header
  • HAL USART driver
    • Improve description of USART_WaitOnFlagUntilTimeout() function header
  • HAL WWDG driver
    • Remove non UTF-8 characters in comments


LL Drivers updates

  • LL ADC driver
    • Update LL_ADC driver to prevent unused argument compilation warning
  • LL RCC driver
    • Add missing APIs LL_RCC_PLL_IsEnabledDomain_XXX for PLL domain outputs
    • Add check of PLL enable bit when a peripheral is using PPL P or PLL Q
    • Update driver to fix CodeSonar warnings


Backward Compatibility

This release is compatible with the previous versions.

Main Changes

  • Maintenance release of HAL and Low Layer drivers to include latest corrections
  • Update of HAL SMBUS driver to introduce fast mode and fast mode plus
    • Add extension files stm32wbxx_hal_smbus_ex.h/.c for new APIs:
      • HAL_SMBUSEx_EnableFastModePlus()
      • HAL_SMBUSEx_DisableFastModePlus()


Contents

HAL Drivers updates

  • HAL CORTEX driver
    • Disable the smallest MPU region sizes (32B, 64B, 128B) within M0+ context
  • HAL CRYP driver
    • Update HAL_CRYP_InCpltCallback() API to fix an incorrect condition call at resumption time
    • Update CRYP_AESCCM_Process_IT() to fix incorrect CCM header length management when data are fed to the peripheral under interrupt
  • HAL EXTI driver
    • Update HAL_EXTI_GetConfigLine() to set default configuration value of Trigger and GPIOSel before checking each corresponding register
  • HAL FLASH driver
    • Add new __HAL_FLASH_ECC_CPUID() macro to get the Bus-ID of the CPU access causing the ECC failure
  • HAL GPIO driver
    • Update HAL_GPIO_Init() function to avoid the configuration of PUPDR register when Analog mode is selected
  • HAL I2C driver
    • Updated I2C_IsAcknowledgeFailed() to avoid keeping I2C in busy state if NACK is received after transmitting register address
  • HAL IWDG driver
    • Add LSI startup time in default IWDG timeout calculation (HAL_IWDG_DEFAULT_TIMEOUT)
    • Update HAL_IWDG_Init() API in order to fix HAL_GetTick() timeout vulnerability issue
  • HAL RCC driver
    • Update definition of IS_RCC_OSCILLATORTYPE() macro
    • Update IS_RCC_PERIPHCLOCK() macro definition depending on targeted derivative
    • Add new API HAL_RCC_GetResetSource() to get all reset sources and clear flags for next reset
  • HAL RTC driver
    • Add new API HAL_RTC_DST_Add1Hour() to add 1 hour without going through the initialization procedure
    • Add new API HAL_RTC_DST_Sub1Hour() to subtract 1 hour without going through the initialization procedure
    • Add new API HAL_RTC_DST_SetStoreOperation() to memorize the Daylight Saving Time status without going through the initialization procedure
    • Add new API HAL_RTC_DST_ClearStoreOperation() to clear the Daylight Saving Time status without going through the initialization procedure
    • Add new API HAL_RTC_DST_ReadStoreOperation() to read the Daylight Saving Time status
    • Fields DayLightSaving and StoreOperation in RTC_TimeTypeDef structure are deprecated
  • HAL RNG driver
    • Update timeout mechanism to avoid false timeout detection in case of preemption
  • HAL SMBUS driver
    • Add support for Fast Mode Plus to be SMBUS Rev3 compliant.
      • Add HAL_SMBUSEx_EnableFastModePlus() and HAL_SMBUSEx_DisableFastModePlus() APIs to manage Fm+.
  • HAL SPI driver
    • Update in SPI_WaitFifoStateUntilTimeout() to fix code optimization issue
    • Update to fix MISRA-C 2012 Rule-13.2 issue
  • HAL UART driver
    • Fix erroneous UART’s handle state in case of error returned after DMA reception start within UART_Start_Receive_DMA()
    • Update UART ReceptionType management in case of ReceptionToIdle API are called from RxEvent callback
    • Handling of UART concurrent register access in case of race condition between Tx and Rx transfers
  • HAL USB driver
    • Add fix transfer complete for IN Interrupt transaction in single buffer mode


LL Drivers updates

  • LL DMA driver
    • Update LL_DMA_ClearFlag_GIx() functions description to inform use not to clear GIx when channel is ON
  • LL RTC driver
    • Fix race condition in LL_RTC_WaitForSynchro() function
    • Fix wrong reference of RTC instance in LL_RTC_TIME_Init() and LL_RTC_DATE_Init() functions
  • LL SPI driver
    • Update LL_SPI_TransmitData8() to avoid casting the result to 8 bits
    • Updated to set the FRXTH bit for 8bit data for LL_SPI_Init() API
  • LL LPUART driver
    • Handling of UART concurrent register access in case of race condition between Tx and Rx transfers
  • LL USART driver
    • Handling of UART concurrent register access in case of race condition between Tx and Rx transfers


Backward Compatibility

This release is compatible with the previous versions.

Main Changes

Add support for STM32WB15xx and STM32WB10xx

Peripheral Headline
generic Prevent redefinition of UNUSED macro
generic Add support of Keil V6
USB Fix device ISO IN double buffer mode
USB Remove duplication of PCD_GET_EP_RX_CNT define
USB Fix PMA rx count descriptor update
USB Fix HAL_PCD_EP_Open indentation
USB Rework device start and stop
USB Remove register keyword as no more supported by c++ compiler
USB Fix double buffer mode
USB Fix Enabling ULPI interface
UART Arrays are now declared as static const
UART Add a HAL UART service to enable RTO interrupt
UART Implement HAL UART enhanced reception services (ReceptionToIdle)
UART Fix typos introduced in UART State definition description
UART Fix invalid CR1 init in UART_SetConfig() and SMARTCARD_SetConfig()
TIMER Correct timeout vulnerability
TIMER Correct counter value latch delay at high frequency
TIMER Correct error: “LL_TIM_TS_ITR11” is undefined
TIMER Correct LL_TIM_E_TestLL_TIM_SetRemap
TIMER Correct HAL_TIM_OnePulse_Start ignoring OutputChannel parameter leading to unexpected behavior
TIMER Correct ONEPULSEMODE defines. Descriptions were inverted
TIMER Fix MISRA errors
TIMER Correct the return value of LL_TIM_GetCounterMode
LPTIM Correct MISRAC2012-Rule-8.3_b: Declaration/definition of HAL_LPTIM_RegisterCallback is inconsistent with previous declaration
LPTIM Fix external clock configuration (was incomplete for some ClockSource/CounterSource combinations)
ADC Correct timeout vulnerability
ADC Increase internal regulator stabilization time from 10us to 20us
COMP Correct timeout vulnerability
CRYP Correct official NIST CCM test pattern enciphering failing when header length is null
CRYP Correct HAL_CRYP_SetConfig not storing the content of KeyIVConfigSkip
CRYP Correct the GCM decryption in interrupt mode

Backward Compatibility

This release is compatible with the previous versions.

Main Changes

Maitenance release

All peripheral

Peripheral Headline
CRYP Add precision on data types
CRYP AES GCM: handling of AUD with size not multiple of 4 bytes not properly handle in CRYP_AESGCM_Process_IT
CRYP Fix CRYP HAL driver to manage GCM header lengths not multiple of 4 bytes in 8-bit, 16-bit and 32-bit data types.
CRYP Update to be able to manage GCM/GMAC/CCM header feed in DMA mode
CRYP Fix the enciphering issue and pass all the official NIST CCM test patterns.
EXTI Replace reserved word __LINE__ by __EXTI_LINE__
EXTI Add missing line 46 to LL_EXTI_LINE_ALL_32_63
I2C Refactor documentation
PWR Remove ‘register’ storage class specifier
RCC HSE bypass related API must be removed from RCC LL/HAL drivers
RCC LSI is no longer a source for RF WUP
RCC SystemCoreClockUpdate shall not be called by the HAL
TIM Add HAL_TIM_DMABurst_MultiWriteStart and HAL_TIM_DMABurst_MultiReadStart to support multiple DMA bursts.
TIM Minor correction to fix warnings
WWDG Correct driver description

Backward Compatibility

This release is compatible with the previous versions.

Main Changes

Maitenance release

All peripheral

Peripheral Headline
All Remove ‘register’ storage class specifier
CRYP AES GCM: Add support data encrypt/decrypt with length not multiple of 16 bytes
DMA LOCK UNLOCK process to modify, as LOCK is done at Start and UNLOCK is done at Completion processus
DMA Correct the computation for DMAMUX overrun IT mask
GPIO Correct bug on HAL_GPIO_TogglePin and LL_GPIO_TogglePin to allow to toggle multiple pin
I2C Sequential transfer MAX_NBYTE_SIZE correspond to no reload
SPI problematic timeout management inside SPI DMA xfer complete handler (interrupt context)
SPI Issue in 3wires communication (Need Disable / Enable SPI)
IWDG Correct the IWDG start-up timeout (insufficiently low)
USB Improve OUT EP re-enable with double buffering
USB Add workaround for unexpected USB wakeup during stop mode
USB Clear unexpected wakeup during suspend IT
USB Adjust IO address access to be volatile
USB Manage IN isoc IN transfer complete interrupt
RTC Issue on macro when clearing or getting flag TAMP, TIMESTAMP in EXTI
SAI Issue with ‘register’ storage class specifier, should be removed
SMARTCARD No repetition after NACK is received in smartcard T=0
SMARTCARD Improve doxygen visual result
UART Rework BRR register value computation in HAL_UART_Init() for ROM size gain
Utils Align package information to RM0434
Utils Turn UTILS_SetFlashLatency() into LL_SetFlashLatency() public function
TIM Order of disabling in HAL_TIM_IC_Stop_DMA function
TIM COUNTERMODE defines are inverted for TIM_CR1_CMS in ll_tim.h

Backward Compatibility

This release is compatible with the previous versions.

Main Changes

Introduction of STM32WB5M, STM32WB35xx and STM32WB30xx product

This release introduce the support of STM32WB5Mxx, STM32WB35xx product and its value line STM32WB30xx.

Added features:

  • Introduction of STM32WB35xx.
Peripheral Headline
HAL/LL VREFBUF trimming calibration must be written by software
HAL HAL_SetTickFreq() should update frequency on Systick_LOAD register and uwTickFreq correctly
GPIO LL_GPIO_Init() generate undesired pulse
I2C HardFault in I2C_DMAXferCplt
I2C Incorrectly enable interrupts in I2C_Enable_IRQ routine when InterruptRequest = I2C_XFER_CPLT_IT
RCC Cannot enable PLL if PLL OFF with identical PLL config
RCC Clock reconfiguration issues once PLLSAI used

Backward Compatibility

This release is compatible with the previous versions.

Main Changes

Maitenance release

Peripheral Headline
CRYP Correct suspend and resume operation with a different parameter size.
I2C Correct MISRA error. The value assigned to variable tmpITFlags was never used.
I2C Correct I2C slave interrupt handling issue.
IPCC Add LL_IPCC_GetChannelNumber API which return the number of channel supported by the device.
LPTIM Correct doxygen group names.
PKA Use a macro __PKA_RAM_PARAM_END to clear the last word of any input parameters.
TSC Correct MISRA error related to tag __TSC_HandleTypeDef which is unused.
ADC Add two functions to ease configuration of internal channels.

Backward Compatibility

This release is compatible with the previous versions.

Dependencies

This software release is compatible with:

STM32CubeMX V6.0.0

Main Changes

Maitenance release

Peripheral Headline
CRYP Document a restriction regarding size field on HAL_CRYP_Encrypt_DMA, HAL_CRYP_Decrypt_DMA API.
CRYP Correct several MISRA C:2012 and Code Sonar compliancy improvements.
FLASH Move FLASH_SIZE define from hal flash. h to cmsis device file
FLASH Correct ECC management in HAL FLASH driver
FLASH Correct #define in stm32wbxx_hal_flash.h - FLASH_PAGE_NB
RCC Correct PLL characteristics
TIMER Add assertion check inside HAL_TIMEx_MasterConfigSynchronization
TIMER Make LL_TIM_SetETRSource in line with RM0434
WWDG Correct typical frequency computation description inside the header file
IRDA Improve the description of the APIs
SMARTCARD Fix GCC compilation warning
UART Correct possible overflow with wordlength = 9bits and NO parity in HAL_UART_Transmit() and HAL_IRDA_Transmit()
UART Fix GCC compilation warning
USART Correct possible overflow with wordlength = 9bits and NO parity in HAL_UART_Transmit() and HAL_IRDA_Transmit()
USART Fix GCC compilation warning

Backward Compatibility

This release is compatible with the previous versions.

Dependencies

This software release is compatible with:

STM32CubeMX V5.4.0

Main Changes

STM32WB50xx introduction and maintenance release

First release for STM32WBxx HAL drivers introducing stm32wb50xx devices.

Peripheral Headline
RCC Add capabilty to configure RNG clock in one step.
Before two steps were required: USB clock then RNG clock.
Two step method is still supported and compatible.
IRDA Avoid using macros with function calls as argument
LPTIM Add polling mechanims to check xxOK flags
Add new EXTI macros to manage LPTIM wakeup EXTI interrupts
USB Improve ep OUT interrupt handler
Ensure 16 bit access to USB PMA
Enable BCD
RNG Add new error definitions
SAI Correct SAI frequency calculation in case of SPDIF output
SMARTCARD Avoid using macros with function calls as argument
UART Avoid using macros with function calls as argument
USART Avoid using macros with function calls as argument

Backward Compatibility

This release is compatible with the previous versions.

Dependencies

This software release is compatible with:

STM32CubeMX V5.3.0

Main Changes

Maintenance release

Maintenance release of HAL and Low layers drivers supporting STM32WB55xx devices.

Fixed bugs list
Peripheral Headline
COMP Only cosmetic changes
CRYP Only changes related to documentation
EXTI Only changes related to documentation
FLASH Improve code efficiency
GPIO Improve HAL_GPIO_TogglePin efficiency
IWDG Only changes related to documentation
RCC Only changes related to documentation
RTC LL_RTC_BAK_GetRegister generates warning on GCC 6.3.1 20170620
TIM Only changes related to documentation
TSC Correct __HAL_TSC_GET_GROUP_STATUS which was checking only TSC_GROUP1_IDX

Backward Compatibility

This release is compatible with the previous versions.

Dependencies

This software release is compatible with:

STM32CubeMX V5.2.0

Main Changes

First release

First official release of HAL (Hardware Abstraction Layer) and LL (Low layers) drivers to support STM32WB55xx.