Skip to content

Commit 14c280f

Browse files
committed
HardwareTimer: fix servo regression introduced by ARR preload enabled
PR: HardwareTimer: Allow setting preload enable bits stm32duino#900 introduced a regression in servo library.
1 parent 413c1ba commit 14c280f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: libraries/Servo/src/stm32/Servo.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ static void TimerServoInit()
8484
TimerServo.setPrescaleFactor(prescaler);
8585
TimerServo.setOverflow(REFRESH_INTERVAL); // thanks to prescaler Tick = microsec
8686
TimerServo.attachInterrupt(Servo_PeriodElapsedCallback);
87+
TimerServo.setPreloadEnable(false);
8788
TimerServo.resume();
8889
}
8990

0 commit comments

Comments
 (0)