fix set_duty ptr write
This commit is contained in:
parent
aca7b86c7e
commit
0f322c1d4e
@ -438,6 +438,11 @@ impl<'d, T: Instance> SimplePwm<'d, T> {
|
|||||||
|
|
||||||
self.duty[channel] = duty & 0x7FFF;
|
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
|
// defensive before seqstart
|
||||||
compiler_fence(Ordering::SeqCst);
|
compiler_fence(Ordering::SeqCst);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user