diff options
| author | 林永 <[email protected]> | 2020-08-26 21:16:40 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-08-26 21:16:40 +0800 |
| commit | dbd389a5a0440b6de128c7b097713cc4f64ffadd (patch) | |
| tree | d2c952e0f7b79c5ab92f6cff14499b1a5242c3c3 /bsp/stm32 | |
| parent | 72f02203b0adc480f9776eb7533596bbd4ecbafc (diff) | |
Update drv_hwtimer.c
抱歉,这里有个失误.
Diffstat (limited to 'bsp/stm32')
| -rw-r--r-- | bsp/stm32/libraries/HAL_Drivers/drv_hwtimer.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
