fix set_duty ptr write
This commit is contained in:
parent
aca7b86c7e
commit
0f322c1d4e
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue