Fix DMA bug on F3 // enable flto again (Thanks to @ronlix for the find)

This commit is contained in:
borisbstyle 2016-11-03 23:40:34 +01:00
parent e2e44b28f5
commit 7100454a1d
2 changed files with 1 additions and 4 deletions

View File

@ -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

View File

@ -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);
}