stm32/dma: add missing fence on BDMA start.

This commit is contained in:
Dario Nieuwenhuis 2025-06-30 00:19:47 +02:00
parent 72248a601a
commit 00b2567fbf

View File

@ -344,6 +344,9 @@ impl AnyChannel {
peripheral_size: WordSize,
options: TransferOptions,
) {
// "Preceding reads and writes cannot be moved past subsequent writes."
fence(Ordering::SeqCst);
let info = self.info();
#[cfg(feature = "_dual-core")]
{
@ -362,9 +365,6 @@ impl AnyChannel {
let state: &ChannelState = &STATE[self.id as usize];
let ch = r.st(info.num);
// "Preceding reads and writes cannot be moved past subsequent writes."
fence(Ordering::SeqCst);
state.complete_count.store(0, Ordering::Release);
self.clear_irqs();