Skip to content

Commit ea819af

Browse files
committed
🐞 fix(定时器): 修正中断计时错误
1 parent 9bb94ab commit ea819af

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/lib/timeout.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ void TIM4_IRQHandler(void)
4242
{
4343
if (TIM_GetITStatus(TIM4, TIM_IT_Update) != RESET) {
4444
TIM_ClearITPendingBit(TIM4, TIM_IT_Update);
45-
timerSet += TIM_GetCounter(TIM4);
46-
TIM_SetCounter(TIM4, 0);
45+
timerSet += 1;
46+
// TIM_SetCounter(TIM4, 0);
4747
}
4848
}
4949

0 commit comments

Comments
 (0)