aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2025-06-30 00:19:47 +0200
committerDario Nieuwenhuis <[email protected]>2025-07-04 00:23:22 +0200
commit00b2567fbf6b264a77dbe63ca2424939957f3128 (patch)
tree352b3b08ea5a73da65ab67b46ecfa5f6afd6ec9f
parent72248a601a9ea28ac696f186e2cbe4c2f128a133 (diff)
stm32/dma: add missing fence on BDMA start.
-rw-r--r--embassy-stm32/src/dma/dma_bdma.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-stm32/src/dma/dma_bdma.rs b/embassy-stm32/src/dma/dma_bdma.rs
index 7dbbe7b72..caf135989 100644
--- a/embassy-stm32/src/dma/dma_bdma.rs
+++ b/embassy-stm32/src/dma/dma_bdma.rs
@@ -344,6 +344,9 @@ impl AnyChannel {
344 peripheral_size: WordSize, 344 peripheral_size: WordSize,
345 options: TransferOptions, 345 options: TransferOptions,
346 ) { 346 ) {
347 // "Preceding reads and writes cannot be moved past subsequent writes."
348 fence(Ordering::SeqCst);
349
347 let info = self.info(); 350 let info = self.info();
348 #[cfg(feature = "_dual-core")] 351 #[cfg(feature = "_dual-core")]
349 { 352 {
@@ -362,9 +365,6 @@ impl AnyChannel {
362 let state: &ChannelState = &STATE[self.id as usize]; 365 let state: &ChannelState = &STATE[self.id as usize];
363 let ch = r.st(info.num); 366 let ch = r.st(info.num);
364 367
365 // "Preceding reads and writes cannot be moved past subsequent writes."
366 fence(Ordering::SeqCst);
367
368 state.complete_count.store(0, Ordering::Release); 368 state.complete_count.store(0, Ordering::Release);
369 self.clear_irqs(); 369 self.clear_irqs();
370 370