Reset complete count global variable on Dma configure
This commit is contained in:
parent
195b1a593a
commit
72020fc012
@ -359,11 +359,13 @@ impl AnyChannel {
|
|||||||
match self.info().dma {
|
match self.info().dma {
|
||||||
#[cfg(dma)]
|
#[cfg(dma)]
|
||||||
DmaInfo::Dma(r) => {
|
DmaInfo::Dma(r) => {
|
||||||
|
let state: &ChannelState = &STATE[self.id as usize];
|
||||||
let ch = r.st(info.num);
|
let ch = r.st(info.num);
|
||||||
|
|
||||||
// "Preceding reads and writes cannot be moved past subsequent writes."
|
// "Preceding reads and writes cannot be moved past subsequent writes."
|
||||||
fence(Ordering::SeqCst);
|
fence(Ordering::SeqCst);
|
||||||
|
|
||||||
|
state.complete_count.store(0, Ordering::Release);
|
||||||
self.clear_irqs();
|
self.clear_irqs();
|
||||||
|
|
||||||
ch.par().write_value(peri_addr as u32);
|
ch.par().write_value(peri_addr as u32);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user