# Release Notes for STM32F1xx HAL Drivers

Copyright © 2016 STMicroelectronics

# Purpose

The STM32Cube HAL and LL, an STM32 abstraction layer embedded software, ensure maximized portability across STM32 portfolio.

The portable APIs layer provides a generic, multi instanced and simple set of APIs to interact with the upper layer (application, libraries and stacks). It is composed of native and extended APIs set. It is directly built around a generic architecture and allows the build-upon layers, like the middleware layer, to implement its functions without knowing in-depth the used STM32 device. This improves the library code reusability and guarantees an easy portability on other devices and STM32 families.

The Low Layer (LL) drivers are part of the STM32Cube firmware HAL that provides a basic set of optimized and one shot services. The Low layer drivers, contrary to the HAL ones are not fully portable across the STM32 families; the availability of some functions depends on the physical availability of the relative features on the product. The Low Layer (LL) drivers are designed to offer the following features:

- New set of inline functions for direct and atomic register access
- One-shot operations that can be used by the HAL drivers or from application level
- Full independence from HAL and standalone usage (without HAL drivers)
- Full features coverage of all the supported peripherals

# Update History

V1.1.10 / 22-July-2024

## Main Changes

- General updates to fix known defects and enhancements implementation.

## Contents

- HAL updates
  - HAL code quality enhancement for MISRA-C Rule-8.13 by adding const qualifiers.
- LL/HAL CORTEX driver
  - Update HAL_MPU_ConfigRegion() to allow the configuration of the MPU registers independently of the value of Enable/Disable field.
  - Add new APIs HAL_MPU_EnableRegion() / HAL_MPU_DisableRegion().
- HAL FLASH driver
  - Remove HAL_LOCK/HAL_UNLOCK() from HAL_FLASH_Program_IT() and HAL_FLASHEx_Erase_IT() APIs.
- HAL GPIO driver
  - Replace GPIO_Pin_x with GPIO_PIN_x to be compliant with macros definition.
- HAL CAN driver
  - Clarify pin configuration in driver header by removing open-drain information.
- HAL I2C driver
  - Update HAL_I2C_Mem_Read() API to clear ACK bit once 3 bytes to read remain to be able to send the NACK once the transfer ends.
  - Update HAL_I2C_Master_Abort_IT() API to support memory abort transfer.
  - Update the HAL I2C driver to reset PreviousState to I2C_STATE_NONE at the end of transfer.
- HAL SDMMC driver
  - Update HAL SD processes to manage STBITERR flag.
- HAL SPI driver
  - Update HAL_SPI_TransmitReceive() API to set the bit CRCNEXT in case of one byte transaction
  - Update IT APIs to enable interrupts after process unlock.
  - Add wait on flag TXE to be set at the end of transaction to be aligned with reference manual.
- HAL I2S driver
  - Update HAL I2S driver to fix misplaced __HAL_LOCK() and remove ‘go to’ instruction.
- LL/HAL TIM driver
  - Improve performance by removing multiple volatile reads or writes in interrupt handler.
  - HAL TIM driver’s operational behavior improvement.
  - Improve period configuration parameter check.
  - Update interrupt flag is cleared when the update event is generated by software.
  - Remove unnecessary change of MOE bitfield in LL_TIM_BDTR_Init().
  - Add LL_TIM_CC_IsEnabledPreload() API.
- HAL UART driver
  - Avoid ORE flag to be cleared by a transmit process in polling mode.
  - Rework of UART_WaitOnFlagUntilTimeout() API to avoid being stuck forever when UART overrun error occurs and to enhance behavior.
- HAL USB_OTG driver
  - Fix device connection in case battery charging is used with HS instance linked to internal FS PHY.
  - ll_usb.c: increase timeout value to allow core reset to complete
  - ll_usb.c: improve delay management to set core mode
- LL UTILS driver
  - Fix ‘Ticks’ parameter’s description of LL_InitTick() API.

V1.1.9 / 07-April-2023

## Main Changes

- General updates to fix known defects and enhancements implementation.
- HAL code quality enhancement for MISRA-C Rule-8.13 by adding const qualifiers.
- All source files: update disclaimer to add reference to the new license agreement.

## Contents

- HAL Generic driver
  - Allow redefinition of macro UNUSED(x).
- HAL EXTI driver
  - Fix computation of pExtiConfig->GPIOSel in HAL_EXTI_GetConfigLine().
- HAL GPIO driver
  - Reorder EXTI configuration sequence in order to avoid unexpected level detection.
- HAL RCC driver
  - Add ‘static’ storage-class specifier to ‘const’ arrays.
  - update macro __HAL_RCC_APB1_FORCE_RESET definition.
- HAL DMA driver
  - Add volatile qualifier to member ‘State’ of DMA_HandleTypeDef structure to prevent any issue when optimization is enabled.
- HAL CEC driver
  - Better performance by removing multiple volatile reads or writes in interrupt handler.
- HAL ADC driver
  - Remove multiple volatile reads or writes in interrupt handler for better performance.
  - Fix HAL_ADCEx_Calibration_Start() in power-on state (ADON bit = ‘1’) for at least two ADC clock cycles.
- HAL DAC driver
  - Fix incorrect word ‘surcharged’ in functions headers.
- HAL/LL TIM driver
  - Manage configuration of the Capture/compare DMA request source:
  - Add related new exported constants (TIM_CCDMAREQUEST_CC, TIM_CCDMAREQUEST_UPDATE).
  - Create a new macro __HAL_TIM_SELECT_CCDMAREQUEST() allowing to program the TIMx_CR2.CCDS bitfield.
  - Update __LL_TIM_CALC_PSC() macro to round up the evaluated value when the fractional part of the division is greater than 0.5.
  - Improved driver robustness against wrong period values.
  - Improved driver robustness against wrong DMA related parameters.
  - Improved period configuration parameter check.
  - Removed lock management from callback management functions.
- HAL RTC driver
  - In HAL_RTC_Init(), use WRITE_REG() instead of MODIFY_REG() to handle PRLL and PRLH write-only registers.
- HAL SPI driver
  - Fix driver to don’t update state in case of error. (HAL_SPI_STATE_READY will be set only in case of HAL_TIMEOUT).
- HAL I2C driver
  - Update HAL_I2C_Mem_Write_DMA() and HAL_I2C_Mem_Read_DMA() APIs to add initialization of Devaddress, Memaddress and EventCount parameters.
  - Update I2C_MasterReceive_RXNE() process to safely manage data N=2 and N=3, Disable BUF interrupt if nothing to do.
  - Update HAL_I2C_Master_Transmit_IT to return HAL_BUSY instead of HAL_ERROR when timeout occur and I2C_FLAG_BUSY is SET.
  - Duplicate the test condition after timeout detection to avoid false timeout detection.
- HAL/LL USART driver
  - Handling of UART concurrent register access in case of race condition between Tx and Rx transfers.
  - Improve header description of USART_WaitOnFlagUntilTimeout() function.
  - Add a check on the USART parity before enabling the parity error interrupt.
  - Remove __HAL_LOCK() from HAL_xxx_RegisterCallback()/HAL_xxx_UnRegisterCallback().
- HAL UART driver
  - Handling of UART concurrent register access in case of race condition between Tx and Rx transfers.
  - Improve header description of UART_WaitOnFlagUntilTimeout() function.
  - Add a check on the UART parity before enabling the parity error interruption.
  - Fix typo in UART_IT_TXE bit description.
  - Add a new API HAL_UARTEx_GetRxEventType that could be used to retrieve the type of event that has led the RxEventCallback execution.
  - Removal of HAL_LOCK/HAL_UNLOCK calls in HAL UART Tx and Rx APIs.
  - Remove __HAL_LOCK() from HAL_xxx_RegisterCallback()/HAL_xxx_UnRegisterCallback().
- HAL SMARTCARD driver
  - Improve header description of SMARTCARD_WaitOnFlagUntilTimeout() function.
  - Remove __HAL_LOCK() from HAL_xxx_RegisterCallback()/HAL_xxx_UnRegisterCallback().
- HAL IRDA driver
  - Improve header description of IRDA_WaitOnFlagUntilTimeout() function.
  - Add a check on the IRDA parity before enabling the parity error interrupt.
  - Remove __HAL_LOCK() from HAL_xxx_RegisterCallback()/HAL_xxx_UnRegisterCallback().
- HAL SDMMC driver
  - Take in account the voltage range in the CMD1 command.
  - Add new LL function to have correct response for MMC driver.
  - Update the driver to have all fields correctly initialized.
  - Add a internal to manage the power class and call it before to update speed of bus width.
  - Add new API to get the value of the Extended CSD register and populate the ExtCSD field of the MMC handle.
- HAL CAN driver
  - Removal of never reached code.
  - Improve protection against bad inputs.
- HAL NOR driver
  - Enable write operations before effective write to NOR memory in HAL_NOR_Init() function to avoid HardFault.
  - FMC_WRITE_OPERATION_DISABLE for NOR cause Hardfault for Read operations.
- HAL/LL USB driver
  - PCD: add handling of USB OUT Endpoint disable interrupt.
  - PCD: fix device IN endpoint isoc incomplete transfer interrupt handling.
  - PCD: fix USB device Isoc OUT Endpoint incomplete transfer interrupt handling.
  - Fix handling of ODDFRM bit in OTG_HCCHARx for isochronous IN transactions.
  - Fix received data length counting when DMA is enabled.
  - Fix added to USB_ClearInterrupts() and USB_HC_Halt() APIs.
  - Remove useless software setting to setup the frame interval at 80%.
  - PCD: add supporting multi packets transfer on Interrupt endpoint.
  - PCD: software correction added to avoid unexpected STALL condition during EP0 multi packet OUT transfer.
  - PCD: add a mask for USB RX bytes count.
  - Add new HAL_PCD_EP_Abort() API to abort current USB endpoint transfer.

V1.1.8 / 18-May-2021

## Main Changes

- General updates to fix known defects.

## Contents

- HAL/LL ADC driver
  - Update LL_ADC_DeInit() API to clear missing SQR3 register.
  - Update HAL ADC driver to add include of the LL ADC driver.
  - Update timeout mechanism to avoid false timeout detection in case of preemption.
- HAL EXTI driver
  - Update macros using LINE as a macro parameter in order to use EXTI_LINE instead to resolve parameter conflicts with standard C usage.
- LL GPIO driver
  - Update LL_GPIO_Init() API to configure the Pin Pull only in INPUT mode.
- HAL/LL RTC driver
  - Correct values assigned to macros LL_RTC_BKP_DR11 to LL_RTC_BKP_DR42 to be inline with actual registers mapping.
  - Update APIs LL_RTC_TIME_Init() and LL_RTC_ALARM_Init() to correctly check the RTC_Format (BIN or BCD).
  - Fix flag clearing operation for HAL_RTC_ALARM_CLEAR_FLAG and HAL_RTC_SECOND_CLEAR_FLAG macros.
- HAL/LL TIM driver
  - 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 driver
  - Update LL_SPI_TransmitData8() API to avoid casting the result to 8 bits. Update to fix MISRA-C 2012 Rule-13.2.
- HAL/LL I2C driver
  - 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.
- HAL NAND driver
  - Update functions HAL_NAND_Read_SpareArea_16b() and HAL_NAND_Write_SpareArea_16b() to fix column address calculation issue
  - Update implementation of “HAL_NAND_Write_Page_16b” and “HAL_NAND_Read_Page_16b” APIs implementation to fix an issue with the page calculation of 8 bits memories
- LL USART driver
  - Remove useless check on maximum BRR value by removing IS_LL_USART_BRR_MAX() macro.
- HAL UART driver
  - 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.
  - Fixe wrong comment related to RX pin configuration within the description section. Correction on UART ReceptionType management in case of ReceptionToIdle API are called from RxEvent callback.
- HAL SMARTCARD driver
  - Fix typos in the SMARTCARD State definition description.
- HAL IRDA driver
  - Fix typos in the IRDA State definition description.
- LL TIM driver
  - Update LL_TIM_GetCounterMode() API to return the correct counter mode.
  - Correct reversed description of TIM_LL_EC_ONEPULSEMODE One Pulse Mode.
- HAL CAN driver
  - Update HAL_CAN_Init() API to be aligned with reference manual and to avoid timeout error:
  - Update CAN Initialization sequence to set “request initialization” bit before exit from sleep mode.
- LL UTILS driver
  - Add a new LL_PLL_ConfigSystemClock_PLL2() API to configure system clock with HSE as clock source of the PLL, via PLL2.
- HAL IWDG driver
  - 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).
- LL FMC driver
  - Fix compilation warning with gcc -Wpedantic compiler option.
- HAL SDMMC driver
  - 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 USB driver
  - HAL PCD: add fix transfer complete for IN Interrupt transaction in single buffer mode.
  - Race condition in USB PCD control endpoint receive ISR.

V1.1.7 / 20-October-2020

## Main Changes

- General updates to fix known defects.

## 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”
- HAL/LL GPIO driver
  - Update LL_GPIO_Init() API to configure correctly the GPIO speed parameter when GPIO alternate function mode is selected.

V1.1.6 / 07-September-2020

## Main Changes

- General updates to fix known defects and enhancements implementation

## Contents

- HAL/LL ADC driver
  - 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 LL_ADC_REG_Init() API to avoid enabling continuous mode and discontinuous mode simultaneously.
- HAL/LL GPIO driver
  - Update HAL_GPIO_TogglePin() API to allow multi Pin’s toggling.
  - Update LL_GPIO_TogglePin() API to improve robustness: use BSRR register instead of ODR register.
  - Update LL GPIO initialization sequence to avoid unwanted pulse on GPIO Pin’s
- 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
- HAL/LL SPI driver
  - Update SPI_DMAReceiveCplt() API to handle efficiently the repeated transfers.
    - Disable TX DMA request only in bidirectional receive mode
  - Update HAL_SPI_Init() API
    - 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 NOR driver
  - Update address calculation in HAL_NOR_ProgramBuffer()
  - Apply adequate commands according to the command set field value
    - command set 1 for Micron JS28F512P33
    - command set 2 for Micron M29W128G and Cypress S29GL128P
  - Add new commands operations:
    - NOR_CMD_READ_ARRAY
    - NOR_CMD_WORD_PROGRAM
    - NOR_CMD_BUFFERED_PROGRAM
    - NOR_CMD_CONFIRM
    - NOR_CMD_BLOCK_ERASE
    - NOR_CMD_BLOCK_UNLOCK
    - NOR_CMD_READ_STATUS_REG
    - NOR_CMD_CLEAR_STATUS_REG
  - Update some APIs in order to be compliant for memories with another command set.
    - HAL_NOR_Init()
    - HAL_NOR_Read_ID()
    - HAL_NOR_ReturnToReadMode()
    - HAL_NOR_Read()
    - HAL_NOR_Program()
    - HAL_NOR_ReadBuffer()
    - HAL_NOR_ProgramBuffer()
    - HAL_NOR_Erase_Block()
    - HAL_NOR_Erase_Chip()
    - HAL_NOR_GetStatus()
- HAL SRAM driver
  - General update to enhance HAL SRAM driver robustness
    - Update HAL_SRAM_Init() API to avoid activation of burst access for SRAM
- HAL FSMC driver
  - Update FSMC_NORSRAM_Init() API in order to resolve compilation issue with MS Visual 2017
  - Update FSMC_NORSRAM_Extended_Timing_Init() API in order to manage Bus turnaround phase duration FSMC_BWTR1_BUSTURN availability.
- LL UTILS driver
  - UTILS_SetFlashLatency() API renamed to LL_SetFlashLatency() and set exportable.
- HAL/LL IWDG driver
  - Update HAL_IWDG_DEFAULT_TIMEOUT define value to consider LSI value instead of hardcoded value.
- HAL/LL TIM driver
  - Align HAL/LL TIM driver with latest updates and enhancements
  - 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/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 polling and interruption processes to fix issues related to accesses out of user specified buffer.
    - Update UART_Transmit_IT(), UART_Receive_IT(), HAL_UART_Transmit() and HAL_UART_Receive() APIs.
  - 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 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 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(), HAL_SMARTCARD_Transmit_IT() and HAL_SMARTCARD_Receive_IT()

V1.1.5 / 30-July-2020

## Main Changes

- 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.
- HAL/LL I2C update
  - 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).
    - Add additional check on hi2c->hdmtx and hi2c->hdmarx before resetting DMA Tx/Rx complete callbacks
  - Update HAL_I2C_ER_IRQHandler() API to fix acknowledge failure issue with I2C memory IT processes
    - Add stop condition generation when NACK occursHAL SMBUS
  - 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
  - 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.
- 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.
  - Remove non used API for USB device mode.

V1.1.4 / 26-June-2019

## Main Changes

- General updates to fix known defects and enhancements implementation
- Add support of HAL callback registration feature
- Add new HAL EXTI driver
- General updates to fix CodeSonar compilation warnings
- General updates to fix the user manual .chm files
- The following changes done on the HAL drivers require an update on the application code based on older HAL versions
  - HAL/LL Generic update
    - Add support of HAL callback registration feature
      - The feature disabled by default is available for the following HAL drivers:
        - ADC, CEC, CAN, DAC, ETH, HCD, UART, USART, IRDA, SMARTCARD,
        - MMC, NAND, NOR, PCCARD, PCD, RTC, SD, SRAM, SPI, I2S, TIM 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 stm32f1xx_hal_conf.h project configuration file (template file stm32f1xx_hal_conf_template.h available from Drivers/STM32F1xx_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()
- HAL/LL Generic update
  - General updates to fix MISRA 2012 compilation errors
    - “stdio.h” include updated with “stddef.h”
  - Add HAL_GetUIDw0(), HAL_GetUIDw1() and HAL_GetUIDw2() API in order to returns the unique device identifier
- HAL CAN update
  - Update HAL_CAN_GetRxMessage() API to correct the remote CAN transmission request.
- HAL CEC update
  - Update HAL CEC State management method:
    - Remove HAL_CEC_StateTypeDef structure parameters
    - Add new defines for CEC states
- HAL CRC update
  - Update HAL_CRC_DeInit() API to be more safe
  - Remove lock mechanism on the followings API’s:
    - HAL_CRC_Accumulate()
    - HAL_CRC_Calculate()
- HAL DAC update
  - General updates for more efficiency implementation
  - Update HAL_DAC_IRQHandler() to manage DAC Under-run error only once DAC DMAUDR interrupt is enabled
- HAL GPIO update
  - HAL_GPIO_TogglePin() API implementation update: to improve robustness
  - HAL_GPIO_DeInit() API update to ensure clear all GPIO EXTI pending interrupts.
- 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 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 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 SDMMC update
  - 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 SPI update
  - Align HAL/LL SPI driver with latest updates and enhancements
  - Fix issue in HAL_SPI_Transmit() and HAL_SPI_TransmitReceive() functions
  - Add SPI Abort transfer API’s:
    - HAL_SPI_Abort()
    - HAL_SPI_Abort_IT()
  - Update HAL/LL SPI driver to manage TI mode not supported by all STM32F1xx devices
  - Add callback registration feature
    - Add HAL_SPI_RegisterCallback() and HAL_SPI_UnRegisterCallback() APIs
    - Add callback identifiers in HAL_SPI_CallbackIDTypeDef enumerated typedef
- HAL I2S update
  - 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/LL TIM update
  - Move the following TIM structures from stm32f1xx_hal_tim_ex.h into stm32f1xx_hal_tim.h
    - TIM_MasterConfigTypeDef()
    - TIM_BreakDeadTimeConfigTypeDef()
  - Add new TIM Callbacks API’s:
    - HAL_TIM_PeriodElapsedHalfCpltCallback()
    - HAL_TIM_IC_CaptureHalfCpltCallback()
    - HAL_TIM_PWM_PulseFinishedHalfCpltCallback()
    - HAL_TIM_TriggerHalfCpltCallback()
  - TIM API changes for MISRA-C 2012 compliance:
    - Rename HAL_TIM_SlaveConfigSynchronization to HAL_TIM_SlaveConfigSynchro
    - Rename HAL_TIM_SlaveConfigSynchronization_IT to HAL_TIM_SlaveConfigSynchro_IT
    - Rename HAL_TIMEx_ConfigCommutationEvent to HAL_TIMEx_ConfigCommutEvent
    - Rename HAL_TIMEx_ConfigCommutationEvent_IT to HAL_TIMEx_ConfigCommutEvent_IT
    - Rename HAL_TIMEx_ConfigCommutationEvent_DMA to HAL_TIMEx_ConfigCommutEvent_DMA
    - Rename HAL_TIMEx_CommutationCallback to HAL_TIMEx_CommutCallback
    - Rename HAL_TIMEx_DMACommutationCplt to TIMEx_DMACommutationCplt
  - Add a call to HAL_DMA_Abort_IT from HAL_TIM_XXX_Stop_DMA
- HAL/LL USB update
  - Rework USB interrupt handler and improve HS DMA support in Device mode
  - Fix BCD handling of OTG instance in device mode
  - cleanup reference to low speed in device mode
  - Allow writing TX FIFO when transfer length is equal to available space in the TX FIFO
  - Fix Toggle OUT interrupt channel in host mode
  - Add new callback to be used to handle the usb device connection/disconnection
    - HAL_HCD_PortEnabled_Callback()
    - HAL_HCD_PortDisabled_Callback()
  - Update to prevent reactivate host interrupt channel
  - Updated USB_WritePacket(), USB_ReadPacket()APIs to prevent compilation warning with GCC GNU v8.2.0
  - Rework USB_EPStartXfer() API to enable theUSB endpoint before unmasking the TX FiFo empty interrupt in case DMA is not used
  - Update USB HAL_HCD_Init() and HAL_PCD_Init() APIs to avoid enabling USB DMA feature for OTG FS instance, USB DMAfeature is available only on OTG HS Instance
  - Remove duplicated line in hal_hcd.c header file comment section
  - Rework USB HAL driver to use instancePCD_SPEED_xxx, HCD_SPEED_xx instead of OTG register Core speed definition during the instance initialization
  - Software Quality improvement with a fix of CodeSonar warnings on PCD_Port_IRQHandler() and HCD_Port_IRQHandler()interrupt handlers

V1.1.3 / 09-October-2018

## Main Changes

- Maintenance release to fix known defects and enhancements implementation
- Generic drivers changes
- Some global variables on stm32xxx_hal.c updated to be declared as extern
- HAL drivers changes
- The following changes done on the HAL drivers require an update on the application code based on older HAL versions
  - Rework of HAL CAN driver (compatibility break)
    - A new HAL CAN driver has been redesigned with new APIs, to bypass limitations on CAN Tx/Rx FIFO management present with previous HAL CAN driver version.
    - The new HAL CAN driver is the recommended version. It is located as usual in Drivers/STM32F1xx_HAL_Driver/Src and Drivers/STM32f1xx_HAL_Driver/Inc folders. It can be enabled through switch HAL_CAN_MODULE_ENABLED in stm32f1xx_hal_conf.h
    - The legacy HAL CAN driver is also present in the release in Drivers/STM32F1xx_HAL_Driver/Src/Legacy and Drivers/STM32F1xx_HAL_Driver/Inc/Legacy folders for software compatibility reasons. Its usage is not recommended as deprecated. It can however be enabled through switch HAL_CAN_LEGACY_MODULE_ENABLED in stm32f1xx_hal_conf.h
- HAL update
  - Add definiton of HAL_CAN_LEGACY_MODULE_ENABLED swith in stm32f1xx_hal_conf_template.h
- HAL CAN update
  - Fields of CAN_InitTypeDef structure are reworked:
    - SJW to SyncJumpWidth, BS1 to TimeSeg1, BS2 to TimeSeg2, TTCM to TimeTriggeredMode, ABOM to AutoBusOff, AWUM to AutoWakeUp, NART to AutoRetransmission (inversed), RFLM to ReceiveFifoLocked and TXFP to TransmitFifoPriority
  - HAL_CAN_Init() is split into both HAL_CAN_Init() and HAL_CAN_Start() API’s
  - HAL_CAN_Transmit() is replaced by HAL_CAN_AddTxMessage() to place Tx Request, then HAL_CAN_GetTxMailboxesFreeLevel() for polling until completion.
  - HAL_CAN_Transmit_IT() is replaced by HAL_CAN_ActivateNotification() to enable transmit IT, then HAL_CAN_AddTxMessage() for place Tx request.
  - HAL_CAN_Receive() is replaced by HAL_CAN_GetRxFifoFillLevel() for polling until reception, then HAL_CAN_GetRxMessage()
  - to get Rx message.
  - HAL_CAN_Receive_IT() is replaced by HAL_CAN_ActivateNotification() to enable receive IT, then HAL_CAN_GetRxMessage()
  - in the receivecallback to get Rx message
  - HAL_CAN_Slepp() is renamed as HAL_CAN_RequestSleep()
  - HAL_CAN_TxCpltCallback() is split into HAL_CAN_TxMailbox0CompleteCallback(), HAL_CAN_TxMailbox1CompleteCallback() and HAL_CAN_TxMailbox2CompleteCallback().
  - HAL_CAN_RxCpltCallback is split into HAL_CAN_RxFifo0MsgPendingCallback() and HAL_CAN_RxFifo1MsgPendingCallback().
  - More complete “How to use the new driver” is detailed in the driver header section itself.

V1.1.2 / 09-March-2018

## Main Changes

- General updates to fix known defects and enhancements implementation
- Remove Date and version from header files
- HAL Generic update
  - stm32f1xx_hal_def.h file changes:
    - Update UNUSED() macro implementation to avoid GCC warning
      - The warning is detected when the UNUSED() macro is called from C++ file
    - Update __weak and __packed defined values for ARM compiler
    - Update __ALIGN_BEGIN and __ALIGN_END defined values for ARM compiler
    - Update to make RAMFUNC define as generic type instead of HAL_StatusTypdef type
- stm32f1xx_hal.c/.h file changes:
  - Update HAL driver to allow user to change systick period to 1ms, 10 ms or 100 ms:
    - Add the following APIs:
      - HAL_GetTickPrio(): Returns a tick priority
      - HAL_SetTickFreq(): Sets new tick frequency
      - HAL_GetTickFreq(): Returns tick frequency
  - Add HAL_TickFreqTypeDef enumeration for the different Tick Frequencies: 10 Hz, 100 Hz and 1KHz (default)
- stm32f1xx_hal_conf_template.h file changes:
  - Fix wrong defined value of LSI
- HAL GPIO update
  - Rework AFIO remap macros to avoid issue with Read-modify-write sequence on AFIO_MAPR register
- HAL I2C update
  - Fix wrong check of data size in HAL_I2C_Slave Receive() API
  - Add a check on the minimum allowed PCLK1 frequency in HAL_I2C_Init() API
  - Fix I2C_SPEED_FAST() and I2C_SPEED_STANDARD() speed calculation macros to not let I2C SCL to go beyond 400KHz in some conditions
- HAL RCC update
  - Update HAL_RCC_DeInit() and LL_RCC_DeInit() APIs to
    - Be able to return HAL/LL status
    - Add checks for HSI, PLL and PLLI2S ready before modifying RCC CFGR registers
    - Clear all interrupt flags
    - Initialize systick interrupt period
  - Update HAL_RCC_GetSysClockFreq() to avoid risk of rounding error which may leads to a wrong returned value.
- HAL SMARTCARD update
  - Update data processing in HAL smartcard transmit/receive processes(Polling/IT) to fix memory corruption issue.
- LL GPIO update
  - Fix wrong management of GPIO pin position in LL_GPIO_Init() API when configuring GPIOx_CRH register
  - Fix wrong check conditions on GPIO mode in LL_GPIO_Init() API
- LL I2C update
  - Rename IS_I2C_CLOCK_SPEED() and IS_I2C_DUTY_CYCLE() respectively to IS_LL_I2C_CLOCK_SPEED() and IS_LL_I2C_DUTY_CYCLE() to avoid incompatible macros redefinition.
- LL RCC update
  - Add LL_RCC_PLL_SetMainSource() macro to configure PLL main clock source

V1.1.1 / 12-May-2017

## Main Changes

- General updates to fix known defects and enhancements implementation
- HAL Generic update
  - stm32f1xx_hal_conf_template.h fix typo: update to refer to stm32f1xx_hal_mmc.h instead of stm32f4xx_hal_mmc.h
- LL SYSTEM update
  - LL_DBGMCU_APB1_GRP1_I2C1_STOP and LL_DBGMCU_APB1_GRP1_I2C2_STOP literals are retarget to an available literals
  - LL_DBGMCU_APB1_GRP1_RTC_STOP literal is not available for all STM32F1 devices
- HAL MMC update
  - Add missing () to fix compilation warning detected with SW4STM32 when extra feature is enabled.
- HAL I2C update
  - Update HAL I2C processes to manage correctly the I2C state to allow the possibility to call HAL_I2C_Master_Sequential_Receive_IT() followed by a call HAL_I2C_Master_Sequential_Transmit_IT()

V1.1.0 / 14-April-2017

## Main Changes

- Add Low Layer drivers allowing performance and footprint optimization
  - Low Layer drivers APIs provide register level programming: require deep knowledge of peripherals described in STM32F1xx Reference Manuals
  - Low Layer drivers are available for: ADC, Cortex, CRC, DAC, DMA, EXTI, GPIO, I2C, IWDG, PWR, RCC, RTC, SPI, TIM, USART, WWDG peripherals and additionnal Low Level Bus, System and Utilities APIs.
  - Low Layer drivers APIs are implemented as static inline function in new Inc/stm32f1xx_ll_ppp.h files for PPP peripherals, there is no configuration file and each stm32f1xx_ll_ppp.h file must be included in user code.
- Add new HAL MMC driver
- General updates to fix known defects and enhancements implementation
- Enhance HAL delay and time base implementation:
  - Add new drivers stm32f1xx_hal_timebase_rtc_alarm_template.c and stm32f1xx_hal_timebase_tim_template.c which override the native HAL time base functions (defined as weak) to either use the RTC/TIM as time base tick source. For more details about the usage of these drivers, please refer to HAL_TimeBase_RTC and HAL_TimeBase_TIM examples and FreeRTOS-based applications
- Fix extra warnings with GCC compiler
- HAL drivers clean up: update ‘uint32_t’ cast with ‘U’
- Update to used the new defined Bit_Pos CMSIS defines insetad of POSITION_VAL() macro
- Update HAL weak empty callbacks to prevent unused argument compilation warnings with some compilers by calling the following line:
  - UNUSED(hppp);
- STM32Fxxx_User_Manual.chm files regenerated for HAL V1.1.0
- The following changes done on the HAL drivers require an update on the application code based on older HAL versions
  - HAL UART, USART, IRDA, SMARTCARD, SPI, I2C (referenced as PPP here below) drivers
    - Add PPP error management during DMA process. This requires the following updates on user application:
      - Configure and enable the PPP IRQ in HAL_PPP_MspInit() function
      - In stm32f1xx_it.c file, PPP_IRQHandler() function: add a call to HAL_PPP_IRQHandler() function
      - Add customize the Error Callback API: HAL_PPP_ErrorCallback()
  - HAL SD driver:
    - Overall rework of the driver for a more efficient implementation
      - Modify initialization API and structures
      - Modify Read / Write sequences: separate transfer process and SD Cards state management
      - Adding interrupt mode for Read / Write operations
      - Update the HAL_SD_IRQHandler function by optimizing the management of interrupt errors
    - Refer to the following example to identify the changes: BSP example and USB_Device/MSC_Standalone application
  - HAL NAND driver:
    - Modify NAND_AddressTypeDef, NAND_DeviceConfigTypeDef and NAND_HandleTypeDef structures fields
    - Add new HAL_NAND_ConfigDevice API
  - HAL CEC driver: Overall driver rework with compatibility break versus previous HAL version
    - Remove HAL CEC polling Process functions: HAL_CEC_Transmit() and HAL_CEC_Receive()
    - Remove HAL CEC receive interrupt process function HAL_CEC_Receive_IT() and enable the “receive” mode during the Init phase
    - Rename HAL_CEC_GetReceivedFrameSize() funtion to HAL_CEC_GetLastReceivedFrameSize()
    - Add new HAL APIs: HAL_CEC_SetDeviceAddress() and HAL_CEC_ChangeRxBuffer()
    - Remove the ‘InitiatorAddress’ field from the CEC_InitTypeDef structure and manage it as a parameter in the HAL_CEC_Transmit_IT() function
    - Add new parameter ‘RxFrameSize’ in HAL_CEC_RxCpltCallback() function
    - Move CEC Rx buffer pointer from CEC_HandleTypeDef structure to CEC_InitTypeDef structure
  - HAL IWDG driver: rework overall driver for better implementation
    - Remove HAL_IWDG_Start(), HAL_IWDG_MspInit() and HAL_IWDG_GetState() APIs
  - HAL WWDG driver: rework overall driver for better implementation
    - Remove HAL_WWDG_Start(), HAL_WWDG_Start_IT(), HAL_WWDG_MspDeInit() and HAL_WWDG_GetState() APIs
    - Update the HAL_WWDG_Refresh(WWDG_HandleTypeDef *hwwdg, uint32_t counter) function and API by removing the “counter” parameter
- HAL GENERIC update
  - Modifiy default HAL_Delay implementation to guarantee minimum delay
  - stm32f1xx_hal_conf_template.h
    - Add new define LSI_VALUE
    - Add new define USE_SPI_CRC for code cleanup when the CRC calculation is disabled.
- HAL CORTEX update
  - Move HAL_MPU_Disable() and HAL_MPU_Enable() from stm32f4xx_hal_cortex.h to stm32f4xx_hal_cortex.c
  - Clear the whole MPU control register in HAL_MPU_Disable() API
- HAL FLASH update
  - HAL_FLASH_OB_Launch(): fix static code analyzer warning: The removed code will not execute under any circumstances
- HAL GPIO update
  - Update IS_GPIO_PIN() macro implementation to be more safe
  - Update remap macros implementation to use CLEAR_BIT()/SET_BIT() macros instead of MODIFY_REG() macro.
- HAL RCC update
  - Update LSI workaround delay to use CPU cycles instead of systick
  - Move LSI_VALUE define from RCC HAL driver to stm32f1xx_hal_conf.h file
  - Adjust defined PLL MUL values in aPLLMULFactorTable[]
- HAL ADC update
  - HAL_ADCEx_MultiModeStart_DMA() and HAL_ADCEx_MultiModeStop_DMA() API’s update to fix code static analyzer warning: Redundant Condition / Unreachable Computation
- HAL DMA update
  - HAL_DMA_Init(): update to check compatibility between FIFO threshold level and size of the memory burst
  - Global driver code optimization to reduce memory footprint
  - New APIs HAL_DMA_RegisterCallback() and HAL_DMA_UnRegisterCallback() to register/unregister the different possible callbacks identified by enum typedef HAL_DMA_CallbackIDTypeDef
  - Add new Error Codes: HAL_DMA_ERROR_NO_XFER and HAL_DMA_ERROR_NOT_SUPPORTED
- HAL USART update
  - Add Transfer abort functions and callbacks
  - DMA Receive process; the code has been updated to clear the USART OVR flag before enabling DMA receive request.
  - Update HAL_USART_IRQHandler() to add a check on interrupt source before managing the error
- HAL UART update
  - Several update on HAL UART driver to implement the new UART state machine:
    - Add new field in UART_HandleTypeDef structure: “rxState”, UART state information related to Rx Operations
    - Rename “state” field in UART_HandleTypeDef structure by “gstate”: UART state information related to global Handle management and Tx Operations
    - Update UART process to manage the new UART states.
    - Update __HAL_UART_RESET_HANDLE_STATE() macro to handle the new UART state parameters (gState, rxState)
  - Add Transfer abort functions and callbacks
  - Update HAL_UART_IRQHandler() to add a check on interrupt source before managing the error
  - DMA Receive process; the code has been updated to clear the USART OVR flag before enabling DMA receive request.
- HAL IRDA update
  - Several update on HAL IRDA driver to implement the new UART state machine:
    - Add new field in IRDA_HandleTypeDef structure: “rxState”, IRDA state information related to Rx Operations
    - Rename “state” field in UART_HandleTypeDef structure by “gstate”: IRDA state information related to global Handle management and Tx Operations
    - Update IRDA process to manage the new UART states.
    - Update __HAL_IRDA_RESET_HANDLE_STATE() macro to handle the new IRDA state parameters (gState, rxState)
  - Removal of IRDA_TIMEOUT_VALUE define
  - Add Transfer abort functions and callbacks
  - Update HAL_IRDA_IRQHandler() to add a check on interrupt source before managing the error
  - DMA Receive process; the code has been updated to clear the USART OVR flag before enabling DMA receive request.
- HAL SMARTCARD update
  - Several update on HAL SMARTCARD driver to implement the new UART state machine:
    - Add new field in SMARTCARD_HandleTypeDef structure: “rxState”, SMARTCARDstate information related to Rx Operations
    - Rename “state” field in UART_HandleTypeDef structure by “gstate”: SMARTCARDstate information related to global Handle management and Tx Operations
    - Update SMARTCARD process to manage the new UART states.
    - Update __HAL_SMARTCARD_RESET_HANDLE_STATE() macro to handle the new SMARTCARD state parameters (gState, rxState)
  - Add Transfer abort functions and callbacks
  - Update HAL_SMARTCARD_IRQHandler() to add a check on interrupt source before managing the error
  - DMA Receive process; the code has been updated to clear the USART OVR flag before enabling DMA receive request.
- HAL CAN update
  - Add management of overrun error.
  - Allow possibility to receive messages from the 2 RX FIFOs in parallel via interrupt.
  - Fix message lost issue with specific sequence of transmit requests.
  - Handle transmission failure with error callback, when NART is enabled.
  - Add __HAL_CAN_CANCEL_TRANSMIT() call to abort transmission when timeout is reached
- HAL TIM update
  - Add __HAL_TIM_MOE_DISABLE_UNCONDITIONALLY() macro to disable Master output without check on TIM channel state.
  - Update HAL_TIMEx_ConfigBreakDeadTime() to fix TIM BDTR register corruption.
  - Update Input Capture polarity by removing non-supported “TIM_INPUTCHANNELPOLARITY_BOTHEDGE” define.
  - Update HAL_TIM_ConfigOCrefClear() API by removing the usage of non-existant SMCR OCCS bit.
  - Add “AutoReloadPreload” field to TIM_Base_InitTypeDef structure and corresponding macros __HAL_TIM_ENABLE_OCxPRELOAD() and __HAL_TIM_DISABLE_OCxPRELOAD() .
  - Update TIM_Base_SetConfig() API to set the auto-reload preload.
- HAL I2C update
  - Update HAL_I2C_Master_Transmit() and HAL_I2C_Slave_Transmit() to avoid sending extra bytes at the end of the transmit processes
  - Update HAL_I2C_Mem_Read() API to fix wrong check on misused parameter “Size”
  - Update I2C_MasterReceive_RXNE() and I2C_MasterReceive_BTF() static APIs to enhance Master sequential reception process.
- HAL SPI update
  - Major Update to improve performance in polling/interrupt mode to reach max frequency:
    - Polling mode :
      - Replace use of SPI_WaitOnFlagUnitTimeout() funnction by “if” statement to check on RXNE/TXE flage while transferring data.
      - Use API data pointer instead of SPI handle data pointer.
    - Use a Goto implementation instead of “if..else” statements
    - Interrupt mode
      - Minimize access on SPI registers.
      - Split the SPI modes into dedicated static functions to minimize checking statements under HAL_IRQHandler():
        - 1lines/2lines modes
        - 8 bit/ 16 bits data formats
        - CRC calculation enabled/disabled.
    - Remove waiting loop under ISR when closing the communication.
    - All modes:
      - Adding switch USE_SPI_CRC to minimize number of statements when CRC calculation is disabled.
      - Update Timeout management to check on global process.
      - Update Error code management in all processes.
  - Add note to the max frequencies reached in all modes.
  - Add note about Master Receive mode restrictions :
  - Master Receive mode restriction:
    - 1. In Master unidirectional receive-only mode (MSTR =1, BIDIMODE=0, RXONLY=0) or
    - bidirectional receive mode (MSTR=1, BIDIMODE=1, BIDIOE=0), to ensure that the SPI
  - does not initiate a new transfer the following procedure has to be respected:
    - (##) HAL_SPI_DeInit()
    - (##) HAL_SPI_Init()
  - Add transfer abort APIs and associated callbacks in interrupt mode
    - HAL_SPI_Abort()
    - HAL_SPI_Abort_IT()
    - HAL_SPI_AbortCpltCallback()
- HAL CEC update
  - Overall driver rework with break of compatibility with HAL V1.0.5
    - Remove the HAL CEC polling Process: HAL_CEC_Transmit() and HAL_CEC_Receive()
    - Remove the HAL CEC receive interrupt process (HAL_CEC_Receive_IT()) and manage the “Receive” mode enable within the Init phase
    - Rename HAL_CEC_GetReceivedFrameSize() function to HAL_CEC_GetLastReceivedFrameSize() function
    - Add new HAL APIs: HAL_CEC_SetDeviceAddress() and HAL_CEC_ChangeRxBuffer()
    - Remove the ‘InitiatorAddress’ field from the CEC_InitTypeDef structure and manage it as a parameter in the HAL_CEC_Transmit_IT() function
    - Add new parameter ‘RxFrameSize’ in HAL_CEC_RxCpltCallback() function
    - Move CEC Rx buffer pointer from CEC_HandleTypeDef structure to CEC_InitTypeDef structure
  - Update driver to implement the new CEC state machine:
    - Add new “rxState” field in CEC_HandleTypeDef structure to provide the CEC state information related to Rx Operations
    - Rename “state” field in CEC_HandleTypeDef structure to “gstate”: CEC state information related to global Handle management and Tx Operations
    - Update CEC process to manage the new CEC states.
    - Update __HAL_CEC_RESET_HANDLE_STATE() macro to handle the new CEC state parameters (gState, rxState)
- HAL I2S update
  - Update I2S Transmit/Receive polling process to manage Overrun and Underrun errors
  - HAL I2S driver ovall clean-up and optimization
  - HAL_I2S_Init() API updated to
    - Fix wrong I2S clock calculation when PCM mode is used.
    - Return state HAL_I2S_ERROR_PRESCALER when the I2S clock is wrongly configured
- HAL NAND update
  - Modify NAND_AddressTypeDef, NAND_DeviceConfigTypeDef and NAND_HandleTypeDef structures fields
  - Add new HAL_NAND_ConfigDevice API
- HAL USB PCD update
  - Flush all TX FIFOs on USB Reset
  - Remove Lock mechanism from HAL_PCD_EP_Transmit() and HAL_PCD_EP_Receive() API’s
- LL USB update
  - Enable DMA Burst mode for USB OTG HS
  - Fix SD card detection issue
- LL SDMMC update
  - Add new SDMMC_CmdSDEraseStartAdd, SDMMC_CmdSDEraseEndAdd, SDMMC_CmdOpCondition and SDMMC_CmdSwitch functions

V1.0.5 / 06-December-2016

## Main Changes

- General updates to fix mainly known I2C defects and enhancements implementation
- The following changes done on the HAL drivers require an update on the application code based on HAL V1.0.4
  - HAL I2C driver:
  - Add I2C error management during DMA process. This requires the following updates on user application:
    - Configure and enable the I2C IRQ in HAL_I2C_MspInit() function
    - In stm32f1xx_it.c file, I2C _IRQHandler() function: add a call to HAL_I2C_IRQHandler() function
    - Add and customize the Error Callback API: HAL_I2C_ErrorCallback()
  - Update to avoid waiting on STOPF/BTF/AF flag under DMA ISR by using the I2C end of transfer interrupt in the DMA transfer process. This requires the following updates on user application:
  - Configure and enable the I2C IRQ in HAL_I2C_MspInit() function
  - In stm32f1xx_it.c file, I2C_IRQHandler() function: add a call to HAL_I2C_IRQHandler() function
  - I2C transfer processes IT update: NACK during addressing phase is managed through I2C Error interrupt instead of HAL state
- HAL I2C update
  - Add support of I2C repeated start feature:
  - With the following new API’s
    - HAL_I2C_Master_Sequential_Transmit_IT()
    - HAL_I2C_Master_Sequential_Receive_IT()
    - HAL_I2C_Master_Abort_IT()
    - HAL_I2C_Slave_Sequential_Transmit_IT()
    - HAL_I2C_Slave_Sequential_Receive_IT()
    - HAL_I2C_EnableListen_IT()
    - HAL_I2C_DisableListen_IT()
  - Add new user callbacks:
    - HAL_I2C_ListenCpltCallback()
    - HAL_I2C_AddrCallback()
  - IRQ handler optimization: read registers status only once
  - I2C addressing phase is updated to be managed using interrupt instead of polling
    - Add new static functions to manage I2C SB, ADDR and ADD10 flags
  - I2C IT transfer processes update: NACK during addressing phase is managed through I2C Error interrupt instead of HAL state
  - Update to generate STOP condition when a acknowledge failure error is detected
  - Update I2C_WaitOnFlagUntilTimeout() to manage the NACK feature.
  - Update I2C transmission process to support the case data size equal 0
  - Update Polling management:
    - The Timeout value must be estimated for the overall process duration: the Timeout measurement is cumulative
  - Add the management of Abort service: Abort DMA transfer through interrupt
    - In the case of Master Abort IT transfer usage:
      - Add new user HAL_I2C_AbortCpltCallback() to inform user of the end of abort process
      - A new abort state is defined in the HAL_I2C_StateTypeDef structure
  - Add the management of I2C peripheral errors, ACK failure and STOP condition detection during DMA process. This requires the following updates on user application:
    - Configure and enable the I2C IRQ in HAL_I2C_MspInit() function
    - In stm32f1xx_it.c file, I2C_IRQHandler() function: add a call to HAL_I2C_IRQHandler() function
    - Add and customize the Error Callback API: HAL_I2C_ErrorCallback()
  - Update to avoid waiting on STOPF/BTF/AF flag under DMA ISR by using the I2C end of transfer interrupt in the DMA transfer process. This requires the following updates on user application:
    - Configure and enable the I2C IRQ in HAL_I2C_MspInit() function
    - In stm32f1xx_it.c file, I2C_IRQHandler() function: add a call to HAL_I2C_IRQHandler() function
  - Add a check if the I2C is already enabled at start of all I2C API’s.
  - Update I2C API’s (Polling, IT, DMA interfaces) to use hi2c->XferSize and hi2c->XferCount instead of size
  - parameter to help user to get information of counter in case of error
- HAL DMA update
  - Add new API HAL_DMA_Abort_IT() to abort DMA transfer under interrupt context
    - The new registered Abort callback is called when DMA transfer abortion is completed
- HAL ETH update
  - Remove ETH MAC debug register defines
- HAL DAC update
  - Clean up: remove the following literals that aren’t used
    - DAC_WAVE_NOISE
    - DAC_WAVE_TRIANGLE

V1.0.4 / 29-April-2016

## Main Changes

- General updates to fix known defects and enhancements implementation.
- HAL RCC
  - Add suffix U for defines equals to 0xFFFFFFFF (fix MISRA error 10.6)
  - Optimization of HAL_RCC_ClockConfig().
  - Replace aAPBAHBPrescTable by APBPrescTable and AHBPrescTable defined inside system_stm32f1xx.c.
  - When using HAL_RCC_OscConfig to activate LSE, if LSE is already ON, it remains in its state ON. Previously, it was turned OFF then ON in all cases.
  - The backup domain is no more reset when changing the RTC clock source from reset value.
  - Correct strange behavior in HAL_RCCEx_PeriphCLKConfig.
- HAL UART
  - Correct the macro UART_BRR_SAMPLING16
- HAL SMARTCARD
  - Correct the macro SMARTCARD_BRR
- HAL IRDA
  - Correct the macro IRDA_BRR
  - EIE bit is no more activated in transmit (this bit only triggers errors in reception)
  - EIE bit is reset at the end of the reception.
- HAL DMA
  - Add macro __HAL_DMA_GET_COUNTER to get the number of remaining data units in the current channel.
- HAL FSMC
  - Adapt FSMC_NAND_Init behavior to the others STM32 series by reseting the bit FSMC_PCRx_PBKEN.

V1.0.3 / 11-January-2016

## Main Changes

- Remove the #if defined(USE_HAL_LEGACY) condition to include Legacy/stm32_hal_legacy.h by default, in stm32f1xx_hal_def.h.

V1.0.2 / 18-December-2015

## Main Changes

- General updates to fix known defects and enhancements implementation.
- HAL generic
  - Insure that do {} while(0) are used in in multi statement macros. (hal eth and pcd)
  - Manage simultaneous errors in IRQHandler. (hal uart, smartcard, usart and uart)
  - To ensure the full compatibility of the GPIO interfaces across all the STM32 families, the gpio speed definition have been renamed:
    - GPIO_SPEED_LOW to GPIO_SPEED_FREQ_LOW
    - GPIO_SPEED_MEDIUM to GPIO_SPEED_FREQ_MEDIUM
    - GPIO_SPEED_HIGH to GPIO_SPEED_FREQ_HIGH
    - aliases are created to keep backward compatibility
  - Reduce the default timeout value for the startup of the HSE form 5s to 100ms.
  - Update HAL weak empty callbacks to prevent unused argument compilation warnings with some compilers.
- HAL ADC
  - Remove useless state HAL_ADC_STATE_REG_OVR and HAL_ADC_STATE_REG_EOSMP.
  - Add an error case if init is done with both continuous and discontinuous modes.
  - HAL_ADC_PollForEvent returns HAL_TIMEOUT if a timeout occurs instead of HAL_ERROR.
  - Trigger the assert_param of the number of discontinuous conversion only if the discontinuous mode is enabled.
  - Enhance the check for ScanConvMode in HAL_ADC_Init.
- HAL CAN
  - Clear the ERRI bit in HAL_CAN_IRQHandler.
- HAL CORTEX
  - Remove the macro __HAL_CORTEX_SYSTICKCLK_CONFIG as duplicated by HAL_SYSTICK_CLKSourceConfig.
    - Create an alias to HAL_SYSTICK_CLKSourceConfig for backward compatibility.
- HAL FLASH
  - The parameter ReturnValue of HAL_FLASH_EndOfOperationCallback, in the case of Pages Erase, now take the value of 0xFFFFFFFF if all the selected pages have been erased.
  - Add a new interface HAL_FLASHEx_OBGetUserData to get the option byte user data.
- HAL GPIO
  - Remove a useless assert_param on the pull mode in HAL_GPIO_Init.
- HAL I2C
  - Correct issue at reception of 2 bytes using memory polling and IT interface.
  - Correct a wrong management of the AF flag.
- HAL RCC
  - Reduce the timeout of HSI, LSI and PLL to be closer to HW specifications:
    - HSI_TIMEOUT_VALUE reduced from 100ms to 2ms
    - LSI_TIMEOUT_VALUE reduced from 100ms to 2ms
    - PLL_TIMEOUT_VALUE reduced from 100ms to 2ms
- HAL SD
  - Correct wrong calculation of the capacity for High Capacity cards.
- HAL SPI
  - Remove incorrect reset of DMA parameter in HAL_SPI_Receive_DMA and HAL_SPI_Transmit_DMA.
- HAL TIM
  - Remove useless assert_param.
  - Rewrite the assert_param when setting clock source.
- HAL UART
  - Manage the case of reception of a character while the driver is not expecting one. This was causing a crash of the driver.
- LL USB
  - Remove the NoVbusSensing feature from driver. (feature not present on STM32F1xx)

V1.0.1 / 31-July-2015

## Main Changes

- General updates to fix known defects and enhancements implementation.
- HAL generic
  - stm32f1xx_hal_def.h
    - Update NULL definition to fix C++ compilation issue.
- HAL ADC
  - Optimization of macro __HAL_ADC_CLEAR_FLAG.
  - ADC poll for conversion now return error status in case of ADC-DMA mode.
  - ADC polling functions now return HAL_TIMEOUT (or HAL_ERROR in case of configuration error).
  - Removing field NbrOfConversionRank of ADC_HandleTypeDef. This field was useless on STM32F1xx.
  - Improving the ADC state machine.
- HAL CAN
  - Field Data of CanRxMsgTypeDef and CanTxMsgTypeDef is changed from uint32_t to uint8_t.
- HAL Cortex
  - Add MPU APIs in Cortex HAL driver.
- HAL CRC
  - Correcting a wrong definition of __HAL_CRC_SET_IDR macro.
- HAL DAC
  - HAL_IS_BIT_SET is nowused properly in HAL_DAC_Start.
  - Add 2 defines: DAC_WAVEGENERATION_NOISE and DAC_WAVEGENERATION_TRIANGLE.
  - HAL_DAC_Stop now disable DAC software conversion.
- HAL DMA
  - Minor typographic updates.
- HAL ETH
  - ETH_MAC_READCONTROLLER_FLUSHING: Removing a space in the middle of the name.
  - Removing some duplicated macros.
- HAL FLASH
  - FLASH_OB_GetRDP returns uint32_t instead of FlagStatus. (internal function). This permit a more coherent use for HAL_FLASHEx_OBGetConfig and HAL_FLASHEx_OBProgram.
  - Correct an issue making impossible to set Flash read protection level1 and level2.
  - The activation of backup domain in RCC is systematic.
- HAL I2C
  - Correct an issue depending of APB/I2C frequency which was preventing the STOP bit to be cleared.
    - The POS bit is now cleared at the beginning of each I2C API.
    - The POS bit is no more cleared near STOP generation.
- HAL I2S
  - HAL_I2S_Transmit() API is updated to keep the check on busy flag only for the slave.
- HAL NAND
  - Review __ARRAY_ADDRESS macro and adapt tests to detect bad blocks
- HAL RCC
  - In HAL_RCCEx_PeriphCLKConfig, Reset backup domain only if RTC clock source has been changed.
  - Update of HAL_RCC_OscConfig functionto correctly check LSEState.
  - Rework __HAL_RCC_LSE_CONFIG macro to manage correctly LSE_Bypass.
  - New HAL RCC macro to configure the SYSCLK clock source: __HAL_RCC_SYSCLK_CONFIG(RCC_SYSCLKSOURCE).
  - Adding macro: __HAL_RCC_MCO_CONFIG.
  - For some RPN, the prediv source management in HAL_RCC_OscConfig function was not used.
- HAL RTC
  - CMSIS mask definition used instead of hardcoded values.
- HAL SMARTCARD
  - Improve documentation
- HAL TIM
  - All STM32F101xx and STM32F102xx defines were missing in the file stm32f1xx_hal_tim_ex.h.
  - The assert on trigger polarity for TI1F_ED is removed.
- HAL USB
  - Correct issue preventing USB Device double-buffering mode for IN endpoints to correctly behave.
  - Correct a bad configuration of Turnaround Time.
  - Correct USB_FlushTxFifo function which was leading to a GRSTCTL register corruption.
  - Replaced the access to USB_OTG_HCCHAR_CHDIS and USB_OTG_HCCHAR_CHENA from a sequencial access to a simultaneous access.

V1.0.0 / 15-December-2014

## Main Changes

- First Official release of STM32F1xx HAL Drivers for all STM32F1 devices.
- This release is in line with STM32Cube Firmware specification Rev1.0 document