|
@@ -374,7 +374,7 @@ static rt_err_t stm32_hw_pwm_init(struct stm32_pwm *device)
|
|
|
/* configure the timer to pwm mode */
|
|
|
tim->Init.Prescaler = 0;
|
|
|
tim->Init.CounterMode = TIM_COUNTERMODE_UP;
|
|
|
- tim->Init.Period = 0;
|
|
|
+ tim->Init.Period = 1;
|
|
|
tim->Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
|
|
#if defined(SOC_SERIES_STM32F1) || defined(SOC_SERIES_STM32L4)
|
|
|
tim->Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|