# Release Notes for STM32CubeH5 HAL and LL drivers

Copyright © 2023 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.5.0 / 05-February-2025

## Main Changes

- Maintenance Release V1.5.0 of HAL and LL drivers for STM32H573xx / STM32H563xx / STM32H562xx / STM32H503xx / STM32H523xx/ STM32H533xx devices
- Add SDIO HAL driver compliant with SDIO 3.0
- The HAL and LL drivers provided within this package are MISRA-C, MCU ASTYLE and Coverity compliant, and have been reviewed with a static analysis tool to eliminate possible run-time errors

- General updates to fix known defects and implementation enhancements

  - HAL drivers :
    - HAL driver
      - Add HAL_SDIO_MODULE_ENABLED, USE_HAL_SDIO_REGISTER_CALLBACKS, SDIO_MAX_IO_NUMBER and USE_SDIO_TRANSCEIVER defines in “hal_conf_template.h” file
    - HAL ETH driver
      - Add HAL_ETH_GetTxBuffersNumber define to get buffers in use number
      - Fix context descriptor not handled properly when timestamping is enabled
    - HAL SDMMC driver
      - Add SDIO HAL driver compliant with SDIO 3.0
      - Add defines of response results after operating with RPMB partition:
        - HAL_MMC_ERROR_RPMB_OPERATION_OK
        - HAL_MMC_ERROR_RPMB_GENERAL_FAILURE
        - HAL_MMC_ERROR_RPMB_AUTHENTICATION_FAILURE
        - HAL_MMC_ERROR_RPMB_COUNTER_FAILURE
        - HAL_MMC_ERROR_RPMB_ADDRESS_FAILURE
        - HAL_MMC_ERROR_RPMB_WRITE_FAILURE
        - HAL_MMC_ERROR_RPMB_READ_FAILURE
        - HAL_MMC_ERROR_RPMB_KEY_NOT_YET_PROG
        - HAL_MMC_ERROR_RPMB_COUNTER_EXPIRED
        - HAL_MMC_USER_AREA_PARTITION
        - HAL_MMC_BOOT_PARTITION1
        - HAL_MMC_BOOT_PARTITION2
        - HAL_MMC_RPMB_PARTITION
        - HAL_MMC_SwitchPartition
        - HAL_MMC_GetRPMBError
      - Add Replay Protected Memory Block management defines:
        - HAL_MMC_RPMB_ProgramAuthenticationKey
        - HAL_MMC_RPMB_ProgramAuthenticationKey_IT
        - HAL_MMC_RPMB_GetWriteCounter
        - HAL_MMC_RPMB_GetWriteCounter_IT
        - HAL_MMC_RPMB_WriteBlocks
        - HAL_MMC_RPMB_WriteBlocks_IT
        - HAL_MMC_RPMB_ReadBlocks
        - HAL_MMC_RPMB_ReadBlocks_IT
    - HAL USB driver
      - SA0035 fixed
  - LL drivers :
    - LL SDMMC driver
      - Add SDIO defines:
        - SDMMC_SDIO_R5_ERROR
        - SDMMC_SDIO_R5_OUT_OF_RANGE
        - SDMMC_SDIO_R5_INVALID_FUNCTION_NUMBER
        - SDMMC_SDIO_R5_GENERAL_UNKNOWN_ERROR
        - SDMMC_SDIO_R5_IO_CURRENT_STATE
        - SDMMC_SDIO_R5_ILLEGAL_CMD
        - SDMMC_SDIO_R5_COM_CRC_FAILED
        - SDMMC_SDIO_R5_ERRORBITS
        - SDMMC_SDIO_MODE_BYTE
        - SDMMC_SDIO_MODE_BLOCK
        - SDMMC_SDIO_NO_INC
        - SDMMC_SDIO_AUTO_INC
        - SDMMC_SDIO_WO
        - SDMMC_SDIO_RAW
      - Add SDIO SDMMC_SDIO_CCCR defines

Note: HAL/LL Backward compatibility ensured by legacy defines.

## Known Limitations

- None

## Backward compatibility

- No compatibility break

V1.4.0 / 30-October-2024

## Main Changes

- Maintenance Release V1.4.0 of HAL and LL drivers for STM32H573xx / STM32H563xx / STM32H562xx / STM32H503xx / STM32H523xx/ STM32H533xx devices
- The HAL and LL drivers provided within this package are MISRA-C, MCU ASTYLE and Coverity compliant, and have been reviewed with a static analysis tool to eliminate possible run-time errors

- General updates to fix known defects and implementation enhancements

  - HAL drivers :
    - HAL CRYP driver
      - Code quality enhancement MISRAC 2012 Rule-10.4
    - HAL DAC driver
      - HAL DAC calibration procedure (function HAL_DACEx_SelfCalibrate() ) fix to manage case of calibration factor equal to range maximum value (previously, in this case calibration factor was reset, leading to voltage accuracy not optimal)
    - HAL DMA_EX driver
      - Update CLLR register value
      - Remove duplicated assert checking
    - HAL FLASH driver
      - Update Flash driver to support 32 bits write operation in the EDATA area
    - HAL FLASH_EX driver
      - Add of HAL_FLASHEx_OBK_Swap_IT() function
    - HAL FMAC driver
      - Add action to abort, if configured, the DMAIn and/or the DMAOut in HAL_FMAC_FilterStop. This allows to reset the DMA State to READY
    - HAL GTZC driver
      - Updated HAL_GTZC_TZSC_MPCWM_ConfigMemAttributes() and HAL_GTZC_TZSC_MPCWM_GetConfigMemAttributes() for MPCWM3 and MPCWM4 to be aligned with the hardware specification
    - HAL LPTIM driver
      - Remove redundant IS_LPTIM_AUTORELOAD macro
    - HAL PKA driver
      - add check for MontgomeryParam not equal to null
    - HAL PWR driver
      - Add guidance for HAL_PWR_ConfigAttributes() API calls
    - HAL RCC driver
      - Fix incorrect HAL_RCCEx_GetPLLxClockFreq() when fractional part is enabled
      - Add g for HAL_RCC_ConfigAttributes() API calls
    - HAL RNG driver
      - Add HAL_RNG_ERROR_RECOVERSEED define
    - HAL RTC_EX driver
      - Add HAL_RTCEx_EnableRemapRtcOut2 and HAL_RTCEx_DisableRemapRtcOut2 defines
    - HAL SPI driver
      - Fix issue with HAL_SPI_Abort_IT in DMA mode to ensure DMA RX aborts after DMA TX
      - HAL code quality enhancement for MISRA-C2012 Rule-8.13
    - HAL UART driver
      - Fix DMA Rx abort procedure impact on ongoing Tx transfer in polling
    - HAL XSPI driver
      - Check BUSY flag instead of TC flag in indirect mode to be sure that command is well completed (FIFO flush)
  - LL drivers :
    - LL DMA driver
      - Fix in linked list node initialization
      - Add missing assert checking in some LL linked-list case
    - LL RCC driver
      - Add missing definition and processing of LL_RCC_USB_CLKSOURCE_PLL2Q
    - LL RTC driver
      - Add LL_RTC_EnableRemapRtcOut2 define
    - LL USB driver
      - Fix added to support bulk transfer in double buffer mode

Note: HAL/LL Backward compatibility ensured by legacy defines.

## Known Limitations

- None

## Backward compatibility

- No compatibility break

V1.3.0 / 05-June-2024

## Main Changes

- Maintenance release V1.3.0 of HAL and LL drivers for STM32H573xx / STM32H563xx / STM32H562xx / STM32H503xx / STM32H523xx/ STM32H533xx devices
- The HAL and LL drivers provided within this package are MISRA-C, MCU ASTYLE and Coverity compliant, and have been reviewed with a static analysis tool to eliminate possible run-time errors

- General updates to fix known defects and implementation enhancements

  - HAL drivers :
    - HAL I3C driver:
      - Add HAL_I3C_TARGET_RESET_PATTERN, HAL_I3C_HDR_EXIT_PATTERN, HAL_I3C_RESET_PATTERN_DISABLE, HAL_I3C_RESET_PATTERN_ENABLE and IS_I3C_RESET_PATTERN defines
      - Add HAL_I3C_Ctrl_SetConfigResetPattern, HAL_I3C_Ctrl_GetConfigResetPattern and HAL_I3C_Ctrl_GenerateArbitration functions
  - LL drivers :
    - LL RNG driver:
      - Add LL_RNG_SetNoiseConfig and LL_RNG_GetNoiseConfig functions
    - LL SYSTEM driver:
      - Remove LL_SBS_SMPS_SEC and LL_SBS_SMPS_NSEC defines
    - LL TIM driver:
      - Remove irrelevant LL_TIM_OCREF_CLR_INT_OCREF_CLR and TIM_CLEARINPUTSOURCE_OCREFCLR constants

Note: HAL/LL Backward compatibility ensured by legacy defines.

## Known Limitations

- None

## Backward compatibility

- No compatibility break

V1.2.0 / 07-February-2024

## Main Changes

- First offiicial release of HAL and LL drivers to support STM32H533xx and STM32H523xx devices

  - HAL drivers :
    - HAL GENERIC driver:
      - Update HAL_InitTick() API to manage multiple SysTick clock source (Ticket 167747).
    - HAL CORTEX driver:
      - Add new API HAL_SYSTICK_GetCLKSourceConfig() to get SysTick clock source.
      - Update HAL_SYSTICK_Config() API to manage multiple SysTick clock source (Ticket 167747).
    - HAL RCC driver:
      - Update HAL_RCC_NMI_IRQHandler() to clear flag before callback (Ticket 158329).
      - Correct RCC_PERIPHCLOCK_ALL define value for H5-512K.
    - HAL GPIO driver:
      - Add missing AFs in H5-512K : GPIO_AF2_TIM8, GPIO_AF4_SPI3 and GPIO_AF6_USART6.
    - HAL EXTI driver:
      - Correct EXTI_LINE_NB define for all H5 derivatives.
    - HAL ADC driver:
      - Add new Helper macro (__HAL_ADC_CALC_DIFF_DATA_TO_VOLTAGE()) for differential mode raw data to voltage conversion (Ticket 155612).
    - HAL DMA driver:
      - Add peripheral flow control check PFREQ (early termination) in HAL_DMA_Init() API.
    - HAL ETH driver:
      - Rename ETH_TxPacketConfig to ETH_TxPacketConfigTypeDef
      - Update ETH_Start_IT sequence (Ticket 154251)
      - Fix PTP APIs (Ticket 137427)
      - Add condition to get the TimeStamp only when it was captured (Ticket 157128)
      - Update ReadData() API to use real latest buffer length received instead of predefined ethernet frame length (Tickets 152028 & 157139)
      - Update HAL_ETH_SetMDIOClockRange API (Ticket 159046 & 157253)
      - Update HAL_ETH_IRQHandler API : Remove multiple volatile reads or writes (Ticket 111542)
      - Update HAL_ETH_Init() API : Disable of unwanted interrupts section moved from HAL_ETH_Start_IT() to HAL_ETH_Init() (Ticket 159576)
      - Update ETH_Prepare_Tx_Descriptors() API to avoid enabling unwanted global interrupts (Ticket 125056)
      - Update ETH_UpdateDescriptor() to avoid that ETH DMA peripheral reads incorrect Rx buffer address (Ticket 159272)
      - Update on MAC L4/L3 Set/Get Filter config functions to avoid code coverage issues
      - Update on HAL_ETH_ReleaseTxPacket() to use the right way to increment descriptors (Ticket 155726)
      - Rename PTP configuration state defines :
        - HAL_ETH_PTP_NOT_CONFIGURATED to HAL_ETH_PTP_NOT_CONFIGURED
        - HAL_ETH_PTP_CONFIGURATED to HAL_ETH_PTP_CONFIGURED
    - HAL FLASH driver:
      - Add ECC operations APIs:
        - HAL_FLASHEx_EnableEccCorrectionInterrupt()
        - HAL_FLASHEx_DisableEccCorrectionInterrupt()
        - HAL_FLASHEx_GetEccInfo()
        - HAL_FLASHEx_ECCD_IRQHandler()
        - HAL_FLASHEx_EccDetectionCallback()
        - HAL_FLASHEx_EccCorrectionCallback()
      - Update HAL_FLASH_IRQHandler() to handle ECC interrupt.
      - Correct OB_BOR_LEVEL_X defines values (Ticket 158618).
      - Add missing User OBs for USB power delivery configuration.
      - Update FLASH_OB_GetEDATA() API to give correct EDATASize (Ticket 167670)
    - HAL HCD driver:
      - Update HCD_HC_IN_IRQHandler() to Prevent auto start of periodic interrupt channel during NAK (Ticket 151335).
      - Fix in RX count formula in HCD_GET_CH_RX_CNT().
    - HAL I2C driver:
      - Fix HAL_I2C_Slave_Transmit returning HAL error when checking the NACK flag (Ticket 162945).
      - Move Prefetch process to function HAL_I2C_Slave_Transmit (Ticket 167073).
      - Fix Error management during HAL_I2C_Mem_Read polling process (Ticket 155722).
    - HAL I3C driver:
      - Add HAL_I3C_Get_ENTDAA_Payload_Info() API and macro to retrieve the different part of the ENTDAA payload:
      - Add private ISR functions to HAL to solve the “IBI or HJ or CR event notification can be lost” problem.
      - Fix Ticket 169111 - Undefined LL TypeDefs in stm32h5xx_util_i3c.h
    - HAL RAMCFG driver:
      - Update HAL_RAMCFG_EnableWriteProtection() to support H5-512K.
    - HAL RTC driver:
      - Remove useless RTC_ICSR_WUTWF bit polling inside HAL_RTCEx_DeactivateWakeUpTimer (Ticket 153540).
    - HAL SMBUS driver:
      - Fix TXDR flush when no error is occurred (Ticket 163156).
    - HAL SPI/I2S driver:
      - Fix misplaced HAL_UNLOCK in IT functions (Ticket 156258).
    - HAL TIM driver:
      - Add HSE divider control capability for TIM17 (Ticket 164073).
      - Remove irrelevant state management in DMA callbacks (Ticket 167896).
      - Fix typo in some macros (ASYMMETRIC instead of ASYMMETRIC) (Ticket 165438).
      - Add USB related ETR defines.
    - HAL UART driver:
      - Add support of H5-512K devices.
    - HAL USART driver:
      - Add support of H5-512K devices.
  - LL drivers :
    - LL CORTEX driver:
      - Replace LL_SYSTICK_CLKSOURCE_HCLK_DIV8 by LL_SYSTICK_CLKSOURCE_EXTERNAL define (Ticket 167747).
    - LL RCC Driver:
      - Update RCC_GetSystemClockFreq() and LL_RCC_GetPPPClockFreq() APIs with PPP = {UART, USART, SPI, I2C, I3C, LPUART, ADCDAC} to consider the HSI division(Ticket 161846).
    - LL BUS Driver:
      - Correct LL_APBx_PERIPH_ALL defines values for H5-512K.
    - LL UTILS Driver:
      - Add new APIs to manage multiple SysTick clock source (Ticket 167747) :
        - LL_Init1msTick_HCLK_Div8()
        - LL_Init1msTick_LSE()
        - LL_Init1msTick_LSI()
    - LL EXTI driver:
      - Update LL_EXTI_DeInit() with correct IMR2 reset value for H5-512K.
    - LL ADC driver:
      - Add new Helper macro (__LL_ADC_CALC_DIFF_DATA_TO_VOLTAGE()) for differential mode raw data to voltage conversion (Ticket 155612).
      - Update LL_ADC_DeInit() to resolve conflict with RM (Ticket 157398)
    - LL DMA driver:
      - Add peripheral flow control check PFREQ (early termination) in LL_DMA_Init() API.
    - LL I2C driver:
      - Update LL_I2C_HandleTransfer() to prevent writing to I2C_CR2 reserved bits (Ticket 160951)
    - LL TIM driver:
      - Add HSE divider control capability for TIM17 (Ticket 164073).
      - Fix typo in some macros (ASYMMETRIC instead of ASYMMETRIC) (Ticket 165438).

Note: HAL/LL Backward compatibility ensured by legacy defines.

## Known Limitations

- None

## Backward compatibility

- No compatibility break

V1.1.0 / 07-June-2023

## Main Changes

- Maintenance Release of HAL and LL drivers for STM32H573xx / STM32H563xx / STM32H562xx / STM32H503xx devices

  - HAL drivers :
    - HAL CRYP driver:
      - Add management of interleave mode with new APIs :
        - HAL_CRYP_SaveContext() and HAL_CRYP_RestoreContext().
        - Add CRYP_ContextTypeDef CRYP Context Structure.
    - HAL Generic driver:
      - [SBS] Add APIs for Debug Control:
        - HAL_SBS_OpenAccessPort()
        - HAL_SBS_OpenDebug()
        - HAL_SBS_ConfigDebugLevel() / HAL_SBS_GetDebugLevel()
        - HAL_SBS_LockDebugConfig()
        - HAL_SBS_ConfigDebugSecurity() / HAL_SBS_GetDebugSecurity()
    - HAL I2C driver:
      - Update I2C_ITMasterCplt() to fix issue related to TX IRQ not being disabled after data transfer.
      - Fix issue related to HAL_I2C_IsDeviceReady().
      - Fix issue related to switching from 10 bits to 7 bits addressing modes.
    - HAL I3C driver:
      - Fix arbitration header disabling when using HAL_I3C_AddDescToFrame() with successive options.
      - Add multiple transfer for Sensor Communication and Multiple CCC RX/TX command with the same interface.
      - Add Interface to check the availability of I2C or I3C device in the Bus.
    - HAL RTC Driver:
      - Update possible values of Active tamper RTC asynchronous prescaler clock selection field.
    - HAL SAI Driver:
      - Reorder the call to SAI_Disable() to fix issue in HAL SAI abort and DMA stop functions.
    - HAL TIMER driver:
      - Fix of issue related to channel being systematically disabled by HAL_TIM_OC_ConfigChannel() API.
      - Fix assert check in HAL_TIM_OC_Start_IT().
      - Enhance performance by removing multiple volatile reads or writes in interrupt handler.
  - LL drivers :
    - LL SYSTEM driver:
      - [SBS] Add APIs for Debug Control:
        - LL_SBS_SetAuthDbgHDPL() / LL_SBS_GetAuthDbgHDPL()
        - LL_SBS_SetAuthDbgSec() / LL_SBS_GetAuthDbgSec()
        - LL_SBS_UnlockDebug() / LL_SBS_IsUnlockedDebug()
        - LL_SBS_UnlockAccessPort() / LL_SBS_IsUnlockedAccessPort()
        - LL_SBS_LockDebugConfig() / LL_SBS_IsLockedDebugConfig()
    - LL RTC Driver:
      - Update possible values of Active tamper RTC asynchronous prescaler clock selection field.

## Known Limitations

- None

## Backward compatibility

- No compatibility break

V1.0.0 / 10-February-2023

## Main Changes

- First official release of HAL and LL drivers for STM32H573xx / STM32H563xx / STM32H562xx / STM32H503xx devices

## Known Limitations

- None

## Backward compatibility

- Not Applicable