AnsweredAssumed Answered

STM32F7 UART HAL Driver Bug

Question asked by nixon.malcolm on Aug 4, 2015
Latest reply on Aug 5, 2015 by Clive One
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:
#define __HAL_UART_CLEAR_IT(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = ~(__FLAG__))

The corresponding USART macro is implemented correctly:
#define __HAL_USART_CLEAR_IT(__HANDLE__, __IT_CLEAR__) ((__HANDLE__)->Instance->ICR = (uint32_t)(__IT_CLEAR__))

- Malcolm

Outcomes