diff --git a/Makefile b/Makefile index c6ccb2b20..fa5bed910 100644 --- a/Makefile +++ b/Makefile @@ -734,11 +734,7 @@ OPTIMIZE = -O0 LTO_FLAGS = $(OPTIMIZE) else OPTIMIZE = -Os -ifeq ($(TARGET),$(filter $(TARGET),$(F1_TARGETS))) LTO_FLAGS = -flto -fuse-linker-plugin $(OPTIMIZE) -else -LTO_FLAGS = -fuse-linker-plugin $(OPTIMIZE) -endif endif DEBUG_FLAGS = -ggdb3 -DDEBUG diff --git a/src/main/drivers/pwm_output_stm32f3xx.c b/src/main/drivers/pwm_output_stm32f3xx.c index e72e03234..0813b76fb 100644 --- a/src/main/drivers/pwm_output_stm32f3xx.c +++ b/src/main/drivers/pwm_output_stm32f3xx.c @@ -139,6 +139,7 @@ void pwmDigitalMotorHardwareConfig(const timerHardware_t *timerHardware, uint8_t TIM_TimeBaseStructure.TIM_Prescaler = (uint16_t)((SystemCoreClock / timerClockDivisor(timer) / hz) - 1); TIM_TimeBaseStructure.TIM_Period = MOTOR_BITLENGTH; TIM_TimeBaseStructure.TIM_ClockDivision = TIM_CKD_DIV1; + TIM_TimeBaseStructure.TIM_RepetitionCounter = 0; TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; TIM_TimeBaseInit(timer, &TIM_TimeBaseStructure); }