2023-09-26 08:10 PM
I have configured the STM32U575 UART baud rate to 115200. I tried to send the data from external utility tool with baud rate 9600, since the baud rate is wrong, there won't be any communication.
Now if try to change baudrate to 115200 then also communication is not established.
I have made some workaround to work in the above scenario.
Updated the HAL_UART_IRQHandler(UART_HandleTypeDef *huart) API from stm32u5xx_hal_uart.c
Updated Line:
if((HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) ||
((errorcode & (HAL_UART_ERROR_RTO | HAL_UART_ERROR_ORE)) != 0U))
changed to
if((HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) &&
((errorcode & (HAL_UART_ERROR_RTO | HAL_UART_ERROR_ORE)) != 0U))
Is above condition is correct?