fix set_duty ptr write

This commit is contained in:
Jacob Rosenthal 2021-11-12 08:55:20 -07:00
parent aca7b86c7e
commit 0f322c1d4e

View file

@ -438,6 +438,11 @@ impl<'d, T: Instance> SimplePwm<'d, T> {
self.duty[channel] = duty & 0x7FFF;
// reload ptr in case self was moved
r.seq0
.ptr
.write(|w| unsafe { w.bits((&self.duty).as_ptr() as u32) });
// defensive before seqstart
compiler_fence(Ordering::SeqCst);