重写延时等待函数,解决与模块之间通信间隔有可能过短的问题
    修改硬件版本号时自动修改can波特率
This commit is contained in:
ranchuan
2023-11-13 17:34:05 +08:00
parent d0abeea58f
commit bff9b1b774
14 changed files with 112 additions and 19 deletions

View File

@@ -363,3 +363,15 @@ uint16_t GetCountTimerCnt()
return TIM2->CNT;
}
void TimerCount_Off(void)
{
TIM_Cmd(TIM2,DISABLE);
TIM2->CNT = 0;
TIM2->PSC = (uint32_t)7200-1;//10K 0.1ms
TIM2->EGR |= TIM_EventSource_Update;
TIM2->SR = 0;
}