Back to Release page
# Release Notes for STM32L1xx HAL Drivers Copyright 2017 STMicroelectronics
## Update History ### V1.3.1 / 25-August-2017 Main Changes Maintenance release Removed DATE and VERSION fields from header files. Updated CHM User Manual for Drivers/STM32L1xx_HAL_Driver. ### V1.3.0 / 21-April-2017 Main Changes Maintenance release to fix known defects. 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\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. ### V1.2.0 / 01-July-2016 Main Changes 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. L ist of HAL updates or corrections provided by this release: 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: r emove 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() ### V1.1.3 / 04-March-2016 Main Changes Maintenance release to fix known defects and enhancements implementation. 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. ### V1.1.2 / 09-October-2015 Main Changes Maintenance release to fix known defects and enhancements implementation. 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. ### V1.1.1 / 31-March-2015 Main Changes Include path changes for compilation under Unix environment. Update drivers to be C++ compliant. Interface Changes 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. PCD: HAL_PCD_ActiveRemoteWakeup renamed HAL_PCD_ActivateRemoteWakeup HAL_PCD_DeActiveRemoteWakeup renamed to HAL_PCD_DeActivateRemoteWakeup 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. ### V1.1.0 / 16-January-2015 Main Changes Add support of new STM32L1 eXtended devices - STM32l151xDX, STM32l152xDX & STM32l62xDX 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 & HAL_FLASHEx_Erase_IT as memory is not continuous between 2 banks, user should perform pages erase by bank only ### V1.0.0 / 05-September-2014 Main Changes First official release ## License Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. For complete documentation on STM32 Microcontrollers visit www.st.com/STM32