USART receiver error bits parity/framing/overrun/noise are supposed to be cleared by reading USART_DR register after detecting the error. Currently, the code returns before reading DR, so the error bits are never cleared; after a single overrun, the USART will forever refuse to read data.
USART receiver error bits parity/framing/overrun/noise are supposed to be cleared by reading USART_DR register after detecting the error. Currently, the code returns before reading DR, so the error bits are never cleared; after a single overrun, the USART will forever refuse to read data.
See:
https://github.com/japaric/stm32f103xx-hal/blob/897596f396441859003733a24d85ac7d2f4afce0/src/serial.rs#L181
The procedure for clearing error bits is on page 820 of the reference for STM32F103xx.