提交 bda4b68a 编写于 作者: Z Zhaoxing Li

[bsp][stm32] Add HAL_TIM_Base_Init

上级 0fb6a822
......@@ -327,6 +327,12 @@ static rt_err_t stm32_hw_pwm_init(struct stm32_pwm *device)
tim->Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
#endif
if (HAL_TIM_Base_Init(tim) != HAL_OK)
{
LOG_E("%s pwm init failed", device->name);
result = -RT_ERROR;
goto __exit;
}
if (HAL_TIM_PWM_Init(tim) != HAL_OK)
{
LOG_E("%s pwm init failed", device->name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册