Release Notes for STM32L5xx HAL Drivers

Copyright © 2019 STMicroelectronics

License

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this component except in compliance with the License. You may obtain a copy of the License at:

https://opensource.org/licenses/BSD-3-Clause

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 provides a 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 depends 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

Fourth release

Contents

Fourth release of HAL and Low Layer drivers for STM32L552xx/STM32L562xx devices

Superset features device STM32L562xx API User Manual available (STM32L562xx_User_Manual.chm)

HAL Drivers updates

  • Global removal of ‘register’ storage class qualifier deprecated since C++ 11
  • HAL generic driver
    • Remove non-applicable HAL_DBGMCU_EnableDBGSleepMode() and HAL_DBGMCU_DisableDBGSleepMode() APIs
  • HAL CRYP driver
    • AES GSM: Support data encrypt/decrypt with length not multiple of 16 bytes
    • AES GSM: Handling of AAD with size not multiple of 4 bytes in HAL_CRYPEx_AESGCM_GenerateAuthTAG()
  • HAL DAC driver
    • Fix timeout management for sample & hold channel 2
  • HAL FLASH driver
    • Add FLASH_NB_PAGE definition in stm32l5xx_hal_flash.h
  • HAL GPIO driver
    • Fix HAL_GPIO_TogglePin() to manage several pins
  • HAL HASH driver
    • Add comments to describe case of message made of several parts, not all with length multiple of 4 bytes.
  • HAL ICACHE driver
    • HAL_ICACHE_Enable() updated to enable the instruction cache whatever any ongoing operation.
    • HAL_ICACHE_Disable() updated to not wait for end of invalidation procedure.
    • Add HAL_ICACHE_WaitForInvalidateComplete() API
  • HAL IWDG driver
    • HAL_IWDG_DEFAULT_TIMEOUT updated based on LSI_VALUE
  • HAL MMC driver
    • Add MMC_LOW_VOLTAGE_RANGE and eMMC_LOW_VOLTAGE_RANGE modes
    • Add HAL_MMC_GetCardExtCSD() API
    • Fix in HAL_MMC_ConfigWideBusOperation() to manage power class before bus width speed
  • HAL NOR driver
    • Apply adequate commands according to the command set field value (command set 1 for Micron JS28F512P33, command set 2 for Micron M29W128G and Cypress S29GL128P)
  • HAL PCD driver
    • Fix double buffer bulk out transaction
  • HAL RNG driver
    • Apply in HAL_RNG_Init() the recommended value after NIST SP 800-90B entropy validation
    • New API HAL_RNGEx_RecoverSeedError()
    • Add check on seed error with internal seed recovery procedure in HAL_RNG_GenerateRandomNumber()
  • HAL RCC driver
    • Fix __HAL_RCC_APB1_FORCE_RESET() and __HAL_RCC_APB1_RELEASE_RESET() macros to manage both APB1RSTR1 and APB1RSTR2 registers
  • HAL SMARTCARD driver
    • Fix NACK management
  • HAL SPI driver
    • Fix in 3-wires communication (disable and enable SPI)
    • Fix timeout management inside SPI DMA xfer complete handler
    • Fix to not assert on BaudRatePrescaler in Slave Motorola mode
  • HAL TIM driver
    • Fix DMA management when DMA requests are used for several channels of the same timer
    • Fix HAL_TIM_IC_Stop_DMA() to stop DMA prior to disabling the channel
  • HAL UART driver
    • Add new reception services APIs, allowing user to handle reception of unknown/variable lengths and to get notified about received data upon events at reception buffer filling or IDLE event on Rx line:
      • HAL_UARTEx_ReceiveToIdle(): allow user to receive data until a given number of data are received or until IDLE event occurs on Rx Line. In case of IDLE event detected during reception, function returns HAL_OK and provides number of received data (available data stored in reception buffer)
      • HAL_UARTEx_ReceiveToIdle_IT(): allow user to receive data in interrupt mode until a given number of data are received or until IDLE event occurs on Rx Line. When any of these 2 events occurs, a user callback HAL_UARTEx_RxEventCallback() is executed and reception is stopped. Callback provides number of received data (available data stored in reception buffer)
      • HAL_UARTEx_ReceiveToIdle_DMA(): allow user to receive data in DMA mode until DMA buffer filling Half Transfer and Transfer Complete events occur or until IDLE event occurs on Rx Line. When any of these 3 events occurs, a user callback HAL_UARTEx_RxEventCallback() is executed and provides number of received data (available data stored in reception buffer). In DMA Normal mode, reception ends after either DMA Transfer Complete or IDLE event occurs. In DMA Circular mode, reception goes on after all occurrences of HAL_UARTEx_RxEventCallback() calls.
      • User version of HAL_UARTEx_RxEventCallback() is to be implemented in user code (weak empty function defined in HAL code).
    • Rework BRR register value computation in HAL_UART_Init() for ROM size gain

LL Drivers updates

  • Global removal of ‘register’ storage class qualifier deprecated since C++ 11
  • LL GPIO driver
    • Fix LL_GPIO_TogglePin() to manage several pins
  • LL PWR driver
    • Fix LL_PWR_IsEnabledUCPDDeadBattery() returned value
  • LL SYSTEM driver
    • Add LL_DBGMCU_EnableTraceClock(), LL_DBGMCU_DisableTraceClock() and LL_DBGMCU_IsEnabledTraceClock() APIs
    • Remove non-applicable LL_DBGMCU_EnableDBGSleepMode() and LL_DBGMCU_DisableDBGSleepMode() APIs
  • LL TIM driver
    • Fix inverted LL_TIM_COUNTERMODE_CENTER_UP and LL_TIM_COUNTERMODE_CENTER_DOWN definitions
  • LL UCPD driver
    • Change default CFGR1 register values in LL_UCPD_StructInit()

Notes

For HAL drivers usage, stm32l5xx_hal_conf_template.h file must be copied in user application as stm32l5xx_hal_conf.h with optional configuration update.

For LL drivers usage, stm32_assert_template.h file must be copied in user application as stm32_assert.h with optional assert configuration update.

Main Changes

Third release

Contents

Third official release of HAL and Low Layer drivers for STM32L552xx/STM32L562xx devices

Superset features device STM32L562xx API User Manual available (STM32L562xx_User_Manual.chm)

HAL Drivers updates

  • HAL FLASH driver
    • Fix non-secure Flash access from secure Flash service to not update SAU status
    • Fix HAL_FLASHEx_OBGetConfig() to return correct non-secure boot address 0 (OB_BOOTADDR_NS0) and non-secure boot address 1 (OB_BOOTADDR_NS1)
  • HAL MMC driver
    • Add support of sanitize and discard functions
      • new APIs HAL_MMC_Sanitize(), HAL_MMC_EraseSequence(), HAL_MMC_ConfigSecRemovalType() and HAL_MMC_GetSupportedSecRemovalType()
  • HAL PWR driver
    • Add HAL_PWREx_SMPS_GetMainRegulatorExtSMPSReadyStatus() API
  • HAL SPI driver
    • Fix HAL_SPI_Receive_DMA() and HAL_SPI_TransmitReceive_DMA() to only disable TX DMA interrupt at end of DMA reception in Master RX 2 lines mode

LL Drivers updates

  • LL UTILS driver
    • Fix AHB prescaler value when requesting System Clock over 80Mhz in
      • LL_PLL_ConfigSystemClock_MSI(), LL_PLL_ConfigSystemClock_HSI() and LL_PLL_ConfigSystemClock_HSE()

Notes

For HAL drivers usage, stm32l5xx_hal_conf_template.h file must be copied in user application as stm32l5xx_hal_conf.h with optional configuration update.

For LL drivers usage, stm32_assert_template.h file must be copied in user application as stm32_assert.h with optional assert configuration update.

Known Limitations

  • HAL SMARTCARD driver
    • Issue with NACK management

Main Changes

Second release

Contents

Second official release of HAL and Low Layer drivers for STM32L552xx/STM32L562xx devices

Superset features device STM32L562xx API User Manual available (STM32L562xx_User_Manual.chm)

HAL Drivers updates

  • HAL FLASH driver
    • Enhance non-secure Flash access from secure Flash
      • Add new macros for controlling non-secure flash interrupts and flags from secure:
        • __HAL_FLASH_ENABLE_IT_NS(), __HAL_FLASH_DISABLE_IT_NS(), __HAL_FLASH_GET_FLAG_NS() and __HAL_FLASH_CLEAR_FLAG_NS()
  • HAL GPIO driver
    • Update initialization sequence in HAL_GPIO_Init() to avoid glitch
  • HAL I2C driver
    • Fix sequential transfer of MAX_NBYTE_SIZE in:
      • HAL_I2C_Master_Seq_Transmit_IT(), HAL_I2C_Master_Seq_Transmit_DMA(), HAL_I2C_Master_Seq_Receive_IT() and HAL_I2C_Master_Seq_Receive_DMA(),
  • HAL SMBUS driver
    • Add SMBUS_FIRST_FRAME_WITH_PEC define to transfer options
  • HAL TIM driver
    • Fix when using multiple DMA request to different channels of same timer
      • Add new APIs HAL_TIM_GetActiveChannel(), HAL_TIM_GetChannelState() and HAL_TIMEx_GetChannelNState()
    • Fix assert instance check in:
      • HAL_TIM_Encoder_Init(), HAL_TIM_Encoder_Start(), HAL_TIM_Encoder_Stop(), HAL_TIM_Encoder_Start_IT(), HAL_TIM_Encoder_Stop_IT(), HAL_TIM_Encoder_Start_DMA() and HAL_TIM_Encoder_Stop_DMA()
  • HAL USART driver
    • Fix SlaveMode field in USART handle after HAL_USARTEx_DisableSlaveMode() call
    • Add receiver timeout interrupt management with new HAL_USART_ERROR_RTO error code in HAL_USART_IRQHandler()

LL Drivers updates

  • LL GPIO driver
    • Update initialization sequence in LL_GPIO_Init() to avoid glitch
  • LL TIM driver
    • Add 32-bit Repetition Counter
  • LL UTILS driver
    • Add LL_SetFlashLatency() API

Notes

For HAL drivers usage, stm32l5xx_hal_conf_template.h file must be copied in user application as stm32l5xx_hal_conf.h with optional configuration update.

For LL drivers usage, stm32_assert_template.h file must be copied in user application as stm32_assert.h with optional assert configuration update.

Main Changes

First release

Contents

First official release of HAL and Low Layer drivers for STM32L552xx/STM32L562xx devices

Superset features device STM32L562xx API User Manual available (STM32L562xx_User_Manual.chm)

HAL Drivers

  • ADC, COMP, CORTEX, CRC, CRYP, DAC, DFSDM, DMA, EXTI, FDCAN, FLASH, GPIO, GTZC, HASH, I2C, ICACHE, IRDA, IWDG, LPTIM, MMC, NAND, NOR, OPAMP, OSPI, OTFDEC, PCD, PKA, PWR, RCC, RNG, RTC, SAI, SD, SMARTCARD, SMBUS, SPI, SRAM, TIM, TSC, UART, USART, WWDG
  • Alternate TIM and RTC timebase templates (to be copied in user application)

LL Drivers

  • ADC, BUS, COMP, CORTEX, CRC, CRS, CRYP, DAC, DMA, DMAMUX, EXTI, GPIO, I2C, IWDG, LPTIM, LPUART, OPAMP, PKA, PWR, RCC, RNG, RTC, SDMMC, SPI, SYSTEM, TIM, UCPD, USART, UTILS, WWDG

Notes

For HAL drivers usage, stm32l5xx_hal_conf_template.h file must be copied in user application as stm32l5xx_hal_conf.h with optional configuration update.

For LL drivers usage, stm32_assert_template.h file must be copied in user application as stm32_assert.h with optional assert configuration update.