cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F7 UART HAL Driver Bug

malcolm23
Associate III
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
1 REPLY 1
Posted on August 05, 2015 at 01:59

The [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/AllItems.aspx]STM32 Software Tools and Firmware forum page might be a better venue for these bugs.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..