From dbd389a5a0440b6de128c7b097713cc4f64ffadd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E6=B0=B8?= <42107741+ynkan@users.noreply.github.com> Date: Wed, 26 Aug 2020 21:16:40 +0800 Subject: [PATCH] Update drv_hwtimer.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 抱歉,这里有个失误. --- bsp/stm32/libraries/HAL_Drivers/drv_hwtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_hwtimer.c b/bsp/stm32/libraries/HAL_Drivers/drv_hwtimer.c index e71c190c65..c344145c37 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_hwtimer.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_hwtimer.c @@ -314,7 +314,7 @@ static rt_err_t timer_ctrl(rt_hwtimer_t *timer, rt_uint32_t cmd, void *arg) #endif { #if !defined(SOC_SERIES_STM32F0) && !defined(SOC_SERIES_STM32G0) - val = (uint32_t)(HAL_RCC_GetPCLK2Freq() * pclk2_doubler / 10000) - 1; + val = HAL_RCC_GetPCLK2Freq() * pclk2_doubler / freq; #endif } else