stm32: Clear possible set flags after disabling DMA
This commit is contained in:
parent
59953b5b5e
commit
aae0431d31
@ -66,6 +66,11 @@ pub(crate) async unsafe fn do_transfer(
|
||||
w.set_en(false);
|
||||
});
|
||||
while ch.cr().read().en() {}
|
||||
|
||||
// Disabling the DMA mid transfer might cause some flags to be set, clear them all for the
|
||||
// next transfer
|
||||
dma.ifcr()
|
||||
.write(|w| w.set_gif(channel_number as usize, true));
|
||||
});
|
||||
|
||||
#[cfg(dmamux)]
|
||||
|
@ -67,6 +67,13 @@ pub(crate) async unsafe fn do_transfer(
|
||||
w.set_en(false);
|
||||
});
|
||||
while ch.cr().read().en() {}
|
||||
|
||||
// Disabling the DMA mid transfer might cause some flags to be set, clear them all for the
|
||||
// next transfer
|
||||
dma.ifcr(channel_number as usize / 4).write(|w| {
|
||||
w.set_tcif(channel_number as usize % 4, true);
|
||||
w.set_teif(channel_number as usize % 4, true);
|
||||
});
|
||||
});
|
||||
|
||||
#[cfg(dmamux)]
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 8702a3a3bb83a59515dab2cf9f75952fa6edae8a
|
||||
Subproject commit ce2e32b927a3637d975e780274b8e0c985f5d992
|
Loading…
Reference in New Issue
Block a user