本帖最后由 totti.lu 于 2014-4-1 11:58 编辑
很奇怪,我使能了输入捕获1,2通道,中断发生时却是3,4通道标志位以及溢出标志位改变,有谁遇到过这种情况吗 C:\Documents and Settings\Administrator\桌面 TIM1_TimeBaseInit(0x0010, TIM1_CounterMode_Up, 0xffff, 0x00);
TIM1_PWMIConfig(TIM1_Channel_1, TIM1_ICPolarity_Rising,TIM1_ICSelection_DirectTI, TIM1_ICPSC_DIV1, 0x03);
TIM1_SelectInputTrigger(TIM1_TRGSelection_TI1FP1);//101:滤波后的定时器输入1(TI1FP1),
TIM1_SelectSlaveMode(TIM1_SlaveMode_Reset);//100:复位模式– 在选中的触发输入(TRGI)的上升沿时重新初始化计数器,并且产生一个更新寄存器的信号
TIM1_ITConfig(TIM1_IT_CC1, ENABLE);
TIM1_ITConfig(TIM1_IT_CC2, ENABLE);
TIM1_Cmd(ENABLE);
|