Skip to content

Commit 3b37c79

Browse files
committed
only clear idle flag
1 parent 17301c0 commit 3b37c79

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

embassy-stm32/src/usart/ringbuffered.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,9 @@ fn clear_idle_flag(r: Regs) -> Sr {
254254

255255
// This read also clears the error and idle interrupt flags on v1.
256256
unsafe { rdr(r).read_volatile() };
257-
clear_interrupt_flags(r, sr);
257+
let mut clear_idle = regs::Icr(0);
258+
clear_idle.set_idle(true);
259+
r.icr().write_value(clear_idle);
258260

259261
r.cr1().modify(|w| w.set_idleie(true));
260262

0 commit comments

Comments
 (0)