diff options
| author | xoviat <[email protected]> | 2025-11-18 16:27:10 -0600 |
|---|---|---|
| committer | xoviat <[email protected]> | 2025-11-18 16:27:10 -0600 |
| commit | 4e808345883ae64099135a8384f774c44feccc5c (patch) | |
| tree | ea8fe0db698a4b3938feb5503565a46062ce44aa /embassy-stm32/src/usart | |
| parent | a72ba1e0571e6bef9c93c1d98b67724c685a37cc (diff) | |
fix: fix incorrect logic for buffered usart transmission complete.
Diffstat (limited to 'embassy-stm32/src/usart')
| -rw-r--r-- | embassy-stm32/src/usart/buffered.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-stm32/src/usart/buffered.rs b/embassy-stm32/src/usart/buffered.rs index 69c3a740f..26d2b8991 100644 --- a/embassy-stm32/src/usart/buffered.rs +++ b/embassy-stm32/src/usart/buffered.rs | |||
| @@ -87,7 +87,7 @@ unsafe fn on_interrupt(r: Regs, state: &'static State) { | |||
| 87 | // With `usart_v4` hardware FIFO is enabled and Transmission complete (TC) | 87 | // With `usart_v4` hardware FIFO is enabled and Transmission complete (TC) |
| 88 | // indicates that all bytes are pushed out from the FIFO. | 88 | // indicates that all bytes are pushed out from the FIFO. |
| 89 | // For other usart variants it shows that last byte from the buffer was just sent. | 89 | // For other usart variants it shows that last byte from the buffer was just sent. |
| 90 | if sr_val.tc() { | 90 | if sr_val.tc() && r.cr1().read().tcie() { |
| 91 | // For others it is cleared above with `clear_interrupt_flags`. | 91 | // For others it is cleared above with `clear_interrupt_flags`. |
| 92 | #[cfg(any(usart_v1, usart_v2))] | 92 | #[cfg(any(usart_v1, usart_v2))] |
| 93 | sr(r).modify(|w| w.set_tc(false)); | 93 | sr(r).modify(|w| w.set_tc(false)); |
