enable clock first
This commit is contained in:
@ -64,7 +64,7 @@ impl<'d, T: ComplementaryCaptureCompare16bitInstance> ComplementaryPwm<'d, T> {
|
||||
fn new_inner(tim: impl Peripheral<P = T> + 'd, freq: Hertz) -> Self {
|
||||
into_ref!(tim);
|
||||
|
||||
T::reset_and_enable();
|
||||
T::enable_and_reset();
|
||||
|
||||
let mut this = Self { inner: tim };
|
||||
|
||||
|
@ -55,7 +55,7 @@ impl<'d, T: CaptureCompare16bitInstance> Qei<'d, T> {
|
||||
fn new_inner(tim: impl Peripheral<P = T> + 'd) -> Self {
|
||||
into_ref!(tim);
|
||||
|
||||
T::reset_and_enable();
|
||||
T::enable_and_reset();
|
||||
|
||||
// Configure TxC1 and TxC2 as captures
|
||||
T::regs_gp16().ccmr_input(0).modify(|w| {
|
||||
|
@ -63,7 +63,7 @@ impl<'d, T: CaptureCompare16bitInstance> SimplePwm<'d, T> {
|
||||
fn new_inner(tim: impl Peripheral<P = T> + 'd, freq: Hertz) -> Self {
|
||||
into_ref!(tim);
|
||||
|
||||
T::reset_and_enable();
|
||||
T::enable_and_reset();
|
||||
|
||||
let mut this = Self { inner: tim };
|
||||
|
||||
|
Reference in New Issue
Block a user