Release Notes for STM32L1xx HAL Drivers

Copyright © 2017 STMicroelectronics

License

Licensed by ST under BSD 3-Clause license (the "License"). You may not use this package 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

Maintenance release

  • Patch release to fix issue in I2C HAL driver

Contents

  • HAL I2C driver
    • Update I2C_MasterReceiveRXNE() static API to avoid set the STOP bit again after the bit clearing by Hardware during the masking operation.
      • Add new API I2C_WaitOnSTOPRequestThroughIT() to wait for stop bit.

Main Changes

Maintenance release

  • Add new HAL EXTI driver
  • General updates to fix known defects and enhancements implementation

Contents

  • HAL driver
    • Enhance HAL_SetTickFreq() API robustness
      • Restore previous tick frequency when a wrong tick initialization occurs.
  • LL ADC driver
    • Fix ADC TEMPSENSOR/VREFINT calibration addresses
  • HAL/LL GPIO driver
    • Update HAL_GPIO_TogglePin() API to allow the toggling of many pins
    • Update GPIO initialization sequence to avoid unwanted pulse on GPIO Pin’s
  • HAL EXTI driver
    • Add new HAL_EXTI driver.
  • HAL FLASH driver
    • Fix assert compilation error with HAL_FLASHEx_DATAEEPROM_Erase() API.
  • HAL/LL I2C driver
    • Update HAL_I2C_ER_IRQHandler() API to fix acknowledge failure issue with I2C memory IT processes
      • Add stop condition generation when NACK occurs.
    • Update I2C_DMAXferCplt(), I2C_DMAError() and I2C_DMAAbort() APIs to fix hardfault issue when hdmatx and hdmarx parameters in i2c handle aren’t initialized (NULL pointer).
    • Update HAL_I2C_Init() API to force software reset before setting new I2C configuration
    • Update HAL I2C processes to report ErrorCode when wrong I2C start condition occurs
      • Add new ErrorCode define: HAL_I2C_WRONG_START
      • Set ErrorCode parameter in I2C handle to HAL_I2C_WRONG_START
    • Update sequential APIs to avoid requesting a START when a STOP condition is not fully treated
      • Wait the end of STOP treatment by polling (with a timeout) the STOP bit on Control register CR1
  • HAL/LL I2S driver
    • Update HAL_I2S_DMAStop() API to be more safe
      • Add a check on BSY, TXE and RXNE flags before disabling the I2S
    • Update HAL_I2S_DMAStop() API to fix multi-call transfer issue(to avoid re-initializing the I2S for the next transfer).
      • Add __HAL_I2SEXT_FLUSH_RX_DR() and __HAL_I2S_FLUSH_RX_DR() macros to flush the remaining data inside DR registers.
      • Add new ErrorCode define: HAL_I2S_ERROR_BUSY_LINE_RX
  • HAL IRDA driver
    • Update IRDA interruption handler to manage correctly the overrun interrupt
      • Add in the HAL_IRDA_IRQHandler() API a check on USART_CR1_RXNEIE bit when an overrun interrupt occurs.
  • HAL SMARTCARD driver
    • Update SMARTCARD interruption handler to manage correctly the overrun interrupt
      • Add in the HAL_SMARTCARD_IRQHandler() API a check on USART_CR1_RXNEIE bit when an overrun interrupt occurs.
    • Update SMARTCARD transmission and reception API to handle memory corruption
      • HAL_SMARTCARD_Transmit(), HAL_SMARTCARD_Receive()
      • SMARTCARD_Transmit_IT(), SMARTCARD_Receive_IT()
  • HAL/LL SPI driver
    • Update to implement Erratasheet: BSY bit may stay high at the end of a data transfer in Slave mode.
    • Update SPI_DMAReceiveCplt() API to handle efficiently the repeated transfers.
      • To avoid setting the BaudRatePrescaler in case of Slave Motorola Mode
      • Use the bit-mask for SPI configuration
    • Update Transmit/Receive processes in half-duplex mode
      • Disable the SPI instance before setting BDIOE bit
    • Fix wrong timeout management
      • Calculate Timeout based on a software loop to avoid blocking issue if Systick is disabled
  • HAL/LL TIM driver
    • Align HAL/LL TIM driver with latest updates and enhancements
    • Add new macros to enable and disable the fast mode when using the one pulse mode to output a waveform with a minimum delay
      • __HAL_TIM_ENABLE_OCxFAST() and __HAL_TIM_DISABLE_OCxFAST().
    • Update Encoder interface mode to keep TIM_CCER_CCxNP bits low
      • Add TIM_ENCODERINPUTPOLARITY_RISING and TIM_ENCODERINPUTPOLARITY_FALLING definitions to determine encoder input polarity.
      • Add IS_TIM_ENCODERINPUT_POLARITY() macro to check the encoder input polarity.
      • Update HAL_TIM_Encoder_Init() API
      • Replace IS_TIM_IC_POLARITY() macro by IS_TIM_ENCODERINPUT_POLARITY() macro.
    • Fix bug when using multiple DMA request to different channels of same timer
      • Introduce DMA burst state management mechanism
        • Add a new structure for DMA Burst States definition : HAL_TIM_DMABurstStateTypeDef
        • Update __HAL_TIM_RESET_HANDLE_STATE to support DMABurstState
        • Add a new API HAL_TIM_DMABurstState() to get the actual state of a DMA burst operation
        • Add DMABurstState, the DMA burst operation state, in the TIM_HandleTypeDef structure
        • Add new API TIM_DMAErrorCCxN() for TIM DMA error callback (complementary channel)
        • Add new API TIM_DMADelayPulseNCplt() for TIM DMA Delay Pulse complete callback (complementary channel)
    • Implement TIM channel state management mechanism
      • Add new macro
        • TIM_CHANNEL_STATE_SET_ALL and TIM_CHANNEL_N_STATE_SET_ALL
        • TIM_CHANNEL_STATE_SET and TIM_CHANNEL_N_STATE_SET
        • TIM_CHANNEL_STATE_GET and TIM_CHANNEL_N_STATE_GET
      • Add new API HAL_TIM_GetActiveChannel()
      • Add new API HAL_TIM_GetChannelState() to get actual state of the TIM channel
      • Add a new structure for TIM channel States definition : HAL_TIM_ChannelStateTypeDef
      • Update __HAL_TIM_RESET_HANDLE_STATE to support ChannelState and ChannelNState
      • Add a new element in the TIM_HandleTypeDef structure : ChannelState to manage TIM channel operation state
      • Add a new element in the TIM_HandleTypeDef structure : ChannelNState to manage TIM complementary channel operation state
    • Update HAL_TIMEx_MasterConfigSynchronization() API to avoid functional errors and assert fails when using some TIM instances as input trigger.
      • Replace IS_TIM_SYNCHRO_INSTANCE() macro by IS_TIM_MASTER_INSTANCE() macro.
      • Add IS_TIM_SLAVE_INSTANCE() macro to check on TIM_SMCR_MSM bit.
    • Remove ‘register’ storage class specifier from LL TIM driver.
    • Add new API HAL_TIM_DMABurst_MultiWriteStart() allowing to configure the DMA Burst to transfer multiple Data from the memory to the TIM peripheral
    • Add new API HAL_TIM_DMABurst_MultiReadStart() allowing to configure the DMA Burst to transfer Data from the TIM peripheral to the memory
  • HAL RCC driver
    • Fix extra parentheses compilation warnings with clang compiler
    • Update HAL_RCC_GetSysClockFreq() API to avoid the risk of rounding overflow.
  • HAL/LL UART driver
    • Update UART polling processes to handle efficiently the Lock mechanism
      • Move the process unlock at the top of the HAL_UART_Receive() and HAL_UART_Transmit() API.
    • Update UART interruption handler to manage correctly the overrun interrupt
      • Add in the HAL_UART_IRQHandler() API a check on USART_CR1_RXNEIE bit when an overrun interrupt occurs.
    • Update UART BRR calculation for ROM size gain
  • HAL/LL USART driver
    • Update some API description
      • HAL_USART_Transmit() / HAL_USART_Transmit_IT()
        • HAL_USART_Receive() / HAL_USART_Receive_IT()
        • HAL_USART_TransmitReceive() / HAL_USART_TransmitReceive_IT()
        • HAL_USART_Transmit_DMA() / HAL_USART_Receive_DMA() / HAL_USART_TransmitReceive_DMA()
    • Update USART interruption handler to manage correctly the overrun interrupt
      • Add in the HAL_USART_IRQHandler() API a check on USART_CR1_RXNEIE bit when an overrun interrupt occurs.
  • HAL/LL USB driver
    • Bug fix: USB_ReadPMA() and USB_WritePMA() by ensuring 16-bits access to USB PMA memory
    • Bug fix: correct USB RX count calculation
    • Fix USB Bulk transfer double buffer mode
    • Remove register keyword from USB defined macros as no more supported by C++ compiler
    • Minor rework on USBD_Start() and USBD_Stop() APIs: stopping device will be handled by HAL_PCD_DeInit() API.
  • LL UTILS driver
    • Add new LL API LL_SetFlashLatency() to set Flash latency.

Main Changes

Maintenance release

  • Add support of HAL callback registration feature
  • Add several enhancements implementation
  • Fix known defects to be aligned with others STM32 series

Contents

  • HAL/LL generic
    • Add support of HAL callback registration feature
    • The feature disabled by default is available for the following HAL drivers:
      • ADC, COMP, DAC, I2C, I2S, IRDA, LPTIM, PCD, RNG, RTC, SMARTCARD, SMBUS, SPI, TIM, TSC, UART, USART and WWDG
    • The feature may be enabled individually per HAL PPP driver by setting the corresponding definition USE_HAL_PPP_REGISTER_CALLBACKS to 1U in stm32l1xx_hal_conf.h project configuration file (template file stm32l1xx_hal_conf_template.h available from Drivers/STM32L1xx_HAL_Driver/Inc)
    • Once enabled, the user application may resort to HAL_PPP_RegisterCallback() to register specific callback function(s) and unregister it(them) with HAL_PPP_UnRegisterCallback().

    • Update HAL/LL Driver compliancy with MISRA C 2012 rules

    • stm32l1xx_hal_def.h
      • Update file to avoid compiler warnings from __packed definitions
      • Update UNUSED() macro to fix compilation warning with g++ compiler
      • Replace include stdio.h by stddef.h
      • Update __RAM_FUNC define to not impose function type
  • HAL driver
    • Add HAL_GetUIDw0(), HAL_GetUIDw1() and HAL_GetUIDw2() for 96-bit UID
    • Modify default HAL_Delay implementation to guarantee minimum delay
    • Update Doxygen tags in macros description to have generate correct CHM format
    • Update implementation of HAL_SetTickFreq() function
  • HAL ADC driver
    • Add callback registration feature
      • Add HAL_ADC_RegisterCallback() and HAL_ADC_UnRegisterCallback() APIs
      • Add callback identifiers in HAL_ADC_CallbackIDTypeDef enumerated typedef
    • Remove unused code in HAL_ADC_Stop_DMA() function.
  • HAL/LL COMP driver
    • Add callback registration feature
      • Add HAL_COMP_RegisterCallback() and HAL_COMP_UnRegisterCallback() APIs
      • Add callback identifiers in HAL_COMP_CallbackIDTypeDef enumerated typedef
    • Update define for COMP_NONINVERTINGINPUT_PA6
    • Update define for LL_COMP_INPUT_PLUS_IO11
    • Correct issue with input plus COMP1 in windowmode
    • Add missing LL function for COMP_CSR->VREFOUTEN bit
  • HAL CRC driver
    • Align HAL/LL CRC driver with latest updates and enhancements
    • Update CRC driver to remove not applicable InputDataFormat
  • HAL DAC driver
    • Align HAL/LL DAC driver with latest updates and enhancements
    • Add callback registration feature
      • Add HAL_DAC_RegisterCallback() and HAL_DAC_UnRegisterCallback() APIs
      • Add callback identifiers in HAL_DAC_CallbackIDTypeDef enumerated typedef
  • HAL/LL DMA driver
    • Align HAL/LL DMA drivers with latest updates and enhancements
    • Add missing APIs to register/unregister DMA callbacks
  • HAL FLASH driver
    • Update HAL_FLASH_Unlock() and HAL_FLASH_OB_Unlock() in order the functions do not return an error when already unlocked
    • Update HAL_FLASHEx_ProgramParallelHalfPage(), HAL_FLASHEx_HalfPageProgram(), HAL_FLASHEx_DATAEEPROM_EraseDoubleWord(), HAL_FLASHEx_DATAEEPROM_ProgramDoubleWord() so that the functions should not be restricted to privilege mode
    • Update FLASH_OB_GetRDP() function to return the correct RDP level
    • Update FLASH_OB_GetUser() and FLASH_OB_UserConfig() to use the combination of specific masks FLASH_OBR_IWDG_SW, FLASH_OBR_nRST_STOP and FLASH_OBR_nRST_STDBY
  • HAL GPIO driver
    • Update HAL_GPIO_DeInit() function to perform EXTI configuration reset before GPIO configuration
    • Improve robustness of HAL_GPIO_TogglePin() function
    • Update definition of IS_GPIO_PIN to remove compilation warning with IAR tool chain
    • Update usage description for HAL_GPIO_LockPin() to justify an unused read of a register
  • HAL/LL I2C driver
    • Align HAL/LL I2C driver with latest updates and enhancements
    • Add callback registration feature
      • Add HAL_I2C_RegisterCallback(), HAL_I2C_UnRegisterCallback(), HAL_I2C_RegisterAddrCallback() and HAL_I2C_UnRegisterAddrCallback() APIs
      • Add callback identifiers in HAL_I2C_CallbackIDTypeDef enumerated typedef
    • Add I2C_FIRST_AND_NEXT_FRAME for I2C Sequential transfer options: allow to manage a sequence with start condition, address and data to transfer without a final stop condition, an then permit a call to the same master sequential interface several times.
    • Add reset on slave LISTEN_TX state in case of direction change
    • Remove unused variable in HAL_I2C_Slave_Transmit_IT/DMA() and HAL_I2C_Slave_Receive_IT/DMA() functions to avoid warning compilation with linux tool chain
    • Add I2C slave enhancement with the functions: HAL_I2C_Master_Sequential_Transmit_DMA(), HAL_I2C_Master_Sequential_Receive_DMA(), HAL_I2C_Slave_Sequential_Transmit_DMA(), HAL_I2C_Slave_Sequential_Receive_DMA() functions
    • Update HAL_I2C_Master_Seq_Transmit_IT(DMA), HAL_I2C_Master_Seq_Receive_IT(DMA) functions.
      • Update comments about Device Address parameter (DevAddress) description in I2C functions header
      • Add restart condition for each call of HAL_I2C_Master_Seq_xxxx_IT
      • Fix MISRAC2012 issue
        • Renamed HAL_I2C_Master_Sequential_Transmit_IT(DMA) to HAL_I2C_Master_Seq_Transmit_IT(DMA)
        • Renamed HAL_I2C_Master_Sequential_Receive_IT(DMA) to HAL_I2C_Master_Seq_Receive_IT(DMA)
        • Renamed HAL_I2C_Slave_Sequential_Transmit_IT(DMA) to HAL_I2C_Slave_Seq_Transmit_IT(DMA)
        • Renamed HAL_I2C_Slave_Sequential_Receive_IT(DMA) to HAL_I2C_Slave_Seq_Receive_IT(DMA)
    • Update ErrorCode to correct wrong returned value after waiting until BUSY flag is reset
  • HAL I2S driver
    • Align HAL I2S driver with latest updates and enhancements
    • Add callback registration feature
      • Add HAL_I2S_RegisterCallback() and HAL_I2S_UnRegisterCallback() APIs
      • Add callback identifiers in HAL_I2S_CallbackIDTypeDef enumerated typedef
  • HAL IRDA driver
    • Align HAL IRDA driver with latest updates and enhancements
    • Add callback registration feature
      • Add HAL_IRDA_RegisterCallback() and HAL_IRDA_UnRegisterCallback() APIs
      • Add callback identifiers in HAL_IRDA_CallbackIDTypeDef enumerated typedef
    • Review IRDA state machine to avoid cases where IRDA state is overwritten by IRDA IRQ
    • Implement new APIs for HAL IRDA Abort management:
      • HAL_IRDA_Abort(), HAL_IRDA_AbortTransmit(), HAL_IRDA_AbortReceive(), HAL_IRDA_Abort_IT(), HAL_IRDA_AbortTransmit_IT(), HAL_IRDA_AbortReceive_IT()
    • Optimize WaitOnFlag management in IRDA_Transmit() function
    • Optimize all HAL IRQ Handler routines
    • Optimize HAL IRDA to avoid using macros as argument of function calls
  • HAL OPAMP driver
    • Align HAL OPAMP driver with latest updates and enhancements
    • Add callback registration feature
      • Add HAL_OPAMP_RegisterCallback() and HAL_OPAMP_UnRegisterCallback() APIs
      • Add callback identifiers in HAL_OPAMP_CallbackIDTypeDef enumerated typedef
  • HAL/LL RCC driver
    • Replace __HAL_RCC_CRYP_CLK_ENABLE by __HAL_RCC_AES_CLK_ENABLE
    • Change HAL_RCC_DeInit() to HAL_StatusTypeDef
    • Update HAL_RCC_DeInit() and LL_RCC_DeInit() to also clear interrupts and reset flags
    • Update HAL_RCC_DeInit() and LL_RCC_DeInit() to add check on PLLRDY before clearing PLLCFGR register
    • Update HAL_RCC_DeInit() to insure that default MSI range is set prior to enable MSI and use it as SYSCLK source
    • Update LL_RCC_DeInit() to add the key word volatile and avoid compilation issue with gcc -O3
    • Remove LSI_VALUE definition from stm32l1xx_hal_rcc_ex.h to have it declared in HAL Generic stm32l1xx_hal_conf_template.h/stm32l1xx_hal_conf.h as other families STM32 HAL drivers
    • Correct LSI_VALUE LL definition in stm32l1xx_ll_rcc.h
    • Update HAL_RCC_OscConfig() to avoid MCU hangs after some stop/wakeup cycles
    • Replace all calls to HAL_InitTick(TICK_INT_PRIORITY) with HAL_InitTick(uwTickPrio) to avoid Tick priority overwrite
    • Add new LL_RCC_PLL_SetMainSource macro to set the PLL source without enabling any PLL
  • HAL/LL RTC driver
    • Align HAL/LL RTC driver with latest updates and enhancements
    • Remove unused value in HAL_RTC_SetTime() function
    • Update implementation of LL_RTC_DATE_Get() function
    • Correct issue in the argument of LL_RTC_ALMB_SetDay() function
    • Add callback registration feature
      • Add HAL_RTC_RegisterCallback() and HAL_RTC_UnRegisterCallback() APIs
      • Add callback identifiers in HAL_RTC_CallbackIDTypeDef enumerated typedef
  • HAL SDMMC driver
    • Align HAL SDMMC driver with latest updates and enhancements
    • Due to limitation SDIO hardware flow control indicated in Errata Sheet :
      • In 4-bits bus wide mode, do not use the HAL_SD_WriteBlocks_IT() or HAL_SD_WriteBlocks() APIs otherwise underrun will occur and there is not possibility to activate the flow control
      • Use DMA mode when using 4-bits bus wide mode or decrease the frequency
    • Add callback registration feature
      • Add HAL_SD_RegisterCallback(),HAL_SD_UnRegisterCallback(), HAL_SD_RegisterTransceiverCallback() and HAL_SD_UnRegisterTransceiverCallback APIs
      • Add callback identifiers in HAL_SD_CallbackIDTypeDef enumerated typedef
  • HAL SMARTCARD driver
    • Align HAL SMARTCARD driver with latest updates and enhancements
    • Add callback registration feature
      • Add HAL_SMARTCARD_RegisterCallback() and HAL_SMARTCARD_UnRegisterCallback() APIs
      • Add callback identifiers in HAL_SMARTCARD_CallbackIDTypeDef enumerated typedef
    • Review SMARTCARD state machine to avoid cases where SMARTCARD state is overwritten by SMARTCARD IRQ
    • Implement new APIs for HAL SMARTCARD Abort management:
      • HAL_SMARTCARD_Abort(), HAL_SMARTCARD_AbortTransmit(), HAL_SMARTCARD_AbortReceive(), HAL_SMARTCARD_Abort_IT(), HAL_SMARTCARD_AbortTransmit_IT(), HAL_SMARTCARD_AbortReceive_IT()
    • Optimize WaitOnFlag management in SMARTCARD_Transmit() function
    • Optimize all HAL IRQ Handler routines
    • Optimize HAL SMARTCARD to avoid using macros as argument of function calls
  • HAL/LL SPI driver
    • Align HAL/LL SPI driver with latest updates and enhancements
    • Backward compatibility:
      • Remove stm32l1xx_hal_spi_ex.c/.h files and move the functions/definitions to stm32l1xx_hal_spi.c/.h
      • The user projects must be updated to remove stm32l1xx_hal_spi_ex.c/.h from files list
    • Fix issue in HAL_SPI_Transmit() and HAL_SPI_TransmitReceive() functions
    • Update HAL/LL SPI driver to manage TI mode not supported by all STM32L1xx devices
    • Add callback registration feature
      • Add HAL_SPI_RegisterCallback() and HAL_SPI_UnRegisterCallback() APIs
      • Add callback identifiers in HAL_SPI_CallbackIDTypeDef enumerated typedef
  • HAL/LL TIM driver
    • Align HAL/LL TIM driver with latest updates and enhancements
    • Add support of preload control in HAL TIM API
    • Remove TIM_CHANNEL_4 argument from description of HAL_TIMEx_OCN_xxx() and HAL_TIMEx_PWMN_xxxx() functions
    • Update comments in HAL/LL functions to describe how to switch from Center Aligned counter mode to Edge Aligned Down mode
    • Remove OCIdleState from TIM_OC_InitTypeDef and TIM_OnePulse_InitTypeDef
    • Update behavior of LL_TIM_EnableUpdateEvent() and LL_TIM_DisableUpdateEvent() functions
    • Add callback registration feature + Add HAL_TIM_RegisterCallback() and HAL_TIM_UnRegisterCallback() APIs + Add callback identifiers in HAL_TIM_CallbackIDTypeDef enumerated typedef
  • HAL UART/USART driver
    • Align HAL UART/USART driver with latest updates and enhancements
    • Add callback registration feature
      • Add HAL_UART/USART_RegisterCallback() and HAL_UART/USART_UnRegisterCallback() APIs
      • Add callback identifiers in HAL_UART/USART_CallbackIDTypeDef enumerated typedef
    • Add missing __IO in UART/USART_HandleTypeDef definition (for TxXferCount and RxXferCount)
    • Review UART/USART state machine to avoid cases where UART/USART state is overwritten by UART/USART IRQ
    • Implement new APIs for HAL UART/USART Abort management:
      • HAL_UART/USART_Abort(), HAL_UART/USART_AbortTransmit(), HAL_UART/USART_AbortReceive(), HAL_UART/USART_Abort_IT(), HAL_UART/USART_AbortTransmit_IT(), HAL_UART/USART_AbortReceive_IT()
    • Optimize WaitOnFlag management in UART/USART_Transmit() function
    • Optimize all HAL IRQ Handler routines
    • Align __HAL_UART_GET_IT and __HAL_UART_GET_IT_SOURCE with other series
    • Optimize HAL UART/USART to avoid using macros as argument of function calls
    • Update USART BRR calculation
  • HAL USB driver
    • Align HAL USB driver with latest updates and enhancements
    • Upgrade to USB Device Library v2.5.2
    • Fix issue with Buffer Overflow in PCD_ReadPMA() function
    • Add callback registration feature
      • Add HAL_PCD_RegisterCallback(),HAL_PCD_UnRegisterCallback(), HAL_PCD_RegisterDataOutStageCallback(), HAL_PCD_UnRegisterDataOutStageCallback(), HAL_PCD_RegisterDataInStageCallback(), HAL_PCD_UnRegisterDataInStageCallback(), HAL_PCD_RegisterIsoOutIncpltCallback(), HAL_PCD_UnRegisterIsoOutIncpltCallback(), HAL_PCD_RegisterIsoInIncpltCallback(), HAL_PCD_UnRegisterIsoInIncpltCallback(), HAL_PCD_RegisterBcdCallback(), HAL_PCD_UnRegisterBcdCallback(), HAL_PCD_RegisterLpmCallback() and HAL_PCD_UnRegisterLpmCallback() APIs
      • Add callback identifiers in HAL_PCD_CallbackIDTypeDef enumerated typedef
  • LL UTILS driver
    • Correct LL_GetUID_Word2 function to fix error in UID flash location
    • Fix mismatch return type in LL_GetPackageType(void)
  • HAL WWDG driver
    • Align HAL WWDG driver with latest updates and enhancements
    • Add callback registration feature
      • Add HAL_WWDG_RegisterCallback() and HAL_WWDG_UnRegisterCallback() APIs
      • Add callback identifiers in HAL_WWDG_CallbackIDTypeDef enumerated typedef

Main Changes

Patch release

Contents

  • HAL/LL generic
    • Remove DATE and VERSION fields from header files
    • Update CHM User Manual for Drivers/STM32L1xx_HAL_Driver

Main Changes

Maintenance release

Contents

  • HAL/LL generic
    • Enhanced HAL delay and time base implementation:
      • Added new templates stm32l1xx_hal_timebase_tim_template.c which can be used to override the native HAL time base functions (defined as weak) and to use Timer as time base tick source.
      • For more details about the usage of these drivers, please refer to HAL_TimeBase_TIM examples and FreeRTOS-based applications.
    • Updated HAL Driver compliancy with MISRA C 2004 rules:
      • MISRA C 2004 rule 10.3 (illegal explicit conversion from type “unsigned int” to "uint16_t *)
      • MISRA C 2004 rule 10.5 (if the bitwise operators ~ and << are applied to an operand of underlying type ‘unsigned char’ or ‘unsigned short’, the result shall be immediately cast to the underlying type of the operand)
      • MISRA C 2004 rule 11.4 (cast should not be performed between a pointer to object type and a different pointer to object type)
      • MISRA C 2004 rule 12.6 (logical operators should not be confused with bitwise operators)
      • MISRA C 2004 rule 12.7 (bitwise operations not performed on signed integer types)
      • MISRA C 2004 rule 14.3 (a null statement shall only occur on a line by itself)
    • Removed (uint32_t) cast when “U” is used in order to avoid double definitions.
    • Replaced hard coded POSITION definition in HAL/LL drivers by the associated PPP_xxx_pos CMSIS define.
  • HAL CORTEX
    • Updated HAL_MPU_Disable function to clear whole CR register.
  • LL DMA
    • Improved CPAR and CMAR registers access in LL_DMA_ConfigAddresses function.
  • HAL FLASH
    • Updated HAL_FLASHEx_Erase_IT() function to check the FLASH is ready before starting Erase by IT.
  • HAL/LL GPIO
    • Renamed GPIO_AFRL_AFRLx and GPIO_AFRL_AFRHx bit to GPIO_AFRL_AFSELx.
  • HAL/LL I2C
    • Added LL_I2C_DisableReset() function to allow the disable of SWRST.
  • HAL PCD
    • Corrected double buffer implementation in PCD_SET_EP_DBUF1_CNT() macro.
    • Added missing USB_CNTR_SOFM in the setting of wInterrupt_Mask global variable used in HAL_PCD_Init.
    • Removed lock/unlock from receive and transmit endpoints.
  • HAL/LL PWR
    • Replaced HAL_PWREx_GetVoltageRange() function by direct register access to remove dependency with HAL PWR.
    • Renamed the LL_PWR_IsActiveFlag_VOSF() API to LL_PWR_IsActiveFlag_VOS() in order to remove reference to PWR flag name and to refer to the Power feature.
  • HAL/LL RTC
    • Renamed RTC_CR_BCK bits in RTC_CR register to RTC_CR_BKP, to be aligned with others series.
  • HAL/LL SPI
    • Removed LL_SPI_SR_UDR define which is available only for I2S feature.
    • Updated LL_SPI_TransmitData16() et LL_SPI_TransmitData8 functions.
  • HAL/LL TIM
    • Corrected error in LL_TIM_EnableUpdateEvent() and LL_TIM_DisableUpdateEvent() functions.

Main Changes

Maintenance release

  • First official release supporting the Low Level drivers for the STM32L1xx family:
    • Low Layer drivers APIs provide register level programming: they require deep knowledge of peripherals described in STM32L1xx Reference Manual.
    • Low Layer drivers are available for: ADC, COMP, CORTEX, CRC, DAC, DMA, EXTI, GPIO, I2C, IWDG, OPAMP, PWR, RCC, RTC, SPI, TIM, USART, WWDG peripherals and additional Low Level Bus, System and Utilities APIs.
    • Low Layer drivers APIs are implemented as static inline function in new Inc/stm32l1xx_ll_ppp.h files for PPP peripherals, there is no configuration file and each stm32l1xx_ll_ppp.h file must be included in user code.

Contents

  • Generic updates
    • Update HAL drivers to apply MISRA C 2004 rule 10.6.
    • uwTick must be global and not static to allow overwrite of HAL_IncTick()
  • ADC
    • Clear the bit OVR (overrun) in addition to EOC (end of conversion) inside HAL_ADC_Start, HAL_ADC_Start_IT and HAL_ADC_Start_DMA.
  • CRC
    • HAL_CRC_DeInit() resets CRC_IDR register to reset value.
  • DMA
    • Add function HAL_StatusTypeDef HAL_DMA_Abort_IT(DMA_HandleTypeDef *hdma).
    • This function aborts the DMA Transfer in Interrupt mode.
    • Add macro __HAL_DMA_GET_COUNTER
    • This macro permits to get the number of remaining data units in the current DMAy Channelx transfer.
    • Global driver code optimization to reduce memory footprint
  • FLASH
    • Correct MISRA 10.3 Error[Pm069]: if identifiers are given for any of the parameters, then the identifiers used in the declaration and definition shall be identical (MISRA C 2004 rule 16.4).
  • GPIO
    • IS_GPIO_PIN is more robust.
  • I2C
    • WaitOnFlag is optimized to effectively last until the expected timeout of a transfer.
    • Optimisation of the IRQHandler.
    • Rework DMA end process and I2C error management during DMA transfer.
    • HAL_I2C_Master_Transmit_DMA now returns an error in case of communication error.
    • Add support for repeated start feature.
  • IWDG
    • New simplified HAL IWDG driver: remove HAL_IWDG_Start(), HAL_IWDG_MspInit() and HAL_IWDG_GetState() APIs
    • API functions are:
    • HAL_IWDG_Init(): this function insures the configuration and the start of the IWDG counter
    • HAL_IWDG_Refresh(): this function insures the reload of the IWDG counter
    • Refer to the following example to identify the changes: IWDG_Example
  • PWR
    • Add new interface HAL_FLASHEx_GetError.
    • Add constant FLASH_SIZE.
    • Use suffix U for all the defines.
    • HAL_PWREx_DisableLowPowerRunMode now returns HAL_StatusTypeDef instead of void.
    • SB and ADDR are now managed in interrupt mode, not in polling.
    • Add DMA abort treatment
  • RCC
    • Rework the correction from V1.1.3:
      • Backup domain are no more reseted when RTC clock source is changed from reset value.
  • RTC
    • Updated HAL_RTCEx_SetWakeUpTimer_IT() function by adding clear of Wake-Up flag before enabling the interrupt.
  • SPI
    • Correct MISRA 5.2 “tmpreg” variable shall not be used inside MACRO.
    • In the SPI_HandleTypeDef structure, RxXferCount and TxXferCount are now __IO.
    • Clear the OVR flag before a new transfer.
  • TIMER
    • Correct the description of the function HAL_TIM_PWM_Start_IT.
      • The parameter Channel mentions the channel to be enabled and not the one to be disabled.
  • WWDG
    • New simplified HAL WWDG driver: remove HAL_WWDG_Start(), HAL_WWDG_Start_IT(), HAL_WWDG_MspDeInit() and HAL_WWDG_GetState() APIs
      • Update HAL_WWDG_Refresh() API to remove counter parameter
      • New field EWIMode in WWDG_InitTypeDef to specify need for Early Wakeup Interrupt
      • API functions are: HAL_WWDG_Init(), HAL_WWDG_MspInit(), HAL_WWDG_Refresh(), HAL_WWDG_IRQHandler() and HAL_WWDG_EarlyWakeupCallback()

Main Changes

Maintenance release

Contents

  • Generic update
    • Update HAL weak empty callbacks to prevent unused argument compilation warnings with some compilers.
    • Improve the update of the SystemCoreClock variable within the HAL Driver.
    • Split aAPBAHBPrescTable into aAHBPrescTable and aAPBPrescTable.
    • Reduce HSE_STARTUP_TIMEOUT from 5s to 100ms.
    • Reduce MSI_TIMEOUT_VALUE from 100ms to 2ms.
    • Reduce HSI_TIMEOUT_VALUE from 100ms to 2ms.
    • Reduce LSI_TIMEOUT_VALUE from 100ms to 2ms.
    • Reduce PLL_TIMEOUT_VALUE from 100ms to 2ms.
  • CORTEX
    • __HAL_CORTEX_SYSTICKCLK_CONFIG is now deprecated. Prefer using HAL_SYSTICK_CLKSourceConfig function.
  • FLASH
    • Correct issue preventing Cat.1 devices to write data in EEPROM.
  • I2C
    • Add NACK management during wait on flag treatment.
    • Update the state machine.
    • It is now possible to use the I2C transmission with a data size of 0.
  • RCC
    • Optimize HAL_RCC_ClockConfig.
    • LSEON is reset only if required inside HAL_RCC_OscConfig.
    • RCC HSE pre-scaler reconfiguration for LCD/RTC peripherical is now possible.
    • Backup domain are no more reseted when RTC clock source is changed from reset value.
  • SMARTCARD
    • Update description of GuardTime and Prescaler fields in SMARTCARD_InitTypeDef structure.
  • UART
    • HAL_LIN_SendBreak() now use IS_UART_LIN_INSTANCE instead of IS_UART_INSTANCE.
    • Correct the UART_BRR_SAMPLING8 macro in the case of cary handling.

Main Changes

Maintenance release

Contents

  • ADC
    • The ADC internal macro “IS_ADC_RANGE” is modified to take into account the ADC resolution.
    • The function HAL_ADC_PollForEvent, in case of timeout, returns HAL_TIMEOUT instead of HAL_ERROR.
    • HAL_ADC_Init set the ADC handle in state HAL_ADC_ERROR_INTERNAL if the user try to initialize the ADC in DiscontinuousConvMode and ContinuousConvMode simultaneously, which is not possible.
    • Enhance the check for ScanConvMode in HAL_ADC_Init.
  • Cortex
    • Corrected Misra error (MISRA C 2004 rule 10.5).
  • CRC
    • Corrected the macro __HAL_CRC_SET_IDR.
  • GPIO
    • Corrected the macro GPIO_GET_INDEX.
    • To insure the same naming accross all STM32 families (F4, F2, F0, F1, L1 etc):
      • Replacing GPIO_SPEED_VERY_LOW by GPIO_SPEED_FREQ_LOW.
      • Replacing GPIO_SPEED_LOW by GPIO_SPEED_FREQ_MEDIUM.
      • Replacing GPIO_SPEED_MEDIUM by GPIO_SPEED_FREQ_HIGH.
      • Replacing GPIO_SPEED_HIGH by GPIO_SPEED_FREQ_VERY_HIGH.
  • IRDA
    • Corrected the HAL_IRDA_IRQHandler which was preventing to handle 2 simultaneous errors.
  • I2C
    • Corrected an issue where the STOP bit was not cleared after reading data depending on APB/I2C frequency.
  • I2S
    • HAL_I2S_Transmit() is updated to keep the check on busy flag only for the slave.
  • PCD
    • Corrected issue when using USB Device double-buffering mode for IN endpoints.
    • do{ … } while(0) is used for multi statement macros.
  • PWR
    • Corrected Misra error (MISRA C 2004 rule 14.3).
  • RCC
    • In HAL_RCCEx_PeriphCLKConfig, the reset of the backup domain occurs only if the RTC clock source has been changed.
    • __HAL_RCC_HSE_CONFIG is updated to remove the transition from RCC_HSE_ON to RCC_HSE_BYPASS.
    • Adding the macro __HAL_RCC_MCO1_CONFIG to configure the MCO clock.
    • Adding the macros and function to handle LSE CSS interrupt.
    • Corrected an error in HAL_RCC_GetSysClockFreq when the PLL is used as system clock. An incorrect sysclockfreq was returned.
  • RTC
    • RTC_TimeTypeDef.SecondFraction field is added to specifies the range or granularity of Sub Second register content.This field will be used only by HAL_RTC_GetTime function.
    • HAL_RTC_GetTime is updated to take into account the new field RTC_TimeTypeDef.SecondFraction.
    • Corrected error in __HAL_RTC_TAMPER_TIMESTAMP_EXTI_GET_FLAG macro.
    • Add additionnal checks on WUTWF flag in HAL_RTCEx_SetWakeUpTimer_IT.
    • do{ … } while(0) is used for multi statement macros.
  • USART
    • Corrected the HAL_USART_IRQHandler which was preventing to handle 2 simultaneous errors.
  • UART
    • Removed the activation of ERR IT from HAL_UART_Transmit_IT() which was leading to HAL_UART_IRQ_Handler wrong behavior.
    • Corrected the HAL_UART_IRQHandler which was preventing to handle 2 simultaneous errors.
  • SMARTCARD
    • Corrected the HAL_SMARTCARD_IRQHandler which was preventing to handle 2 simultaneous errors.

Main Changes

Maintenance release

  • Include path changes for compilation under Unix environment
  • Update drivers to be C++ compliant

Contents

  • CORTEX
    • Added interface to access MPU features (refer to stm32l1xx_hal_cortex.h)
  • CRYP
    • Added Instance field in CRYP_HandleTypeDef.
      • HAL CRYP driver updated to support multi instance, so user must ensure that the new parameter Instance is initialized in his application (CRYPHandle.Instance = CRYP)
  • FLASH
    • Changing field name of NOR_CFITypeDef (CFI1X changed to CFI1_X)
  • PCD
    • HAL_PCD_ActiveRemoteWakeup renamed HAL_PCD_ActivateRemoteWakeup
    • HAL_PCD_DeActiveRemoteWakeup renamed to HAL_PCD_DeActivateRemoteWakeup
  • PWR
    • HAL_PWR_PVDConfig renamed HAL_PWR_ConfigPVD
    • Added new interfaces:
      • void HAL_PWR_EnableSleepOnExit(void);
      • void HAL_PWR_DisableSleepOnExit(void);
      • void HAL_PWR_EnableSEVOnPend(void);
      • void HAL_PWR_DisableSEVOnPend(void);
      • void HAL_PWR_EnableSleepOnExit(void);
      • uint32_t HAL_PWREx_GetVoltageRange(void);
  • RCC
    • HAL_RCC_CCSCallback renamed to HAL_RCC_CSSCallback
    • Adding HAL_RCCEx_GetPeriphCLKFreq interface.
  • SMARTCARD
    • Removal of HAL_SMARTCARD_ReInit interface.
  • SPI
    • HAL_SPI_GetError now returns a uint32_t instead of HAL_SPI_ErrorTypeDef.
  • TIMER
    • Adding interface HAL_TIM_SlaveConfigSynchronization_IT
  • UART
    • The field ErrorCode of UART_HandleTypeDef is changed from HAL_UART_ErrorTypeDef to uint32_t.
  • USART
    • The field ErrorCode of UART_HandleTypeDef is changed from HAL_UART_ErrorTypeDef to uint32_t.

Main Changes

Maintenance release

  • Add support of new STM32L1 eXtended devices - STM32l151xDX, STM32l152xDX & STM32l62xDX

Contents

  • HAL generic
    • Add eXtended Devices switchs when needed
      • STM32L151xDX has same features than STM32L151xE
      • STM32L152xDX has same features than STM32L152xE
      • STM32L162xDX has same features than STM32L162xE
  • HAL FLASH
    • Add support of new STM32L1 Devices (same as other HAL)
    • stm32l1xx_hal_flash_ex.c : Specific treatment done in HAL_FLASHEx_Erase and HAL_FLASHEx_Erase_IT as memory is not continuous between 2 banks, user should perform pages erase by bank only

Main Changes

First official release