diff --git a/libcpu/arm/stm32/serial.c b/libcpu/arm/stm32/serial.c index c5dbb0b24..41f8e74a9 100644 --- a/libcpu/arm/stm32/serial.c +++ b/libcpu/arm/stm32/serial.c @@ -107,7 +107,7 @@ static rt_err_t rt_serial_init (rt_device_t dev) rt_memset(uart->int_rx->rx_buffer, 0, sizeof(uart->int_rx->rx_buffer)); uart->int_rx->read_index = 0; - uart->int_rx->read_index = 0; + uart->int_rx->save_index = 0; } if (dev->flag & RT_DEVICE_FLAG_DMA_RX)