# Release Notes for

# STM32L5xx 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 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:

- New set of inline functions for direct and atomic register access
- One-shot operations that can be used by the HAL drivers or from application level
- Full independence from HAL and standalone usage (without HAL drivers)
- Full features coverage of all the supported peripherals

# Update History

V1.0.7 / 29-October-2025

## Main Changes

Maintenance release

## Contents

- General updates to fix known defects and implementation enhancements.

### HAL Drivers updates

- HAL ADC
  - Correct length parameter definition in HAL_ADCEx_MultiModeStart_DMA() API.
- HAL CRC
  - Replace successive ‘if’ statements by ‘else if’ to improve checksum calculation performance in CRC_Handle_8() static function.
- HAL DAC
  - Update HAL_DACEx_SelfCalibrate() API to handle calibration factor equal to the range maximum value.
- HAL CRYP
  - Remove __HAL_UNLOCK() invocation when __HAL_LOCK() is not present.
  - Prevent reading outside the boundaries of local array for all data type.
- HAL FDCAN
  - Fix assert issue when Standard or Extended filter numbers are zeros.
  - Fix GetIndex computation overflow in overwrite mode in HAL_FDCAN_GetRxMessage() API.
- HAL GPIO
  - Add Pull down capability in analog mode.
- HAL PWR
  - Add guidance for HAL_PWR_ConfigAttributes() API description.
- HAL RCC
  - Add guidance for HAL_RCC_ConfigAttributes() API description.
- HAL FLASH
  - Change timeout calculation method in FLASH_WaitForLastOperation() function for improved handling.
  - Update the description of FLASH_OB_UserConfig() function.
- HAL HASH
  - Remove commented code section.
  - Enhance HASH_Start_IT() function to properly handle remaining data smaller than 4 bytes during the processing phase.
- HAL Cortex
  - Add MPU attributes description.
- HAL I2C
  - Move variable declaration at the beginning in I2C_TransferCofig() function.
  - Update HAL_I2C_IsDeviceReady() API to consider number of trials.
- HAL SMBUS
  - Improve HAL_SMBUS_IsDeviceReady() API to better handle STOP flag timing issues by allowing automatic retries and improved error recovery.
- HAL NAND
  - Correct buffer assignment to ensure proper volatile access improving data integrity and preventing compiler optimization issues.
  - Remove unused local variables.
- HAL OSPI
  - Add new helper HAL_OSPI_IsMemoryMapped() API to verify whether memory-mapped mode is configured or not.
  - change ChipSelectHighTime max limits to 64 to feat with specification.
  - Keep BSY flag high at the end of data transfer in SPI_EndRxTransaction() static API.
- HAL RNG
  - Distinguish errors from RecoverSeedError and SeedError.
  - Modify CR register configuration in HAL_RNG_Init() API to be compliant with NIST.
- HAL SPI
  - Add note clarifying HAL_SPI_Receive() API behavior in master mode.
  - Add units to physical measurements.
  - Avoid buffer overflow in SPI_WaitFifoStateUntilTimeout() function.
  - Check data size before changing state in reception API.
  - Keep BSY bit high to the end of a data transfer.
- HAL TIM
  - Fix update flag (UIF) clearing in TIM_Base_SetConfig() function.
  - Update TIM_CCER_CCxE_MASK to support internal TIM Channel 5 and 6.
  - Fix complementary channel being systematically disabled by TIM_OCx_SetConfig() function.
- HAL UART
  - Report an Idle event (HAL_UART_RXEVENT_IDLE) during DMA Circular mode reception by invoking the appropriate Rx Event callback.
  - Align prescaler value used by default in UART_GET_DIV_FACTOR macro with reference manual.
  - Correct DMA Rx abort procedure impact on ongoing Tx transfer in polling mode in static function UART_DMAAbortOnError().
  - Correct references to HAL_UARTEx_WakeupCallback and to HAL_UART_WAKEUP_CB_ID define, according to serie capabilities
  - Correct wrong comment in HAL_UARTEx_DisableFifoMode() API.
  - Ensure UART Rx buffer is not written beyond boundaries during RX FIFO reception in Interrupt mode.
  - Improve Rx Event callback by reporting accurate position for remaining DMA transfers.
- HAL USART
  - Align prescaler value used by default in USART_GET_DIV_FACTOR macro with reference manual.
  - Correct wrong comment in HAL_USARTEx_DisableFifoMode() API.
- HAL USB
  - Fix security advisory SA0035.

## 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.

V1.0.6 / 09-February-2024

## Main Changes

Maintenance release

## Contents

- General updates to fix known defects and implementation enhancements.

### HAL Drivers updates

- HAL code quality enhancement for MISRA-C2012 Rule-8.13 by adding const qualifiers.
- HAL Generic
  - Allow redefinition of macro UNUSED(x).
  - Update of HAL_GetTickFreq() API brief.
- HAL/LL RCC
  - Fix HAL_RCC_GetOscConfig() API to return oscillator state based on xxxRDY bit status.
  - Add uint32_t cast to shift left operands constants defined with ‘U’ suffix in case MISRAC2012-Rule-12.2 violated.
  - Invoke UNUSED() macro to avoid compilation warnings due to unused parameter(s).
  - Correct LSE config macro regarding LSESYS handling.
- HAL PWR
  - Update HAL_PWR_EnterSTANDBYMode() and HAL_PWREx_EnterSHUTDOWNMode() APIs to remove call to the __force_stores() intrinsic API:
    - No longer need to call __force_stores() with MDK-ARM V5.6.0 version and later.
  - Invoke UNUSED() macro in HAL_PWR_ConfigAttributes() and HAL_PWR_GetConfigAttributes() APIs to avoid compilation warnings due to unused parameter.
- HAL GPIO
  - Update HAL_GPIO_LockPin() API description to return HAL status instead of None.
  - Optimize the implementation of HAL_GPIO_ConfigPinAttributes() API.
  - Replace GPIO_Pin_x with GPIO_PIN_x to be compliant with macros definition.
- HAL SAI
  - Improve audio quality (avoid potential glitch).
- HAL/LL CORTEX
  - Align MPU Enable/Disable APIs with ARM’s last recommendations in the usage of Data Memory and Data/Instruction Synchronization barriers.
  - Align LL_MPU_ACCESS_OUTER_SHAREABLE defined value with ARMv8-M Architecture documentation.
  - Update HAL_MPU_ConfigRegion() API to allow the configuration of the MPU registers independently of the value of Enable/Disable field.
  - Add new APIs HAL_MPU_EnableRegion() / HAL_MPU_DisableRegion().
- HAL ICACHE
  - Update HAL_ICACHE_DeInit to set registers to reset value.
  - Update HAL_ICACHE_Invalidate() to prevent launching an invalidation if one has already been launched.
  - Update “How to use” for HAL_ICACHE_Enable() API.
- HAL HASH
  - Read the last remaining bytes (3 or 2 or 1) of the data in a temporary variable (taking into account swap mode) and enter this variable into the HASH->DIN when the data is not a multiple of 4 bytes.
  - HAL code quality enhancement for MISRA-C2012 Rule-12.1, Rule-10.7, Rule-10.6 and Rule-10.4.
- HAL DAC
  - Updated DAC buffer calibration according to RM.
- LL RTC
  - Correct misleading note about shadow registers.
- HAL/LL TIM
  - Remove multiple volatile reads or writes in interrupt handler for better performance.
  - Improve HAL TIM driver’s operational behavior.
  - Assert check for the right channels.
  - Remove unnecessary change of MOE bitfield in LL_TIM_BDTR_Init() API.
  - Remove useless check on IS_TIM_ADVANCED_INSTANCE() within LL_TIM_BDTR_Init() API to fix Break Filter configuration problem with specific TIM instances.
  - Improve period configuration parameter check.
  - Fix typo in PWM symmetric mode related constants names.
- HAL LPTIM
  - Remove redundant IS_LPTIM_AUTORELOAD macro.
- HAL UART
  - Update initialisation sequence for TXINV, RXINV and TXRXSWAP settings.
  - Fix incorrect gState check in HAL_UART_RegisterRxEventCallback()/HAL_UART_UnRegisterRxEventCallback() APIs to allow user Rx Event Callback registration when a transmit is ongoing.
  - Avoid RTOF flag to be cleared by a transmit process in polling mode.
  - Add LL LPUART API allowing TX FIFO flush request.
- HAL USART
  - Improve the visibility of the SPI function support in HAL USART description.
- HAL CRYP
  - Update AES GCM in interrupt mode to avoid Computation Completed IRQ fires before the DINR pointer increment.
  - Update Crypt/Decrypt IT processes to avoid Computation Completed IRQ fires before the DINR pointer increment.
  - HAL code quality enhancement for MISRA-C2012 Rule-10.4.
- HAL FDCAN
  - Fix GetIndex issue in HAL_FDCAN_GetRxMessage() API.
  - Remove shift from ‘FDCAN_DLC_BYTES_X’ definitions so that values taken by ‘DataLength’ structure member comply to the definition of a DLC.
- HAL SPI
  - Fix driver to don’t update state in case of error. (HAL_SPI_STATE_READY will be set only in case of HAL_TIMEOUT).
  - Update HAL_SPI_TransmitReceive() API to set the bit CRCNEXT in case of one byte transaction.
  - Update IT API to enable interrupts after process unlock.
- HAL TSC
  - Update IS_TSC_PG_PRESC_VS_CTPL() assert macro: Add parameter assertion depends on Duration time restriction link to product.
- HAL/LL I2C
  - Update HAL_I2C_IsDeviceReady() API to support 10_bit addressing mode: Update done on the macro I2C_GENERATE_START.
  - Update HAL I2C driver to prefetch data before starting the transmission: implementation of errata sheet workaround I2C2-190208 : Transmission stalled after first byte.
  - Update HAL I2C driver to disable all interrupts after end of transaction.
  - Update HAL_I2C_Init() API to clear ADD10 bit in 7 bit addressing mode.
  - Update HAL_I2C_Mem_Write_IT() API to initialize XferSize at 0.
  - Update I2C_Slave_ISR_IT(), I2C_Slave_ISR_DMA() and I2C_ITSlaveCplt() APIs to prevent the call of HAL_I2C_ListenCpltCallback twice.
  - Update I2C_WaitOnRXNEFlagUntilTimeout() API to check I2C_FLAG_AF independently from I2C_FLAG_RXNE.
  - Remove the unusable code in HAL_I2C_IsDeviceReady() API.
  - Update LL_I2C_HandleTranfer() API to prevent undefined behavior of volatile usage before updating the CR2 register.
  - Update I2C_WaitOnFlagUntilTimeout() API to handle error case.
  - Add a temporary variable to get the value to check before comparison.
  - Add abort memory management to HAL_I2C_Master_Abort_IT() API.
  - Move the prefetch process in HAL_I2C_Slave_Transmit() API.
- HAL SMBUS
  - Update HAL SMBUS driver to prefetch data before starting the transmission: implementation of errata sheet workaround I2C2-190208 : Transmission stalled after first byte.
- HAL SMARTCARD
  - Update SMARTCARD_SetConfig() API to fix CONSTANT_EXPRESSION_RESULT Coverity warning.
- HAL SDMMC
  - Update HAL_SD_ConfigSpeedBusOperation() API to add support of switch to Default Speed.
  - Fix CodeSonar Division by Zero and Empty while Statement warnings.
  - Remove __HAL_LOCK() API from HAL_xxx_RegisterCallback()/HAL_xxx_UnRegisterCallback() APIs.
  - Improve the abort mechanism for specific cases.
  - Fix Misra-C 2012 warnings MISRAC2012-Rule-15.6_e and MISRAC2012-Rule-15.7.
  - Fix typos in constants used for variable assignments : MMC instead of SD.
  - Substitute magic numbers by macros.
  - Fix Misra-C 2012 warning MISRAC2012-Rule-12.1.
  - Add MMC Card Reply Protected Memory Block (RPMB) APIs.
  - Add HAL_MMC_BOOT_PARTITION1 and HAL_MMC_BOOT_PARTITION2 macros.
  - Add configurable HW/SW Timeout.
- LL UTILS
  - Update LL_InitTick() API documentation: update “Ticks” parameter description.

## 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.

V1.0.5 / 04-November-2022

## Main Changes

Maintenance release

## Contents

- General updates to fix known defects and implementation enhancements.
- All source files: update disclaimer to add reference to the new license agreement.

### HAL Drivers updates

- HAL Generic
  - HAL code quality enhancement for MISRA-C2012 rules 2.2_C, 13.2 and 13.3.
  - HAL code quality enhancement for MISRA-C2012 Rule-8.13 by adding const qualifiers.
- HAL RCC
  - Update IS_RCC_PERIPHCLOCK() macro definition depending on targeted derivative.
  - 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.
  - Fix on HCLK prescaler update in HAL_RCC_ClockConfig() API to avoid issue with CPU clock being out of range versus the Flash latency.
  - Wait PLL1RDY to be off before clearing PLL1 source.
- HAL GPIO
  - Update HAL_GPIO_Init() API to avoid the configuration of PUPDR register when Analog mode is selected.
  - Optimize assertion control for GPIO Pull mode in HAL_GPIO_Init.
  - Reorder EXTI configuration sequence in order to avoid unexpected level detection.
- HAL EXTI
  - Update HAL_EXTI_GetConfigLine() API to set default configuration value of Trigger and GPIOSel before checking each corresponding registers.
  - Fix computation of pExtiConfig->GPIOSel in HAL_EXTI_GetConfigLine() API.
- HAL CRC
  - Add filter in HAL_CRCEx_Polynomial_Set() API to exclude even polynomials.
- HAL GTZC
  - Fix lock configuration in HAL_GTZC_MPCBB_ConfigMem() API.
- HAL CORTEX
  - CORTEX MPU Instruction Access Shareable values alignment with defined one in STM32 Cortex-M33 MCUs programming manual.
  - Fix weakness on MPU region deactivation.
- HAL FLASH
  - Update __HAL_FLASH_GET_FLAG() macro to return a ‘1’ when more than one flag is set.
- HAL/LL ADC
  - Update Temperature sensor data acquired to 130’C instead of 110’C.
  - In case of temperature sensor is used, wait for delay mentioned in device datasheet “tSTART(TS_BUF)” between ADC enable and ADC conversion start.
  - Remove useless binary mask (optimization).
  - Update LL_ADC driver to prevent unused argument compilation warning.
- HAL/LL RTC_BKP
  - Fix assertion in HAL_RTCEx_SetTamper_IT.
  - Check if the RTC calendar has been previously initialized before entering Initialization mode.
  - To avoid any possible clearing of other ISR flags during sequence read-modify-write, a direct assignment was applied with a mask of reserved bits to avoid setting them.
  - Fix wrong IS_LL_RTC_MONTH leading to assert check failure.
  - Fix bad reference to RTC handle in LL_RTC_TIME_Init() & LL_RTC_DATE_Init() APIs.
- HAL/LL TIM
  - Update HAL_TIMEx_ConfigBreakInput to use CMSIS TIM1_OR2_BKDF1BK0E_Pos definition instead of its hard coded value.
  - Manage configuration of the Capture/compare DMA request source.
  - Add related new exported constants (TIM_CCDMAREQUEST_CC, TIM_CCDMAREQUEST_UPDATE).
  - Create a new macro __HAL_TIM_SELECT_CCDMAREQUEST() allowing to program the TIMx_CR2.CCDS bitfield.
  - __LL_TIM_CALC_PSC() macro update to round up the evaluate value when the fractional part of the division is greater than 0.5.
  - Remove useless check on IS_TIM_ADVANCED_INSTANCE() within LL_TIM_BDTR_Init() to fix Break Filter configuration problem with specific TIM instances.
- HAL LPTIM
  - Add check on PRIMASK register to prevent from enabling unwanted global interrupts within LPTIM_Disable() and LL_LPTIM_Disable().
- HAL UART
  - Handle UART concurrent register access in case of race condition between Tx and Rx transfers.
  - Fix erroneous UART’s handle state in case of error returned after DMA reception start within UART_Start_Receive_DMA().
  - Correct UART ReceptionType management in case ReceptionToIdle API are called from RxEvent callback.
  - Handle UART concurrent register access in case of race condition between Tx and Rx transfers.
  - Improve header description of UART_WaitOnFlagUntilTimeout() function.
  - Add a check on the UART parity before enabling the parity error interruption.
  - Add const qualifier for read only pointers.
  - Fix wrong cast when computing the USARTDIV value in UART_SetConfig().
  - Removal of HAL_LOCK/HAL_UNLOCK calls in HAL UART Tx and Rx APIs.
  - Disable the Receiver Timeout Interrupt when data reception is completed.
  - Rework of UART_WaitOnFlagUntilTimeout() API to avoid being stuck forever when UART overrun error occurs and to enhance behavior.
- HAL/LL USART
  - Improve header description of USART_WaitOnFlagUntilTimeout() function.
  - Add a check on the USART parity before enabling the parity error interrupt.
  - Add const qualifier for read only pointers.
  - Handle UART concurrent register access in case of race condition between Tx and Rx transfers.
  - Fix compilation warnings generated with ARMV6 compiler.
- HAL IRDA
  - Improve header description of IRDA_WaitOnFlagUntilTimeout() function.
  - Add a check on the IRDA parity before enabling the parity error interrupt.
  - Add const qualifier for read only pointers.
  - Fix wrong cast when computing the USARTDIV value in IRDA_SetConfig() API.
- HAL SMARTCARD
  - Improve header description of SMARTCARD_WaitOnFlagUntilTimeout() API.
  - Add const qualifier for read only pointers.
  - Fix wrong cast when computing the USARTDIV value in SMARTCARD_SetConfig().
- LL LPUART
  - Remove TXFECF reference from LL LPUART driver.
- HAL NOR
  - Align HAL_NOR_Init() API when write operation is disabled to avoid HardFault.
  - FMC_WRITE_OPERATION_DISABLE for NOR cause Hardfault for Read operations.
- HAL PKA
  - Update PKA_MontgomeryParam_Set() API to skip the zero bytes in the evaluate Size.
- HAL CRYP
  - Correct CRYP_AESCCM_Process_IT() API to manage header length expressed in bytes or in words when header length is less than 16 bytes.
- HAL FDCAN
  - Better performance by removing multiple volatile reads or writes in interrupt handler.
- HAL/LL OPAMP
  - OPAMP_POWERMODE_NORMAL is changed by OPAMP_POWERMODE_NORMALPOWER in hal.c,.h files and LL_OPAMP_POWERMODE_NORMAL is changed by LL_OPAMP_POWERMODE_NORMALPOWER in ll.c,.h files.
  - Register address redefinition must be volatile (_IO).
  - Remove TXFECF reference from LL LPUART driver.
- HAL/LL SPI
  - Update LL_SPI_TransmitData8() API to avoid casting the result to 8 bits.
- HAL PKA
  - Update PKA_MontgomeryParam_Set() API to skip the zero bytes in the evaluate Size.
- HAL I2C
  - Updated I2C_IsAcknowledgeFailed() API to avoid I2C in busy state if NACK received after transmitting register address.
  - Fix I2C HAL CHM warnings.
  - Update to handle errors in polling mode.
    - Rename I2C_IsAcknowledgeFailed() to I2C_IsErrorOccurred() and correctly manage when error occurs.
  - Update to fix issue detected due to low system frequency execution (HSI).
  - Declare an internal macro link to DMA macro to check remaining data: I2C_GET_DMA_REMAIN_DATA.
  - Timeout issue using HAL MEM interface through FreeRTOS.
  - I2C_IsErrorOccurred does not return error if timeout is detected.
  - The ADDRF flag is cleared too early when the restart is received but the direction has changed.
- HAL SMBUS
  - Add the support of wake up capability.
  - Add new APIs:
    - HAL_SMBUSEx_EnableWakeUp()
    - HAL_SMBUSEx_DisableWakeUp()
  - Update to fix issue of mismatched data received by master in case of data size to be transmitted by the slave is greater than the data size to be received by the master.
    - Add flush on TX register.
- HAL SAI
  - Avoid using magic numbers.
- HAL IWDG
  - Add LSI startup time in default IWDG timeout calculation (HAL_IWDG_DEFAULT_TIMEOUT).
- HAL ICACHE
  - Fix clear of BSYENDF before Instruction Cache invalidate command.
  - Add HAL_ICACHE_IsEnabled() API.
- HAL USB_FS
  - PCD: add supporting multi packets transfer on Interrupt endpoint.
  - Set DCD timeout to minimum of 300ms before starting BCD primary detection process.
  - HAL: PCD: software correction added to avoid unexpected STALL condition during EP0 multi packet OUT transfer.
  - hal_pcd.h: add a mask for USB RX bytes count.
- LL UCPD
  - Correction of register accessed by LL_UCPD_ReadRxPaySize macro.
- Documentation
  - “@ref” Doxygen tags removed from PDF UserManual.
  - Update the way to declare licenses.

## 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.

V1.0.4 / 10-February-2021

## Main Changes

Maintenance release

## Contents

Maintenance 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 ADC driver
  - Update timeout mechanism to avoid false timeout detection in case of preemption
- HAL CORTEX driver
  - Add APIs for MPU control:
    - HAL_MPU_Enable(), HAL_MPU_Disable(), HAL_MPU_ConfigRegion() and HAL_MPU_ConfigMemoryAttributes()
    - HAL_MPU_Enable_NS(), HAL_MPU_Disable_NS(), HAL_MPU_ConfigRegion_NS() and HAL_MPU_ConfigMemoryAttributes_NS() for non-secure MPU control
- HAL CRYP driver
  - Add capability to manage GCM/GMAC/CCM header feed in DMA mode
- HAL DAC driver
  - Update timeout mechanism to avoid false timeout detection in case of preemption
- HAL ICACHE driver
  - Update timeout mechanism to avoid false timeout detection in case of preemption
- HAL IWDG driver
  - Update timeout mechanism to avoid false timeout detection in case of preemption
- HAL LPTIM driver
  - Update external clock configuration for some ClockSource/CounterSource combinations
- HAL MMC driver
  - High speed mode frequency computed based on real clock value
- HAL NAND driver
  - Fix read and write in spare area (16-bits addressing)
- HAL OPAMP driver
  - Rename definition OPAMP_POWERMODE_NORMAL to OPAMP_POWERMODE_NORMALPOWER
- HAL PCD driver
  - Fix device ISO IN double buffer mode
  - Fix PMA rx count descriptor update
- HAL RCC driver
  - Update timeout mechanism to avoid false timeout detection in case of preemption
- HAL RNG driver
  - Update timeout mechanism to avoid false timeout detection in case of preemption
- HAL RTC driver
  - Add APIs for daylight saving time:
    - HAL_RTC_DST_Add1Hour(), HAL_RTC_DST_Sub1Hour(), HAL_RTC_DST_SetStoreOperation(), HAL_RTC_DST_ClearStoreOperation() and HAL_RTC_DST_ReadStoreOperation()
  - Add APIs for monitoring functions:
    - HAL_RTCEx_EnableTemperatureMonitoring() and HAL_RTCEx_DisableTemperatureMonitoring()
    - HAL_RTCEx_EnableVoltageMonitoring() and HAL_RTCEx_DisableVoltageMonitoring()
    - HAL_RTCEx_EnableWUTMonitoring() and HAL_RTCEx_DisableWUTMonitoring()
  - Fix clear of registers synchronization flag (RSF) in HAL_RTC_WaitForSynchro()
- HAL SDMMC driver
  - High speed mode frequency computed based on real clock value
- HAL SMBUS driver
  - Add extension files stm32l5xx_hal_smbus_ex.h/.c for new APIs:
    - HAL_SMBUSEx_EnableFastModePlus() and HAL_SMBUSEx_DisableFastModePlus()
- HAL SPI driver
  - Fix code optimization problem in SPI_WaitFifoStateUntilTimeout()
- HAL TIM driver
  - Fix HAL_TIM_OnePulse_Start() not to ignore OutputChannel parameter
  - Fix counter value latch delay at high frequency in HAL_TIM_IC_Start_DMA()
  - Update timeout mechanism to avoid false timeout detection in case of preemption
- HAL TSC driver
  - Add assert macro to avoid wrong CPLT/PGPSC configuration

### LL Drivers updates

- New LL ICACHE driver: new stm32l5xx_ll_icache.h/.c files
  - Add APIs for ICACHE control:
    - LL_ICACHE_Enable(), LL_ICACHE_Disable(), LL_ICACHE_IsEnabled(), LL_ICACHE_SetMode(), LL_ICACHE_GetMode(), LL_ICACHE_Invalidate(), LL_ICACHE_EnableMonitors(), LL_ICACHE_DisableMonitors(), LL_ICACHE_IsEnabledMonitors(), LL_ICACHE_ResetMonitors(), LL_ICACHE_GetHitMonitor() and LL_ICACHE_GetMissMonitor()
    - LL_ICACHE_ConfigRegion()
- LL ADC driver
  - Increase internal regulator stabilization time from 10us to 20us (LL_ADC_DELAY_INTERNAL_REGUL_STAB_US)
- LL CORTEX driver
  - Add APIs for MPU control:
    - LL_MPU_Enable(), LL_MPU_Disable(), LL_MPU_IsEnabled(), LL_MPU_EnableRegion(), LL_MPU_DisableRegion(), LL_MPU_IsEnabledRegion(), LL_MPU_ConfigRegion(), LL_MPU_ConfigRegionAddress(), LL_MPU_ConfigAttributes(), LL_MPU_SetRegionBaseAddress(), LL_MPU_GetRegionBaseAddress(), LL_MPU_SetRegionLimitAddress(), LL_MPU_GetRegionLimitAddress(), LL_MPU_SetRegionAccess() and LL_MPU_GetRegionAccess()
    - LL_MPU_Enable_NS(), LL_MPU_Disable_NS(), LL_MPU_IsEnabled_NS(), LL_MPU_EnableRegion_NS(), LL_MPU_DisableRegion_NS(), LL_MPU_IsEnabledRegion_NS(), LL_MPU_ConfigRegion_NS(), LL_MPU_ConfigRegionAddress_NS(), LL_MPU_ConfigAttributes_NS(), LL_MPU_SetRegionBaseAddress_NS(), LL_MPU_GetRegionBaseAddress_NS(), LL_MPU_SetRegionLimitAddress_NS(), LL_MPU_GetRegionLimitAddress_NS(), LL_MPU_SetRegionAccess_NS() and LL_MPU_GetRegionAccess_NS() for non-secure MPU
- LL OPAMP driver
  - Rename definition LL_OPAMP_POWERMODE_NORMAL to LL_OPAMP_POWERMODE_NORMALPOWER
- LL RTC driver
  - Add APIs for monitoring functions:
    - LL_RTC_EnableTemperatureMonitoring() and LL_RTC_DisableTemperatureMonitoring()
    - LL_RTC_EnableVoltageMonitoring() and LL_RTC_DisableVoltageMonitoring()
    - LL_RTC_EnableWUTMonitoring() and LL_RTC_DisableWUTMonitoring()
- LL SPI driver
  - Fix LL_SPI_Init() for Rx FIFO threshold if 8-bits mode
- LL TIM driver
  - Fix LL_TIM_GetCounterMode()
  - Fix inverted comment for One Pulse Mode definitions
- LL USART driver
  - Fix LL_USART_ClockInit() to configure clock phase and clock polarity when CR2_CLKEN is cleared
  - Remove useless IS_LL_USART_BRR_MAX() macro

## 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.

V1.0.3 / 26-June-2020

## 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.

V1.0.2 / 12-February-2020

## 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

V1.0.1 / 22-January-2020

## 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.

V1.0.0 / 13-December-2019

## 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.