From fed9a00cd96c28d413f71b06c116e04c0647c9fc Mon Sep 17 00:00:00 2001 From: "quantum8023@126.com" Date: Wed, 18 Sep 2019 20:13:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4TIM=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E9=A1=BA=E5=BA=8F=EF=BC=8C=E8=A7=A3=E5=86=B3PWM?= =?UTF-8?q?=E6=97=A0=E8=BE=93=E5=87=BA=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= =?UTF-8?q?STM32=E9=9C=80=E8=A6=81=E5=85=88=E8=BF=9B=E8=A1=8CHAL=5FTIM=5FB?= =?UTF-8?q?ase=5FInit=E5=86=8D=E8=BF=9B=E8=A1=8CHAL=5FTIM=5FPWM=5FInit?= =?UTF-8?q?=EF=BC=8C=E5=90=A6=E5=88=99=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E8=BE=93=E5=87=BAPWM=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/stm32/libraries/HAL_Drivers/drv_pwm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_pwm.c b/bsp/stm32/libraries/HAL_Drivers/drv_pwm.c index ef89018eca..536092349c 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_pwm.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_pwm.c @@ -323,16 +323,16 @@ static rt_err_t stm32_hw_pwm_init(struct stm32_pwm *device) tim->Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; #endif - if (HAL_TIM_PWM_Init(tim) != HAL_OK) + if (HAL_TIM_Base_Init(tim) != HAL_OK) { - LOG_E("%s pwm init failed", device->name); + LOG_E("%s time base init failed", device->name); result = -RT_ERROR; goto __exit; } - if (HAL_TIM_Base_Init(tim) != HAL_OK) + if (HAL_TIM_PWM_Init(tim) != HAL_OK) { - LOG_E("%s time base init failed", device->name); + LOG_E("%s pwm init failed", device->name); result = -RT_ERROR; goto __exit; } -- Gitee