aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32/src/usart/buffered.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/embassy-stm32/src/usart/buffered.rs b/embassy-stm32/src/usart/buffered.rs
index abc766bc7..c78752883 100644
--- a/embassy-stm32/src/usart/buffered.rs
+++ b/embassy-stm32/src/usart/buffered.rs
@@ -68,11 +68,16 @@ impl<T: BasicInstance> interrupt::typelevel::Handler<T::Interrupt> for Interrupt
68 // indicates that all bytes are pushed out from the FIFO. 68 // indicates that all bytes are pushed out from the FIFO.
69 // For other usart variants it shows that last byte from the buffer was just sent. 69 // For other usart variants it shows that last byte from the buffer was just sent.
70 if sr_val.tc() { 70 if sr_val.tc() {
71 // For others it is cleared above with `clear_interrupt_flags`.
72 #[cfg(any(usart_v1, usart_v2))]
73 sr(r).modify(|w| w.set_tc(false));
74
71 r.cr1().modify(|w| { 75 r.cr1().modify(|w| {
72 w.set_tcie(false); 76 w.set_tcie(false);
73 }); 77 });
78
74 state.tx_done.store(true, Ordering::Release); 79 state.tx_done.store(true, Ordering::Release);
75 state.rx_waker.wake(); 80 state.tx_waker.wake();
76 } 81 }
77 82
78 // TX 83 // TX