Skip to content

Commit 085bf1b

Browse files
jr-ossSh3Rm4n
authored andcommitted
Check for valid uart data, even when isr indicates rx busy.
There could be a valid character available in rdr while the next character reception already started, e.g. with back-to-back characters..
1 parent d30018e commit 085bf1b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/serial.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -881,9 +881,7 @@ where
881881
{
882882
let isr = usart.isr.read();
883883

884-
Err(if isr.busy().bit_is_set() {
885-
nb::Error::WouldBlock
886-
} else if isr.pe().bit_is_set() {
884+
Err(if isr.pe().bit_is_set() {
887885
usart.icr.write(|w| w.pecf().clear());
888886
nb::Error::Other(Error::Parity)
889887
} else if isr.fe().bit_is_set() {

0 commit comments

Comments
 (0)