diff --git a/embassy-rp/src/spi.rs b/embassy-rp/src/spi.rs index 19c9d07c..959ad9b0 100644 --- a/embassy-rp/src/spi.rs +++ b/embassy-rp/src/spi.rs @@ -142,10 +142,17 @@ impl<'d, T: Instance> Spi<'d, T> { let (presc, postdiv) = calc_prescs(freq); let p = self.inner.regs(); unsafe { + // disable + p.cr1().write(|w| w.set_sse(false)); + + // change stuff p.cpsr().write(|w| w.set_cpsdvsr(presc)); p.cr0().modify(|w| { w.set_scr(postdiv); }); + + // enable + p.cr1().write(|w| w.set_sse(true)); } } }