Skip to content

Commit dbd389a

Browse files
authored
Update drv_hwtimer.c
抱歉,这里有个失误.
1 parent 72f0220 commit dbd389a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: bsp/stm32/libraries/HAL_Drivers/drv_hwtimer.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ static rt_err_t timer_ctrl(rt_hwtimer_t *timer, rt_uint32_t cmd, void *arg)
314314
#endif
315315
{
316316
#if !defined(SOC_SERIES_STM32F0) && !defined(SOC_SERIES_STM32G0)
317-
val = (uint32_t)(HAL_RCC_GetPCLK2Freq() * pclk2_doubler / 10000) - 1;
317+
val = HAL_RCC_GetPCLK2Freq() * pclk2_doubler / freq;
318318
#endif
319319
}
320320
else

0 commit comments

Comments
 (0)