Release Notes for STM32CubeC0 HAL and LL drivers

Copyright ©  2022 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:

Update History

Main Changes

  • Official Release of STM32CubeC0 Firmware package supporting STM32C071xx devices
  • General updates to fix known defects and implementation enhancements

HAL Drivers updates

  • HAL generic driver:
    • Remove invalid HAL_SYSCFG_EnableIOAnalogSwitchBooster() and HAL_SYSCFG_DisableIOAnalogSwitchBooster() APIs
    • Rename __HAL_RCC_APB1_FORCE_RESET and __HAL_RCC_APB2_FORCE_RESET macros by __HAL_RCC_APB1_GRP1_FORCE_RESET and __HAL_RCC_APB1_GRP2_FORCE_RESET
    • Rename __HAL_RCC_APB1_RELEASE_RESET and __HAL_RCC_APB2_RELEASE_RESET macros by __HAL_RCC_APB1_GRP1_RELEASE_RESET and __HAL_RCC_APB1_GRP2_RELEASE_RESET
  • HAL ADC driver:
    • Update HAL_ADC_IRQHandler by adding checks on ADC Ready flag and End of Calibration flag
    • Add HAL_ADC_CalibrationCpltCallback() and HAL_ADC_ADCReadyCallback() APIs
    • Add ADC_FLAG_EOCAL ADC End of Calibration interrupt flag
  • HAL CORTEX driver:
    • Add HAL_MPU_EnableRegion() and HAL_MPU_DisableRegion() APIs
  • HAL FLASH driver:
    • Add OB_USER_HSE_NOT_REMAPPED and OB_USER_SECURE_MUXING_EN definitions
    • Update OB_USER_ALL definition
    • Add OB_HSE_NOT_REMAPPED_ENABLE and OB_HSE_NOT_REMAPPED_DISABLE FLASH Option Bytes User HSE REMAP enable/disable definitions
    • Add OB_SECURE_MUXING_ENABLE and OB_SECURE_MUXING_DISABLE Option Bytes User Multiple-bonding security enable/disable definitions
    • Update FLASH_PAGE_NB definition to compute the flash pages number based on the flash size
  • HAL I2C driver:
    • Update HAL_I2C_Slave_Transmit to check if the received NACK is the correct one
    • Update I2C_WaitOnRXNEFlagUntilTimeout to check I2C_FLAG_AF independently from I2C_FLAG_RXNE
    • Remove the unusable code in HAL_I2C_IsDeviceReady() API
    • Remove unused state defines HAL_I2C_STATE_TIMEOUT and HAL_I2C_STATE_ERROR in HAL_I2C_StateTypeDef
    • Update I2C_WaitOnFlagUntilTimeout to handle error case.
    • Update HAL_I2C_Master_Abort_IT to support memory abort transfer.
  • HAL I2S driver:
    • Update HAL I2S driver to fix misplaced __HAL_LOCK and remove ‘go to’ instruction
  • HAL SPI driver:
    • Update IT API to enable interrupts after process unlock
    • Update driver to keep state in case of error and set HAL_SPI_STATE_READY only in case of HAL_TIMEOUT
    • Update HAL_SPI_TransmitReceive API to set the bit CRCNEXT in case of one byte transaction
  • HAL SMBUS driver:
    • Update SMBUS_ITErrorHandler to flash TXDR only in case of error
    • Remove unused state defines HAL_SMBUS_STATE_TIMEOUT and HAL_SMBUS_STATE_ERROR in HAL_I2C_StateTypeDef
  • HAL RCC driver:
    • Update HAL_RCC_GetHCLKFreq() to Compute SystemCoreClock value
  • HAL RTC driver:
    • Remove RTC_FLAG_ITSF and RTC_CLEAR_ITSF to be aligned with reference manual
    • Remove meaningless __HAL_RTC_INTERNAL_TIMESTAMP_ENABLE, __HAL_RTC_INTERNAL_TIMESTAMP_DISABLE, __HAL_RTC_INTERNAL_TIMESTAMP_GET_FLAG and __HAL_RTC_INTERNAL_TIMESTAMP_CLEAR_FLAG macros
    • Update RTC_EXTI_LINE_TIMESTAMP_EVENT definition
    • Remove extra HAL_RTCEx_SetInternalTimeStamp() and HAL_RTCEx_DeactivateInternalTimeStamp() definitions
  • HAL TIM driver:
    • Add the possibility to configure the break inputs in bidirectional mode for lite timers
    • Added system break interrupt handling in IRQ handler
    • Update interrupt flag to be cleared when the update event is generated by software
    • Fixed some typos in code comments
    • Made HAL_TIMEx_OCN_Stop_IT and HAL_TIMEx_PWMN_Stop_IT more generic
    • Improved HAL_TIMEx_ConfigBreakDeadTime() function implementation
    • Improved CH4N support handling
    • Fix typo in PWM symmetric mode related constants names
  • HAL USART driver:
    • Fixed some typos in code comments
  • HAL UART driver:
    • Fixed some typos in code comments
    • Remove __HAL_LOCK() from HAL_xxx_RegisterCallback()/HAL_xxx_UnRegisterCallback()
    • Fix incorrect gState check in HAL_UART_RegisterRxEventCallback/HAL_UART_UnRegisterRxEventCallback to allow user Rx Event Callback registration when a transmit is ongoing
    • Update driver to avoid RTOF flag to be cleared by a transmit process in polling mode
    • Ensure UART Rx buffer is not written beyond boundaries in case of RX FIFO reception in Interrupt mode

LL Drivers updates

  • LL ADC driver:
    • Fixed some typos in code comments
  • LL DMA driver:
    • Add missing LL_DMAMUX_SYNC_DMAMUX_CH3, LL_DMAMUX_REQ_GEN_DMAMUX_CH3 and LL_DMAMUX_SYNC_TIM14_OC definitions
  • LL GPIO driver:
    • Update LL_GPIO_Init() to avoid causing quick switch to low level on the pins
  • LL RCC driver:
    • Remove meaningless RCC_PLL_GetFreqDomain_SYS(), RCC_PLL_GetFreqDomain_ADC() and RCC_PLL_GetFreqDomain_I2S1() APIs definitions
  • LL TIM driver:
    • Removed meaningless LL_TIM_ReArmBRK() and LL_TIM_ReArmBRK2() functions
    • Fixed some typos in code comments
    • Improve LL_TIM_BDTR_Init() implementation consistency
    • Configure complementary channels only when supported
    • Fix typo in PWM symmetric mode related constants names
    • Added LL_TIM_CC_IsEnabledPreload() API
  • LL I2C driver:
    • Update LL_I2C_HandleTranfer function to prevent undefined behavior of volatile usage before updating the CR2 register.
  • LL SYSTEM driver:
    • Correct LL_SYSCFG_IsActiveFlag_CLK_CTRL() and LL_SYSCFG_IsActiveFlag_WWDG() implementation
  • LL UTILS driver:
    • Remove IS_LL_UTILS_SYSCLK_DIV, IS_LL_UTILS_APB1_DIV, IS_LL_UTILS_HSI_DIV, IS_LL_UTILS_HSIKER_DIV IS_LL_UTILS_HSE_BYPASS and IS_LL_UTILS_HSE_FREQUENCY macros
    • Remove useless LL_UTILS_ClkInitTypeDef structure
    • Correct LL_UTILS_PACKAGETYPE naming
    • Remove UTILS_HSE_FREQUENCY_MIN and UTILS_HSE_FREQUENCY_MAX definitions

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

Known Limitations

  • None

Backward Compatibility

  • Not applicable

Main Changes

  • Maintenance Release of STM32CubeC0 Firmware Package

HAL/LL Drivers updates

  • HAL and LL drivers Maintenance Release for STM32C011xx / STM32C031xx devices

HAL Drivers updates

  • HAL RCC driver
    • Rename the following defines:
      • HSE_TIMEOUT_VALUE to RCC_HSE_TIMEOUT_VALUE
      • HSI_TIMEOUT_VALUE to RCC_HSI_TIMEOUT_VALUE
      • LSI_TIMEOUT_VALUE to RCC_LSI_TIMEOUT_VALUE
      • CLOCKSWITCH_TIMEOUT_VALUE to RCC_CLOCKSWITCH_TIMEOUT_VALUE
  • HAL RTC driver
    • Add __HAL_RTC_IS_CALENDAR_INITIALIZED macro
  • HAL TIM driver
    • Add __HAL_TIM_SELECT_CCDMAREQUEST macro
  • HAL UART driver
    • Add (HAL_UART_RxEventTypeTypeDef RxEventType) to the __UART_HandleTypeDef structure
    • Add following defines:
      • HAL_UART_RXEVENT_TC (Transfer Complete event)
      • HAL_UART_RXEVENT_HT (Half Transfer event)
      • HAL_UART_RXEVENT_IDLE (IDLE event)
    • Add HAL_UARTEx_GetRxEventType() API to provide Rx Event type (to be called within the user implementation of Rx Event Callback)
  • HAL driver
    • Update HAL_SYSCFG_SetPinBinding() to handle properly setting of a pin biding (w/o overwriting existing pins binding settings).
    • Update HAL_SYSCFG_GetPinBinding() to get a pin biding setting.

LL Drivers updates

  • LL SYSTEM driver
    • Add SYSTEM_LL_PINMUX_SOURCE following defines:
      • LL_PINMUX_SO8_PIN1, LL_PINMUX_SO8_PIN4, LL_PINMUX_SO8_PIN5, LL_PINMUX_SO8_PIN8, LL_PINMUX_WLCSP12_PINE2, LL_PINMUX_WLCSP12_PINF1 in case of device STM32C011xx device
      • LL_PINMUX_WLCSP14_PINF2, LL_PINMUX_WLCSP14_PING3, LL_PINMUX_WLCSP14_PINJ1, LL_PINMUX_WLCSP14_PINH2, LL_PINMUX_WLCSP14_PING1, LL_PINMUX_WLCSP14_PINJ3 in case of device STM32C031xx device
    • Update LL_SYSCFG_ConfigPinMux() and LL_SYSCFG_GetConfigPinMux() functions
    • LL_SYSCFG_ConfigPinMux() API updated to handle properly setting of a pin binding (w/o overwriting existing pins biding settings).
    • LL_SYSCFG_GetConfigPinMux() API updated to get a pin biding setting.

Known Limitations

N/A

Backward Compatibility

  • HAL_SYSCFG_GetPinBinding() and LL_SYSCFG_GetConfigPinMux() are updated.

Main Changes

  • Patch Release of STM32CubeC0 Firmware Package

  • Update ADC HAL driver with proper internal sensor calibration implementation:

    • Helper macro “__LL_ADC_CALC_TEMPERATURE()” is not available and macro “__LL_ADC_CALC_TEMPERATURE_TYP_PARAMS()” must be used.
  • Update RCC LL driver by adding missing AHB Prescaler.

Known Limitations

N/A

Main Changes

First official release of HAL and LL drivers for STM32C031xx / STM32C011xx devices

Known Limitations

N/A