提交 6a1e12f1 编写于 作者: wuhanstudio's avatar wuhanstudio

[stm32][driver] pwm enable clock

上级 3b252d5b
......@@ -314,6 +314,9 @@ static rt_err_t stm32_hw_pwm_init(struct stm32_pwm *device)
tim = (TIM_HandleTypeDef *)&device->tim_handle;
/* enable timer clock */
HAL_TIM_PWM_MspInit(tim);
/* configure the timer to pwm mode */
tim->Init.Prescaler = 0;
tim->Init.CounterMode = TIM_COUNTERMODE_UP;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册