It seems that HT can be filtered out by checking :if (huart->RxEventType != HAL_UART_RXEVENT_HT)void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size)
{
memcpy(tx_buf,received_data,Size);
if (huart->RxEventType != HAL_UART_RXEVEN...