diff --git a/components/asic/serial.c b/components/asic/serial.c index 814f72cc..b18877fe 100644 --- a/components/asic/serial.c +++ b/components/asic/serial.c @@ -46,6 +46,10 @@ void SERIAL_init(void) void SERIAL_set_baud(int baud) { ESP_LOGI(TAG, "Changing UART baud to %i", baud); + + // Make sure that we are done writing before setting a new baudrate. + uart_wait_tx_done(UART_NUM_1, 1000 / portTICK_PERIOD_MS); + uart_set_baudrate(UART_NUM_1, baud); }