aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32/src/dma/bdma.rs5
-rw-r--r--embassy-stm32/src/dma/dma.rs7
m---------stm32-data0
3 files changed, 12 insertions, 0 deletions
diff --git a/embassy-stm32/src/dma/bdma.rs b/embassy-stm32/src/dma/bdma.rs
index 4c26a9501..5063ec2e7 100644
--- a/embassy-stm32/src/dma/bdma.rs
+++ b/embassy-stm32/src/dma/bdma.rs
@@ -66,6 +66,11 @@ pub(crate) async unsafe fn do_transfer(
66 w.set_en(false); 66 w.set_en(false);
67 }); 67 });
68 while ch.cr().read().en() {} 68 while ch.cr().read().en() {}
69
70 // Disabling the DMA mid transfer might cause some flags to be set, clear them all for the
71 // next transfer
72 dma.ifcr()
73 .write(|w| w.set_gif(channel_number as usize, true));
69 }); 74 });
70 75
71 #[cfg(dmamux)] 76 #[cfg(dmamux)]
diff --git a/embassy-stm32/src/dma/dma.rs b/embassy-stm32/src/dma/dma.rs
index 591279ef8..8634de205 100644
--- a/embassy-stm32/src/dma/dma.rs
+++ b/embassy-stm32/src/dma/dma.rs
@@ -67,6 +67,13 @@ pub(crate) async unsafe fn do_transfer(
67 w.set_en(false); 67 w.set_en(false);
68 }); 68 });
69 while ch.cr().read().en() {} 69 while ch.cr().read().en() {}
70
71 // Disabling the DMA mid transfer might cause some flags to be set, clear them all for the
72 // next transfer
73 dma.ifcr(channel_number as usize / 4).write(|w| {
74 w.set_tcif(channel_number as usize % 4, true);
75 w.set_teif(channel_number as usize % 4, true);
76 });
70 }); 77 });
71 78
72 #[cfg(dmamux)] 79 #[cfg(dmamux)]
diff --git a/stm32-data b/stm32-data
Subproject 8702a3a3bb83a59515dab2cf9f75952fa6edae8 Subproject ce2e32b927a3637d975e780274b8e0c985f5d99