stm32/gpdma: clear all interrupts after reset.

Reset doesn't clear them, this causes subsequent transfers to instantly
complete because the TC flag was set from before.
This commit is contained in:
Dario Nieuwenhuis 2023-06-19 22:39:08 +02:00
parent 990dd5e5db
commit 428a4ba3f9

View File

@ -252,6 +252,7 @@ impl<'a, C: Channel> Transfer<'a, C> {
super::dmamux::configure_dmamux(&mut *this.channel, request); super::dmamux::configure_dmamux(&mut *this.channel, request);
ch.cr().write(|w| w.set_reset(true)); ch.cr().write(|w| w.set_reset(true));
ch.fcr().write(|w| w.0 = 0xFFFF_FFFF); // clear all irqs
ch.llr().write(|_| {}); // no linked list ch.llr().write(|_| {}); // no linked list
ch.tr1().write(|w| { ch.tr1().write(|w| {
w.set_sdw(data_size.into()); w.set_sdw(data_size.into());