程序再初始化时执行如下语句,就会进一次TIM3中断,但这是TIM3并没有开启。 TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure; /* Time Base configuration */ TIM_TimeBaseStructure.TIM_Period = 0xFFFF; TIM_TimeBaseStructure.TIM_Prescaler = 0x00; TIM_TimeBaseStructure.TIM_ClockDivision = TIM_CKD_DIV1; TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; TIM_TimeBaseInit(TIM3, &TIM_TimeBaseStructure); //下降沿计数值加1, TIM_ETRClockMode2Config(TIM3, TIM_ExtTRGPSC_OFF, TIM_ExtTRGPolarity_Inverted, 0); TIM_ITConfig(TIM3, TIM_IT_Update, ENABLE ); |