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:
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
Main Changes
Maintenance release
Patch release to to fix known defects and enhancements implementation.
Contents
HAL Generic update
Update HAL TimeBase TIM template for more robustness
Update Hal_Init_Tick() API to propoerty store the priority when using the non-default time base.
HAL/LL TIM update
Previous release note corrected by removing reference to ChannelNState.
Made TIM_DMADelayPulseCplt callback as a private function.
Update HAL_TIMEx_OnePulseN_Start and HAL_TIMEx_OnePulseN_Stop (pooling and IT mode) to take into consideration all OutputChannel parameters.
Update input capture measurement in DMA mode to avoid zero return values at high frequencies.
Update LL_TIM_GetCounterMode() API to return the correct counter mode.
Correct reversed description of TIM_LL_EC_ONEPULSEMODE One Pulse Mode.
HAL/LL SPI update
Update LL_SPI_TransmitData8() API to avoid casting the result to 8 bits.
Update to fix MISRA-C 2012 Rule-13.2.
HAL/LL USART update
Remove useless check on maximum BRR value by removing IS_LL_USART_BRR_MAX() macro.
HAL UART update
Correction on UART ReceptionType management in case of ReceptionToIdle API are called from RxEvent callback. Update UART polling and interruption processes to fix issues related to access out of user’s specified buffer. Fix wrong comment related to RX pin configuration within the description section. Enhance reception for idle services (ReceptionToIdle):
Add a new field (HAL_UART_RxTypeTypeDef) to the UART_HandleTypeDef structure to identify the type of ongoing reception.
Add UART Reception Event Callback registration.
Add reception specific APIs specific to reception for Idle transfer in different modes:
HAL_UARTEx_ReceiveToIdle(): Receive an amount of data in blocking mode until either the expected number of data is received or an IDLE event occurs.
HAL_UARTEx_ReceiveToIdle_IT(): Receive an amount of data in interrupt mode until either the expected number of data is received or an IDLE event occurs.
HAL_UARTEx_ReceiveToIdle_DMA(): Receive an amount of data in DMA mode until either the expected number of data is received or an IDLE event occurs.
Update HAL_UART_Receive(), HAL_UART_Receive_IT() and HAL_UART_Receive_DMA() APIs to support the new enhancement of ReceptionToIdle.
HAL SMARTCARD update
Fix typos in the SMARTCARD State definition description.
HAL IRDA update
Fix typos in the IRDA State definition description.
HAL RTC update
New APIs to subtract or add one hour to the calendar in one single operation without going through the initialization procedure (Daylight Saving):
HAL_RTC_DST_Add1Hour()
HAL_RTC_DST_Sub1Hour()
HAL_RTC_DST_SetStoreOperation()
HAL_RTC_DST_ClearStoreOperation()
HAL_RTC_DST_ReadStoreOperation()
DayLightSaving and StoreOperation interfaces from RTC_TimeTypeDef type and HAL_RTC_DAYLIGHT_SAVING_TIME_ADD1H() and HAL_RTC_DAYLIGHT_SAVING_TIME_SUB1H() macros are now deprecated.
Fix the wait for the RSF bit to be cleared in the LL_RTC_WaitForSynchro function.
Correct month management in IS_LL_RTC_MONTH() macro.
Update __HAL_RTC_…(__HANDLE__, …) macros to access registers through (__HANDLE__)->Instance pointer and avoid “unused variable” warnings.
LL FMC_LL update
Fix compilation warning with gcc -Wpedantic compiler option
HAL SDMMC update
Update the definition of SDMMC_DATATIMEOUT constant in order to allow the user to redefine it in his proper application.
SD_FindSCR() updated to resolve an issue with FIFO blocking when reading.
Update the definition of SDMMC_DATATIMEOUT constant in order to allow the user to redefine it in his proper application.
Add the block size settings in the initialization functions and remove it from read/write transactions to avoid repeated and inefficient reconfiguration.
Update read/write functions in DMA mode in order to force the DMA direction.
Deploy new functions MMC_ReadExtCSD() and SDMMC_CmdSendEXTCSD () that read and check the sectors number of the device in order to resolve the issue of wrongly reading big memory size.
HAL FLASH update
Update FLASH_SetErrorCode() to correctly handle the SIZERR flag.
HAL USB_FS update
HAL PCD: add fix transfer complete for IN Interrupt transaction in single buffer mode.
HAL OPAMP update
Fix CodeSonar error.
Update HAL_OPAMP_SelfCalibrate() API to avoid wrong configuration of trimming value “n” and “p”.
HAL I2C update
Update to avoid I2C interrupt in endless loop:
Update HAL_I2C_Master_Transmit_IT(), HAL_I2C_Master_Receive_IT(), HAL_I2C_Master_Transmit_DMA() and HAL_I2C_Master_Receive_DMA() APIs to unlock the I2C peripheral before generating the start.
Update the management of (hi2c->hdmatx!=NULL) & (hi2c->hdmarx!=NULL) check.
Update to prevent several calls of Start bit:
Update I2C_MemoryTransmit_TXE_BTF() API to increment EventCount.
Update to use the right macro to clear I2C ADDR flag inside I2C_Slave_ADDR() API as it’s indicated in the reference manual.
Update HAL_I2C_EV_IRQHandler() and I2C_MasterTransmit_BTF() APIs to fix an issue where the transfer of the first few bytes to an I2C memory fails.
HAL/LL ADC update
Update HAL_ADC_Stop_DMA() API to check if DMA state is Busy before calling HAL_DMA_Abort() API to avoid DMA internal error.
Update HAL ADC driver to add include of the LL ADC driver.
Update timeout mechanism to avoid false timeout detection in case of preemption.
Update LL_ADC_REG_Init() API to avoid enabling continuous mode and discontinuous mode simultaneously.
HAL WWDG update
Update HAL driver description.
HAL IWDG update
Update HAL_IWDG_Init() API in order to fix HAL_GetTick() timeout vulnerability issue.
Add LSI startup time in default IWDG timeout calculation (HAL_IWDG_DEFAULT_TIMEOUT).
HAL EXTI update
Update macros using LINE as a macro parameter to use EXTI_LINE instead to resolve parameter conflicts with standard C usage.
Update HAL_EXTI_GetConfigLine() API to set default configuration value of Trigger and GPIOSel before checking each corresponding registers.
Main Changes
Maintenance release
General updates to fix known defect.
Contents
HAL/LL I2C driver
Update to fix hardfault issue with HAL_I2C_Mem_Write_DMA() API:
Abort the right ongoing DMA transfer when memory write access request operation failed: fix typo “hdmarx” replaced by “hdmatx”
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
TIM_CHANNEL_STATE_SET
TIM_CHANNEL_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
Add a new element in the TIM_HandleTypeDef structure : ChannelState to manage TIM 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.
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
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:
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)
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