void
tiM3_Configuration(void)
{
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
TIM_ClearITPendingBit(TIM3,TIM_IT_Update);
TIM_TimeBaseStructure.TIM_Period =1000;
TIM_TimeBaseStructure.TIM_Prescaler =0; //72mhz
TIM_TimeBaseStructure.TIM_ClockDivision =0;
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
TIM_TimeBaseInit(TIM3,&TIM_TimeBaseStructure);
TIM_ITConfig(TIM3,TIM_IT_Update,ENABLE);
TIM_Cmd(TIM3,ENABLE);
}
请问如果我这样配置定时器的话,是不是每1/72000秒触发一次中断?
谢谢!
谢谢,但是我试过900,响应没问题,但是就是不知道是不是会漏掉
一周热门 更多>