UART optimization