Question
STM32F7 UART HAL Driver Bug
Posted on August 04, 2015 at 22:58
The STM32F7 HAL Driver (v1.1.0) has a bug in the __HAL_UART_CLEAR_IT macro:
Writing a bit to the ICR register clears the corresponding interrupt; however the __HAL_UART_CLEAR_IT writes the ones-complement:&sharpdefine __HAL_UART_CLEAR_IT(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = ~(__FLAG__))The corresponding USART macro is implemented correctly:&sharpdefine __HAL_USART_CLEAR_IT(__HANDLE__, __IT_CLEAR__) ((__HANDLE__)->Instance->ICR = (uint32_t)(__IT_CLEAR__))- Malcolm #stm32f7-hal-uart