Skip to content

Commit 1bf6033

Browse files
committed
Update stm32_mcu.cpp
1 parent 73bc24b commit 1bf6033

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/drivers/hardware_specific/stm32/stm32_mcu.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,15 +713,15 @@ void* _configure8PWM(long pwm_frequency, float dead_zone)
713713
htim1.Instance = TIM1;
714714
htim1.Init.Prescaler = 0;
715715
htim1.Init.CounterMode = TIM_COUNTERMODE_UP;
716-
htim1.Init.Period = 255;
716+
htim1.Init.Period = 65536;
717717
htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
718718
htim1.Init.RepetitionCounter = 0;
719719
HAL_TIM_PWM_Init(&htim1);
720720

721721
htim8.Instance = TIM8;
722722
htim8.Init.Prescaler = 0;
723723
htim8.Init.CounterMode = TIM_COUNTERMODE_UP;
724-
htim8.Init.Period = 255;
724+
htim8.Init.Period = 65536;
725725
htim8.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
726726
htim8.Init.RepetitionCounter = 0;
727727
HAL_TIM_PWM_Init(&htim8);

0 commit comments

Comments
 (0)