diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_hwtimer.c b/bsp/stm32/libraries/HAL_Drivers/drv_hwtimer.c index 24e91cd690935cf95efb15a3b149a268c10f5e06..52fa5c84faf49bd298adab4a02f864a0252055fa 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_hwtimer.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_hwtimer.c @@ -228,7 +228,7 @@ static rt_err_t timer_start(rt_hwtimer_t *timer, rt_uint32_t t, rt_hwtimer_mode_ tim = (TIM_HandleTypeDef *)timer->parent.user_data; /* set tim cnt */ - __HAL_TIM_SET_AUTORELOAD(tim, t); + __HAL_TIM_SET_AUTORELOAD(tim, t - 1); if (opmode == HWTIMER_MODE_ONESHOT) {